-
Notifications
You must be signed in to change notification settings - Fork 40
Rewrite in functional style #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
79b6be6
chore: Update tooling and dev dependencies
spawnia 370b9b5
feat!: Use native ApolloOperation instead of our own Operation type
spawnia 036b746
feat!: Replace OperationBreadcrumb class with plain GraphQLBreadcrumb…
spawnia 0467c85
test: excludeGraphQLFetch should default to not assuming GraphQL when…
spawnia e1db20e
feat!: Restructure options and describe upgrade process
spawnia 0fa1482
refactor: Extract functions and simplify SentryLink.ts
spawnia c8b43c3
chore: Clarify peer dependencies
spawnia eeb21a5
release: v3.0.0
spawnia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['airbnb-typescript/base'], | ||
parserOptions: { | ||
project: 'tsconfig.eslint.json', | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'import'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
rules: { | ||
'no-console': [1, { allow: ['warn', 'error'] }], | ||
'import/prefer-default-export': 0, | ||
'lines-between-class-members': 0, | ||
} | ||
'import/imports-first': 'error', | ||
'import/newline-after-import': 'error', | ||
'import/order': [ | ||
'error', | ||
{ 'newlines-between': 'always', alphabetize: { order: 'asc' } }, | ||
], | ||
'import/prefer-default-export': 'off', | ||
}, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
# Directories | ||
/lib | ||
node_modules/ | ||
tests/coverage/ | ||
|
||
# Logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lib | ||
node_modules | ||
tests/coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"arrowParens": "always" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Upgrade guide | ||
|
||
This document provides guidance for upgrading between major versions of `apollo-link-sentry`. | ||
|
||
## v2 to v3 | ||
|
||
### Adapt your configuration | ||
|
||
The configuration of `SentryLink` has changed. | ||
|
||
```diff | ||
import { SentryLink } from 'apollo-link-sentry'; | ||
|
||
new SentryLink({ | ||
- filter: (operation) => ..., | ||
+ shouldHandleOperation: (operation) => ..., | ||
+ uri: 'https://example.com/graphql', | ||
setTransaction: true, | ||
setFingerprint: true, | ||
|
||
- breadcrumb: { | ||
- enable: true, | ||
+ attachBreadcrumbs: { | ||
includeQuery: false, | ||
includeVariables: false, | ||
- includeFetchResult: false, | ||
+ includeFetchResult: false, | ||
includeError: false, | ||
includeCache: false, | ||
- includeContext: ['example'], | ||
+ includeContext: ['example'], | ||
+ transform: (breadcrumb, operation) => ..., | ||
}, | ||
- beforeBreadcrumb: (breadcrumb) => ..., | ||
}) | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "apollo-link-sentry", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"license": "MIT", | ||
"author": "Diederik van den Burger <[email protected]>", | ||
"repository": "https://github.com/DiederikvandenB/apollo-link-sentry.git", | ||
|
@@ -22,6 +22,8 @@ | |
"build": "tsc", | ||
"test": "jest", | ||
"test:coverage": "jest --coverage --watchAll=false", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint --fix .", | ||
"prerelease": "yarn test && yarn build", | ||
"release": "standard-version", | ||
"deploy": "yarn publish --non-interactive" | ||
|
@@ -32,7 +34,8 @@ | |
}, | ||
"peerDependencies": { | ||
"@apollo/client": "^3.2.3", | ||
"@sentry/minimal": "^5.26.0", | ||
"@sentry/browser": "^6.0.4", | ||
"graphql": "^15.4.0", | ||
"zen-observable": "^0.8.15" | ||
}, | ||
"devDependencies": { | ||
|
@@ -41,23 +44,23 @@ | |
"@sentry/minimal": "^6.0.4", | ||
"@sentry/types": "^6.0.4", | ||
"@types/jest": "^26.0.14", | ||
"@typescript-eslint/eslint-plugin": "^3.1.0", | ||
"@typescript-eslint/parser": "^3.1.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-airbnb-base": "^14.1.0", | ||
"eslint-config-airbnb-typescript": "^7.2.1", | ||
"eslint-plugin-import": "^2.20.2", | ||
"@typescript-eslint/eslint-plugin": "^4.14.2", | ||
"@typescript-eslint/parser": "^4.14.2", | ||
"eslint": "^7.19.0", | ||
"eslint-config-prettier": "^7.2.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"graphql": "^15.4.0", | ||
"graphql-tag": "^2.10.3", | ||
"jest": "^26.5.3", | ||
"jest-spec-reporter": "^1.0.14", | ||
"prettier": "^2.2.1", | ||
"rimraf": "^3.0.2", | ||
"sentry-testkit": "^3.2.1", | ||
"standard-version": "^9.0.0", | ||
"ts-jest": "^26.4.1", | ||
"tsc-watch": "~4.2.9", | ||
"tslib": "^2.0.3", | ||
"typescript": "^4.0.3", | ||
"typescript": "^4.1.3", | ||
"zen-observable": "^0.8.15" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.