@sentry/bundler-plugins 11.10.0 → 11.12.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/build/cjs/core/build-plugin-manager.js +184 -33
- package/build/cjs/core/build-plugin-manager.js.map +1 -1
- package/build/cjs/core/debug-id-upload.js +63 -54
- package/build/cjs/core/debug-id-upload.js.map +1 -1
- package/build/cjs/core/index.js +2 -0
- package/build/cjs/core/index.js.map +1 -1
- package/build/cjs/core/options-mapping.js +6 -0
- package/build/cjs/core/options-mapping.js.map +1 -1
- package/build/cjs/core/sentry/telemetry.js +4 -0
- package/build/cjs/core/sentry/telemetry.js.map +1 -1
- package/build/cjs/core/sourcemap-settings.js +63 -0
- package/build/cjs/core/sourcemap-settings.js.map +1 -0
- package/build/cjs/core/upload-filter.js +57 -0
- package/build/cjs/core/upload-filter.js.map +1 -0
- package/build/cjs/core/version.js +1 -1
- package/build/cjs/core/version.js.map +1 -1
- package/build/cjs/esbuild/index.js +3 -2
- package/build/cjs/esbuild/index.js.map +1 -1
- package/build/cjs/rollup/index.js +49 -9
- package/build/cjs/rollup/index.js.map +1 -1
- package/build/cjs/rollup/source-map-handling.js +202 -0
- package/build/cjs/rollup/source-map-handling.js.map +1 -0
- package/build/cjs/vite/index.js +4 -18
- package/build/cjs/vite/index.js.map +1 -1
- package/build/cjs/vite/source-map-hooks.js +93 -0
- package/build/cjs/vite/source-map-hooks.js.map +1 -0
- package/build/cjs/webpack/index.js +113 -1
- package/build/cjs/webpack/index.js.map +1 -1
- package/build/esm/core/build-plugin-manager.js +185 -34
- package/build/esm/core/build-plugin-manager.js.map +1 -1
- package/build/esm/core/debug-id-upload.js +62 -56
- package/build/esm/core/debug-id-upload.js.map +1 -1
- package/build/esm/core/index.js +1 -0
- package/build/esm/core/index.js.map +1 -1
- package/build/esm/core/options-mapping.js +6 -0
- package/build/esm/core/options-mapping.js.map +1 -1
- package/build/esm/core/sentry/telemetry.js +4 -0
- package/build/esm/core/sentry/telemetry.js.map +1 -1
- package/build/esm/core/sourcemap-settings.js +61 -0
- package/build/esm/core/sourcemap-settings.js.map +1 -0
- package/build/esm/core/upload-filter.js +41 -0
- package/build/esm/core/upload-filter.js.map +1 -0
- package/build/esm/core/version.js +1 -1
- package/build/esm/core/version.js.map +1 -1
- package/build/esm/esbuild/index.js +3 -2
- package/build/esm/esbuild/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/rollup/index.js +49 -10
- package/build/esm/rollup/index.js.map +1 -1
- package/build/esm/rollup/source-map-handling.js +183 -0
- package/build/esm/rollup/source-map-handling.js.map +1 -0
- package/build/esm/vite/index.js +5 -19
- package/build/esm/vite/index.js.map +1 -1
- package/build/esm/vite/source-map-hooks.js +77 -0
- package/build/esm/vite/source-map-hooks.js.map +1 -0
- package/build/esm/webpack/index.js +114 -2
- package/build/esm/webpack/index.js.map +1 -1
- package/build/types/core/build-plugin-manager.d.ts +69 -1
- package/build/types/core/build-plugin-manager.d.ts.map +1 -1
- package/build/types/core/debug-id-upload.d.ts +38 -2
- package/build/types/core/debug-id-upload.d.ts.map +1 -1
- package/build/types/core/index.d.ts +4 -0
- package/build/types/core/index.d.ts.map +1 -1
- package/build/types/core/options-mapping.d.ts +1 -0
- package/build/types/core/options-mapping.d.ts.map +1 -1
- package/build/types/core/sentry/telemetry.d.ts.map +1 -1
- package/build/types/core/sourcemap-settings.d.ts +28 -0
- package/build/types/core/sourcemap-settings.d.ts.map +1 -0
- package/build/types/core/types.d.ts +18 -0
- package/build/types/core/types.d.ts.map +1 -1
- package/build/types/core/upload-filter.d.ts +9 -0
- package/build/types/core/upload-filter.d.ts.map +1 -0
- package/build/types/core/version.d.ts +1 -1
- package/build/types/esbuild/index.d.ts.map +1 -1
- package/build/types/rollup/index.d.ts +106 -6
- package/build/types/rollup/index.d.ts.map +1 -1
- package/build/types/rollup/source-map-handling.d.ts +59 -0
- package/build/types/rollup/source-map-handling.d.ts.map +1 -0
- package/build/types/vite/index.d.ts +1 -5
- package/build/types/vite/index.d.ts.map +1 -1
- package/build/types/vite/source-map-hooks.d.ts +45 -0
- package/build/types/vite/source-map-hooks.d.ts.map +1 -0
- package/build/types/webpack/index.d.ts.map +1 -1
- package/package.json +43 -41
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { NormalizedOptions } from './options-mapping';
|
|
2
|
+
/**
|
|
3
|
+
* The user's source map setting in the bundler, reduced to what matters for upload and deletion.
|
|
4
|
+
*
|
|
5
|
+
* - `unset`: the user did not configure source maps
|
|
6
|
+
* - `off`: source map generation is turned off
|
|
7
|
+
* - `visible`: separate map files with a `sourceMappingURL` comment
|
|
8
|
+
* - `hidden`: separate map files without the comment
|
|
9
|
+
* - `inline`: the map is embedded into the bundle
|
|
10
|
+
*/
|
|
11
|
+
export type SourceMapKind = 'unset' | 'off' | 'visible' | 'hidden' | 'inline';
|
|
12
|
+
export type SourceMapDecision = {
|
|
13
|
+
/** Switch the bundler to hidden source maps. */
|
|
14
|
+
enableHidden: boolean;
|
|
15
|
+
/** Remove the source maps from the build output once they are uploaded. */
|
|
16
|
+
deleteAfterUpload: boolean;
|
|
17
|
+
log?: {
|
|
18
|
+
level: 'info' | 'warn';
|
|
19
|
+
message: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Decides whether the plugin turns hidden source maps on and whether it removes the maps from the
|
|
24
|
+
* build output after the upload. The plugin only turns maps on when an upload can run, and only
|
|
25
|
+
* removes maps it turned on itself unless `deleteSourcemapsAfterUpload` says otherwise.
|
|
26
|
+
*/
|
|
27
|
+
export declare function decideSourceMapHandling(kind: SourceMapKind, options: NormalizedOptions, uploadPossible: boolean): SourceMapDecision;
|
|
28
|
+
//# sourceMappingURL=sourcemap-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourcemap-settings.d.ts","sourceRoot":"","sources":["../../../src/core/sourcemap-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gDAAgD;IAChD,YAAY,EAAE,OAAO,CAAC;IACtB,2EAA2E;IAC3E,iBAAiB,EAAE,OAAO,CAAC;IAC3B,GAAG,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACnD,CAAC;AAIF;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,iBAAiB,EAC1B,cAAc,EAAE,OAAO,GACtB,iBAAiB,CAsEnB"}
|
|
@@ -170,6 +170,24 @@ export interface Options {
|
|
|
170
170
|
* Use the `debug` option to print information about which files end up being deleted.
|
|
171
171
|
*/
|
|
172
172
|
filesToDeleteAfterUpload?: string | string[] | Promise<string | string[] | undefined>;
|
|
173
|
+
/**
|
|
174
|
+
* Whether source maps are removed from the build output after they are uploaded to Sentry.
|
|
175
|
+
*
|
|
176
|
+
* When unset, the plugin removes only the source maps it turned on itself, that is, when the bundler's source map
|
|
177
|
+
* setting was not set. `true` also removes source maps you enabled yourself. `false` never removes them; the plugin
|
|
178
|
+
* still turns on hidden source maps when the setting is not set, so they can be uploaded.
|
|
179
|
+
*
|
|
180
|
+
* When the plugin turned source maps on, none of them reach the build output, not even those of chunks that
|
|
181
|
+
* `sourcemaps.assets` or `sourcemaps.ignore` keep out of the upload. Source maps you enabled yourself are only
|
|
182
|
+
* removed for the JavaScript chunks that were uploaded; excluded chunks keep theirs.
|
|
183
|
+
*
|
|
184
|
+
* With webpack's array form of `devtool`, `true` replaces the array with one hidden source map setting for
|
|
185
|
+
* all asset types, because webpack hides the array from plugins.
|
|
186
|
+
*
|
|
187
|
+
* With Rollup, Vite and webpack the removed source maps are never written to the output directory. With esbuild
|
|
188
|
+
* they are deleted after the upload.
|
|
189
|
+
*/
|
|
190
|
+
deleteSourcemapsAfterUpload?: boolean;
|
|
173
191
|
};
|
|
174
192
|
/**
|
|
175
193
|
* Options related to managing the Sentry releases for a build.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEjG,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,OAAO;IACtB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IAEpC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE;QACX;;;;;;;;;;;;WAYG;QACH,OAAO,CAAC,EAAE,OAAO,GAAG,gB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O,CAAC;CAC5C;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,qBAAqB,GAAG,uBAAuB,CAAC,GAAG;IAClF;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B;;;;;;;OAOG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,IAAI,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAEzB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NormalizedOptions } from './options-mapping';
|
|
2
|
+
export type UploadFilter = (filePath: string) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Mirrors the glob of the upload from disk for files that are not on disk yet: a file is
|
|
5
|
+
* uploaded when it matches one of `sourcemaps.assets` (all files when unset) and none of
|
|
6
|
+
* `sourcemaps.ignore`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createUploadFilter(options: NormalizedOptions): UploadFilter;
|
|
9
|
+
//# sourceMappingURL=upload-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-filter.d.ts","sourceRoot":"","sources":["../../../src/core/upload-filter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAoB3E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.
|
|
1
|
+
export declare const LIB_VERSION = "11.12.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/esbuild/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/esbuild/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA4FvC,wBAAgB,mBAAmB,CAAC,WAAW,GAAE,OAAY,GAAG,GAAG,CA8OlE;eAGc,mBAAmB;AAClC,YAAY,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -3,6 +3,7 @@ import type { ComponentAnnotationTransformMeta } from '../core/component-annotat
|
|
|
3
3
|
import type { SourceMap } from 'magic-string';
|
|
4
4
|
import MagicString from 'magic-string';
|
|
5
5
|
import { type OutputBundle } from './debug-id-stamping';
|
|
6
|
+
import { type OutputDestinationOptions } from './source-map-handling';
|
|
6
7
|
type TransformResult = {
|
|
7
8
|
code: string;
|
|
8
9
|
map?: SourceMap | string | {
|
|
@@ -14,6 +15,83 @@ type PluginContext = {
|
|
|
14
15
|
rolldownVersion?: string;
|
|
15
16
|
};
|
|
16
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* @ignore - internal plugin factory shared by the Rollup and Vite plugins.
|
|
20
|
+
*
|
|
21
|
+
* `main` carries injection, release creation and the upload. `post` runs last in `generateBundle`,
|
|
22
|
+
* copies chunks and their source maps into the upload staging folder and drops the map assets
|
|
23
|
+
* from the bundle, so the bundler never writes them.
|
|
24
|
+
*/
|
|
25
|
+
export declare function _createRollupPluginInternals(userOptions: Options | undefined, buildTool: 'rollup' | 'vite', buildToolMajorVersion?: string): {
|
|
26
|
+
main: {
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
29
|
+
post: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
main: {
|
|
32
|
+
name: string;
|
|
33
|
+
buildStart: () => void;
|
|
34
|
+
transform?: ((code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>) | {
|
|
35
|
+
filter: {
|
|
36
|
+
id: RegExp;
|
|
37
|
+
};
|
|
38
|
+
handler: (code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>;
|
|
39
|
+
} | undefined;
|
|
40
|
+
configResolved: (config: import("../vite/source-map-hooks").ViteResolvedConfig) => void;
|
|
41
|
+
renderChunk: (this: PluginContext | undefined, code: string, chunk: {
|
|
42
|
+
fileName: string;
|
|
43
|
+
facadeModuleId?: string | null;
|
|
44
|
+
isEntry?: boolean;
|
|
45
|
+
}, _?: unknown, meta?: {
|
|
46
|
+
magicString?: MagicString;
|
|
47
|
+
chunks?: Record<string, ChunkGraphNode>;
|
|
48
|
+
}) => {
|
|
49
|
+
code: string;
|
|
50
|
+
map?: SourceMap;
|
|
51
|
+
} | null;
|
|
52
|
+
generateBundle: {
|
|
53
|
+
order: 'pre';
|
|
54
|
+
handler: (this: PluginContext | undefined, _outputOptions: unknown, bundle: OutputBundle) => void;
|
|
55
|
+
};
|
|
56
|
+
writeBundle: (outputOptions: OutputDestinationOptions, bundle: OutputBundle | undefined) => Promise<void>;
|
|
57
|
+
} | {
|
|
58
|
+
name: string;
|
|
59
|
+
buildStart: () => void;
|
|
60
|
+
transform?: ((code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>) | {
|
|
61
|
+
filter: {
|
|
62
|
+
id: RegExp;
|
|
63
|
+
};
|
|
64
|
+
handler: (code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>;
|
|
65
|
+
} | undefined;
|
|
66
|
+
outputOptions: (rawOutputOptions: import("./source-map-handling").OutputOptions) => import("./source-map-handling").OutputOptions | null;
|
|
67
|
+
renderChunk: (this: PluginContext | undefined, code: string, chunk: {
|
|
68
|
+
fileName: string;
|
|
69
|
+
facadeModuleId?: string | null;
|
|
70
|
+
isEntry?: boolean;
|
|
71
|
+
}, _?: unknown, meta?: {
|
|
72
|
+
magicString?: MagicString;
|
|
73
|
+
chunks?: Record<string, ChunkGraphNode>;
|
|
74
|
+
}) => {
|
|
75
|
+
code: string;
|
|
76
|
+
map?: SourceMap;
|
|
77
|
+
} | null;
|
|
78
|
+
generateBundle: {
|
|
79
|
+
order: 'pre';
|
|
80
|
+
handler: (this: PluginContext | undefined, _outputOptions: unknown, bundle: OutputBundle) => void;
|
|
81
|
+
};
|
|
82
|
+
writeBundle: (outputOptions: OutputDestinationOptions, bundle: OutputBundle | undefined) => Promise<void>;
|
|
83
|
+
};
|
|
84
|
+
post: {
|
|
85
|
+
name: string;
|
|
86
|
+
config?: ((userConfig: import("../vite/source-map-hooks").ViteUserConfig, env: {
|
|
87
|
+
command: string;
|
|
88
|
+
}) => import("../vite/source-map-hooks").ViteUserConfig | null) | undefined;
|
|
89
|
+
generateBundle: {
|
|
90
|
+
order: 'post';
|
|
91
|
+
handler(outputOptions: OutputDestinationOptions, bundle: OutputBundle, isWrite?: boolean): Promise<void>;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
17
95
|
/**
|
|
18
96
|
* @ignore - this is the internal plugin factory function only used for the Vite plugin!
|
|
19
97
|
*/
|
|
@@ -28,6 +106,33 @@ export declare function _rollupPluginInternal(userOptions: Options | undefined,
|
|
|
28
106
|
};
|
|
29
107
|
handler: (code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>;
|
|
30
108
|
} | undefined;
|
|
109
|
+
configResolved: (config: import("../vite/source-map-hooks").ViteResolvedConfig) => void;
|
|
110
|
+
renderChunk: (this: PluginContext | undefined, code: string, chunk: {
|
|
111
|
+
fileName: string;
|
|
112
|
+
facadeModuleId?: string | null;
|
|
113
|
+
isEntry?: boolean;
|
|
114
|
+
}, _?: unknown, meta?: {
|
|
115
|
+
magicString?: MagicString;
|
|
116
|
+
chunks?: Record<string, ChunkGraphNode>;
|
|
117
|
+
}) => {
|
|
118
|
+
code: string;
|
|
119
|
+
map?: SourceMap;
|
|
120
|
+
} | null;
|
|
121
|
+
generateBundle: {
|
|
122
|
+
order: 'pre';
|
|
123
|
+
handler: (this: PluginContext | undefined, _outputOptions: unknown, bundle: OutputBundle) => void;
|
|
124
|
+
};
|
|
125
|
+
writeBundle: (outputOptions: OutputDestinationOptions, bundle: OutputBundle | undefined) => Promise<void>;
|
|
126
|
+
} | {
|
|
127
|
+
name: string;
|
|
128
|
+
buildStart: () => void;
|
|
129
|
+
transform?: ((code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>) | {
|
|
130
|
+
filter: {
|
|
131
|
+
id: RegExp;
|
|
132
|
+
};
|
|
133
|
+
handler: (code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>;
|
|
134
|
+
} | undefined;
|
|
135
|
+
outputOptions: (rawOutputOptions: import("./source-map-handling").OutputOptions) => import("./source-map-handling").OutputOptions | null;
|
|
31
136
|
renderChunk: (this: PluginContext | undefined, code: string, chunk: {
|
|
32
137
|
fileName: string;
|
|
33
138
|
facadeModuleId?: string | null;
|
|
@@ -43,12 +148,7 @@ export declare function _rollupPluginInternal(userOptions: Options | undefined,
|
|
|
43
148
|
order: 'pre';
|
|
44
149
|
handler: (this: PluginContext | undefined, _outputOptions: unknown, bundle: OutputBundle) => void;
|
|
45
150
|
};
|
|
46
|
-
writeBundle: (outputOptions:
|
|
47
|
-
dir?: string;
|
|
48
|
-
file?: string;
|
|
49
|
-
}, bundle: {
|
|
50
|
-
[fileName: string]: unknown;
|
|
51
|
-
}) => Promise<void>;
|
|
151
|
+
writeBundle: (outputOptions: OutputDestinationOptions, bundle: OutputBundle | undefined) => Promise<void>;
|
|
52
152
|
};
|
|
53
153
|
export declare function sentryRollupPlugin(userOptions?: Options): any;
|
|
54
154
|
export type { Options as SentryRollupPluginOptions } from '../core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rollup/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAgBvD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,WAAW,MAAM,cAAc,CAAC;AAIvC,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rollup/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAgBvD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAA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AAS,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { SentryBuildPluginManager, SourceMapDecision, SourceMapKind, UploadStaging } from '../core';
|
|
2
|
+
import type { OutputBundle } from './debug-id-stamping';
|
|
3
|
+
export type RollupSourceMapSetting = boolean | 'inline' | 'hidden' | undefined;
|
|
4
|
+
export type OutputDestinationOptions = {
|
|
5
|
+
dir?: string;
|
|
6
|
+
file?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The output options that tell outputs of one directory apart. Several outputs can write into the
|
|
10
|
+
* same directory at once, for example an ES and a CJS build, each with its own `sourcemap` setting.
|
|
11
|
+
* `sourcemap` holds the setting as the plugin left it, so an output it switched to hidden maps
|
|
12
|
+
* differs from one the user set.
|
|
13
|
+
*/
|
|
14
|
+
export type OutputMatch = {
|
|
15
|
+
dir?: unknown;
|
|
16
|
+
file?: unknown;
|
|
17
|
+
format?: unknown;
|
|
18
|
+
entryFileNames?: unknown;
|
|
19
|
+
chunkFileNames?: unknown;
|
|
20
|
+
preserveModules?: unknown;
|
|
21
|
+
sourcemap?: unknown;
|
|
22
|
+
};
|
|
23
|
+
export type OutputOptions = OutputDestinationOptions & OutputMatch & {
|
|
24
|
+
sourcemap?: RollupSourceMapSetting;
|
|
25
|
+
};
|
|
26
|
+
/** Maps Rollup's (and Vite's) `sourcemap` setting onto the plugin's source map kinds. */
|
|
27
|
+
export declare function sourceMapKindFromRollupSetting(setting: RollupSourceMapSetting): SourceMapKind;
|
|
28
|
+
/** The directory an output writes to. Decisions and stagings are keyed by it. */
|
|
29
|
+
export declare function getOutputDestination(outputOptions: OutputDestinationOptions): string;
|
|
30
|
+
/** The fields of `OutputMatch` an output sets, in the form the normalized options carry them. */
|
|
31
|
+
export declare function getOutputMatch(outputOptions: OutputMatch): OutputMatch;
|
|
32
|
+
export type DecisionRecord = {
|
|
33
|
+
match: OutputMatch;
|
|
34
|
+
kind: SourceMapKind;
|
|
35
|
+
decision: SourceMapDecision;
|
|
36
|
+
};
|
|
37
|
+
export type SourceMapHandling = {
|
|
38
|
+
/** Rollup's `outputOptions` hook: decides for the output and switches it to hidden source maps when needed. */
|
|
39
|
+
outputOptions: (rawOutputOptions: OutputOptions) => OutputOptions | null;
|
|
40
|
+
/** Records the decision for an output, for bundlers that decide outside `outputOptions`. */
|
|
41
|
+
setDecision: (destination: string, record: DecisionRecord) => void;
|
|
42
|
+
/**
|
|
43
|
+
* `generateBundle` with `order: 'post'`: copies each chunk and its source map into a staging folder
|
|
44
|
+
* and drops the map asset from the bundle, so the bundler never writes it.
|
|
45
|
+
*/
|
|
46
|
+
stageSourceMaps: (outputOptions: OutputOptions, bundle: OutputBundle, isWrite?: boolean) => Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Hands the staging of this bundle to `writeBundle`. Without a bundle (SvelteKit calls the hook
|
|
49
|
+
* with output options only) the oldest staging is taken.
|
|
50
|
+
*/
|
|
51
|
+
takeStaging: (outputOptions: OutputDestinationOptions, bundle: OutputBundle | undefined) => Promise<UploadStaging | undefined>;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Source map decisions and upload stagings of one plugin instance. Keyed by output destination
|
|
55
|
+
* because one instance can serve several outputs, and watch mode or several `write()` calls
|
|
56
|
+
* rebuild the same one. Outputs that share a directory are told apart by `OutputMatch`.
|
|
57
|
+
*/
|
|
58
|
+
export declare function createSourceMapHandling(sentryBuildPluginManager: SentryBuildPluginManager): SourceMapHandling;
|
|
59
|
+
//# sourceMappingURL=source-map-handling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-map-handling.d.ts","sourceRoot":"","sources":["../../../src/rollup/source-map-handling.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEzG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MA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IACH,eAAe,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1G;;;OAGG;IACH,WAAW,EAAE,CACX,aAAa,EAAE,wBAAwB,EACvC,MAAM,EAAE,YAAY,GAAG,SAAS,KAC7B,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,wBAAwB,EAAE,wBAAwB,GAAG,iBAAiB,CA8I7G"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { SentryRollupPluginOptions } from '../rollup';
|
|
2
|
-
import { type OutputBundle } from '../rollup/debug-id-stamping';
|
|
3
2
|
interface SentryVitePlugin {
|
|
4
3
|
name: string;
|
|
5
4
|
enforce: 'pre' | 'post';
|
|
6
|
-
|
|
7
|
-
order: 'pre' | 'post';
|
|
8
|
-
handler: (_outputOptions: unknown, bundle: OutputBundle) => void;
|
|
9
|
-
};
|
|
5
|
+
[hook: string]: unknown;
|
|
10
6
|
}
|
|
11
7
|
export declare const sentryVitePlugin: (options?: SentryRollupPluginOptions) => SentryVitePlugin[];
|
|
12
8
|
export type { Options as SentryVitePluginOptions } from '../core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAI3D,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB;AAgBD,eAAO,MAAM,gBAAgB,aAAc,yBAAyB,KAAG,gBAAgB,EAUtF,CAAC;AAEF,YAAY,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { SentryBuildPluginManager } from '../core';
|
|
2
|
+
import type { OutputMatch, RollupSourceMapSetting, SourceMapHandling } from '../rollup/source-map-handling';
|
|
3
|
+
type BundlerOutput = OutputMatch & {
|
|
4
|
+
dir?: string;
|
|
5
|
+
sourcemap?: RollupSourceMapSetting;
|
|
6
|
+
};
|
|
7
|
+
type BundlerOutputOptions = BundlerOutput | BundlerOutput[] | undefined;
|
|
8
|
+
type ViteBuildOptions = {
|
|
9
|
+
sourcemap?: RollupSourceMapSetting;
|
|
10
|
+
outDir?: string;
|
|
11
|
+
rollupOptions?: {
|
|
12
|
+
output?: BundlerOutputOptions;
|
|
13
|
+
};
|
|
14
|
+
rolldownOptions?: {
|
|
15
|
+
output?: BundlerOutputOptions;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type ViteUserConfig = {
|
|
19
|
+
build?: ViteBuildOptions;
|
|
20
|
+
environments?: Record<string, {
|
|
21
|
+
build?: ViteBuildOptions;
|
|
22
|
+
} | undefined>;
|
|
23
|
+
};
|
|
24
|
+
export type ViteResolvedConfig = {
|
|
25
|
+
root: string;
|
|
26
|
+
build: ViteBuildOptions;
|
|
27
|
+
environments?: Record<string, {
|
|
28
|
+
build: ViteBuildOptions;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
export type ViteSourceMapHooks = {
|
|
32
|
+
config: (userConfig: ViteUserConfig, env: {
|
|
33
|
+
command: string;
|
|
34
|
+
}) => ViteUserConfig | null;
|
|
35
|
+
configResolved: (config: ViteResolvedConfig) => void;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Vite warns about `rollupOptions.output.sourcemap`, so the Vite plugin decides on `build.sourcemap`
|
|
39
|
+
* in a `config` hook. The hook belongs on the post plugin: framework plugins that set
|
|
40
|
+
* `build.sourcemap` themselves run first, and the decision sees the merged setting. The output
|
|
41
|
+
* directories are only known in `configResolved`, which then records the decision for each of them.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createViteSourceMapHooks(sentryBuildPluginManager: SentryBuildPluginManager, sourceMapHandling: SourceMapHandling): ViteSourceMapHooks;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=source-map-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-map-hooks.d.ts","sourceRoot":"","sources":["../../../src/vite/source-map-hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAoC,MAAM,SAAS,CAAC;AAC1F,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAG5G,KAAK,aAAa,GAAG,WAAW,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,sBAAsB,CAAA;CAAE,CAAC;AACxF,KAAK,oBAAoB,GAAG,aAAa,GAAG,aAAa,EAAE,GAAG,SAAS,CAAC;AAExE,KAAK,gBAAgB,GAAG;IACtB,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAC;IAClD,eAAe,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,gBAAgB,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,gBAAgB,CAAA;KAAE,CAAC,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,cAAc,GAAG,IAAI,CAAC;IACxF,cAAc,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACtD,CAAC;AAiCF;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,wBAAwB,EAAE,wBAAwB,EAClD,iBAAiB,EAAE,iBAAiB,GACnC,kBAAkB,CA2EpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webpack/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webpack/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAmD,MAAM,eAAe,CAAC;AA6iB9F,eAAO,MAAM,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,0BAA0B,KAAK,GAA+B,CAAC;AAE5G,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;QACvC;;;;;;;WAOG;QACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;KACtC,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/bundler-plugins",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.12.0",
|
|
4
4
|
"description": "Sentry Bundler Plugins",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git://github.com/getsentry/sentry-javascript.git"
|
|
8
|
+
},
|
|
6
9
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/main/packages/bundler-plugins",
|
|
7
10
|
"author": "Sentry",
|
|
8
11
|
"license": "MIT",
|
|
@@ -71,33 +74,6 @@
|
|
|
71
74
|
"require": "./build/cjs/webpack/component-annotation-transform.js"
|
|
72
75
|
}
|
|
73
76
|
},
|
|
74
|
-
"scripts": {
|
|
75
|
-
"build": "run-p build:transpile build:types",
|
|
76
|
-
"build:dev": "pnpm run build",
|
|
77
|
-
"build:version": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/core/version.ts",
|
|
78
|
-
"build:transpile": "rollup -c rollup.npm.config.mjs",
|
|
79
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
80
|
-
"build:watch": "run-p build:transpile:watch",
|
|
81
|
-
"build:dev:watch": "pnpm run build:watch",
|
|
82
|
-
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
|
|
83
|
-
"build:tarball": "npm pack",
|
|
84
|
-
"prebuild": "pnpm run build:version",
|
|
85
|
-
"precheck:types": "pnpm run build:version",
|
|
86
|
-
"prelint:types": "pnpm run build:version",
|
|
87
|
-
"pretest": "pnpm run build:version",
|
|
88
|
-
"pretest:unit": "pnpm run build:version",
|
|
89
|
-
"check:types": "run-p check:types:src check:types:test",
|
|
90
|
-
"check:types:src": "tsc --project ./tsconfig.json --noEmit",
|
|
91
|
-
"check:types:test": "tsc --project ./test/tsconfig.json --noEmit",
|
|
92
|
-
"clean": "rimraf build dist coverage sentry-bundler-plugins-*.tgz",
|
|
93
|
-
"clean:all": "run-p clean clean:deps",
|
|
94
|
-
"clean:deps": "rimraf node_modules",
|
|
95
|
-
"lint": "oxlint . --type-aware",
|
|
96
|
-
"lint:types": "oxlint src --type-aware --type-check",
|
|
97
|
-
"lint:fix": "oxlint . --fix --type-aware",
|
|
98
|
-
"test": "vitest run",
|
|
99
|
-
"test:unit": "vitest run"
|
|
100
|
-
},
|
|
101
77
|
"nx": {
|
|
102
78
|
"targets": {
|
|
103
79
|
"build:transpile": {
|
|
@@ -115,13 +91,12 @@
|
|
|
115
91
|
}
|
|
116
92
|
},
|
|
117
93
|
"dependencies": {
|
|
118
|
-
"@sentry/core": "11.
|
|
94
|
+
"@sentry/core": "11.12.0",
|
|
119
95
|
"dotenv": "^17.4.2",
|
|
120
|
-
"glob": "^
|
|
96
|
+
"glob": "^14.0.3",
|
|
121
97
|
"magic-string": "~0.30.8 || ^1.0.0",
|
|
122
98
|
"oxc-parser": "^0.152.0",
|
|
123
|
-
"sentry": "^0.
|
|
124
|
-
"supports-color": "^8.1.1"
|
|
99
|
+
"sentry": "^0.49.0"
|
|
125
100
|
},
|
|
126
101
|
"peerDependencies": {
|
|
127
102
|
"rollup": ">=3.2.0",
|
|
@@ -137,16 +112,16 @@
|
|
|
137
112
|
},
|
|
138
113
|
"devDependencies": {
|
|
139
114
|
"@babel/core": "^7.18.5",
|
|
140
|
-
"@babel/parser": "^
|
|
115
|
+
"@babel/parser": "^8.0.10",
|
|
141
116
|
"@babel/preset-react": "^7.23.3",
|
|
142
|
-
"@sentry-internal/rollup-utils": "11.
|
|
143
|
-
"@sentry-internal/test-utils": "11.
|
|
117
|
+
"@sentry-internal/rollup-utils": "11.12.0",
|
|
118
|
+
"@sentry-internal/test-utils": "11.12.0",
|
|
144
119
|
"@types/babel__core": "^7.20.5",
|
|
145
120
|
"@types/node": "^20.19.0",
|
|
146
|
-
"premove": "^4.0.0",
|
|
147
121
|
"rolldown": "^1.0.0",
|
|
148
|
-
"
|
|
149
|
-
"
|
|
122
|
+
"vite": "^8.3.6",
|
|
123
|
+
"vitest": "^4.1.12",
|
|
124
|
+
"webpack": "5.112.2"
|
|
150
125
|
},
|
|
151
126
|
"engines": {
|
|
152
127
|
"node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0"
|
|
@@ -154,5 +129,32 @@
|
|
|
154
129
|
"sideEffects": [
|
|
155
130
|
"./sentry-release-injection-file.js",
|
|
156
131
|
"./sentry-esbuild-debugid-injection-file.js"
|
|
157
|
-
]
|
|
158
|
-
|
|
132
|
+
],
|
|
133
|
+
"scripts": {
|
|
134
|
+
"build": "run-p build:transpile build:types",
|
|
135
|
+
"build:dev": "pnpm run build",
|
|
136
|
+
"build:version": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/core/version.ts",
|
|
137
|
+
"build:transpile": "rollup -c rollup.npm.config.mjs",
|
|
138
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
139
|
+
"build:watch": "run-p build:transpile:watch",
|
|
140
|
+
"build:dev:watch": "pnpm run build:watch",
|
|
141
|
+
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
|
|
142
|
+
"build:tarball": "pnpm pack",
|
|
143
|
+
"prebuild": "pnpm run build:version",
|
|
144
|
+
"precheck:types": "pnpm run build:version",
|
|
145
|
+
"prelint:types": "pnpm run build:version",
|
|
146
|
+
"pretest": "pnpm run build:version",
|
|
147
|
+
"pretest:unit": "pnpm run build:version",
|
|
148
|
+
"check:types": "run-p check:types:src check:types:test",
|
|
149
|
+
"check:types:src": "tsc --project ./tsconfig.json --noEmit",
|
|
150
|
+
"check:types:test": "tsc --project ./test/tsconfig.json --noEmit",
|
|
151
|
+
"clean": "node ../../scripts/rm.mjs build dist coverage sentry-bundler-plugins-*.tgz",
|
|
152
|
+
"clean:all": "run-p clean clean:deps",
|
|
153
|
+
"clean:deps": "node ../../scripts/rm.mjs node_modules",
|
|
154
|
+
"lint": "oxlint . --type-aware",
|
|
155
|
+
"lint:types": "oxlint src --type-aware --type-check",
|
|
156
|
+
"lint:fix": "oxlint . --fix --type-aware",
|
|
157
|
+
"test": "vitest run",
|
|
158
|
+
"test:unit": "vitest run"
|
|
159
|
+
}
|
|
160
|
+
}
|