Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Do not remove integrations package... (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea authored Apr 22, 2024
1 parent 061c7ae commit 4959a75
Show file tree
Hide file tree
Showing 19 changed files with 979 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
rules: {
'@sentry-internal/sdk/no-nullish-coalescing': 'off',
'@sentry-internal/sdk/no-optional-chaining': 'off',
'@sentry-internal/sdk/no-unsupported-es6-methods': 'off',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0
- name: Install Dependencies
run: yarn install
run: pnpm install
- name: Prepare release
uses: getsentry/action-prepare-release@lms/write-config-branch
env:
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ You can run `npx @sentry/migr8 --help` to get a list of available options.

## Transformations

### Use functional integrations instead of integration classes

This updates usage of class-based integrations to the new, functional style. For example:

- `new BrowserTracing()``browserTracingIntegration()`
- `new Sentry.Replay()``Sentry.replayIntegration()`

### Replay Config v7>v8

This migrates deprecated replay configuration from v7 to v8. This includes:
Expand Down
16 changes: 16 additions & 0 deletions src/transformers/integrations/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import path from 'path';
import url from 'url';

import { runJscodeshift } from '../../utils/jscodeshift.js';

/**
* @type {import('types').Transformer}
*/
export default {
name: 'Use functional integrations instead of integration classes',
transform: async (files, options) => {
const transformPath = path.join(path.dirname(url.fileURLToPath(import.meta.url)), './transform.cjs');

await runJscodeshift(transformPath, files, options);
},
};
Loading

0 comments on commit 4959a75

Please sign in to comment.