File tree Expand file tree Collapse file tree 5 files changed +196
-95
lines changed
examples/bundle-analyzer-cli
packages/bundler-plugin-core Expand file tree Collapse file tree 5 files changed +196
-95
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @codecov/bundler-plugin-core " : minor
3
+ " @codecov/astro-plugin " : minor
4
+ " @codecov/bundle-analyzer " : minor
5
+ " @codecov/nextjs-webpack-plugin " : minor
6
+ " @codecov/nuxt-plugin " : minor
7
+ " @codecov/remix-vite-plugin " : minor
8
+ " @codecov/rollup-plugin " : minor
9
+ " @codecov/solidstart-plugin " : minor
10
+ " @codecov/sveltekit-plugin " : minor
11
+ " @codecov/vite-plugin " : minor
12
+ " @codecov/webpack-plugin " : minor
13
+ ---
14
+
15
+ Inline @sentry/core dependency
Original file line number Diff line number Diff line change 18
18
},
19
19
"type" : " module" ,
20
20
"scripts" : {
21
- "build" : " rollup -c && pnpm bundle-analyzer ./dist -v --bundle-name=@codecov/example-bundle-analyzer-cli --upload-token=$BUNDLE_ANALYZER_UPLOAD_TOKEN --api-url=$BUNDLE_ANALYZER_API_URL --config-file=./baconfig.json"
21
+ "build" : " rollup -c && pnpm bundle-analyzer ./dist -v --bundle-name=@codecov/example-bundle-analyzer-cli --upload-token=$BUNDLE_ANALYZER_UPLOAD_TOKEN --api-url=$BUNDLE_ANALYZER_API_URL --config-file=./baconfig.json --debug "
22
22
},
23
23
"devDependencies" : {
24
24
"@codecov/bundle-analyzer" : " workspace:^" ,
Original file line number Diff line number Diff line change @@ -19,7 +19,25 @@ export default defineBuildConfig({
19
19
} ,
20
20
} ,
21
21
hooks : {
22
- "rollup:options" : ( _ctx , opts ) => {
22
+ "rollup:options" : ( ctx , opts ) => {
23
+ // We want to ensure that `@sentry/core` is not externalized
24
+ // So we do not ship this dependency to users, as this may lead to conflicts with their installed Sentry versions
25
+ // TODO: When unbuild is updated to 3.3.0, this can be simplified by configuring `inlineDependencies`
26
+ // See: https://github.com/unjs/unbuild/releases/tag/v3.3.0
27
+ // Inspired by https://github.com/nuxt/nuxt/blob/f0ce20388d2ab533eba016de0565c150ea3c5172/packages/schema/build.config.ts#L23-L34
28
+ ctx . options . rollup . dts . respectExternal = false ;
29
+ const isExternal = opts . external as (
30
+ id : string ,
31
+ importer ?: string ,
32
+ isResolved ?: boolean ,
33
+ ) => boolean ;
34
+ opts . external = ( source , importer , isResolved ) => {
35
+ if ( source === "@sentry/core" ) {
36
+ return false ;
37
+ }
38
+ return isExternal ( source , importer , isResolved ) ;
39
+ } ;
40
+
23
41
if ( process . env . PLUGIN_CODECOV_TOKEN && Array . isArray ( opts . plugins ) ) {
24
42
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-floating-promises
25
43
opts . plugins = [
Original file line number Diff line number Diff line change 41
41
"dependencies" : {
42
42
"@actions/core" : " ^1.10.1" ,
43
43
"@actions/github" : " ^6.0.0" ,
44
- "@sentry/core" : " ^8.42.0" ,
45
44
"chalk" : " 4.1.2" ,
46
45
"semver" : " ^7.5.4" ,
47
46
"unplugin" : " ^1.10.1" ,
48
47
"zod" : " ^3.22.4"
49
48
},
50
49
"devDependencies" : {
51
50
"@octokit/webhooks-definitions" : " ^3.67.3" ,
51
+ "@sentry/core" : " ^8.42.0" ,
52
52
"@types/node" : " ^20.11.15" ,
53
53
"@types/semver" : " ^7.5.6" ,
54
54
"@vitest/coverage-v8" : " ^2.1.8" ,
You can’t perform that action at this time.
0 commit comments