@sentry/rollup-plugin 4.6.2 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/cjs/index.js +6 -20
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +7 -21
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -122,6 +122,7 @@ SENTRY_PROJECT=frontend-team-a,frontend-team-b,frontend-team-c
|
|
|
122
122
|
- [`reactComponentAnnotation`](#reactcomponentannotation)
|
|
123
123
|
- [`enabled`](#reactcomponentannotationenabled)
|
|
124
124
|
- [`ignoredComponents`](#reactcomponentannotationignoredcomponents)
|
|
125
|
+
- [`_experimentalInjectIntoHtml`](#reactcomponentannotation_experimentalinjectintohtml)
|
|
125
126
|
- [`moduleMetadata`](#modulemetadata)
|
|
126
127
|
- [`applicationKey`](#applicationkey)
|
|
127
128
|
- [`_experiments`](#_experiments)
|
|
@@ -662,6 +663,12 @@ Type: `string[]`
|
|
|
662
663
|
|
|
663
664
|
A list of strings representing the names of components to ignore. The plugin will not perform apply `data-sentry` annotations on the DOM element for these components.
|
|
664
665
|
|
|
666
|
+
### `reactComponentAnnotation._experimentalInjectIntoHtml`
|
|
667
|
+
|
|
668
|
+
Type: `boolean`
|
|
669
|
+
|
|
670
|
+
An experimental component annotation injection mode that injects annotations into HTML rather than React components.
|
|
671
|
+
|
|
665
672
|
### `moduleMetadata`
|
|
666
673
|
|
|
667
674
|
Type: `Record<string, any> | (args: { org?: string; project?: string; release?: string; }) => Record<string, any>`
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,28 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var bundlerPluginCore = require('@sentry/bundler-plugin-core');
|
|
6
6
|
|
|
7
|
-
function
|
|
8
|
-
return {
|
|
9
|
-
name: "sentry-rollup-release-injection-plugin",
|
|
10
|
-
rollup: bundlerPluginCore.createRollupReleaseInjectionHooks(injectionCode)
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function rollupComponentNameAnnotatePlugin(ignoredComponents) {
|
|
7
|
+
function rollupComponentNameAnnotatePlugin(ignoredComponents, injectIntoHtml) {
|
|
14
8
|
return {
|
|
15
9
|
name: "sentry-rollup-component-name-annotate-plugin",
|
|
16
|
-
rollup: bundlerPluginCore.createComponentNameAnnotateHooks(ignoredComponents)
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function rollupDebugIdInjectionPlugin() {
|
|
20
|
-
return {
|
|
21
|
-
name: "sentry-rollup-debug-id-injection-plugin",
|
|
22
|
-
rollup: bundlerPluginCore.createRollupDebugIdInjectionHooks()
|
|
10
|
+
rollup: bundlerPluginCore.createComponentNameAnnotateHooks(ignoredComponents, injectIntoHtml)
|
|
23
11
|
};
|
|
24
12
|
}
|
|
25
|
-
function
|
|
13
|
+
function rollupInjectionPlugin(injectionCode, debugIds) {
|
|
26
14
|
return {
|
|
27
|
-
name: "sentry-rollup-
|
|
28
|
-
rollup: bundlerPluginCore.
|
|
15
|
+
name: "sentry-rollup-injection-plugin",
|
|
16
|
+
rollup: bundlerPluginCore.createRollupInjectionHooks(injectionCode, debugIds)
|
|
29
17
|
};
|
|
30
18
|
}
|
|
31
19
|
function rollupDebugIdUploadPlugin(upload, logger, createDependencyOnBuildArtifacts) {
|
|
@@ -41,10 +29,8 @@ function rollupBundleSizeOptimizationsPlugin(replacementValues) {
|
|
|
41
29
|
};
|
|
42
30
|
}
|
|
43
31
|
var sentryUnplugin = bundlerPluginCore.sentryUnpluginFactory({
|
|
44
|
-
|
|
32
|
+
injectionPlugin: rollupInjectionPlugin,
|
|
45
33
|
componentNameAnnotatePlugin: rollupComponentNameAnnotatePlugin,
|
|
46
|
-
debugIdInjectionPlugin: rollupDebugIdInjectionPlugin,
|
|
47
|
-
moduleMetadataInjectionPlugin: rollupModuleMetadataInjectionPlugin,
|
|
48
34
|
debugIdUploadPlugin: rollupDebugIdUploadPlugin,
|
|
49
35
|
bundleSizeOptimizationsPlugin: rollupBundleSizeOptimizationsPlugin
|
|
50
36
|
});
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import {\n CodeInjection,\n sentryUnpluginFactory,\n Options,\n createRollupInjectionHooks,\n createRollupDebugIdUploadHooks,\n SentrySDKBuildFlags,\n createRollupBundleSizeOptimizationHooks,\n createComponentNameAnnotateHooks,\n Logger,\n} from \"@sentry/bundler-plugin-core\";\nimport type { UnpluginOptions } from \"unplugin\";\n\nfunction rollupComponentNameAnnotatePlugin(\n ignoredComponents: string[],\n injectIntoHtml: boolean\n): UnpluginOptions {\n return {\n name: \"sentry-rollup-component-name-annotate-plugin\",\n rollup: createComponentNameAnnotateHooks(ignoredComponents, injectIntoHtml),\n };\n}\n\nfunction rollupInjectionPlugin(injectionCode: CodeInjection, debugIds: boolean): UnpluginOptions {\n return {\n name: \"sentry-rollup-injection-plugin\",\n rollup: createRollupInjectionHooks(injectionCode, debugIds),\n };\n}\n\nfunction rollupDebugIdUploadPlugin(\n upload: (buildArtifacts: string[]) => Promise<void>,\n logger: Logger,\n createDependencyOnBuildArtifacts: () => () => void\n): UnpluginOptions {\n return {\n name: \"sentry-rollup-debug-id-upload-plugin\",\n rollup: createRollupDebugIdUploadHooks(upload, logger, createDependencyOnBuildArtifacts),\n };\n}\n\nfunction rollupBundleSizeOptimizationsPlugin(\n replacementValues: SentrySDKBuildFlags\n): UnpluginOptions {\n return {\n name: \"sentry-rollup-bundle-size-optimizations-plugin\",\n rollup: createRollupBundleSizeOptimizationHooks(replacementValues),\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n injectionPlugin: rollupInjectionPlugin,\n componentNameAnnotatePlugin: rollupComponentNameAnnotatePlugin,\n debugIdUploadPlugin: rollupDebugIdUploadPlugin,\n bundleSizeOptimizationsPlugin: rollupBundleSizeOptimizationsPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryRollupPlugin: (options?: Options) => any = sentryUnplugin.rollup;\n\nexport type { Options as SentryRollupPluginOptions } from \"@sentry/bundler-plugin-core\";\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\n"],"names":["rollupComponentNameAnnotatePlugin","ignoredComponents","injectIntoHtml","name","rollup","createComponentNameAnnotateHooks","rollupInjectionPlugin","injectionCode","debugIds","createRollupInjectionHooks","rollupDebugIdUploadPlugin","upload","logger","createDependencyOnBuildArtifacts","createRollupDebugIdUploadHooks","rollupBundleSizeOptimizationsPlugin","replacementValues","createRollupBundleSizeOptimizationHooks","sentryUnplugin","sentryUnpluginFactory","injectionPlugin","componentNameAnnotatePlugin","debugIdUploadPlugin","bundleSizeOptimizationsPlugin","sentryRollupPlugin"],"mappings":";;;;;;AAaA,SAASA,iCAAiCA,CACxCC,iBAA2B,EAC3BC,cAAuB,EACN;EACjB,OAAO;AACLC,IAAAA,IAAI,EAAE,8CAA8C;AACpDC,IAAAA,MAAM,EAAEC,kDAAgC,CAACJ,iBAAiB,EAAEC,cAAc,CAAA;GAC3E,CAAA;AACH,CAAA;AAEA,SAASI,qBAAqBA,CAACC,aAA4B,EAAEC,QAAiB,EAAmB;EAC/F,OAAO;AACLL,IAAAA,IAAI,EAAE,gCAAgC;AACtCC,IAAAA,MAAM,EAAEK,4CAA0B,CAACF,aAAa,EAAEC,QAAQ,CAAA;GAC3D,CAAA;AACH,CAAA;AAEA,SAASE,yBAAyBA,CAChCC,MAAmD,EACnDC,MAAc,EACdC,gCAAkD,EACjC;EACjB,OAAO;AACLV,IAAAA,IAAI,EAAE,sCAAsC;AAC5CC,IAAAA,MAAM,EAAEU,gDAA8B,CAACH,MAAM,EAAEC,MAAM,EAAEC,gCAAgC,CAAA;GACxF,CAAA;AACH,CAAA;AAEA,SAASE,mCAAmCA,CAC1CC,iBAAsC,EACrB;EACjB,OAAO;AACLb,IAAAA,IAAI,EAAE,gDAAgD;IACtDC,MAAM,EAAEa,yDAAuC,CAACD,iBAAiB,CAAA;GAClE,CAAA;AACH,CAAA;AAEA,IAAME,cAAc,GAAGC,uCAAqB,CAAC;AAC3CC,EAAAA,eAAe,EAAEd,qBAAqB;AACtCe,EAAAA,2BAA2B,EAAErB,iCAAiC;AAC9DsB,EAAAA,mBAAmB,EAAEZ,yBAAyB;AAC9Ca,EAAAA,6BAA6B,EAAER,mCAAAA;AACjC,CAAC,CAAC,CAAA;;AAEF;AACaS,IAAAA,kBAA8C,GAAGN,cAAc,CAACd;;;;;;;;"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,28 +1,16 @@
|
|
|
1
|
-
import { sentryUnpluginFactory,
|
|
1
|
+
import { sentryUnpluginFactory, createComponentNameAnnotateHooks, createRollupInjectionHooks, createRollupDebugIdUploadHooks, createRollupBundleSizeOptimizationHooks } from '@sentry/bundler-plugin-core';
|
|
2
2
|
export { sentryCliBinaryExists } from '@sentry/bundler-plugin-core';
|
|
3
3
|
|
|
4
|
-
function
|
|
5
|
-
return {
|
|
6
|
-
name: "sentry-rollup-release-injection-plugin",
|
|
7
|
-
rollup: createRollupReleaseInjectionHooks(injectionCode)
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function rollupComponentNameAnnotatePlugin(ignoredComponents) {
|
|
4
|
+
function rollupComponentNameAnnotatePlugin(ignoredComponents, injectIntoHtml) {
|
|
11
5
|
return {
|
|
12
6
|
name: "sentry-rollup-component-name-annotate-plugin",
|
|
13
|
-
rollup: createComponentNameAnnotateHooks(ignoredComponents)
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
function rollupDebugIdInjectionPlugin() {
|
|
17
|
-
return {
|
|
18
|
-
name: "sentry-rollup-debug-id-injection-plugin",
|
|
19
|
-
rollup: createRollupDebugIdInjectionHooks()
|
|
7
|
+
rollup: createComponentNameAnnotateHooks(ignoredComponents, injectIntoHtml)
|
|
20
8
|
};
|
|
21
9
|
}
|
|
22
|
-
function
|
|
10
|
+
function rollupInjectionPlugin(injectionCode, debugIds) {
|
|
23
11
|
return {
|
|
24
|
-
name: "sentry-rollup-
|
|
25
|
-
rollup:
|
|
12
|
+
name: "sentry-rollup-injection-plugin",
|
|
13
|
+
rollup: createRollupInjectionHooks(injectionCode, debugIds)
|
|
26
14
|
};
|
|
27
15
|
}
|
|
28
16
|
function rollupDebugIdUploadPlugin(upload, logger, createDependencyOnBuildArtifacts) {
|
|
@@ -38,10 +26,8 @@ function rollupBundleSizeOptimizationsPlugin(replacementValues) {
|
|
|
38
26
|
};
|
|
39
27
|
}
|
|
40
28
|
var sentryUnplugin = sentryUnpluginFactory({
|
|
41
|
-
|
|
29
|
+
injectionPlugin: rollupInjectionPlugin,
|
|
42
30
|
componentNameAnnotatePlugin: rollupComponentNameAnnotatePlugin,
|
|
43
|
-
debugIdInjectionPlugin: rollupDebugIdInjectionPlugin,
|
|
44
|
-
moduleMetadataInjectionPlugin: rollupModuleMetadataInjectionPlugin,
|
|
45
31
|
debugIdUploadPlugin: rollupDebugIdUploadPlugin,
|
|
46
32
|
bundleSizeOptimizationsPlugin: rollupBundleSizeOptimizationsPlugin
|
|
47
33
|
});
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import {\n CodeInjection,\n sentryUnpluginFactory,\n Options,\n createRollupInjectionHooks,\n createRollupDebugIdUploadHooks,\n SentrySDKBuildFlags,\n createRollupBundleSizeOptimizationHooks,\n createComponentNameAnnotateHooks,\n Logger,\n} from \"@sentry/bundler-plugin-core\";\nimport type { UnpluginOptions } from \"unplugin\";\n\nfunction rollupComponentNameAnnotatePlugin(\n ignoredComponents: string[],\n injectIntoHtml: boolean\n): UnpluginOptions {\n return {\n name: \"sentry-rollup-component-name-annotate-plugin\",\n rollup: createComponentNameAnnotateHooks(ignoredComponents, injectIntoHtml),\n };\n}\n\nfunction rollupInjectionPlugin(injectionCode: CodeInjection, debugIds: boolean): UnpluginOptions {\n return {\n name: \"sentry-rollup-injection-plugin\",\n rollup: createRollupInjectionHooks(injectionCode, debugIds),\n };\n}\n\nfunction rollupDebugIdUploadPlugin(\n upload: (buildArtifacts: string[]) => Promise<void>,\n logger: Logger,\n createDependencyOnBuildArtifacts: () => () => void\n): UnpluginOptions {\n return {\n name: \"sentry-rollup-debug-id-upload-plugin\",\n rollup: createRollupDebugIdUploadHooks(upload, logger, createDependencyOnBuildArtifacts),\n };\n}\n\nfunction rollupBundleSizeOptimizationsPlugin(\n replacementValues: SentrySDKBuildFlags\n): UnpluginOptions {\n return {\n name: \"sentry-rollup-bundle-size-optimizations-plugin\",\n rollup: createRollupBundleSizeOptimizationHooks(replacementValues),\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n injectionPlugin: rollupInjectionPlugin,\n componentNameAnnotatePlugin: rollupComponentNameAnnotatePlugin,\n debugIdUploadPlugin: rollupDebugIdUploadPlugin,\n bundleSizeOptimizationsPlugin: rollupBundleSizeOptimizationsPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryRollupPlugin: (options?: Options) => any = sentryUnplugin.rollup;\n\nexport type { Options as SentryRollupPluginOptions } from \"@sentry/bundler-plugin-core\";\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\n"],"names":["rollupComponentNameAnnotatePlugin","ignoredComponents","injectIntoHtml","name","rollup","createComponentNameAnnotateHooks","rollupInjectionPlugin","injectionCode","debugIds","createRollupInjectionHooks","rollupDebugIdUploadPlugin","upload","logger","createDependencyOnBuildArtifacts","createRollupDebugIdUploadHooks","rollupBundleSizeOptimizationsPlugin","replacementValues","createRollupBundleSizeOptimizationHooks","sentryUnplugin","sentryUnpluginFactory","injectionPlugin","componentNameAnnotatePlugin","debugIdUploadPlugin","bundleSizeOptimizationsPlugin","sentryRollupPlugin"],"mappings":";;;AAaA,SAASA,iCAAiCA,CACxCC,iBAA2B,EAC3BC,cAAuB,EACN;EACjB,OAAO;AACLC,IAAAA,IAAI,EAAE,8CAA8C;AACpDC,IAAAA,MAAM,EAAEC,gCAAgC,CAACJ,iBAAiB,EAAEC,cAAc,CAAA;GAC3E,CAAA;AACH,CAAA;AAEA,SAASI,qBAAqBA,CAACC,aAA4B,EAAEC,QAAiB,EAAmB;EAC/F,OAAO;AACLL,IAAAA,IAAI,EAAE,gCAAgC;AACtCC,IAAAA,MAAM,EAAEK,0BAA0B,CAACF,aAAa,EAAEC,QAAQ,CAAA;GAC3D,CAAA;AACH,CAAA;AAEA,SAASE,yBAAyBA,CAChCC,MAAmD,EACnDC,MAAc,EACdC,gCAAkD,EACjC;EACjB,OAAO;AACLV,IAAAA,IAAI,EAAE,sCAAsC;AAC5CC,IAAAA,MAAM,EAAEU,8BAA8B,CAACH,MAAM,EAAEC,MAAM,EAAEC,gCAAgC,CAAA;GACxF,CAAA;AACH,CAAA;AAEA,SAASE,mCAAmCA,CAC1CC,iBAAsC,EACrB;EACjB,OAAO;AACLb,IAAAA,IAAI,EAAE,gDAAgD;IACtDC,MAAM,EAAEa,uCAAuC,CAACD,iBAAiB,CAAA;GAClE,CAAA;AACH,CAAA;AAEA,IAAME,cAAc,GAAGC,qBAAqB,CAAC;AAC3CC,EAAAA,eAAe,EAAEd,qBAAqB;AACtCe,EAAAA,2BAA2B,EAAErB,iCAAiC;AAC9DsB,EAAAA,mBAAmB,EAAEZ,yBAAyB;AAC9Ca,EAAAA,6BAA6B,EAAER,mCAAAA;AACjC,CAAC,CAAC,CAAA;;AAEF;AACaS,IAAAA,kBAA8C,GAAGN,cAAc,CAACd;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/rollup-plugin",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "Official Sentry Rollup plugin",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript-bundler-plugins.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/rollup-plugin",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"prepack": "ts-node ./src/prepack.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@sentry/bundler-plugin-core": "4.
|
|
52
|
+
"@sentry/bundler-plugin-core": "4.8.0",
|
|
53
53
|
"unplugin": "1.0.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@babel/preset-typescript": "7.17.12",
|
|
62
62
|
"@rollup/plugin-babel": "5.3.1",
|
|
63
63
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
64
|
-
"@sentry-internal/eslint-config": "4.
|
|
65
|
-
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.
|
|
64
|
+
"@sentry-internal/eslint-config": "4.8.0",
|
|
65
|
+
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.8.0",
|
|
66
66
|
"@swc/core": "^1.2.205",
|
|
67
67
|
"@swc/jest": "^0.2.21",
|
|
68
68
|
"@types/jest": "^28.1.3",
|