Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"packages/integration-tests-next",
"packages/integration-tests-next/fixtures/rolldown",
"packages/integration-tests-next/fixtures/rollup3",
"packages/integration-tests-next/fixtures/rollup4"
"packages/integration-tests-next/fixtures/rollup4",
"packages/integration-tests-next/fixtures/vite4",
"packages/integration-tests-next/fixtures/vite7",
"packages/integration-tests-next/fixtures/vite8"
],
"scripts": {
"postinstall": "patch-package",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-component-annotate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"eslint": "^8.18.0",
"vitest": "^4.0.0",
"premove": "^4.0.0",
"rolldown": "^1.0.0-rc.6",
"rolldown": "1.0.0-rc.10",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/bundler-plugin-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"eslint": "^8.18.0",
"vitest": "^4.0.0",
"premove": "^4.0.0",
"rolldown": "^1.0.0-rc.6",
"rolldown": "1.0.0-rc.10",
"typescript": "^4.7.4"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion packages/esbuild-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"eslint": "^8.18.0",
"vitest": "^4.0.0",
"premove": "^4.0.0",
"rolldown": "^1.0.0-rc.6",
"rolldown": "1.0.0-rc.10",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => {
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"basic.js": "//#region src/basic.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b699d9c1-b033-4536-aa25-233c92609b54",e._sentryDebugIdIdentifier="sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");}catch(e){}}();console.log("hello world");

(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b699d9c1-b033-4536-aa25-233c92609b54", e._sentryDebugIdIdentifier = "sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");
} catch (e) {}
})();
console.log("hello world");
//#endregion

//# sourceMappingURL=basic.js.map",
}
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,26 @@ import { test } from "./utils";
test(import.meta.url, ({ runBundler, readOutputFiles }) => {
runBundler();
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"basic.js": "//#region src/basic.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];if(null!=a)for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:1234567890abcdef":true});var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b699d9c1-b033-4536-aa25-233c92609b54",e._sentryDebugIdIdentifier="sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");}catch(e){}}();console.log("hello world");

//#endregion",
}
`);
{
"basic.js": "//#region src/basic.js
(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = function(e) {
for (var n = 1; n < arguments.length; n++) {
var a = arguments[n];
if (null != a) for (var t in a) a.hasOwnProperty(t) && (e[t] = a[t]);
}
return e;
}({}, e._sentryModuleMetadata[new e.Error().stack], { "_sentryBundlerPluginAppKey:1234567890abcdef": true });
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b699d9c1-b033-4536-aa25-233c92609b54", e._sentryDebugIdIdentifier = "sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");
} catch (e) {}
})();
console.log("hello world");
//#endregion
",
}
`);
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ import { test } from "./utils";
test(import.meta.url, ({ runBundler, readOutputFiles }) => {
runBundler();
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"basic.js": "//#region src/basic.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b699d9c1-b033-4536-aa25-233c92609b54",e._sentryDebugIdIdentifier="sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");}catch(e){}}();console.log("hello world");
//#endregion",
}
`);
{
"basic.js": "//#region src/basic.js
(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b699d9c1-b033-4536-aa25-233c92609b54", e._sentryDebugIdIdentifier = "sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");
} catch (e) {}
})();
console.log("hello world");
//#endregion
",
}
`);
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => {
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"basic.js": "//#region src/basic.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b699d9c1-b033-4536-aa25-233c92609b54",e._sentryDebugIdIdentifier="sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");}catch(e){}}();console.log("hello world");

(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b699d9c1-b033-4536-aa25-233c92609b54", e._sentryDebugIdIdentifier = "sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");
} catch (e) {}
})();
console.log("hello world");
//#endregion

//# sourceMappingURL=basic.js.map",
"basic.js.map": "{"version":3,"file":"basic.js","names":[],"sources":["../../src/basic.js"],"sourcesContent":["// eslint-disable-next-line no-console\\nconsole.log(\\"hello world\\");\\n"],"mappings":";scACA,OAAA,CAAQ,GAAA,CAAI,CAAA,KAAA,CAAA,KAAA,CAAA,CAAc"}",
"basic.js.map": "{"version":3,"file":"basic.js","names":[],"sources":["../../src/basic.js"],"sourcesContent":["// eslint-disable-next-line no-console\\nconsole.log(\\"hello world\\");\\n"],"mappings":";;;;;;;;;AACA,QAAQ,IAAI,cAAc"}",
"sentry-cli-mock.json": "["releases","new","CURRENT_SHA"],
["releases","set-commits","CURRENT_SHA","--auto","--ignore-missing"],
["releases","finalize","CURRENT_SHA"],
Expand Down
14 changes: 11 additions & 3 deletions packages/integration-tests-next/fixtures/rolldown/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => {
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"basic.js": "//#region src/basic.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b699d9c1-b033-4536-aa25-233c92609b54",e._sentryDebugIdIdentifier="sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");}catch(e){}}();console.log("hello world");

//#endregion",
(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b699d9c1-b033-4536-aa25-233c92609b54", e._sentryDebugIdIdentifier = "sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");
} catch (e) {}
})();
console.log("hello world");
//#endregion
",
"sentry-cli-mock.json": "["releases","new","CURRENT_SHA"],
["releases","set-commits","CURRENT_SHA","--auto","--ignore-missing"],
["releases","finalize","CURRENT_SHA"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"basic.js": "//#region src/basic.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["react","rolldown"],"depsVersions":{"react":19},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b699d9c1-b033-4536-aa25-233c92609b54",e._sentryDebugIdIdentifier="sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");}catch(e){}}();console.log("hello world");

//#endregion",
(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
e.SENTRY_RELEASE = { id: "build-information-injection-test" };
e.SENTRY_BUILD_INFO = {
"deps": ["react", "rolldown"],
"depsVersions": { "react": 19 },
"nodeVersion":"NODE_VERSION"
};
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b699d9c1-b033-4536-aa25-233c92609b54", e._sentryDebugIdIdentifier = "sentry-dbid-b699d9c1-b033-4536-aa25-233c92609b54");
} catch (e) {}
})();
console.log("hello world");
//#endregion
",
}
`);
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,24 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => {
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"bundle.js": "//#region src/bundle.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="92a38845-d1ee-42b4-9812-67a76e42b480",e._sentryDebugIdIdentifier="sentry-dbid-92a38845-d1ee-42b4-9812-67a76e42b480");}catch(e){}}();console.log(JSON.stringify({
(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "92a38845-d1ee-42b4-9812-67a76e42b480", e._sentryDebugIdIdentifier = "sentry-dbid-92a38845-d1ee-42b4-9812-67a76e42b480");
} catch (e) {}
})();
console.log(JSON.stringify({
debug: "b",
trace: "b",
replayCanvas: "a",
replayIframe: "a",
replayShadowDom: "a",
replayWorker: "a"
}));

//#endregion",
//#endregion
",
}
`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,27 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
runBundler();
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b0a43d00-208c-4b0e-b024-c0951a1c11f8",e._sentryDebugIdIdentifier="sentry-dbid-b0a43d00-208c-4b0e-b024-c0951a1c11f8");}catch(e){}}();import { jsx, jsxs } from "../../../../../node_modules/react/jsx-runtime.js";

"app.js": "(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b0a43d00-208c-4b0e-b024-c0951a1c11f8", e._sentryDebugIdIdentifier = "sentry-dbid-b0a43d00-208c-4b0e-b024-c0951a1c11f8");
} catch (e) {}
})();
import { jsx, jsxs } from "../../../../../node_modules/react/jsx-runtime.js";
//#region src/component-a.jsx
function ComponentA() {
return /* @__PURE__ */ jsx("span", { children: "Component A" });
}

//#endregion
//#region src/app.jsx
function App() {
return /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx(ComponentA, {}), ";"] });
}

//#endregion
export { App as default };",
export { App as default };
",
}
`);
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
runBundler();
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4bdf6d53-8b4d-4766-b048-143c5e6d2cbd",e._sentryDebugIdIdentifier="sentry-dbid-4bdf6d53-8b4d-4766-b048-143c5e6d2cbd");}catch(e){}}();import { jsx, jsxs } from "../../../../../node_modules/react/jsx-runtime.js";

"app.js": "(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4bdf6d53-8b4d-4766-b048-143c5e6d2cbd", e._sentryDebugIdIdentifier = "sentry-dbid-4bdf6d53-8b4d-4766-b048-143c5e6d2cbd");
} catch (e) {}
})();
import { jsx, jsxs } from "../../../../../node_modules/react/jsx-runtime.js";
//#region src/component-a.jsx
function ComponentA() {
return /* @__PURE__ */ jsx("span", {
"data-sentry-component": "ComponentA",
children: "Component A"
});
}

//#endregion
//#region src/app.jsx
function App() {
Expand All @@ -23,9 +29,9 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
children: [/* @__PURE__ */ jsx(ComponentA, {}), ";"]
});
}

//#endregion
export { App as default };",
export { App as default };
",
}
`);
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
runBundler();
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0880f8a4-f072-4b80-b577-4bb7d5be4841",e._sentryDebugIdIdentifier="sentry-dbid-0880f8a4-f072-4b80-b577-4bb7d5be4841");}catch(e){}}();import { jsx, jsxs } from "../../../../../node_modules/react/jsx-runtime.js";

"app.js": "(function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
e.SENTRY_RELEASE = { id: "CURRENT_SHA" };
var n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0880f8a4-f072-4b80-b577-4bb7d5be4841", e._sentryDebugIdIdentifier = "sentry-dbid-0880f8a4-f072-4b80-b577-4bb7d5be4841");
} catch (e) {}
})();
import { jsx, jsxs } from "../../../../../node_modules/react/jsx-runtime.js";
//#region src/component-a.jsx
function ComponentA() {
return /* @__PURE__ */ jsx("span", {
Expand All @@ -15,7 +22,6 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
children: "Component A"
});
}

//#endregion
//#region src/app.jsx
function App() {
Expand All @@ -28,9 +34,9 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => {
}), ";"]
});
}

//#endregion
export { App as default };",
export { App as default };
",
}
`);
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { test } from "./utils";
test(import.meta.url, ({ runBundler, readOutputFiles }) => {
runBundler();
expect(readOutputFiles()).toMatchInlineSnapshot(`
{
"basic.js": "//#region src/basic.js
console.log("hello world");
{
"basic.js": "//#region src/basic.js
console.log("hello world");
//#endregion

//#endregion
//# sourceMappingURL=basic.js.map",
"basic.js.map": "{"version":3,"file":"basic.js","names":[],"sources":["../../src/basic.js"],"sourcesContent":["// eslint-disable-next-line no-console\\nconsole.log(\\"hello world\\");\\n"],"mappings":";AACA,QAAQ,IAAI,cAAc"}",
}
`);
//# sourceMappingURL=basic.js.map",
"basic.js.map": "{"version":3,"file":"basic.js","names":[],"sources":["../../src/basic.js"],"sourcesContent":["// eslint-disable-next-line no-console\\nconsole.log(\\"hello world\\");\\n"],"mappings":";AACA,QAAQ,IAAI,cAAc"}",
}
`);
});
Loading
Loading