Skip to content

Commit 21fefd4

Browse files
authored
feat: Bundle in Sentry SDK deps (#487)
1 parent ac928b7 commit 21fefd4

File tree

9 files changed

+82
-59
lines changed

9 files changed

+82
-59
lines changed

packages/babel-plugin-component-annotate/rollup.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ export default {
1111
input,
1212
external: [...Object.keys(packageJson.dependencies ?? []), ...modulePackage.builtinModules],
1313
onwarn: (warning) => {
14-
throw new Error(warning.message); // Warnings are usually high-consequence for us so let's throw to catch them
14+
if (warning.code === "CIRCULAR_DEPENDENCY") {
15+
// Circular dependencies are usually not a big deal for us so let's just warn about them
16+
console.warn(warning.message);
17+
return;
18+
}
19+
// Warnings are usually high-consequence for us so let's throw to catch them
20+
throw new Error(warning.message);
1521
},
1622
plugins: [
1723
resolve({

packages/bundler-plugin-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@
5555
"@babel/core": "7.18.5",
5656
"@sentry/babel-plugin-component-annotate": "2.14.1",
5757
"@sentry/cli": "^2.22.3",
58-
"@sentry/node": "^7.60.0",
59-
"@sentry/utils": "^7.60.0",
6058
"dotenv": "^16.3.1",
6159
"find-up": "5.0.0",
6260
"glob": "9.3.2",
@@ -70,6 +68,8 @@
7068
"@rollup/plugin-json": "4.1.0",
7169
"@rollup/plugin-node-resolve": "13.3.0",
7270
"@rollup/plugin-replace": "^4.0.0",
71+
"@sentry/node": "7.102.0",
72+
"@sentry/utils": "7.102.0",
7373
"@sentry-internal/eslint-config": "2.14.1",
7474
"@sentry-internal/sentry-bundler-plugin-tsconfig": "2.14.1",
7575
"@swc/core": "^1.2.205",

packages/bundler-plugin-core/rollup.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ export default {
1212
input,
1313
external: [...Object.keys(packageJson.dependencies), ...modulePackage.builtinModules],
1414
onwarn: (warning) => {
15-
throw new Error(warning.message); // Warnings are usually high-consequence for us so let's throw to catch them
15+
if (warning.code === "CIRCULAR_DEPENDENCY") {
16+
// Circular dependencies are usually not a big deal for us so let's just warn about them
17+
console.warn(warning.message);
18+
return;
19+
}
20+
// Warnings are usually high-consequence for us so let's throw to catch them
21+
throw new Error(warning.message);
1622
},
1723
plugins: [
1824
resolve({

packages/bundler-plugin-core/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ import {
2424
} from "./utils";
2525
import * as dotenv from "dotenv";
2626
import { glob } from "glob";
27-
import pkg from "@sentry/utils";
28-
const { logger } = pkg;
27+
import { logger } from "@sentry/utils";
2928

3029
interface SentryUnpluginFactoryOptions {
3130
releaseInjectionPlugin: (injectionCode: string) => UnpluginOptions;

packages/esbuild-plugin/rollup.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ export default {
1111
input,
1212
external: [...Object.keys(packageJson.dependencies), ...modulePackage.builtinModules],
1313
onwarn: (warning) => {
14-
throw new Error(warning.message); // Warnings are usually high-consequence for us so let's throw to catch them
14+
if (warning.code === "CIRCULAR_DEPENDENCY") {
15+
// Circular dependencies are usually not a big deal for us so let's just warn about them
16+
console.warn(warning.message);
17+
return;
18+
}
19+
// Warnings are usually high-consequence for us so let's throw to catch them
20+
throw new Error(warning.message);
1521
},
1622
plugins: [
1723
resolve({

packages/rollup-plugin/rollup.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ export default {
1111
input,
1212
external: [...Object.keys(packageJson.dependencies), ...modulePackage.builtinModules],
1313
onwarn: (warning) => {
14-
throw new Error(warning.message); // Warnings are usually high-consequence for us so let's throw to catch them
14+
if (warning.code === "CIRCULAR_DEPENDENCY") {
15+
// Circular dependencies are usually not a big deal for us so let's just warn about them
16+
console.warn(warning.message);
17+
return;
18+
}
19+
// Warnings are usually high-consequence for us so let's throw to catch them
20+
throw new Error(warning.message);
1521
},
1622
plugins: [
1723
resolve({

packages/vite-plugin/rollup.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ export default {
1111
input,
1212
external: [...Object.keys(packageJson.dependencies), ...modulePackage.builtinModules],
1313
onwarn: (warning) => {
14-
throw new Error(warning.message); // Warnings are usually high-consequence for us so let's throw to catch them
14+
if (warning.code === "CIRCULAR_DEPENDENCY") {
15+
// Circular dependencies are usually not a big deal for us so let's just warn about them
16+
console.warn(warning.message);
17+
return;
18+
}
19+
// Warnings are usually high-consequence for us so let's throw to catch them
20+
throw new Error(warning.message);
1521
},
1622
plugins: [
1723
resolve({

packages/webpack-plugin/rollup.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ export default {
1111
input,
1212
external: [...Object.keys(packageJson.dependencies), ...modulePackage.builtinModules, "webpack"],
1313
onwarn: (warning) => {
14-
throw new Error(warning.message); // Warnings are usually high-consequence for us so let's throw to catch them
14+
if (warning.code === "CIRCULAR_DEPENDENCY") {
15+
// Circular dependencies are usually not a big deal for us so let's just warn about them
16+
console.warn(warning.message);
17+
return;
18+
}
19+
// Warnings are usually high-consequence for us so let's throw to catch them
20+
throw new Error(warning.message);
1521
},
1622
plugins: [
1723
resolve({

yarn.lock

Lines changed: 37 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,6 +2647,15 @@
26472647
estree-walker "^2.0.2"
26482648
picomatch "^2.3.1"
26492649

2650+
"@sentry-internal/tracing@7.102.0":
2651+
version "7.102.0"
2652+
resolved "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.102.0.tgz#24cf662e1eb5623f6d5197e78c66d7b257560eb8"
2653+
integrity sha512-BlE33HWL1IzkGa0W+pwTiyu01MUIfYf+WnO9UC8qkDW3jxVvg2zhoSjXSxikT+KPCOgoZpQHspaTzwjnI1LCvw==
2654+
dependencies:
2655+
"@sentry/core" "7.102.0"
2656+
"@sentry/types" "7.102.0"
2657+
"@sentry/utils" "7.102.0"
2658+
26502659
"@sentry-internal/tracing@7.50.0":
26512660
version "7.50.0"
26522661
resolved "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.50.0.tgz#74454af99a03d81762993835d2687c881e14f41e"
@@ -2657,16 +2666,6 @@
26572666
"@sentry/utils" "7.50.0"
26582667
tslib "^1.9.3"
26592668

2660-
"@sentry-internal/tracing@7.60.0":
2661-
version "7.60.0"
2662-
resolved "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.60.0.tgz#4f101d936a45965b086e042a3fba7ec7683cc034"
2663-
integrity sha512-2qvxmR954H+K7u4o92sS2u+hntzshem9XwfHAqDvBe51arNbFVy8LfJTJ5fffgZq/6jXlozCO0/6aR5yLR5mBg==
2664-
dependencies:
2665-
"@sentry/core" "7.60.0"
2666-
"@sentry/types" "7.60.0"
2667-
"@sentry/utils" "7.60.0"
2668-
tslib "^2.4.1 || ^1.9.3"
2669-
26702669
"@sentry/cli-darwin@2.22.3":
26712670
version "2.22.3"
26722671
resolved "https://registry.npmjs.org/@sentry/cli-darwin/-/cli-darwin-2.22.3.tgz#d81f6a1b2060d20adb1da7e65e1c57e050e8ffcc"
@@ -2721,6 +2720,14 @@
27212720
"@sentry/cli-win32-i686" "2.22.3"
27222721
"@sentry/cli-win32-x64" "2.22.3"
27232722

2723+
"@sentry/core@7.102.0":
2724+
version "7.102.0"
2725+
resolved "https://registry.npmjs.org/@sentry/core/-/core-7.102.0.tgz#da5e04a5fe97ed91464944dac40b813e6f8aa453"
2726+
integrity sha512-GO9eLOSBK1waW4AD0wDXAreaNqXFQ1MPQZrkKcN+GJYEFhJK1+u+MSV7vO5Fs/rIfaTZIZ2jtEkxSSAOucE8EQ==
2727+
dependencies:
2728+
"@sentry/types" "7.102.0"
2729+
"@sentry/utils" "7.102.0"
2730+
27242731
"@sentry/core@7.50.0":
27252732
version "7.50.0"
27262733
resolved "https://registry.npmjs.org/@sentry/core/-/core-7.50.0.tgz#88bc9cbfc0cb429a28489ece6f0be7a7006436c4"
@@ -2730,15 +2737,6 @@
27302737
"@sentry/utils" "7.50.0"
27312738
tslib "^1.9.3"
27322739

2733-
"@sentry/core@7.60.0":
2734-
version "7.60.0"
2735-
resolved "https://registry.npmjs.org/@sentry/core/-/core-7.60.0.tgz#c256d1305b52210d608e71de8d8f365ca9377f15"
2736-
integrity sha512-B02OlFMoqdkfDZlbQfmk7tL2vObShofk7ySd/7mp+oRdUuCvX0tyrGlwI87YJvd8YWSZOCKINs3aVYivw/b6gg==
2737-
dependencies:
2738-
"@sentry/types" "7.60.0"
2739-
"@sentry/utils" "7.60.0"
2740-
tslib "^2.4.1 || ^1.9.3"
2741-
27422740
"@sentry/integrations@7.50":
27432741
version "7.50.0"
27442742
resolved "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.50.0.tgz#82616f34ddba3c1f3e17b54900dfa7d8e0a0c537"
@@ -2749,6 +2747,16 @@
27492747
localforage "^1.8.1"
27502748
tslib "^1.9.3"
27512749

2750+
"@sentry/node@7.102.0":
2751+
version "7.102.0"
2752+
resolved "https://registry.npmjs.org/@sentry/node/-/node-7.102.0.tgz#f2853bad8650b1f94a57ae3bafad3440740f98ab"
2753+
integrity sha512-ZS1s2uO/+K4rHkmWjyqm5Jtl6dT7klbZSMvn4tfIpkfWuqrs7pP0jaATyvmF+96z3lpq6fRAJliV5tRqPy7w5Q==
2754+
dependencies:
2755+
"@sentry-internal/tracing" "7.102.0"
2756+
"@sentry/core" "7.102.0"
2757+
"@sentry/types" "7.102.0"
2758+
"@sentry/utils" "7.102.0"
2759+
27522760
"@sentry/node@7.50":
27532761
version "7.50.0"
27542762
resolved "https://registry.npmjs.org/@sentry/node/-/node-7.50.0.tgz#d6adab136d87f7dca614ea0d77944f902fa45626"
@@ -2763,29 +2771,22 @@
27632771
lru_map "^0.3.3"
27642772
tslib "^1.9.3"
27652773

2766-
"@sentry/node@^7.60.0":
2767-
version "7.60.0"
2768-
resolved "https://registry.npmjs.org/@sentry/node/-/node-7.60.0.tgz#9db8fa0e71a4365b2a93a3504f2e48a38eeaae1b"
2769-
integrity sha512-I27gr7BSkdT1uwDPcbdPm7+w2yke5tojVGgothtvKfql1en4/cJZmk2bkvO2Di41+EF0UrTlUgLQff5X/q24WQ==
2770-
dependencies:
2771-
"@sentry-internal/tracing" "7.60.0"
2772-
"@sentry/core" "7.60.0"
2773-
"@sentry/types" "7.60.0"
2774-
"@sentry/utils" "7.60.0"
2775-
cookie "^0.4.1"
2776-
https-proxy-agent "^5.0.0"
2777-
lru_map "^0.3.3"
2778-
tslib "^2.4.1 || ^1.9.3"
2774+
"@sentry/types@7.102.0":
2775+
version "7.102.0"
2776+
resolved "https://registry.npmjs.org/@sentry/types/-/types-7.102.0.tgz#b31e9faa54036053ab82c09c3c855035a4889c59"
2777+
integrity sha512-FPfFBP0x3LkPARw1/6cWySLq1djIo8ao3Qo2KNBeE9CHdq8bsS1a8zzjJLuWG4Ww+wieLP8/lY3WTgrCz4jowg==
27792778

27802779
"@sentry/types@7.50.0":
27812780
version "7.50.0"
27822781
resolved "https://registry.npmjs.org/@sentry/types/-/types-7.50.0.tgz#52a035cad83a80ca26fa53c09eb1241250c3df3e"
27832782
integrity sha512-Zo9vyI98QNeYT0K0y57Rb4JRWDaPEgmp+QkQ4CRQZFUTWetO5fvPZ4Gb/R7TW16LajuHZlbJBHmvmNj2pkL2kw==
27842783

2785-
"@sentry/types@7.60.0":
2786-
version "7.60.0"
2787-
resolved "https://registry.npmjs.org/@sentry/types/-/types-7.60.0.tgz#e3e5f16436feff802b1b126a16dba537000cef55"
2788-
integrity sha512-MSEuF9YjE0j+UKdqee2AzcNlMnShVNTkCB2Wnng6Bc5hHhn4fyYeTLbuFpNxL0ffN65lxblaWx6doDsMcvRxcA==
2784+
"@sentry/utils@7.102.0":
2785+
version "7.102.0"
2786+
resolved "https://registry.npmjs.org/@sentry/utils/-/utils-7.102.0.tgz#66325f2567986cc3fd12fbdb980fb8ada170342b"
2787+
integrity sha512-cp5KCRe0slOVMwG4iP2Z4UajQkjryRTiFskZ5H7Q3X9R5voM8+DAhiDcIW88GL9NxqyUrAJOjmKdeLK2vM+bdA==
2788+
dependencies:
2789+
"@sentry/types" "7.102.0"
27892790

27902791
"@sentry/utils@7.50.0":
27912792
version "7.50.0"
@@ -2795,14 +2796,6 @@
27952796
"@sentry/types" "7.50.0"
27962797
tslib "^1.9.3"
27972798

2798-
"@sentry/utils@7.60.0", "@sentry/utils@^7.60.0":
2799-
version "7.60.0"
2800-
resolved "https://registry.npmjs.org/@sentry/utils/-/utils-7.60.0.tgz#a96d772dcc2d007f73a5bcf67dcc66f6a7085736"
2801-
integrity sha512-Oc/PQqzeNDOSy4ZzVj6h9U+GEGRkg2PEVn9PC2V9/v3HDD20mndFqR/S2B5OOgDb/6pNGyz8XiZYI5rb29WFHA==
2802-
dependencies:
2803-
"@sentry/types" "7.60.0"
2804-
tslib "^2.4.1 || ^1.9.3"
2805-
28062799
"@sigstore/protobuf-specs@^0.1.0":
28072800
version "0.1.0"
28082801
resolved "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.1.0.tgz#957cb64ea2f5ce527cc9cf02a096baeb0d2b99b4"
@@ -12520,11 +12513,6 @@ tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0:
1252012513
resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338"
1252112514
integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==
1252212515

12523-
"tslib@^2.4.1 || ^1.9.3":
12524-
version "2.6.0"
12525-
resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3"
12526-
integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==
12527-
1252812516
tsutils@^3.21.0:
1252912517
version "3.21.0"
1253012518
resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"

0 commit comments

Comments
 (0)