Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/babel-plugin-component-annotate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"@swc/jest": "^0.2.21",
"@types/jest": "^28.1.3",
"@types/node": "^18.6.3",
"@types/uuid": "^9.0.1",
"eslint": "^8.18.0",
"jest": "^28.1.1",
"premove": "^4.0.0",
Expand Down
3 changes: 0 additions & 3 deletions packages/esbuild-plugin/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ module.exports = {
transform: {
"^.+\\.(t|j)sx?$": ["@swc/jest"],
},
moduleNameMapper: {
uuid: require.resolve("uuid"), // https://stackoverflow.com/a/73203803
},
};
4 changes: 1 addition & 3 deletions packages/esbuild-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
"prepack": "ts-node ./src/prepack.ts"
},
"dependencies": {
"@sentry/bundler-plugin-core": "5.1.0",
"uuid": "^9.0.0"
"@sentry/bundler-plugin-core": "5.1.0"
},
"devDependencies": {
"@sentry-internal/eslint-config": "5.1.0",
Expand All @@ -58,7 +57,6 @@
"@swc/jest": "^0.2.21",
"@types/jest": "^28.1.3",
"@types/node": "^18.6.3",
"@types/uuid": "^9.0.1",
"eslint": "^8.18.0",
"jest": "^28.1.1",
"premove": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/esbuild-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "@sentry/bundler-plugin-core";
import * as path from "node:path";
import { createRequire } from "node:module";
import { v4 as uuidv4 } from "uuid";
import { randomUUID } from "node:crypto";
Comment thread
timfish marked this conversation as resolved.

interface EsbuildOnResolveArgs {
path: string;
Comment thread
timfish marked this conversation as resolved.
Expand Down Expand Up @@ -268,7 +268,7 @@ export function sentryEsbuildPlugin(userOptions: Options = {}): any {
sideEffects: true,
pluginName,
namespace: "sentry-debug-id-stub",
suffix: "?sentry-module-id=" + uuidv4(),
suffix: "?sentry-module-id=" + randomUUID(),
};
});

Expand All @@ -278,7 +278,7 @@ export function sentryEsbuildPlugin(userOptions: Options = {}): any {
return {
loader: "js",
pluginName,
contents: getDebugIdSnippet(uuidv4()).code(),
contents: getDebugIdSnippet(randomUUID()).code(),
};
}
);
Expand Down
3 changes: 0 additions & 3 deletions packages/webpack-plugin/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ module.exports = {
transform: {
"^.+\\.(t|j)sx?$": ["@swc/jest"],
},
moduleNameMapper: {
uuid: require.resolve("uuid"), // https://stackoverflow.com/a/73203803
},
};
4 changes: 1 addition & 3 deletions packages/webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
"prepack": "ts-node ./src/prepack.ts"
},
"dependencies": {
"@sentry/bundler-plugin-core": "5.1.0",
"uuid": "^9.0.0"
"@sentry/bundler-plugin-core": "5.1.0"
},
"devDependencies": {
"@sentry-internal/eslint-config": "5.1.0",
Expand All @@ -63,7 +62,6 @@
"@swc/jest": "^0.2.21",
"@types/jest": "^28.1.3",
"@types/node": "^18.6.3",
"@types/uuid": "^9.0.1",
"@types/webpack": "npm:@types/webpack@^4",
"eslint": "^8.18.0",
"jest": "^28.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/webpack-plugin/src/webpack4and5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import * as path from "node:path";
import { fileURLToPath } from "node:url";
import { createRequire } from "node:module";
import { v4 as uuidv4 } from "uuid";
import { randomUUID } from "node:crypto";

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore Rollup transpiles import.meta for us for CJS
Expand Down Expand Up @@ -240,7 +240,7 @@ export function sentryWebpackPluginFactory({
const codeToInject = staticInjectionCode.clone();
if (sourcemapsEnabled) {
const hash = arg?.chunk?.contentHash?.javascript ?? arg?.chunk?.hash;
const debugId = hash ? stringToUUID(hash) : uuidv4();
const debugId = hash ? stringToUUID(hash) : randomUUID();
codeToInject.append(getDebugIdSnippet(debugId));
}
return codeToInject.code();
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2587,11 +2587,6 @@
dependencies:
source-map "^0.6.1"

"@types/uuid@^9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz#98586dc36aee8dacc98cc396dbca8d0429647aa6"
integrity sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==

"@types/webpack-sources@*":
version "3.2.0"
resolved "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-3.2.0.tgz#16d759ba096c289034b26553d2df1bf45248d38b"
Expand Down Expand Up @@ -10584,11 +10579,6 @@ uuid@8.3.2:
resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==

uuid@^9.0.0:
version "9.0.0"
resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"
integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==

v8-compile-cache-lib@^3.0.1:
version "3.0.1"
resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
Expand Down
Loading