diff --git a/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts index 51e2a7ee7517..880c5ff0e8b4 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts @@ -16,7 +16,10 @@ sentryTest('should not add source context lines to errors from script files', as const exception = eventData.exception?.values?.[0]; const frames = exception?.stacktrace?.frames; - expect(frames).toHaveLength(1); + expect(frames?.length).toBeGreaterThanOrEqual(1); + // Verify the subject.bundle.js frame is present + expect(frames?.some(f => f.filename?.includes('subject.bundle.js'))).toBe(true); + // Core assertion: no context lines should be added for script files frames?.forEach(f => { expect(f).not.toHaveProperty('pre_context'); expect(f).not.toHaveProperty('context_line'); diff --git a/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts b/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts index 35a0cffeb13c..697da77aa512 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadata/test.ts @@ -7,5 +7,9 @@ sentryTest('should provide module_metadata on stack frames in beforeSend', async const url = await getLocalTestUrl({ testDir: __dirname }); const errorEvent = await getFirstSentryEnvelopeRequest(page, url); - expect(errorEvent.extra?.['module_metadata_entries']).toEqual([{ foo: 'bar' }]); + // Filter out null entries from internal Sentry frames that don't have module metadata + const metadataEntries = (errorEvent.extra?.['module_metadata_entries'] as Array)?.filter( + entry => entry !== null, + ); + expect(metadataEntries).toEqual([{ foo: 'bar' }]); }); diff --git a/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts b/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts index 296e76c219c5..41634d3edc63 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/moduleMetadata/appliesMetadataWithRewriteFrames/test.ts @@ -9,6 +9,10 @@ sentryTest( const url = await getLocalTestUrl({ testDir: __dirname }); const errorEvent = await getFirstSentryEnvelopeRequest(page, url); - expect(errorEvent?.extra?.['module_metadata_entries']).toEqual([{ foo: 'baz' }]); + // Filter out null entries from internal Sentry frames that don't have module metadata + const metadataEntries = (errorEvent?.extra?.['module_metadata_entries'] as Array)?.filter( + entry => entry !== null, + ); + expect(metadataEntries).toEqual([{ foo: 'baz' }]); }, ); diff --git a/dev-packages/e2e-tests/test-applications/create-react-app/package.json b/dev-packages/e2e-tests/test-applications/create-react-app/package.json index 0c2bc337d396..795ea417bff3 100644 --- a/dev-packages/e2e-tests/test-applications/create-react-app/package.json +++ b/dev-packages/e2e-tests/test-applications/create-react-app/package.json @@ -19,7 +19,6 @@ "eject": "react-scripts eject", "clean": "npx rimraf node_modules pnpm-lock.yaml", "test:build": "pnpm install && pnpm build", - "test:build-ts3.8": "pnpm install && pnpm add typescript@3.8 && pnpm build", "test:build-canary": "pnpm install && pnpm add react@canary react-dom@canary && pnpm build", "test:assert": "pnpm -v" }, @@ -43,13 +42,5 @@ }, "volta": { "extends": "../../package.json" - }, - "sentryTest": { - "variants": [ - { - "build-command": "pnpm test:build-ts3.8", - "label": "create-react-app (TS 3.8)" - } - ] } } diff --git a/dev-packages/e2e-tests/test-applications/generic-ts3.8/.npmrc b/dev-packages/e2e-tests/test-applications/generic-ts3.8/.npmrc deleted file mode 100644 index 070f80f05092..000000000000 --- a/dev-packages/e2e-tests/test-applications/generic-ts3.8/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -@sentry:registry=http://127.0.0.1:4873 -@sentry-internal:registry=http://127.0.0.1:4873 diff --git a/dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts b/dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts deleted file mode 100644 index beb10260da38..000000000000 --- a/dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as _SentryReplay from '@sentry-internal/replay'; -import * as _SentryBrowser from '@sentry/browser'; -import * as _SentryCore from '@sentry/core'; -import * as _SentryNode from '@sentry/node'; -import * as _SentryWasm from '@sentry/wasm'; diff --git a/dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json b/dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json deleted file mode 100644 index fbd40cebcb07..000000000000 --- a/dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@sentry-internal/ts3.8-test", - "private": true, - "license": "MIT", - "scripts": { - "build:types": "pnpm run type-check", - "ts-version": "tsc --version", - "type-check": "tsc --project tsconfig.json", - "test:build": "pnpm install && pnpm run build:types", - "test:assert": "pnpm -v" - }, - "devDependencies": { - "typescript": "3.8.3", - "@types/node": "^14.0.0" - }, - "dependencies": { - "@sentry/browser": "latest || *", - "@sentry/core": "latest || *", - "@sentry/node": "latest || *", - "@sentry-internal/replay": "latest || *", - "@sentry/wasm": "latest || *" - }, - "volta": { - "extends": "../../package.json" - } -} diff --git a/dev-packages/e2e-tests/test-applications/generic-ts3.8/tsconfig.json b/dev-packages/e2e-tests/test-applications/generic-ts3.8/tsconfig.json deleted file mode 100644 index 95de9c93fc38..000000000000 --- a/dev-packages/e2e-tests/test-applications/generic-ts3.8/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "include": ["index.ts"], - "compilerOptions": { - "lib": ["es2018", "DOM"], - "skipLibCheck": false, - "noEmit": true, - "types": [], - "target": "es2018", - "moduleResolution": "node" - } -} diff --git a/dev-packages/e2e-tests/test-applications/nextjs-orpc/next.config.js b/dev-packages/e2e-tests/test-applications/nextjs-orpc/next.config.js index ade813b1cde3..c2c5f470b3a3 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-orpc/next.config.js +++ b/dev-packages/e2e-tests/test-applications/nextjs-orpc/next.config.js @@ -1,8 +1,8 @@ /** @type {import("next").NextConfig} */ const config = {}; -import { withSentryConfig } from '@sentry/nextjs'; +const { withSentryConfig } = require('@sentry/nextjs'); -export default withSentryConfig(config, { +module.exports = withSentryConfig(config, { disableLogger: true, }); diff --git a/dev-packages/e2e-tests/test-applications/nextjs-orpc/package.json b/dev-packages/e2e-tests/test-applications/nextjs-orpc/package.json index 7e32f562916a..ec0d324b5ab6 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-orpc/package.json +++ b/dev-packages/e2e-tests/test-applications/nextjs-orpc/package.json @@ -2,7 +2,6 @@ "name": "next-orpc", "version": "0.1.0", "private": true, - "type": "module", "scripts": { "build": "next build", "dev": "next dev -p 3030", diff --git a/dev-packages/e2e-tests/test-applications/nextjs-t3/next.config.js b/dev-packages/e2e-tests/test-applications/nextjs-t3/next.config.js index b22141b67893..9209b1480ec0 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-t3/next.config.js +++ b/dev-packages/e2e-tests/test-applications/nextjs-t3/next.config.js @@ -1,11 +1,11 @@ -await import('./src/env.js'); +require('./src/env.js'); /** @type {import("next").NextConfig} */ const config = {}; -import { withSentryConfig } from '@sentry/nextjs'; +const { withSentryConfig } = require('@sentry/nextjs'); -export default withSentryConfig(config, { +module.exports = withSentryConfig(config, { disableLogger: true, silent: true, }); diff --git a/dev-packages/e2e-tests/test-applications/nextjs-t3/package.json b/dev-packages/e2e-tests/test-applications/nextjs-t3/package.json index 3de6bc858768..95abab562e31 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-t3/package.json +++ b/dev-packages/e2e-tests/test-applications/nextjs-t3/package.json @@ -2,7 +2,6 @@ "name": "t3", "version": "0.1.0", "private": true, - "type": "module", "scripts": { "build": "next build", "clean": "npx rimraf node_modules pnpm-lock.yaml", diff --git a/dev-packages/e2e-tests/test-applications/react-router-6/package.json b/dev-packages/e2e-tests/test-applications/react-router-6/package.json index 20d9b4f85f18..f5c96b0413e1 100644 --- a/dev-packages/e2e-tests/test-applications/react-router-6/package.json +++ b/dev-packages/e2e-tests/test-applications/react-router-6/package.json @@ -21,7 +21,6 @@ "test": "playwright test", "clean": "npx rimraf node_modules pnpm-lock.yaml", "test:build": "pnpm install && pnpm build", - "test:build-ts3.8": "pnpm install && pnpm add typescript@3.8 && pnpm build", "test:build-canary": "pnpm install && pnpm add react@canary react-dom@canary && pnpm build", "test:assert": "pnpm test" }, @@ -51,13 +50,5 @@ }, "volta": { "extends": "../../package.json" - }, - "sentryTest": { - "variants": [ - { - "build-command": "pnpm test:build-ts3.8", - "label": "react-router-6 (TS 3.8)" - } - ] } } diff --git a/dev-packages/e2e-tests/test-applications/react-router-7-spa/package.json b/dev-packages/e2e-tests/test-applications/react-router-7-spa/package.json index aadbe6b3d736..ba875e688c26 100644 --- a/dev-packages/e2e-tests/test-applications/react-router-7-spa/package.json +++ b/dev-packages/e2e-tests/test-applications/react-router-7-spa/package.json @@ -24,7 +24,6 @@ "test": "playwright test", "clean": "npx rimraf node_modules pnpm-lock.yaml", "test:build": "pnpm install && pnpm build", - "test:build-ts3.8": "pnpm install && pnpm add typescript@3.8 && pnpm build", "test:build-canary": "pnpm install && pnpm add react@canary react-dom@canary && pnpm build", "test:assert": "pnpm test" }, @@ -49,14 +48,6 @@ "volta": { "extends": "../../package.json" }, - "sentryTest": { - "variants": [ - { - "build-command": "pnpm test:build-ts3.8", - "label": "react-router-7-spa (TS 3.8)" - } - ] - }, "pnpm": { "overrides": { "esbuild": "0.24.0" diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/vite.config.js b/dev-packages/e2e-tests/test-applications/sveltekit-2/vite.config.js index 1a410bee7e11..4b361e3eabbf 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/vite.config.js +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/vite.config.js @@ -9,4 +9,9 @@ export default defineConfig({ }), sveltekit(), ], + build: { + rollupOptions: { + external: ['fsevents'], + }, + }, }); diff --git a/dev-packages/node-core-integration-tests/package.json b/dev-packages/node-core-integration-tests/package.json index e44835ef32c3..64a1aec5e659 100644 --- a/dev-packages/node-core-integration-tests/package.json +++ b/dev-packages/node-core-integration-tests/package.json @@ -12,7 +12,7 @@ "scripts": { "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", + "build:transpile": "rolldown -c rollup.npm.config.mjs", "build:types": "tsc -p tsconfig.types.json", "clean": "rimraf -g **/node_modules && run-p clean:script", "clean:script": "node scripts/clean.js", diff --git a/dev-packages/node-integration-tests/package.json b/dev-packages/node-integration-tests/package.json index ed25bcfa1f59..b48bd947ae1a 100644 --- a/dev-packages/node-integration-tests/package.json +++ b/dev-packages/node-integration-tests/package.json @@ -12,7 +12,7 @@ "scripts": { "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", + "build:transpile": "rolldown -c rollup.npm.config.mjs", "build:types": "tsc -p tsconfig.types.json", "clean": "rimraf -g suites/**/node_modules suites/**/tmp_* && run-p clean:script", "clean:script": "node scripts/clean.js", diff --git a/dev-packages/rollup-utils/bundleHelpers.mjs b/dev-packages/rollup-utils/bundleHelpers.mjs index 8dd2ebd21999..005614f08b5b 100644 --- a/dev-packages/rollup-utils/bundleHelpers.mjs +++ b/dev-packages/rollup-utils/bundleHelpers.mjs @@ -3,48 +3,38 @@ */ import { builtinModules } from 'module'; - +import path from 'node:path'; +import fs from 'node:fs'; import deepMerge from 'deepmerge'; import { makeBrowserBuildPlugin, - makeCleanupPlugin, - makeCommonJSPlugin, makeIsDebugBuildPlugin, - makeLicensePlugin, - makeNodeResolvePlugin, makeRrwebBuildPlugin, makeSetSDKSourcePlugin, - makeSucrasePlugin, - makeTerserPlugin, + makeBannerOptions, + makeMinifierOptions, } from './plugins/index.mjs'; -import { mergePlugins } from './utils.mjs'; -import { makeProductionReplacePlugin } from './plugins/npmPlugins.mjs'; +import { mergePlugins, treeShakePreset } from './utils.mjs'; const BUNDLE_VARIANTS = ['.js', '.min.js', '.debug.min.js']; +const packageDotJSON = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), './package.json'), { encoding: 'utf8' })); + export function makeBaseBundleConfig(options) { - const { bundleType, entrypoints, licenseTitle, outputFileBase, packageSpecificConfig, sucrase } = options; + const { bundleType, entrypoints, licenseTitle, outputFileBase, packageSpecificConfig } = options; - const nodeResolvePlugin = makeNodeResolvePlugin(); - const sucrasePlugin = makeSucrasePlugin({}, sucrase); - const cleanupPlugin = makeCleanupPlugin(); const markAsBrowserBuildPlugin = makeBrowserBuildPlugin(true); - const licensePlugin = makeLicensePlugin(licenseTitle); + const banner = makeBannerOptions(licenseTitle, packageDotJSON.version); const rrwebBuildPlugin = makeRrwebBuildPlugin({ excludeIframe: false, excludeShadowDom: false, }); - const productionReplacePlugin = makeProductionReplacePlugin(); - - // The `commonjs` plugin is the `esModuleInterop` of the bundling world. When used with `transformMixedEsModules`, it - // will include all dependencies, imported or required, in the final bundle. (Without it, CJS modules aren't included - // at all, and without `transformMixedEsModules`, they're only included if they're imported, not if they're required.) - const commonJSPlugin = makeCommonJSPlugin({ transformMixedEsModules: true }); // used by `@sentry/browser` const standAloneBundleConfig = { output: { + banner, format: 'iife', name: 'Sentry', intro: () => { @@ -52,7 +42,7 @@ export function makeBaseBundleConfig(options) { }, }, context: 'window', - plugins: [rrwebBuildPlugin, markAsBrowserBuildPlugin, licensePlugin], + plugins: [rrwebBuildPlugin, markAsBrowserBuildPlugin], }; // used by `@sentry/wasm` & pluggable integrations from core/browser (bundles which need to be combined with a stand-alone SDK bundle) @@ -63,7 +53,7 @@ export function makeBaseBundleConfig(options) { format: 'cjs', // code to add before the CJS wrapper - banner: '(function (__window) {', + banner: `${banner}\n(function (__window) {`, // code to add just inside the CJS wrapper, before any of the wrapped code intro: 'var exports = {};', @@ -86,14 +76,15 @@ export function makeBaseBundleConfig(options) { // code to add after the CJS wrapper footer: '}(window));', }, - plugins: [rrwebBuildPlugin, markAsBrowserBuildPlugin, licensePlugin], + plugins: [rrwebBuildPlugin, markAsBrowserBuildPlugin], }; const workerBundleConfig = { output: { + banner, format: 'esm', + minify: makeMinifierOptions(), }, - plugins: [commonJSPlugin, makeTerserPlugin(), licensePlugin], // Don't bundle any of Node's core modules external: builtinModules, }; @@ -101,8 +92,9 @@ export function makeBaseBundleConfig(options) { const awsLambdaExtensionBundleConfig = { output: { format: 'esm', + minify: makeMinifierOptions(), }, - plugins: [commonJSPlugin, makeIsDebugBuildPlugin(true), makeTerserPlugin()], + plugins: [makeIsDebugBuildPlugin(true)], // Don't bundle any of Node's core modules external: builtinModules, }; @@ -110,16 +102,22 @@ export function makeBaseBundleConfig(options) { // used by all bundles const sharedBundleConfig = { input: entrypoints, + // Point to the package's tsconfig.json so rolldown respects TypeScript & JSX settings + tsconfig: path.resolve(process.cwd(), './tsconfig.json'), + + // Enforce ES2020 target for all builds + transform: { + target: 'es2020', + }, + output: { // a file extension will be added to this base value when we specify either a minified or non-minified build entryFileNames: outputFileBase, dir: 'build', sourcemap: true, - strict: false, esModule: false, }, - plugins: [productionReplacePlugin, sucrasePlugin, nodeResolvePlugin, cleanupPlugin], - treeshake: 'smallest', + treeshake: treeShakePreset('smallest'), }; const bundleTypeConfigMap = { @@ -149,7 +147,7 @@ export function makeBundleConfigVariants(baseConfig, options = {}) { const includeDebuggingPlugin = makeIsDebugBuildPlugin(true); const stripDebuggingPlugin = makeIsDebugBuildPlugin(false); - const terserPlugin = makeTerserPlugin(); + const minifierOptions = makeMinifierOptions(); const setSdkSourcePlugin = makeSetSDKSourcePlugin('cdn'); // The additional options to use for each variant we're going to create. @@ -164,15 +162,17 @@ export function makeBundleConfigVariants(baseConfig, options = {}) { '.min.js': { output: { entryFileNames: chunkInfo => `${baseConfig.output.entryFileNames(chunkInfo)}.min.js`, + minify: minifierOptions, }, - plugins: [stripDebuggingPlugin, setSdkSourcePlugin, terserPlugin], + plugins: [stripDebuggingPlugin, setSdkSourcePlugin], }, '.debug.min.js': { output: { entryFileNames: chunkInfo => `${baseConfig.output.entryFileNames(chunkInfo)}.debug.min.js`, + minify: minifierOptions, }, - plugins: [includeDebuggingPlugin, setSdkSourcePlugin, terserPlugin], + plugins: [includeDebuggingPlugin, setSdkSourcePlugin], }, }; @@ -180,6 +180,7 @@ export function makeBundleConfigVariants(baseConfig, options = {}) { if (!BUNDLE_VARIANTS.includes(variant)) { throw new Error(`Unknown bundle variant requested: ${variant}`); } + return deepMerge(baseConfig, variantSpecificConfigMap[variant], { // Merge the plugin arrays and make sure the end result is in the correct order. Everything else can use the // default merge strategy. diff --git a/dev-packages/rollup-utils/index.mjs b/dev-packages/rollup-utils/index.mjs index 2d8c9a2150bc..98527fc5ef30 100644 --- a/dev-packages/rollup-utils/index.mjs +++ b/dev-packages/rollup-utils/index.mjs @@ -1,7 +1,4 @@ -// TODO Is this necessary? -import * as plugins from './plugins/index.mjs'; -export { plugins }; - +export * from './plugins/index.mjs'; export * from './bundleHelpers.mjs'; export * from './npmHelpers.mjs'; -export { insertAt } from './utils.mjs'; +export { insertAt, treeShakePreset } from './utils.mjs'; diff --git a/dev-packages/rollup-utils/npmHelpers.mjs b/dev-packages/rollup-utils/npmHelpers.mjs index d5f7428b992d..0ff2759d71ae 100644 --- a/dev-packages/rollup-utils/npmHelpers.mjs +++ b/dev-packages/rollup-utils/npmHelpers.mjs @@ -8,19 +8,16 @@ import * as fs from 'fs'; import { builtinModules } from 'module'; import * as path from 'path'; import { fileURLToPath } from 'url'; - import deepMerge from 'deepmerge'; - -import { defineConfig } from 'rollup'; +import { defineConfig } from 'rolldown'; +import { dts as makeDtsPlugin } from 'rolldown-plugin-dts'; import { - makeCleanupPlugin, makeDebugBuildStatementReplacePlugin, - makeNodeResolvePlugin, makeProductionReplacePlugin, makeRrwebBuildPlugin, - makeSucrasePlugin, } from './plugins/index.mjs'; import { makePackageNodeEsm } from './plugins/make-esm-plugin.mjs'; +import { makeMoveDtsPlugin } from './plugins/move-dts-plugin.mjs'; import { mergePlugins } from './utils.mjs'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -34,22 +31,32 @@ export function makeBaseNPMConfig(options = {}) { entrypoints = ['src/index.ts'], hasBundles = false, packageSpecificConfig = {}, - sucrase = {}, bundledBuiltins = [], } = options; - const nodeResolvePlugin = makeNodeResolvePlugin(); - const sucrasePlugin = makeSucrasePlugin({}, sucrase); + // Make sure subpath imports are also treated as external (e.g., 'solid-js/web' when 'solid-js' is external) + const externalWithSubpaths = [ + ...Object.keys(packageDotJSON.dependencies || {}), + ...Object.keys(packageDotJSON.peerDependencies || {}), + ...Object.keys(packageDotJSON.optionalDependencies || {}), + ].map(dep => new RegExp(`^${dep}(?:/.*)?$`)); + const debugBuildStatementReplacePlugin = makeDebugBuildStatementReplacePlugin(); - const cleanupPlugin = makeCleanupPlugin(); const rrwebBuildPlugin = makeRrwebBuildPlugin({ excludeShadowDom: undefined, excludeIframe: undefined, }); - const defaultBaseConfig = { + const defaultBaseConfig = defineConfig({ input: entrypoints, + // Point to the package's tsconfig.json so rolldown respects TypeScript & JSX settings + tsconfig: path.resolve(process.cwd(), './tsconfig.json'), + + checks: { + pluginTimings: true, + }, + output: { // an appropriately-named directory will be added to this base value when we specify either a cjs or esm build dir: hasBundles ? 'build/npm' : 'build', @@ -62,14 +69,14 @@ export function makeBaseNPMConfig(options = {}) { // output individual files rather than one big bundle preserveModules: true, + // output files relative to the src directory + preserveModulesRoot: 'src', + // Allow wrappers or helper functions generated by rollup to use any ES2015 features generatedCode: { preset: 'es2015', }, - // don't add `"use strict"` to the top of cjs files - strict: false, - // do TS-3.8-style exports // exports.dogs = are.great // rather than TS-3.9-style exports @@ -78,12 +85,6 @@ export function makeBaseNPMConfig(options = {}) { // get: () => are.great, // }); externalLiveBindings: false, - - // Don't call `Object.freeze` on the results of `import * as someModule from '...'` - // (We don't need it, so why waste the bytes?) - freeze: false, - - interop: 'esModule', }, treeshake: { @@ -97,26 +98,34 @@ export function makeBaseNPMConfig(options = {}) { }, }, - plugins: [nodeResolvePlugin, sucrasePlugin, debugBuildStatementReplacePlugin, rrwebBuildPlugin, cleanupPlugin], + // Enforce ES2020 target for all builds + transform: { + target: 'es2020', + }, + + plugins: [debugBuildStatementReplacePlugin, rrwebBuildPlugin], // don't include imported modules from outside the package in the final output - external: [ - ...builtinModules.filter(m => !bundledBuiltins.includes(m)), - ...Object.keys(packageDotJSON.dependencies || {}), - ...Object.keys(packageDotJSON.peerDependencies || {}), - ...Object.keys(packageDotJSON.optionalDependencies || {}), - ], - }; - - return deepMerge(defaultBaseConfig, packageSpecificConfig, { + external: [...builtinModules.filter(m => !bundledBuiltins.includes(m)), ...externalWithSubpaths], + }); + + const baseConfig = deepMerge(defaultBaseConfig, packageSpecificConfig, { // Plugins have to be in the correct order or everything breaks, so when merging we have to manually re-order them customMerge: key => (key === 'plugins' ? mergePlugins : undefined), }); + + if (hasBundles) { + // @ts-expect-error - this is a private property that we use to determine if the package has bundles + baseConfig.__sentry_internal_hasBundles = true; + } + + return baseConfig; } export function makeNPMConfigVariants(baseConfig, options = {}) { const { emitEsm = true, emitCjs = true, splitDevProd = false } = options; + const hasBundles = baseConfig.__sentry_internal_hasBundles; const variantSpecificConfigs = []; if (emitCjs) { @@ -132,6 +141,15 @@ export function makeNPMConfigVariants(baseConfig, options = {}) { } if (emitEsm) { + const hasTypes = fs.existsSync(path.resolve(process.cwd(), './tsconfig.types.json')); + const dts = makeDtsPlugin({ + tsconfig: path.resolve(process.cwd(), hasTypes ? './tsconfig.types.json' : './tsconfig.json'), + tsgo: true, + }); + + const moveDtsDir = hasBundles ? 'build/npm/esm' : 'build/esm'; + const moveDtsOutputDir = hasBundles ? 'build/npm/types' : 'build/types'; + if (splitDevProd) { variantSpecificConfigs.push({ output: { @@ -140,24 +158,32 @@ export function makeNPMConfigVariants(baseConfig, options = {}) { plugins: [makePackageNodeEsm()], }, }); + variantSpecificConfigs.push({ + plugins: [dts], output: { format: 'esm', dir: path.join(baseConfig.output.dir, 'esm/prod'), - plugins: [makeProductionReplacePlugin(), makePackageNodeEsm()], + plugins: [ + makeProductionReplacePlugin(), + makePackageNodeEsm(), + makeMoveDtsPlugin(`${moveDtsDir}/prod`, moveDtsOutputDir), + ], }, }); } else { variantSpecificConfigs.push({ + plugins: [dts], output: { format: 'esm', dir: path.join(baseConfig.output.dir, 'esm'), - plugins: [makePackageNodeEsm()], + plugins: [makePackageNodeEsm(), makeMoveDtsPlugin(moveDtsDir, moveDtsOutputDir)], }, }); } } + // @ts-expect-error -TODO: Not properly typed at the moment return variantSpecificConfigs.map(variant => deepMerge(baseConfig, variant)); } diff --git a/dev-packages/rollup-utils/plugins/bundlePlugins.mjs b/dev-packages/rollup-utils/plugins/bundlePlugins.mjs index 9d6edd3157c0..7ace3c653e9a 100644 --- a/dev-packages/rollup-utils/plugins/bundlePlugins.mjs +++ b/dev-packages/rollup-utils/plugins/bundlePlugins.mjs @@ -1,73 +1,51 @@ -/** - * CommonJS plugin docs: https://github.com/rollup/plugins/tree/master/packages/commonjs - * License plugin docs: https://github.com/mjeanroy/rollup-plugin-license - * Replace plugin docs: https://github.com/rollup/plugins/tree/master/packages/replace - * Resolve plugin docs: https://github.com/rollup/plugins/tree/master/packages/node-resolve - * Terser plugin docs: https://github.com/TrySound/rollup-plugin-terser#options - * Terser docs: https://github.com/terser/terser#api-reference - * Typescript plugin docs: https://github.com/rollup/plugins/tree/master/packages/typescript/#readme - */ - import * as childProcess from 'child_process'; - -import commonjs from '@rollup/plugin-commonjs'; -import { nodeResolve } from '@rollup/plugin-node-resolve'; -import replace from '@rollup/plugin-replace'; -import terser from '@rollup/plugin-terser'; -import license from 'rollup-plugin-license'; +import { replacePlugin } from 'rolldown/plugins'; /** * Create a plugin to add an identification banner to the top of stand-alone bundles. * * @param title The title to use for the SDK, if not the package name - * @returns An instance of the `rollup-plugin-license` plugin + * @param version The version of the SDK */ -export function makeLicensePlugin(title) { +export function makeBannerOptions(title, version) { const commitHash = childProcess.execSync('git rev-parse --short HEAD', { encoding: 'utf-8' }).trim(); - const plugin = license({ - banner: { - content: `/*! <%= data.title %> <%= pkg.version %> (${commitHash}) | https://github.com/getsentry/sentry-javascript */`, - data: { title }, - }, - }); - - // give it a nicer name for later, when we'll need to sort the plugins - plugin.name = 'license'; - - return plugin; + return `/*! ${title} ${version} (${commitHash}) | https://github.com/getsentry/sentry-javascript */`; } /** * Create a plugin to set the value of the `__SENTRY_DEBUG__` magic string. * * @param includeDebugging Whether or not the resulting build should include log statements - * @returns An instance of the `@rollup/plugin-replace` plugin to do the replacement of the magic string with `true` or + * @returns An instance of the `rolldown.replacePlugin` plugin to do the replacement of the magic string with `true` or * 'false` */ export function makeIsDebugBuildPlugin(includeDebugging) { - return replace({ - // TODO `preventAssignment` will default to true in version 5.x of the replace plugin, at which point we can get rid - // of this. (It actually makes no difference in this case whether it's true or false, since we never assign to - // `__SENTRY_DEBUG__`, but if we don't give it a value, it will spam with warnings.) - preventAssignment: true, - values: { + return replacePlugin( + { // Flags in current package - __DEBUG_BUILD__: includeDebugging, + __DEBUG_BUILD__: JSON.stringify(includeDebugging), // Flags in built monorepo dependencies, from which the bundle pulls - __SENTRY_DEBUG__: includeDebugging, + __SENTRY_DEBUG__: JSON.stringify(includeDebugging), + }, + { + // of this. (It actually makes no difference in this case whether it's true or false, since we never assign to + // `__SENTRY_DEBUG__`, but if we don't give it a value, it will spam with warnings.) + preventAssignment: true, }, - }); + ); } export function makeSetSDKSourcePlugin(sdkSource) { - return replace({ - preventAssignment: false, - delimiters: ['', ''], - values: { - '/* __SENTRY_SDK_SOURCE__ */': `return ${JSON.stringify(sdkSource)};`, + return replacePlugin( + { + '/*! __SENTRY_SDK_SOURCE__ */': `return ${JSON.stringify(sdkSource)};`, }, - }); + { + preventAssignment: false, + delimiters: ['', ''], + }, + ); } /** @@ -77,81 +55,72 @@ export function makeSetSDKSourcePlugin(sdkSource) { * @returns An instance of the `replace` plugin to do the replacement of the magic string with `true` or 'false` */ export function makeBrowserBuildPlugin(isBrowserBuild) { - return replace({ - // TODO This will be the default in the next version of the `replace` plugin - preventAssignment: true, - values: { - __SENTRY_BROWSER_BUNDLE__: isBrowserBuild, + return replacePlugin( + { + __SENTRY_BROWSER_BUNDLE__: JSON.stringify(!!isBrowserBuild), + // Replace process.env.NODE_ENV for browser bundles (needed for dependencies like Preact) + 'process.env.NODE_ENV': JSON.stringify('production'), + }, + { + preventAssignment: true, }, - }); + ); } -// `terser` options reference: https://github.com/terser/terser#api-reference -// `rollup-plugin-terser` options reference: https://github.com/TrySound/rollup-plugin-terser#options - /** - * Create a plugin to perform minification using `terser`. + * Create minifier options for the rollup build. * - * @returns An instance of the `terser` plugin + * @returns {import('rolldown').OutputOptions['minify']} */ -export function makeTerserPlugin() { - return terser({ - mangle: { - // `captureException` and `captureMessage` are public API methods and they don't need to be listed here, as the - // mangler won't touch user-facing things, but `sentryWrapped` is not user-facing, and would be mangled during - // minification. (We need it in its original form to correctly detect our internal frames for stripping.) All three - // are all listed here just for the clarity's sake, as they are all used in the frames manipulation process. - reserved: ['captureException', 'captureMessage', 'sentryWrapped'], - properties: { - // allow mangling of private field names... - regex: /^_[^_]/, - reserved: [ - // ...except for `_experiments`, which we want to remain usable from the outside - '_experiments', - // We want to keep some replay fields unmangled to enable integration tests to access them - '_replay', - '_canvas', - // We also can't mangle rrweb private fields when bundling rrweb in the replay CDN bundles - '_cssText', - // We want to keep the _integrations variable unmangled to send all installed integrations from replay - '_integrations', - // _meta is used to store metadata of replay network events - '_meta', - // We store SDK metadata in the options - '_metadata', - // Object we inject debug IDs into with bundler plugins - '_sentryDebugIds', - // These are used by instrument.ts in utils for identifying HTML elements & events - '_sentryCaptured', - '_sentryId', - // Keeps the frozen DSC on a Sentry Span - '_frozenDsc', - // These are used to keep span & scope relationships - '_sentryRootSpan', - '_sentryChildSpans', - '_sentrySpan', - '_sentryScope', - '_sentryIsolationScope', - // require-in-the-middle calls `Module._resolveFilename`. We cannot mangle this (AWS lambda layer bundle). - '_resolveFilename', - // Set on e.g. the shim feedbackIntegration to be able to detect it - '_isShim', - // This is used in metadata integration - '_sentryModuleMetadata', - ], - }, - }, - output: { - comments: false, - }, - }); -} +export function makeMinifierOptions() { + // FIXME: mangle properties options are not supported by rolldown yet, so we return true for now. + // We should remove this once rolldown supports these options. + // Keeping the original options for reference in case we want to add them back. + // For now, rolldown won't mangle properties, so it should be safe. + // https://github.com/oxc-project/oxc/issues/15375 + // `captureException` and `captureMessage` are public API methods and they don't need to be listed here, as the + // mangler won't touch user-facing things, but `sentryWrapped` is not user-facing, and would be mangled during + // minification. (We need it in its original form to correctly detect our internal frames for stripping.) All three + // are all listed here just for the clarity's sake, as they are all used in the frames manipulation process. + // reserved: ['captureException', 'captureMessage', 'sentryWrapped'], + // properties: { + // // allow mangling of private field names... + // regex: /^_[^_]/, + // reserved: [ + // // ...except for `_experiments`, which we want to remain usable from the outside + // '_experiments', + // // We want to keep some replay fields unmangled to enable integration tests to access them + // '_replay', + // '_canvas', + // // We also can't mangle rrweb private fields when bundling rrweb in the replay CDN bundles + // '_cssText', + // // We want to keep the _integrations variable unmangled to send all installed integrations from replay + // '_integrations', + // // _meta is used to store metadata of replay network events + // '_meta', + // // We store SDK metadata in the options + // '_metadata', + // // Object we inject debug IDs into with bundler plugins + // '_sentryDebugIds', + // // These are used by instrument.ts in utils for identifying HTML elements & events + // '_sentryCaptured', + // '_sentryId', + // // Keeps the frozen DSC on a Sentry Span + // '_frozenDsc', + // // These are used to keep span & scope relationships + // '_sentryRootSpan', + // '_sentryChildSpans', + // '_sentrySpan', + // '_sentryScope', + // '_sentryIsolationScope', + // // require-in-the-middle calls `Module._resolveFilename`. We cannot mangle this (AWS lambda layer bundle). + // '_resolveFilename', + // // Set on e.g. the shim feedbackIntegration to be able to detect it + // '_isShim', + // // This is used in metadata integration + // '_sentryModuleMetadata', + // ], + // }, -// We don't pass these plugins any options which need to be calculated or changed by us, so no need to wrap them in -// another factory function, as they are themselves already factory functions. - -export function makeNodeResolvePlugin() { - return nodeResolve(); + return true; } - -export { commonjs as makeCommonJSPlugin }; diff --git a/dev-packages/rollup-utils/plugins/make-esm-plugin.mjs b/dev-packages/rollup-utils/plugins/make-esm-plugin.mjs index ad18856c011a..908afc7cb157 100644 --- a/dev-packages/rollup-utils/plugins/make-esm-plugin.mjs +++ b/dev-packages/rollup-utils/plugins/make-esm-plugin.mjs @@ -1,4 +1,5 @@ import fs from 'node:fs'; +import path from 'node:path'; /** * Outputs a package.json file with {type: module} in the root of the output directory so that Node @@ -11,9 +12,9 @@ export function makePackageNodeEsm() { // We need to keep the `sideEffects` value from the original package.json, // as e.g. webpack seems to depend on this // without this, tree shaking does not work as expected - const packageJSONPath = (await this.resolve('package.json')).id; - - const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, 'utf-8')); + const packageJSON = JSON.parse( + fs.readFileSync(path.resolve(process.cwd(), './package.json'), { encoding: 'utf8' }), + ); const sideEffects = packageJSON.sideEffects; // For module federation we need to keep the version of the package const version = packageJSON.version; diff --git a/dev-packages/rollup-utils/plugins/move-dts-plugin.mjs b/dev-packages/rollup-utils/plugins/move-dts-plugin.mjs new file mode 100644 index 000000000000..cf7bae86f711 --- /dev/null +++ b/dev-packages/rollup-utils/plugins/move-dts-plugin.mjs @@ -0,0 +1,73 @@ +import fs from 'node:fs'; +import fsPromises from 'node:fs/promises'; +import path from 'node:path'; + +/** + * Plugin that moves all .d.ts and .d.ts.map files from build/esm to build/types after the build completes. + * This preserves the directory structure within the types directory. + * Optimized for speed with parallel file operations. + */ +export function makeMoveDtsPlugin(searchDir = 'build/esm', outputDir = 'build/types') { + return { + name: 'move-dts-files', + async writeBundle() { + const buildEsmDir = path.resolve(process.cwd(), searchDir); + const buildTypesDir = path.resolve(process.cwd(), outputDir); + + // Check if build/esm exists + if (!fs.existsSync(buildEsmDir)) { + return; + } + + // Ensure build/types directory exists (recursive handles existing dirs) + await fsPromises.mkdir(buildTypesDir, { recursive: true }); + + /** + * Recursively find all .d.ts and .d.ts.map files in a directory + * @param {string} dir - Directory to search + * @param {string} baseDir - Base directory for relative path calculation + * @returns {Array<{relativePath: string, fullPath: string, targetPath: string}>} Array of file info objects + */ + function findDtsFiles(dir, baseDir = dir) { + const files = []; + const entries = fs.readdirSync(dir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + const relativePath = path.relative(baseDir, fullPath); + + if (entry.isDirectory()) { + files.push(...findDtsFiles(fullPath, baseDir)); + } else if (entry.isFile() && (entry.name.endsWith('.d.ts') || entry.name.endsWith('.d.ts.map'))) { + const targetPath = path.join(buildTypesDir, relativePath); + files.push({ relativePath, fullPath, targetPath }); + } + } + + return files; + } + + const dtsFiles = findDtsFiles(buildEsmDir); + + // Early exit if no files to move + if (dtsFiles.length === 0) { + return; + } + + // Collect all unique directories that need to be created + const dirsToCreate = new Set(); + for (const { targetPath } of dtsFiles) { + const targetDir = path.dirname(targetPath); + if (targetDir !== buildTypesDir) { + dirsToCreate.add(targetDir); + } + } + + // Create all directories in parallel + await Promise.all(Array.from(dirsToCreate).map(dir => fsPromises.mkdir(dir, { recursive: true }))); + + // Move all files in parallel + await Promise.all(dtsFiles.map(({ fullPath, targetPath }) => fsPromises.rename(fullPath, targetPath))); + }, + }; +} diff --git a/dev-packages/rollup-utils/plugins/npmPlugins.mjs b/dev-packages/rollup-utils/plugins/npmPlugins.mjs index 7f08873f1c80..898fb95eb091 100644 --- a/dev-packages/rollup-utils/plugins/npmPlugins.mjs +++ b/dev-packages/rollup-utils/plugins/npmPlugins.mjs @@ -1,46 +1,10 @@ /** - * Rollup plugin hooks docs: https://rollupjs.org/guide/en/#build-hooks and - * https://rollupjs.org/guide/en/#output-generation-hooks - * - * Cleanup plugin docs: https://github.com/aMarCruz/rollup-plugin-cleanup - * Replace plugin docs: https://github.com/rollup/plugins/tree/master/packages/replace - * Sucrase plugin docs: https://github.com/rollup/plugins/tree/master/packages/sucrase + * Replace plugin docs: https://rolldown.rs/builtin-plugins/replace#replace-plugin */ -import * as fs from 'fs'; -import * as path from 'path'; - -import json from '@rollup/plugin-json'; -import replace from '@rollup/plugin-replace'; -import cleanup from 'rollup-plugin-cleanup'; -import sucrase from './vendor/sucrase-plugin.mjs'; - -/** - * Create a plugin to transpile TS syntax using `sucrase`. - * - * @returns An instance of the `@rollup/plugin-sucrase` plugin - */ -export function makeSucrasePlugin(options = {}, sucraseOptions = {}) { - return sucrase( - { - // Required for bundling OTEL code properly - exclude: ['**/*.json'], - ...options, - }, - { - transforms: ['typescript', 'jsx'], - // We use a custom forked version of sucrase, - // where there is a new option `disableES2019Transforms` - disableESTransforms: false, - disableES2019Transforms: true, - ...sucraseOptions, - }, - ); -} +import { replacePlugin } from 'rolldown/plugins'; -export function makeJsonPlugin() { - return json(); -} +export { makeMoveDtsPlugin } from './move-dts-plugin.mjs'; /** * Create a plugin which can be used to pause the build process at the given hook. @@ -92,46 +56,38 @@ export function makeDebuggerPlugin(hookName) { }; } -/** - * Create a plugin to clean up output files by: - * - Converting line endings unix line endings - * - Removing consecutive empty lines - * - * @returns A `rollup-plugin-cleanup` instance. - */ -export function makeCleanupPlugin() { - return cleanup({ - // line endings are unix-ized by default - comments: 'all', // comments to keep - compactComments: 'false', // don't remove blank lines in multi-line comments - maxEmptyLines: 1, - extensions: ['js', 'jsx', 'ts', 'tsx'], - }); -} - /** * Creates a plugin to replace all instances of "__DEBUG_BUILD__" with a safe statement that * a) evaluates to `true` * b) can easily be modified by our users' bundlers to evaluate to false, facilitating the treeshaking of logger code. * - * @returns A `@rollup/plugin-replace` instance. + * @returns A `rolldown.replacePlugin` instance. */ export function makeDebugBuildStatementReplacePlugin() { - return replace({ - preventAssignment: false, - values: { + return replacePlugin( + { __DEBUG_BUILD__: "(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)", }, - }); + { + preventAssignment: true, + }, + ); } export function makeProductionReplacePlugin() { - const pattern = /\/\* rollup-include-development-only \*\/[\s\S]*?\/\* rollup-include-development-only-end \*\/\s*/g; + // Use legal comments (/*!) so they're preserved by Rolldown + // NOTE: Due to a Rolldown limitation, the ending comment must be placed before a statement + // (e.g., before a return) rather than after a block, otherwise it gets stripped. + // See: https://github.com/rolldown/rolldown/issues/[TODO: file issue] + const pattern = + /\/\*! rollup-include-development-only \*\/[\s\S]*?\/\*! rollup-include-development-only-end \*\/\s*/g; function stripDevBlocks(code) { if (!code) return null; if (!code.includes('rollup-include-development-only')) return null; + const replaced = code.replace(pattern, ''); + return { code: replaced, map: null }; } @@ -162,23 +118,7 @@ export function makeRrwebBuildPlugin({ excludeShadowDom, excludeIframe } = {}) { values['__RRWEB_EXCLUDE_IFRAME__'] = excludeIframe; } - return replace({ + return replacePlugin(values, { preventAssignment: true, - values, - }); -} - -/** - * Plugin that uploads bundle analysis to codecov. - * - * @param type The type of bundle being uploaded. - * @param prefix The prefix for the codecov bundle name. Defaults to 'npm'. - */ -export function makeCodeCovPlugin() { - const packageJson = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), './package.json'), { encoding: 'utf8' })); - return codecovRollupPlugin({ - enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, - bundleName: packageJson.name, - uploadToken: process.env.CODECOV_TOKEN, }); } diff --git a/dev-packages/rollup-utils/plugins/vendor/sucrase-plugin.mjs b/dev-packages/rollup-utils/plugins/vendor/sucrase-plugin.mjs deleted file mode 100644 index 63465e768bc9..000000000000 --- a/dev-packages/rollup-utils/plugins/vendor/sucrase-plugin.mjs +++ /dev/null @@ -1,79 +0,0 @@ -// Vendored from https://github.com/rollup/plugins/blob/0090e728f52828d39b071ab5c7925b9b575cd568/packages/sucrase/src/index.js and modified - -/* - -The MIT License (MIT) - -Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -import fs from 'fs'; -import path from 'path'; - -import { createFilter } from '@rollup/pluginutils'; -import { transform } from 'sucrase'; - -export default function sucrase(opts = {}, sucraseOpts = {}) { - const filter = createFilter(opts.include, opts.exclude); - - return { - name: 'sucrase', - - // eslint-disable-next-line consistent-return - resolveId(importee, importer) { - if (importer && /^[./]/.test(importee)) { - const resolved = path.resolve(importer ? path.dirname(importer) : process.cwd(), importee); - // resolve in the same order that TypeScript resolves modules - const resolvedFilenames = [ - `${resolved}.ts`, - `${resolved}.tsx`, - `${resolved}/index.ts`, - `${resolved}/index.tsx`, - ]; - if (resolved.endsWith('.js')) { - resolvedFilenames.splice(2, 0, `${resolved.slice(0, -3)}.ts`, `${resolved.slice(0, -3)}.tsx`); - } - const resolvedFilename = resolvedFilenames.find(filename => fs.existsSync(filename)); - - if (resolvedFilename) { - return resolvedFilename; - } - } - }, - - transform(code, id) { - if (!filter(id)) return null; - const result = transform(code, { - transforms: sucraseOpts.transforms, - filePath: id, - sourceMapOptions: { - compiledFilename: id, - }, - ...sucraseOpts, - }); - return { - code: result.code, - map: result.sourceMap, - }; - }, - }; -} diff --git a/dev-packages/rollup-utils/utils.mjs b/dev-packages/rollup-utils/utils.mjs index b687ff9993c4..4dec0fc3e346 100644 --- a/dev-packages/rollup-utils/utils.mjs +++ b/dev-packages/rollup-utils/utils.mjs @@ -21,16 +21,7 @@ export function mergePlugins(pluginsA, pluginsB) { // here. // Additionally, the excludeReplay plugin must run before TS/Sucrase so that we can eliminate the replay code // before anything is type-checked (TS-only) and transpiled. - const order = [ - 'remove-dev-mode-blocks', - 'excludeReplay', - 'typescript', - 'sucrase', - '...', - 'terser', - 'license', - 'output-base64-worker-script', - ]; + const order = ['remove-dev-mode-blocks', 'excludeReplay', '...', 'output-base64-worker-script']; const sortKeyA = order.includes(a.name) ? a.name : '...'; const sortKeyB = order.includes(b.name) ? b.name : '...'; @@ -39,3 +30,22 @@ export function mergePlugins(pluginsA, pluginsB) { return plugins; } + +/** + * Creates a treeshake setting preset, rolldown doesn't have "smallest" as a preset, so we need to create our own. + * Smallest + * https://rolldown.rs/options/treeshake#treeshake + * https://rollupjs.org/configuration-options/#treeshake + * @param {boolean | readonly string[] | ModuleSideEffectsRule[] | ((id: string, external: boolean) => boolean | undefined) | 'no-external' | 'smallest'} preset - The preset to use + */ +export function treeShakePreset(preset) { + if (preset === 'smallest') { + return { + propertyReadSideEffects: false, + moduleSideEffects: false, + unknownGlobalSideEffects: false, + }; + } + + return preset; +} diff --git a/dev-packages/test-utils/package.json b/dev-packages/test-utils/package.json index f6f9a426e2c5..87ac398109b3 100644 --- a/dev-packages/test-utils/package.json +++ b/dev-packages/test-utils/package.json @@ -36,7 +36,7 @@ "build": "run-s build:transpile build:types", "build:tarball": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", + "build:transpile": "rolldown -c rollup.npm.config.mjs", "build:types": "tsc -p tsconfig.types.json", "clean": "rimraf -g ./node_modules ./build" }, diff --git a/nx.json b/nx.json index d4a90a3a6777..0ec797427f01 100644 --- a/nx.json +++ b/nx.json @@ -41,13 +41,8 @@ }, "build:types": { "inputs": ["production", "^production"], - "dependsOn": ["^build:types"], - "outputs": [ - "{projectRoot}/build/types", - "{projectRoot}/build/types-ts3.8", - "{projectRoot}/build/npm/types", - "{projectRoot}/build/npm/types-ts3.8" - ] + "dependsOn": ["build:transpile", "^build:transpile", "^build:types"], + "outputs": ["{projectRoot}/build/types", "{projectRoot}/build/npm/types"] }, "lint": { "inputs": ["default"], diff --git a/package.json b/package.json index c92a18b0dfe1..d38f46019546 100644 --- a/package.json +++ b/package.json @@ -104,22 +104,13 @@ "dev-packages/bundler-tests" ], "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-esm-shim": "^0.1.5", - "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-replace": "^5.0.5", - "@rollup/plugin-sucrase": "^5.0.2", - "@rollup/plugin-terser": "^0.4.4", - "@rollup/plugin-typescript": "^11.1.6", - "@rollup/pluginutils": "^5.1.0", "@size-limit/file": "~11.1.6", "@size-limit/webpack": "~11.1.6", "@types/jsdom": "^21.1.6", "@types/node": "^18.19.1", + "@typescript/native-preview": "^7.0.0-dev.20251210.1", "@vitest/coverage-v8": "^3.2.4", "deepmerge": "^4.2.2", - "downlevel-dts": "~0.11.0", "es-check": "^7.2.1", "eslint": "8.57.0", "jsdom": "^21.1.2", @@ -130,11 +121,9 @@ "prettier": "^3.6.2", "prettier-plugin-astro": "^0.14.1", "rimraf": "^5.0.10", - "rollup": "^4.35.0", - "rollup-plugin-cleanup": "^3.2.1", - "rollup-plugin-license": "^3.3.1", + "rolldown": "^1.0.0-beta.57", + "rolldown-plugin-dts": "^0.19.2", "size-limit": "~11.1.6", - "sucrase": "^3.35.0", "ts-node": "10.9.1", "typescript": "~5.8.0", "vitest": "^3.2.4", @@ -150,7 +139,6 @@ "gauge/strip-ansi": "6.0.1", "wide-align/string-width": "4.2.3", "cliui/wrap-ansi": "7.0.0", - "sucrase": "getsentry/sucrase#es2020-polyfills", "import-in-the-middle": "2.0.1" }, "version": "0.0.0", diff --git a/packages/astro/package.json b/packages/astro/package.json index cb7ea61b933a..7eb8709afe9b 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -33,7 +33,7 @@ "require": "./build/cjs/index.server.js" }, "./middleware": { - "types": "./build/types/integration/middleware/index.types.d.ts", + "types": "./build/types/integration/middleware/index.d.ts", "node": "./build/esm/integration/middleware/index.js", "import": "./build/esm/integration/middleware/index.js", "require": "./build/cjs/integration/middleware/index.js" @@ -68,12 +68,11 @@ "scripts": { "build": "run-p build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "tsc -p tsconfig.types.json", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-astro-*.tgz", diff --git a/packages/astro/rollup.npm.config.mjs b/packages/astro/rollup.npm.config.mjs index ca3b338433a7..6a95369188d2 100644 --- a/packages/astro/rollup.npm.config.mjs +++ b/packages/astro/rollup.npm.config.mjs @@ -2,7 +2,12 @@ import { makeBaseNPMConfig, makeNPMConfigVariants, makeOtelLoaders } from '@sent const variants = makeNPMConfigVariants( makeBaseNPMConfig({ - entrypoints: ['src/index.server.ts', 'src/index.client.ts', 'src/integration/middleware/index.ts'], + entrypoints: [ + 'src/index.server.ts', + 'src/index.client.ts', + 'src/index.types.ts', + 'src/integration/middleware/index.ts', + ], packageSpecificConfig: { output: { dynamicImportInCjs: true, diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index 4c12516b8423..5c20304e7154 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -54,13 +54,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -79,17 +72,14 @@ "@vercel/nft": "^0.29.4" }, "scripts": { - "build": "run-p build:transpile build:types", - "build:layer": "rimraf build/aws && rollup -c rollup.lambda-extension.config.mjs && yarn ts-node scripts/buildLambdaLayer.ts", - "build:dev": "run-p build:transpile build:types", - "build:transpile": "rollup -c rollup.npm.config.mjs && yarn build:layer", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8", + "build": "run-s build:transpile build:types", + "build:layer": "rimraf build/aws && rolldown -c rollup.lambda-extension.config.mjs && yarn ts-node scripts/buildLambdaLayer.ts", + "build:dev": "run-s build:transpile build:types", + "build:transpile": "rolldown -c rollup.npm.config.mjs && yarn build:layer", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build dist-awslambda-layer coverage sentry-serverless-*.tgz", diff --git a/packages/aws-serverless/scripts/buildLambdaLayer.ts b/packages/aws-serverless/scripts/buildLambdaLayer.ts index 241bc864816a..b5a63874adf2 100644 --- a/packages/aws-serverless/scripts/buildLambdaLayer.ts +++ b/packages/aws-serverless/scripts/buildLambdaLayer.ts @@ -22,6 +22,8 @@ function run(cmd: string, options?: childProcess.ExecSyncOptions): string { async function buildLambdaLayer(): Promise { console.log('Building Lambda layer.'); buildPackageJson(); + // Clean up Angular ngcc lock files that can cause yarn install to fail when using file: dependencies + cleanupNgccLockFiles(); console.log('Installing local @sentry/aws-serverless into build/aws/dist-serverless/nodejs.'); run('yarn install --prod --cwd ./build/aws/dist-serverless/nodejs'); @@ -153,6 +155,31 @@ function getAllFiles(dir: string): string[] { return files; } +/** + * Clean up Angular ngcc lock files from all packages that could interfere with yarn install. + * These lock files can cause ENOENT errors when yarn tries to copy files from file: dependencies. + */ +function cleanupNgccLockFiles(): void { + const packagesDir = path.resolve(__dirname, '../..'); + const packageDirs = fs + .readdirSync(packagesDir, { withFileTypes: true }) + .filter(dirent => dirent.isDirectory()) + .map(dirent => dirent.name) + .filter(name => !name.startsWith('.')); + + for (const packageDir of packageDirs) { + const lockFilePath = path.join(packagesDir, packageDir, 'node_modules', '.ngcc_lock_file'); + if (fs.existsSync(lockFilePath)) { + try { + fs.unlinkSync(lockFilePath); + console.log(`Removed ${lockFilePath}`); + } catch { + console.warn(`Warning: Could not remove ${lockFilePath}`); + } + } + } +} + function buildPackageJson(): void { console.log('Building package.json'); const packagesDir = path.resolve(__dirname, '../..'); @@ -207,8 +234,8 @@ function replaceSDKSource(): void { // Replace the line marked with __SENTRY_SDK_SOURCE__ comment // Change from 'npm' to 'aws-lambda-layer' to identify that this is the AWS Lambda layer content = content.replace( - "/* __SENTRY_SDK_SOURCE__ */ return 'npm';", - "/* __SENTRY_SDK_SOURCE__ */ return 'aws-lambda-layer';", + '/*! __SENTRY_SDK_SOURCE__ */ return "npm";', + '/*! __SENTRY_SDK_SOURCE__ */ return "aws-lambda-layer";', ); fs.writeFileSync(envFile, content); diff --git a/packages/browser-utils/package.json b/packages/browser-utils/package.json index 85c2641d5aca..bbf582c188d8 100644 --- a/packages/browser-utils/package.json +++ b/packages/browser-utils/package.json @@ -28,13 +28,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -42,16 +35,13 @@ "@sentry/core": "10.32.1" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "run-p build:transpile:watch build:types:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "clean": "rimraf build coverage sentry-internal-browser-utils-*.tgz", "fix": "eslint . --format stylish --fix", diff --git a/packages/browser/package.json b/packages/browser/package.json index eaa2e2bd106a..baa8bbb59cab 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -33,13 +33,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -55,18 +48,15 @@ "fake-indexeddb": "^6.2.4" }, "scripts": { - "build": "run-p build:transpile build:bundle build:types", - "build:dev": "run-p build:transpile build:types", - "build:bundle": "rollup -c rollup.bundle.config.mjs", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8", + "build": "run-s build:transpile build:types build:bundle", + "build:dev": "run-s build:transpile build:types", + "build:bundle": "rolldown -c rollup.bundle.config.mjs", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch", "build:dev:watch": "run-p build:transpile:watch build:types:watch", - "build:bundle:watch": "rollup -c rollup.bundle.config.mjs --watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:bundle:watch": "rolldown -c rollup.bundle.config.mjs --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage .rpt2_cache sentry-browser-*.tgz", diff --git a/packages/browser/src/sdk.ts b/packages/browser/src/sdk.ts index 800c1b701352..f6df23564aa6 100644 --- a/packages/browser/src/sdk.ts +++ b/packages/browser/src/sdk.ts @@ -94,7 +94,7 @@ export function init(options: BrowserOptions = {}): Client | undefined { let defaultIntegrations = options.defaultIntegrations == null ? getDefaultIntegrations(options) : options.defaultIntegrations; - /* rollup-include-development-only */ + /*! rollup-include-development-only */ if (options.spotlight) { if (!defaultIntegrations) { defaultIntegrations = []; @@ -102,7 +102,6 @@ export function init(options: BrowserOptions = {}): Client | undefined { const args = typeof options.spotlight === 'string' ? { sidecarUrl: options.spotlight } : undefined; defaultIntegrations.push(spotlightBrowserIntegration(args)); } - /* rollup-include-development-only-end */ const clientOptions: BrowserClientOptions = { ...options, @@ -114,6 +113,9 @@ export function init(options: BrowserOptions = {}): Client | undefined { }), transport: options.transport || makeFetchTransport, }; + // TODO: This is here to avoid the Rolldown limitation of not being able to place the ending comment after a block + // Should be moved back after the if block once the Rolldown limitation is fixed + /*! rollup-include-development-only-end */ return initAndBind(BrowserClient, clientOptions); } diff --git a/packages/bun/package.json b/packages/bun/package.json index babe02414ef0..03a1de617d39 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -28,13 +28,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -46,16 +39,13 @@ "bun-types": "^1.2.9" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-bun-*.tgz", diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index 95f639343407..ea97800a41b1 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -38,13 +38,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -66,16 +59,13 @@ "wrangler": "4.22.0" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-cloudflare-*.tgz", diff --git a/packages/core/package.json b/packages/core/package.json index 734485cad82c..5a5abdbc2deb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -28,27 +28,17 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-core-*.tgz", diff --git a/packages/core/rollup.npm.config.mjs b/packages/core/rollup.npm.config.mjs index cc3ad4064820..c6c96c546930 100644 --- a/packages/core/rollup.npm.config.mjs +++ b/packages/core/rollup.npm.config.mjs @@ -2,8 +2,8 @@ import { readFileSync } from 'fs'; import { dirname, join } from 'path'; +import { replacePlugin } from 'rolldown/plugins'; import { fileURLToPath } from 'url'; -import replace from '@rollup/plugin-replace'; import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils'; const packageJson = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), 'package.json'), 'utf-8')); @@ -27,12 +27,14 @@ export default makeNPMConfigVariants( : Boolean(process.env.SENTRY_BUILD_PRESERVE_MODULES), }, plugins: [ - replace({ - preventAssignment: true, - values: { + replacePlugin( + { __SENTRY_SDK_VERSION__: JSON.stringify(packageVersion), }, - }), + { + preventAssignment: true, + }, + ), ], }, }), diff --git a/packages/core/src/utils/env.ts b/packages/core/src/utils/env.ts index 86872017707a..5fdd9e9b7b91 100644 --- a/packages/core/src/utils/env.ts +++ b/packages/core/src/utils/env.ts @@ -31,5 +31,5 @@ export function isBrowserBundle(): boolean { */ export function getSDKSource(): SdkSource { // This comment is used to identify this line in the CDN bundle build step and replace this with "return 'cdn';" - /* __SENTRY_SDK_SOURCE__ */ return 'npm'; + /*! __SENTRY_SDK_SOURCE__ */ return 'npm'; } diff --git a/packages/deno/package.json b/packages/deno/package.json index b05edb11010d..72ab5651b221 100644 --- a/packages/deno/package.json +++ b/packages/deno/package.json @@ -7,12 +7,12 @@ "author": "Sentry", "license": "MIT", "module": "build/index.mjs", - "types": "build/index.d.ts", + "types": "build/types/index.d.ts", "exports": { "./package.json": "./package.json", ".": { "import": { - "types": "./build/esm/index.d.ts", + "types": "./build/types/index.d.ts", "default": "./build/esm/index.js" } } @@ -31,8 +31,8 @@ "deno-types": "node ./scripts/download-deno-types.mjs", "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "yarn deno-types && rollup -c rollup.npm.config.mjs", - "build:types": "tsc -p tsconfig.types.json", + "build:transpile": "yarn deno-types && rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build build-types build-test coverage node_modules/.deno sentry-deno-*.tgz", diff --git a/packages/eslint-config-sdk/src/base.js b/packages/eslint-config-sdk/src/base.js index 5b77056bfbb2..238bf2ed14ed 100644 --- a/packages/eslint-config-sdk/src/base.js +++ b/packages/eslint-config-sdk/src/base.js @@ -236,6 +236,8 @@ module.exports = { balanced: true, // ... unless they're jsdoc-style block comments, which end with `**/` exceptions: ['*'], + // Allow /*! for legal/preserved comments + markers: ['!'], }, }, ], diff --git a/packages/feedback/package.json b/packages/feedback/package.json index eed226f95085..97e67d9f72dd 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -28,13 +28,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -45,18 +38,15 @@ "preact": "^10.19.4" }, "scripts": { - "build": "run-p build:transpile build:types build:bundle", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:bundle": "rollup -c rollup.bundle.config.mjs", - "build:dev": "run-p build:transpile build:types", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8 && yarn node ./scripts/shim-preact-export.js", + "build": "run-s build:transpile build:types build:bundle", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:bundle": "rolldown -c rollup.bundle.config.mjs", + "build:dev": "run-s build:transpile build:types", + "build:types": "yarn node ./scripts/shim-preact-export.js", "build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch", "build:dev:watch": "run-p build:transpile:watch build:types:watch", "build:transpile:watch": "yarn build:transpile --watch", "build:bundle:watch": "yarn build:bundle --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build sentry-internal-feedback-*.tgz", diff --git a/packages/feedback/rollup.bundle.config.mjs b/packages/feedback/rollup.bundle.config.mjs index a5efc6140c06..c5f98bd09b28 100644 --- a/packages/feedback/rollup.bundle.config.mjs +++ b/packages/feedback/rollup.bundle.config.mjs @@ -1,5 +1,15 @@ import { makeBaseBundleConfig, makeBundleConfigVariants } from '@sentry-internal/rollup-utils'; +// Alias react to preact/compat since this package uses Preact for rendering +const preactAlias = { + resolve: { + alias: { + react: 'preact/compat', + 'react/jsx-runtime': 'preact/jsx-runtime', + }, + }, +}; + export default [ // The core `feedback` bundle is built in the browser package // Sub-bundles are built here @@ -10,13 +20,7 @@ export default [ jsVersion: 'es6', licenseTitle: '@sentry-internal/feedback', outputFileBase: () => 'bundles/feedback-screenshot', - sucrase: { - // The feedback widget is using preact so we need different pragmas and jsx runtimes - jsxPragma: 'h', - jsxFragmentPragma: 'Fragment', - jsxRuntime: 'classic', - production: true, - }, + packageSpecificConfig: preactAlias, }), ), ...makeBundleConfigVariants( @@ -26,13 +30,7 @@ export default [ jsVersion: 'es6', licenseTitle: '@sentry-internal/feedback', outputFileBase: () => 'bundles/feedback-modal', - sucrase: { - // The feedback widget is using preact so we need different pragmas and jsx runtimes - jsxPragma: 'h', - jsxFragmentPragma: 'Fragment', - jsxRuntime: 'classic', - production: true, - }, + packageSpecificConfig: preactAlias, }), ), ]; diff --git a/packages/feedback/rollup.npm.config.mjs b/packages/feedback/rollup.npm.config.mjs index c91c37ec84f8..f012e515a5e0 100644 --- a/packages/feedback/rollup.npm.config.mjs +++ b/packages/feedback/rollup.npm.config.mjs @@ -15,12 +15,5 @@ export default makeNPMConfigVariants( : Boolean(process.env.SENTRY_BUILD_PRESERVE_MODULES), }, }, - sucrase: { - // The feedback widget is using preact so we need different pragmas and jsx runtimes - jsxPragma: 'h', - jsxFragmentPragma: 'Fragment', - jsxRuntime: 'classic', - production: true, - }, }), ); diff --git a/packages/feedback/scripts/shim-preact-export.js b/packages/feedback/scripts/shim-preact-export.js index bd74e4da0a05..69f53a2628d3 100644 --- a/packages/feedback/scripts/shim-preact-export.js +++ b/packages/feedback/scripts/shim-preact-export.js @@ -1,8 +1,8 @@ // preact does not support more modern TypeScript versions, which breaks our users that depend on older // TypeScript versions. To fix this, we shim the types from preact to be any and remove the dependency on preact -// for types directly. This script is meant to be run after the build/npm/types-ts3.8 directory is created. +// for types directly. This script is meant to be run after the build/npm/esm directory is created (where rolldown dts generates types). -// Path: build/npm/types-ts3.8/global.d.ts +// Path: build/npm/types/global.d.ts const fs = require('fs'); const path = require('path'); @@ -67,8 +67,8 @@ function walk(dir) { } function run() { - // recurse through build/npm/types-ts3.8 directory - const dir = path.join('build', 'npm', 'types-ts3.8'); + // recurse through build/npm/esm directory (where rolldown dts generates types) + const dir = path.join('build', 'npm', 'esm'); walk(dir); } diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 5b1c0c77ee1b..22ed8a413b01 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -34,13 +34,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -60,18 +53,15 @@ "webpack": "^5.0.0" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", "build:plugin": "tsc -p tsconfig.plugin.json", "build:transpile": "run-p build:rollup build:plugin", - "build:rollup": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:rollup": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage *.d.ts sentry-gatsby-*.tgz", diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json index 5b2caff2b00b..8e5c71f28709 100644 --- a/packages/google-cloud-serverless/package.json +++ b/packages/google-cloud-serverless/package.json @@ -37,13 +37,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -67,16 +60,13 @@ } }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-google-cloud-*.tgz", diff --git a/packages/integration-shims/package.json b/packages/integration-shims/package.json index 8b2048b6534d..88e4c398e10a 100644 --- a/packages/integration-shims/package.json +++ b/packages/integration-shims/package.json @@ -21,26 +21,16 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "sideEffects": false, "private": true, "scripts": { - "build": "run-p build:transpile build:types", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build": "run-s build:transpile build:types", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:dev": "yarn build", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "run-p build:watch", "build:transpile:watch": "yarn build:transpile --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", "clean": "rimraf build", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json index ea62a64cf1bb..7f9619675baa 100644 --- a/packages/nestjs/package.json +++ b/packages/nestjs/package.json @@ -31,11 +31,11 @@ }, "./setup": { "import": { - "types": "./setup.d.ts", + "types": "./build/types/setup.d.ts", "default": "./build/esm/setup.js" }, "require": { - "types": "./setup.d.ts", + "types": "./build/types/setup.d.ts", "default": "./build/cjs/setup.js" } } @@ -65,14 +65,11 @@ "scripts": { "build": "run-p build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:setup", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:setup": "tsc -p tsconfig.setup-types.json", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts && madge --circular src/setup.ts", "clean": "rimraf build coverage sentry-nestjs-*.tgz ./*.d.ts ./*.d.ts.map", diff --git a/packages/nestjs/tsconfig.setup-types.json b/packages/nestjs/tsconfig.setup-types.json deleted file mode 100644 index 2ef9310f3edc..000000000000 --- a/packages/nestjs/tsconfig.setup-types.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "./tsconfig.json", - - "compilerOptions": { - "declaration": true, - "declarationMap": true, - "emitDeclarationOnly": true, - "outDir": "./" - }, - - "//": "This type is built separately because it is for a subpath export, which has problems if it is not in the root", - "include": ["src/setup.ts"], - "exclude": [] -} diff --git a/packages/nestjs/tsconfig.types.json b/packages/nestjs/tsconfig.types.json index 6240cd92efaa..65455f66bd75 100644 --- a/packages/nestjs/tsconfig.types.json +++ b/packages/nestjs/tsconfig.types.json @@ -6,8 +6,5 @@ "declarationMap": true, "emitDeclarationOnly": true, "outDir": "build/types" - }, - - "//": "This is built separately in tsconfig.setup-types.json", - "exclude": ["src/setup.ts"] + } } diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index a113781f7140..9680f44c6d7f 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -65,13 +65,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -102,16 +95,13 @@ "next": "^13.2.0 || ^14.0 || ^15.0.0-rc.0 || ^16.0.0-0" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", "build:transpile": "ts-node scripts/buildRollup.ts", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", "build:transpile:watch": "nodemon --ext ts --watch src scripts/buildRollup.ts", - "build:types:watch": "tsc -p tsconfig.types.json --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/edge/index.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-nextjs-*.tgz", diff --git a/packages/nextjs/rollup.npm.config.mjs b/packages/nextjs/rollup.npm.config.mjs index 89271a21e9d3..0f873a2f08d6 100644 --- a/packages/nextjs/rollup.npm.config.mjs +++ b/packages/nextjs/rollup.npm.config.mjs @@ -8,6 +8,7 @@ export default [ entrypoints: [ 'src/index.server.ts', 'src/index.client.ts', + 'src/index.types.ts', 'src/client/index.ts', 'src/server/index.ts', 'src/edge/index.ts', @@ -19,6 +20,10 @@ export default [ packageSpecificConfig: { external: ['next/router', 'next/constants', 'next/headers', 'stacktrace-parser'], + output: { + virtualDirname: '_virtual/core', + }, + // Next.js and our users are more happy when our client code has the "use client" directive plugins: [ { @@ -51,8 +56,7 @@ export default [ packageSpecificConfig: { output: { - // Preserve the original file structure (i.e., so that everything is still relative to `src`) - entryFileNames: 'config/templates/[name].js', + virtualDirname: '_virtual/loaders', // this is going to be add-on code, so it doesn't need the trappings of a full module (and in fact actively // shouldn't have them, lest they muck with the module to which we're adding it) @@ -69,6 +73,33 @@ export default [ '__SENTRY_WRAPPING_TARGET_FILE__', '__SENTRY_NEXTJS_REQUEST_ASYNC_STORAGE_SHIM__', ], + plugins: [ + { + name: 'sentry-fix-missing-serverComponentModule-import', + renderChunk(code, chunk) { + // Rolldown has a bug where it removes namespace imports for external modules even when they're still + // referenced in the code (specifically when there's a `declare const` with the same name in the source). + // We need to add back the missing import for serverComponentModule in the serverComponentWrapperTemplate. + if ( + chunk.facadeModuleId?.includes('serverComponentWrapperTemplate') && + code.includes('serverComponentModule') && + !code.includes('import * as serverComponentModule') + ) { + // Find the position after the last import statement to insert our missing import + const lastImportMatch = code.match(/^import[^;]*;/gm); + if (lastImportMatch) { + const lastImport = lastImportMatch[lastImportMatch.length - 1]; + const lastImportEnd = code.indexOf(lastImport) + lastImport.length; + return { + code: `${code.slice(0, lastImportEnd)} +import * as serverComponentModule from "__SENTRY_WRAPPING_TARGET_FILE__";${code.slice(lastImportEnd)}`, + }; + } + } + return null; + }, + }, + ], }, }), ), @@ -78,8 +109,7 @@ export default [ packageSpecificConfig: { output: { - // Preserve the original file structure (i.e., so that everything is still relative to `src`) - entryFileNames: 'config/loaders/[name].js', + virtualDirname: '_virtual/polyfills', // make it so Rollup calms down about the fact that we're combining default and named exports exports: 'named', @@ -94,8 +124,7 @@ export default [ packageSpecificConfig: { output: { - // Preserve the original file structure (i.e., so that everything is still relative to `src`) - entryFileNames: 'config/polyfills/[name].js', + virtualDirname: '_virtual/polyfills', // make it so Rollup calms down about the fact that we're combining default and named exports exports: 'named', diff --git a/packages/nextjs/scripts/buildRollup.ts b/packages/nextjs/scripts/buildRollup.ts index d273146b872d..78010a4932b7 100644 --- a/packages/nextjs/scripts/buildRollup.ts +++ b/packages/nextjs/scripts/buildRollup.ts @@ -10,7 +10,7 @@ function run(cmd: string, options?: childProcess.ExecSyncOptions): string | Buff return childProcess.execSync(cmd, { stdio: 'inherit', ...options }); } -run('yarn rollup -c rollup.npm.config.mjs'); +run('yarn rolldown -c rollup.npm.config.mjs'); // Regardless of whether nextjs is using the CJS or ESM version of our SDK, we want the code from our templates to be in // ESM (since we'll be adding it onto page files which are themselves written in ESM), so copy the ESM versions of the diff --git a/packages/nextjs/src/config/templates/routeHandlerWrapperTemplate.ts b/packages/nextjs/src/config/templates/routeHandlerWrapperTemplate.ts index 3a05c97d5f5c..2e9d602c9f83 100644 --- a/packages/nextjs/src/config/templates/routeHandlerWrapperTemplate.ts +++ b/packages/nextjs/src/config/templates/routeHandlerWrapperTemplate.ts @@ -60,8 +60,8 @@ function wrapHandler(handler: T, method: 'GET' | 'POST' | 'PUT' | 'PATCH' | ' // @ts-expect-error See above export * from '__SENTRY_WRAPPING_TARGET_FILE__'; -// @ts-expect-error This is the file we're wrapping -export { default } from '__SENTRY_WRAPPING_TARGET_FILE__'; +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access +export default routeModule.default; type RouteHandler = (...args: unknown[]) => unknown; diff --git a/packages/nextjs/src/config/templates/sentryInitWrapperTemplate.ts b/packages/nextjs/src/config/templates/sentryInitWrapperTemplate.ts index 3be1b07d6bc5..fd060ebf9df0 100644 --- a/packages/nextjs/src/config/templates/sentryInitWrapperTemplate.ts +++ b/packages/nextjs/src/config/templates/sentryInitWrapperTemplate.ts @@ -1,8 +1,9 @@ -// @ts-expect-error This will be replaced with the user's sentry config gile import '__SENTRY_CONFIG_IMPORT_PATH__'; +// @ts-expect-error This is the file we're wrapping +import * as wrappingTargetModule from '__SENTRY_WRAPPING_TARGET_FILE__'; // @ts-expect-error This is the file we're wrapping export * from '__SENTRY_WRAPPING_TARGET_FILE__'; -// @ts-expect-error This is the file we're wrapping -export { default } from '__SENTRY_WRAPPING_TARGET_FILE__'; +// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access +export default wrappingTargetModule.default; diff --git a/packages/nextjs/test/config/wrappingLoader.test.ts b/packages/nextjs/test/config/wrappingLoader.test.ts index ab33450790bb..0e96ebf1faab 100644 --- a/packages/nextjs/test/config/wrappingLoader.test.ts +++ b/packages/nextjs/test/config/wrappingLoader.test.ts @@ -100,7 +100,8 @@ describe('wrappingLoader', () => { await loaderPromise; - expect(callback).toHaveBeenCalledWith(null, expect.stringContaining("'/my/route'"), expect.anything()); + // Rolldown uses double quotes, old Rollup used single quotes + expect(callback).toHaveBeenCalledWith(null, expect.stringMatching(/["']\/my\/route['"]/), expect.anything()); }); describe('middleware wrapping', () => { @@ -148,8 +149,8 @@ describe('wrappingLoader', () => { expect(wrappedCode).toContain('userProvidedProxy = true'); // Proxy should be wrapped, middleware should be undefined - expect(wrappedCode).toMatch(/const proxy = userProvidedProxy \? wrappedHandler : undefined/); - expect(wrappedCode).toMatch(/const middleware = userProvidedMiddleware \? wrappedHandler : undefined/); + expect(wrappedCode).toMatch(/const proxy = userProvidedProxy \? wrappedHandler : (?:undefined|void 0)/); + expect(wrappedCode).toMatch(/const middleware = userProvidedMiddleware \? wrappedHandler : (?:undefined|void 0)/); }); it('should export middleware when user exports named "middleware" export', async () => { @@ -196,8 +197,8 @@ describe('wrappingLoader', () => { expect(wrappedCode).toContain('userProvidedProxy = false'); // Middleware should be wrapped, proxy should be undefined - expect(wrappedCode).toMatch(/const middleware = userProvidedMiddleware \? wrappedHandler : undefined/); - expect(wrappedCode).toMatch(/const proxy = userProvidedProxy \? wrappedHandler : undefined/); + expect(wrappedCode).toMatch(/const middleware = userProvidedMiddleware \? wrappedHandler : (?:undefined|void 0)/); + expect(wrappedCode).toMatch(/const proxy = userProvidedProxy \? wrappedHandler : (?:undefined|void 0)/); }); it('should export undefined middleware/proxy when user only exports default', async () => { @@ -245,8 +246,8 @@ describe('wrappingLoader', () => { expect(wrappedCode).toContain('userProvidedProxy = false'); // Both middleware and proxy should be undefined (conditionals evaluate to false) - expect(wrappedCode).toMatch(/const middleware = userProvidedMiddleware \? wrappedHandler : undefined/); - expect(wrappedCode).toMatch(/const proxy = userProvidedProxy \? wrappedHandler : undefined/); + expect(wrappedCode).toMatch(/const middleware = userProvidedMiddleware \? wrappedHandler : (?:undefined|void 0)/); + expect(wrappedCode).toMatch(/const proxy = userProvidedProxy \? wrappedHandler : (?:undefined|void 0)/); }); }); }); diff --git a/packages/nextjs/tsconfig.types.json b/packages/nextjs/tsconfig.types.json index 978b51b8e126..1b9611c362d6 100644 --- a/packages/nextjs/tsconfig.types.json +++ b/packages/nextjs/tsconfig.types.json @@ -5,7 +5,6 @@ // creating types for these template files a circular exercise, which causes `tsc` to crash. Fortunately, since the // templates aren't consumed as modules (they're essentially just text files which happen to contain code), we don't // actually need to create types for them. - "exclude": ["src/config/templates/*"], "compilerOptions": { "declaration": true, diff --git a/packages/node-core/package.json b/packages/node-core/package.json index ad99efc5fcba..52575e09f1d8 100644 --- a/packages/node-core/package.json +++ b/packages/node-core/package.json @@ -46,13 +46,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -83,16 +76,13 @@ "@types/node": "^18.19.1" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-node-*.tgz", diff --git a/packages/node-core/rollup.npm.config.mjs b/packages/node-core/rollup.npm.config.mjs index 8e18333836ef..2e3d0671f02d 100644 --- a/packages/node-core/rollup.npm.config.mjs +++ b/packages/node-core/rollup.npm.config.mjs @@ -1,4 +1,3 @@ -import replace from '@rollup/plugin-replace'; import { makeBaseNPMConfig, makeNPMConfigVariants, makeOtelLoaders } from '@sentry-internal/rollup-utils'; import { createWorkerCodeBuilder } from './rollup.anr-worker.config.mjs'; @@ -12,6 +11,36 @@ const [localVariablesWorkerConfig, getLocalVariablesBase64Code] = createWorkerCo 'build/esm/integrations/local-variables', ); +/** + * Custom replace plugin that lazily evaluates replacement values. + * This is needed because the worker scripts are built in earlier configs, + * and we need to wait for their renderChunk hooks to complete before + * we can get the base64-encoded worker code. + */ +function makeLazyReplacePlugin(replacements, options = {}) { + const { delimiters = ['###', '###'] } = options; + const [delimiterStart, delimiterEnd] = delimiters; + + return { + name: 'lazy-replace-plugin', + renderChunk(code) { + let result = code; + + for (const [key, valueFn] of Object.entries(replacements)) { + const value = typeof valueFn === 'function' ? valueFn() : valueFn; + const searchPattern = `${delimiterStart}${key}${delimiterEnd}`; + // Don't add quotes - the source already has quotes around the placeholder + const replacement = value; + + // Replace all occurrences + result = result.split(searchPattern).join(replacement); + } + + return { code: result }; + }, + }; +} + export default [ ...makeOtelLoaders('./build', 'otel'), // The workers needs to be built first since it's their output is copied in the main bundle. @@ -27,15 +56,15 @@ export default [ preserveModules: true, }, plugins: [ - replace({ - delimiters: ['###', '###'], - // removes some rollup warnings - preventAssignment: true, - values: { - AnrWorkerScript: () => getAnrBase64Code(), - LocalVariablesWorkerScript: () => getLocalVariablesBase64Code(), + makeLazyReplacePlugin( + { + AnrWorkerScript: getAnrBase64Code, + LocalVariablesWorkerScript: getLocalVariablesBase64Code, + }, + { + delimiters: ['###', '###'], }, - }), + ), ], }, }), diff --git a/packages/node-native/package.json b/packages/node-native/package.json index 16d285daebae..3113f77cb14a 100644 --- a/packages/node-native/package.json +++ b/packages/node-native/package.json @@ -30,13 +30,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "engines": { "node": ">=18" }, @@ -52,13 +45,11 @@ "lint": "eslint . --format stylish", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", "fix": "eslint . --format stylish --fix", - "build": "yarn build:types && yarn build:transpile", - "build:transpile": "yarn rollup -c rollup.npm.config.mjs", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", - "build:types": "tsc -p tsconfig.types.json && yarn build:types:downlevel", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build": "run-s build:transpile build:types", + "build:transpile": "yarn rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:dev": "yarn clean && yarn build", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:watch": "run-p build:transpile:watch build:types:watch", "build:tarball": "npm pack" }, diff --git a/packages/node/package.json b/packages/node/package.json index bd312657e92f..78e82886d9b9 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -54,13 +54,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -105,16 +98,13 @@ "@types/node": "^18.19.1" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-node-*.tgz", diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index bbb4086d3dc2..84ba7bd094f6 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -67,12 +67,11 @@ "build": "run-s build:types build:transpile", "build:dev": "yarn build", "build:nuxt-module": "bash ./generate-build-stubs.bash && nuxt-module-build build --outDir build/module", - "build:transpile": "rollup -c rollup.npm.config.mjs && yarn build:nuxt-module", - "build:types": "tsc -p tsconfig.types.json", + "build:transpile": "rolldown -c rollup.npm.config.mjs && yarn build:nuxt-module", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-nuxt-*.tgz", @@ -92,12 +91,11 @@ "build:transpile": { "dependsOn": [ "^build:transpile", - "^build:types", - "build:types" + "^build:types" ], "outputs": [ "{projectRoot}/build/cjs", - "{projectRoot}/build/esm", + "{projectRoot}/build/types", "{projectRoot}/build/module" ] } diff --git a/packages/nuxt/rollup.npm.config.mjs b/packages/nuxt/rollup.npm.config.mjs index a94a4b5af253..80dd9703f050 100644 --- a/packages/nuxt/rollup.npm.config.mjs +++ b/packages/nuxt/rollup.npm.config.mjs @@ -8,6 +8,7 @@ export default [ 'src/index.client.ts', 'src/client/index.ts', 'src/server/index.ts', + 'src/index.types.ts', 'src/module.ts', ], packageSpecificConfig: { diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index 9050db122155..2e331b8e2d8d 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -28,13 +28,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -56,16 +49,13 @@ "@opentelemetry/semantic-conventions": "^1.37.0" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-opentelemetry-*.tgz", diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index f4ca4a4eb02e..b4e0ae9797c6 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -22,13 +22,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "bin": { "sentry-prune-profiler-binaries": "scripts/prune-profiler-binaries.js" }, @@ -48,13 +41,11 @@ "lint": "eslint . --format stylish", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", "fix": "eslint . --format stylish --fix", - "build": "yarn build:types && yarn build:transpile", - "build:transpile": "yarn rollup -c rollup.npm.config.mjs", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", - "build:types": "tsc -p tsconfig.types.json && yarn build:types:downlevel", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build": "run-s build:transpile build:types", + "build:transpile": "yarn rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:dev": "yarn clean && yarn build", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:watch": "run-p build:transpile:watch build:types:watch", "build:tarball": "npm pack", "test:bundle": "node test-binaries.esbuild.js", diff --git a/packages/react-router/package.json b/packages/react-router/package.json index a4578339e914..d64aa4d5f870 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -72,13 +72,11 @@ "scripts": { "build": "run-p build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core", - "build:types:core": "tsc -p tsconfig.types.json", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-react-router-*.tgz", diff --git a/packages/react-router/rollup.npm.config.mjs b/packages/react-router/rollup.npm.config.mjs index 4a52f4ab57a7..ef9b066669f5 100644 --- a/packages/react-router/rollup.npm.config.mjs +++ b/packages/react-router/rollup.npm.config.mjs @@ -3,7 +3,7 @@ import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollu export default [ ...makeNPMConfigVariants( makeBaseNPMConfig({ - entrypoints: ['src/index.server.ts', 'src/index.client.ts', 'src/cloudflare/index.ts'], + entrypoints: ['src/index.server.ts', 'src/index.client.ts', 'src/index.types.ts', 'src/cloudflare/index.ts'], packageSpecificConfig: { external: ['react-router', 'react-router-dom', 'react', 'react/jsx-runtime', 'vite'], output: { @@ -11,12 +11,6 @@ export default [ exports: 'named', }, }, - sucrase: { - // React 19 emits a warning if we don't use the newer jsx transform: https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html - // but this breaks react 17, so we keep it at `classic` for now - jsxRuntime: 'classic', - production: true, // This is needed so that sucrase uses the production jsx runtime (ie `import { jsx } from 'react/jsx-runtime'` instead of `import { jsxDEV as _jsxDEV } from 'react/jsx-dev-runtime'`) - }, }), ), ]; diff --git a/packages/react/package.json b/packages/react/package.json index 52fcaabcafe7..4a80f44677e5 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -28,13 +28,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -68,16 +61,13 @@ "redux": "^4.0.5" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-react-*.tgz", diff --git a/packages/react/rollup.npm.config.mjs b/packages/react/rollup.npm.config.mjs index 923dfafb85d7..edfc16d8d2ff 100644 --- a/packages/react/rollup.npm.config.mjs +++ b/packages/react/rollup.npm.config.mjs @@ -5,11 +5,5 @@ export default makeNPMConfigVariants( packageSpecificConfig: { external: ['react', 'react/jsx-runtime'], }, - sucrase: { - // React 19 emits a warning if we don't use the newer jsx transform: https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html - // but this breaks react 17, so we keep it at `classic` for now - jsxRuntime: 'classic', - production: true, // This is needed so that sucrase uses the production jsx runtime (ie `import { jsx } from 'react/jsx-runtime'` instead of `import { jsxDEV as _jsxDEV } from 'react/jsx-dev-runtime'`) - }, }), ); diff --git a/packages/remix/package.json b/packages/remix/package.json index 7a20814f03e3..f351de7aff50 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -29,7 +29,11 @@ "require": "./build/cjs/index.client.js", "default": "./build/cjs/index.client.js" }, - "node": "./build/cjs/index.server.js", + "node": { + "import": "./build/esm/index.server.js", + "require": "./build/cjs/index.server.js", + "default": "./build/cjs/index.server.js" + }, "worker": { "import": "./build/esm/cloudflare/index.js", "require": "./build/cjs/cloudflare/index.js", @@ -37,9 +41,9 @@ } }, "./cloudflare": { + "types": "./build/types/cloudflare/index.d.ts", "import": "./build/esm/cloudflare/index.js", "require": "./build/cjs/cloudflare/index.js", - "types": "./build/types/cloudflare/index.d.ts", "default": "./build/esm/cloudflare/index.js" }, "./import": { @@ -53,13 +57,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -91,16 +88,13 @@ "react": "18.x" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.server.ts && madge --circular src/index.client.ts", "clean": "rimraf build coverage sentry-remix-*.tgz", diff --git a/packages/remix/rollup.npm.config.mjs b/packages/remix/rollup.npm.config.mjs index 8ba7eac8051b..d3cf8a659d4c 100644 --- a/packages/remix/rollup.npm.config.mjs +++ b/packages/remix/rollup.npm.config.mjs @@ -6,6 +6,7 @@ export default [ entrypoints: [ 'src/index.server.ts', 'src/index.client.ts', + 'src/index.types.ts', 'src/client/index.ts', 'src/server/index.ts', 'src/cloudflare/index.ts', @@ -17,12 +18,6 @@ export default [ exports: 'named', }, }, - sucrase: { - // React 19 emits a warning if we don't use the newer jsx transform: https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html - // but this breaks react 17, so we keep it at `classic` for now - jsxRuntime: 'classic', - production: true, // This is needed so that sucrase uses the production jsx runtime (ie `import { jsx } from 'react/jsx-runtime'` instead of `import { jsxDEV as _jsxDEV } from 'react/jsx-dev-runtime'`) - }, }), ), ...makeOtelLoaders('./build', 'sentry-node'), diff --git a/packages/remix/src/server/instrumentServer.ts b/packages/remix/src/server/instrumentServer.ts index d8864d254a99..5f254db2a4bf 100644 --- a/packages/remix/src/server/instrumentServer.ts +++ b/packages/remix/src/server/instrumentServer.ts @@ -24,7 +24,6 @@ import { hasSpansEnabled, httpHeadersToSpanAttributes, isNodeEnv, - loadModule, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, @@ -400,7 +399,8 @@ function instrumentBuildCallback( // We should be able to wrap them, as they may not be wrapped before. const defaultExport = wrappedEntry.module.default as undefined | WrappedFunction; if (defaultExport && !defaultExport.__sentry_original__) { - fill(wrappedEntry.module, 'default', makeWrappedDocumentRequestFunction(options?.instrumentTracing)); + const instrumentTracing = options ? options.instrumentTracing : undefined; + fill(wrappedEntry.module, 'default', makeWrappedDocumentRequestFunction(instrumentTracing)); } for (const [id, route] of Object.entries(build.routes)) { @@ -414,18 +414,21 @@ function instrumentBuildCallback( } if (!(wrappedRoute.module.loader as WrappedFunction).__sentry_original__) { - fill(wrappedRoute.module, 'loader', makeWrappedRootLoader(options?.instrumentTracing, build)); + const instrumentTracing = options ? options.instrumentTracing : undefined; + fill(wrappedRoute.module, 'loader', makeWrappedRootLoader(instrumentTracing, build)); } } const routeAction = wrappedRoute.module.action as undefined | WrappedFunction; if (routeAction && !routeAction.__sentry_original__) { - fill(wrappedRoute.module, 'action', makeWrappedAction(id, options?.instrumentTracing, build)); + const instrumentTracing = options ? options.instrumentTracing : undefined; + fill(wrappedRoute.module, 'action', makeWrappedAction(id, instrumentTracing, build)); } const routeLoader = wrappedRoute.module.loader as undefined | WrappedFunction; if (routeLoader && !routeLoader.__sentry_original__) { - fill(wrappedRoute.module, 'loader', makeWrappedLoader(id, options?.instrumentTracing, build)); + const instrumentTracing = options ? options.instrumentTracing : undefined; + fill(wrappedRoute.module, 'loader', makeWrappedLoader(id, instrumentTracing, build)); } routes[id] = wrappedRoute; @@ -475,21 +478,3 @@ export const makeWrappedCreateRequestHandler = (options?: { instrumentTracing?: return wrapRequestHandler(requestHandler, newBuild, options); }; }; - -/** - * Monkey-patch Remix's `createRequestHandler` from `@remix-run/server-runtime` - * which Remix Adapters (https://remix.run/docs/en/v1/api/remix) use underneath. - */ -export function instrumentServer(options?: { instrumentTracing?: boolean }): void { - const pkg = loadModule<{ - createRequestHandler: CreateRequestHandlerFunction; - }>('@remix-run/server-runtime', module); - - if (!pkg) { - DEBUG_BUILD && debug.warn('Remix SDK was unable to require `@remix-run/server-runtime` package.'); - - return; - } - - fill(pkg, 'createRequestHandler', makeWrappedCreateRequestHandler(options)); -} diff --git a/packages/remix/src/server/patchServerRuntime.ts b/packages/remix/src/server/patchServerRuntime.ts new file mode 100644 index 000000000000..c0c3370043c8 --- /dev/null +++ b/packages/remix/src/server/patchServerRuntime.ts @@ -0,0 +1,46 @@ +import type { CreateRequestHandlerFunction } from '@remix-run/server-runtime'; +import { debug, fill, loadModule } from '@sentry/core'; +import { createRequire } from 'module'; +import { DEBUG_BUILD } from '../utils/debug-build'; +import { makeWrappedCreateRequestHandler } from './instrumentServer'; + +/** + * Helper to load a module in both CJS and ESM contexts. + * In ESM, we use createRequire to create a require function. + * In CJS, we use the standard loadModule. + */ +function loadModuleCompat(moduleName: string): T | undefined { + // Check if we're in ESM context (module doesn't exist) + if (typeof module === 'undefined') { + // ESM context - use createRequire to get a require function + try { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const require = createRequire(import.meta.url); + return require(moduleName) as T; + } catch { + return undefined; + } + } else { + // CJS context - use loadModule with module reference + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return loadModule(moduleName, module as any); + } +} + +/** + * Monkey-patch Remix's `createRequestHandler` from `@remix-run/server-runtime` + * which Remix Adapters (https://remix.run/docs/en/v1/api/remix) use underneath. + */ +export function instrumentServer(options?: { instrumentTracing?: boolean }): void { + const pkg = loadModuleCompat<{ + createRequestHandler: CreateRequestHandlerFunction; + }>('@remix-run/server-runtime'); + + if (!pkg) { + DEBUG_BUILD && debug.warn('Remix SDK was unable to require `@remix-run/server-runtime` package.'); + + return; + } + + fill(pkg, 'createRequestHandler', makeWrappedCreateRequestHandler(options)); +} diff --git a/packages/remix/src/server/sdk.ts b/packages/remix/src/server/sdk.ts index f191a336cfbb..1a8e41a3eecc 100644 --- a/packages/remix/src/server/sdk.ts +++ b/packages/remix/src/server/sdk.ts @@ -4,9 +4,9 @@ import type { NodeClient, NodeOptions } from '@sentry/node'; import { getDefaultIntegrations as getDefaultNodeIntegrations, init as nodeInit, isInitialized } from '@sentry/node'; import { DEBUG_BUILD } from '../utils/debug-build'; import type { RemixOptions } from '../utils/remixOptions'; -import { instrumentServer } from './instrumentServer'; import { httpIntegration } from './integrations/http'; import { remixIntegration } from './integrations/opentelemetry'; +import { instrumentServer } from './patchServerRuntime'; /** * Returns the default Remix integrations. diff --git a/packages/remix/test/config/vite.test.ts b/packages/remix/test/config/vite.test.ts index 2f3ccc5464ca..d85f995924d0 100644 --- a/packages/remix/test/config/vite.test.ts +++ b/packages/remix/test/config/vite.test.ts @@ -62,9 +62,7 @@ describe('sentryRemixVitePlugin', () => { fs.writeFileSync(path.join(routesDir, 'about.tsx'), '// about'); fs.writeFileSync(path.join(routesDir, 'users.$id.tsx'), '// users'); - const plugin = sentryRemixVitePlugin() as Plugin & { - configResolved: (config: ResolvedConfig) => void; - }; + const plugin = sentryRemixVitePlugin(); const mockConfig: Partial = { root: tempDir, @@ -83,9 +81,7 @@ describe('sentryRemixVitePlugin', () => { fs.writeFileSync(path.join(routesDir, 'index.tsx'), '// index'); fs.writeFileSync(path.join(routesDir, 'users.$id.tsx'), '// users'); - const plugin = sentryRemixVitePlugin() as Plugin & { - configResolved: (config: ResolvedConfig) => void; - }; + const plugin = sentryRemixVitePlugin(); const mockConfig: Partial = { root: tempDir, @@ -101,9 +97,7 @@ describe('sentryRemixVitePlugin', () => { }); it('should handle errors gracefully and set empty manifest', () => { - const plugin = sentryRemixVitePlugin({ appDirPath: '/nonexistent/path' }) as Plugin & { - configResolved: (config: ResolvedConfig) => void; - }; + const plugin = sentryRemixVitePlugin({ appDirPath: '/nonexistent/path' }); const mockConfig: Partial = { root: tempDir, @@ -124,9 +118,7 @@ describe('sentryRemixVitePlugin', () => { fs.mkdirSync(customRoutesDir, { recursive: true }); fs.writeFileSync(path.join(customRoutesDir, 'index.tsx'), '// index'); - const plugin = sentryRemixVitePlugin({ appDirPath: customAppDir }) as Plugin & { - configResolved: (config: ResolvedConfig) => void; - }; + const plugin = sentryRemixVitePlugin({ appDirPath: customAppDir }); const mockConfig: Partial = { root: tempDir, @@ -144,13 +136,7 @@ describe('sentryRemixVitePlugin', () => { it('should inject manifest into HTML with tag', () => { fs.writeFileSync(path.join(routesDir, 'index.tsx'), '// index'); - const plugin = sentryRemixVitePlugin() as Plugin & { - configResolved: (config: ResolvedConfig) => void; - transformIndexHtml: { - order: string; - handler: (html: string) => string; - }; - }; + const plugin = sentryRemixVitePlugin(); const mockConfig: Partial = { root: tempDir, diff --git a/packages/remix/test/integration/instrument.server.mjs b/packages/remix/test/integration/instrument.server.mjs index 5598d81af581..a7f0f1eb8474 100644 --- a/packages/remix/test/integration/instrument.server.mjs +++ b/packages/remix/test/integration/instrument.server.mjs @@ -1,7 +1,35 @@ import * as Sentry from '@sentry/remix'; +import { createTransport } from '@sentry/core'; + +// Global storage for captured envelopes - test helpers will read from this +globalThis.__SENTRY_TEST_ENVELOPES__ = globalThis.__SENTRY_TEST_ENVELOPES__ || []; + +// Create a custom transport that captures envelopes instead of sending them +function makeTestTransport(options) { + function makeRequest(request) { + // Parse the serialized envelope body the same way the test helper's parseEnvelope does + // The body is a serialized string with newline-separated JSON lines + const bodyStr = typeof request.body === 'string' ? request.body : new TextDecoder().decode(request.body); + // Split by newlines and parse each line as JSON - this matches test helper format + const envelope = bodyStr + .split('\n') + .filter(line => line.trim()) + .map(e => JSON.parse(e)); + globalThis.__SENTRY_TEST_ENVELOPES__.push(envelope); + + // Return a successful response + return Promise.resolve({ + statusCode: 200, + headers: {}, + }); + } + + return createTransport(options, makeRequest); +} Sentry.init({ dsn: 'https://public@dsn.ingest.sentry.io/1337', tracesSampleRate: 1, tracePropagationTargets: ['example.org'], + transport: makeTestTransport, }); diff --git a/packages/remix/test/integration/test/server/utils/helpers.ts b/packages/remix/test/integration/test/server/utils/helpers.ts index b338b783bac0..f042ce07b374 100644 --- a/packages/remix/test/integration/test/server/utils/helpers.ts +++ b/packages/remix/test/integration/test/server/utils/helpers.ts @@ -1,6 +1,7 @@ import * as http from 'http'; import { AddressInfo } from 'net'; import * as path from 'path'; +import { fileURLToPath } from 'url'; import { createRequestHandler } from '@remix-run/express'; import { debug } from '@sentry/core'; import type { EnvelopeItemType, Event, TransactionEvent } from '@sentry/core'; @@ -12,7 +13,6 @@ import express from 'express'; import type { Express } from 'express'; import type { HttpTerminator } from 'http-terminator'; import { createHttpTerminator } from 'http-terminator'; -import nock from 'nock'; type DataCollectorOptions = { // Optional custom URL @@ -107,15 +107,25 @@ class TestEnv { ? [options.envelopeType] : options.envelopeType || (['event'] as EnvelopeItemType[]); + // Use a ref to capture startIndex right before making the request + // The claimed indices mechanism and stopping at count will ensure parallel requests don't interfere + const startIndexRef = { startIndex: null as number | null }; const resProm = this.setupNock( options.count || 1, typeof options.endServer === 'undefined' ? true : options.endServer, envelopeTypeArray, + startIndexRef, ); - // eslint-disable-next-line @typescript-eslint/no-floating-promises - makeRequest(options.method, options.url || this.url, this._axiosConfig); - return resProm; + // Capture startIndex right before making the request + const globalEnvelopesArray = (globalThis as any).__SENTRY_TEST_ENVELOPES__ || []; + startIndexRef.startIndex = globalEnvelopesArray.length; + // Wait for the request to complete so Sentry has time to capture events + await makeRequest(options.method, options.url || this.url, this._axiosConfig); + // Flush Sentry events to ensure they're sent to the transport + await Sentry.flush(2000); + const result = await resProm; + return result; } /** @@ -166,51 +176,104 @@ class TestEnv { count: number, endServer: boolean, envelopeType: EnvelopeItemType[], + startIndexRef?: { startIndex: number | null }, ): Promise[][]> { - return new Promise(resolve => { + return new Promise((resolve, reject) => { const envelopes: Record[][] = []; - const mock = nock('https://dsn.ingest.sentry.io') - .persist() - .post('/api/1337/envelope/', body => { - const envelope = parseEnvelope(body); + let timeoutId: NodeJS.Timeout | null = null; + let checkInterval: NodeJS.Timeout | null = null; + + // Track the starting length to only count envelopes added after the request is made + // If startIndexRef is provided, use it (set right before request); otherwise capture now + let startIndex: number; + if (startIndexRef) { + // Wait for startIndex to be set (it will be set right before request is made) + const getStartIndex = () => { + if (startIndexRef.startIndex === null) { + const globalEnvelopesArray = (globalThis as any).__SENTRY_TEST_ENVELOPES__ || []; + return globalEnvelopesArray.length; + } + return startIndexRef.startIndex; + }; + startIndex = getStartIndex(); + } else { + const globalEnvelopesArray = (globalThis as any).__SENTRY_TEST_ENVELOPES__ || []; + startIndex = globalEnvelopesArray.length; + } - if (envelopeType.includes(envelope[1]?.type as EnvelopeItemType)) { - envelopes.push(envelope); - } else { - return false; + // Use a global Set to track which envelope indices have been claimed + // This prevents parallel setupNock instances from matching the same envelopes + if (!(globalThis as any).__SENTRY_TEST_CLAIMED_ENVELOPE_INDICES__) { + (globalThis as any).__SENTRY_TEST_CLAIMED_ENVELOPE_INDICES__ = new Set(); + } + const claimedIndices = (globalThis as any).__SENTRY_TEST_CLAIMED_ENVELOPE_INDICES__ as Set; + + // Poll for envelopes from the custom transport + const checkForEnvelopes = () => { + // If using ref, wait until it's set (set right before request is made) + if (startIndexRef && startIndexRef.startIndex === null) { + return; // Don't check yet, startIndex hasn't been set + } + + const globalEnvelopes = (globalThis as any).__SENTRY_TEST_ENVELOPES__ || []; + + // Use the ref value if provided, otherwise use the initial startIndex + const currentStartIndex = startIndexRef?.startIndex ?? startIndex; + + // Only check envelopes that were added after the request started + // Check each envelope by its index in the global array + // Stop once we have enough envelopes to avoid claiming more than needed + for (let i = currentStartIndex; i < globalEnvelopes.length && envelopes.length < count; i++) { + // Skip if this envelope index has already been claimed by another setupNock + if (claimedIndices.has(i)) { + continue; } - if (count === envelopes.length) { - nock.removeInterceptor(mock); - - if (endServer) { - // Cleaning nock only before the server is closed, - // not to break tests that use simultaneous requests to the server. - // Ex: Remix scope bleed tests. - nock.cleanAll(); - - // Abort all pending requests to nock to prevent hanging / flakes. - // See: https://github.com/nock/nock/issues/1118#issuecomment-544126948 - nock.abortPendingRequests(); - - this._closeServer() - .catch(e => { - debug.warn(e); - }) - .finally(() => { - resolve(envelopes); - }); - } else { - resolve(envelopes); + const envelope = globalEnvelopes[i]; + // The parsed envelope format is [header, itemHeader, itemPayload] + // where itemHeader has a 'type' property + const itemHeader = envelope[1]; + if (itemHeader && envelopeType.includes(itemHeader.type as EnvelopeItemType)) { + // Check if we've already added this envelope to our local array + if (!envelopes.includes(envelope)) { + // Claim this envelope index so other parallel setupNock instances don't match it + claimedIndices.add(i); + envelopes.push(envelope); + // Stop if we have enough envelopes + if (envelopes.length >= count) { + break; + } } } + } - return true; - }); + if (count === envelopes.length) { + if (timeoutId) clearTimeout(timeoutId); + if (checkInterval) clearInterval(checkInterval); + + if (endServer) { + this._closeServer() + .catch(e => { + debug.warn(e); + }) + .finally(() => { + resolve(envelopes); + }); + } else { + resolve(envelopes); + } + } + }; - mock - .query(true) // accept any query params - used for sentry_key param - .reply(200); + // Check immediately and then poll every 50ms + checkForEnvelopes(); + checkInterval = setInterval(checkForEnvelopes, 50); + + // Add a timeout to detect if Sentry requests never arrive + timeoutId = setTimeout(() => { + if (checkInterval) clearInterval(checkInterval); + reject(new Error(`Timeout waiting for Sentry envelopes. Expected ${count}, got ${envelopes.length}`)); + }, 5000); }); } @@ -224,25 +287,27 @@ class TestEnv { envelopeType: EnvelopeItemType | EnvelopeItemType[]; }): Promise { return new Promise(resolve => { - let reqCount = 0; + const envelopeTypeArray = + typeof options.envelopeType === 'string' ? [options.envelopeType] : options.envelopeType; - const mock = nock('https://dsn.ingest.sentry.io') - .persist() - .post('/api/1337/envelope/', body => { - const envelope = parseEnvelope(body); + // Track the starting length to only count envelopes added after this call + const globalEnvelopesArray = (globalThis as any).__SENTRY_TEST_ENVELOPES__ || []; + const startIndex = globalEnvelopesArray.length; - if (options.envelopeType.includes(envelope[1]?.type as EnvelopeItemType)) { + setTimeout(() => { + const globalEnvelopes = (globalThis as any).__SENTRY_TEST_ENVELOPES__ || []; + // Only count envelopes that were added after this call started + const newEnvelopes = globalEnvelopes.slice(startIndex); + let reqCount = 0; + + for (const envelope of newEnvelopes) { + // The parsed envelope format is [header, itemHeader, itemPayload] + // where itemHeader has a 'type' property + const itemHeader = envelope[1]; + if (itemHeader && envelopeTypeArray.includes(itemHeader.type as EnvelopeItemType)) { reqCount++; - return true; } - - return false; - }); - - setTimeout(() => { - nock.removeInterceptor(mock); - - nock.cleanAll(); + } // eslint-disable-next-line @typescript-eslint/no-floating-promises this._closeServer().then(() => { @@ -266,20 +331,36 @@ export class RemixTestEnv extends TestEnv { } public static async init(): Promise { - let serverPort; - const server = await new Promise(async resolve => { - const app = express(); + const app = express(); - // Vite builds to build/server/index.js instead of build/index.js - app.all('*', createRequestHandler({ build: await import('../../../build/server/index.js') })); + // Import the build module dynamically + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const buildPath = path.resolve(__dirname, '../../../build/server/index.js'); + const build = await import(buildPath); + const handler = createRequestHandler({ build }); + + app.all('*', async (req, res, next) => { + try { + await handler(req, res); + } catch (e) { + next(e); + } + }); + + return new Promise((resolve, reject) => { const server = app.listen(0, () => { - serverPort = (server.address() as AddressInfo).port; - resolve(server); + const address = server.address(); + if (address && typeof address === 'object') { + resolve(new RemixTestEnv(server, `http://localhost:${address.port}`)); + } else { + server.close(); + reject(new Error('Failed to start server: could not determine port')); + } }); - }); - return new RemixTestEnv(server, `http://localhost:${serverPort}`); + server.on('error', reject); + }); } } diff --git a/packages/replay-canvas/package.json b/packages/replay-canvas/package.json index a4d882f0f1a1..d20e6590d328 100644 --- a/packages/replay-canvas/package.json +++ b/packages/replay-canvas/package.json @@ -18,30 +18,20 @@ } } }, - "typesVersions": { - "<5.0": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" - ] - } - }, "files": [ "/build/npm" ], "sideEffects": false, "scripts": { - "build": "run-p build:transpile build:types build:bundle", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:bundle": "rollup -c rollup.bundle.config.mjs", - "build:dev": "run-p build:transpile build:types", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8", + "build": "run-s build:transpile build:types build:bundle", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:bundle": "rolldown -c rollup.bundle.config.mjs", + "build:dev": "run-s build:transpile build:types", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch", "build:dev:watch": "run-p build:transpile:watch build:types:watch", "build:transpile:watch": "yarn build:transpile --watch", "build:bundle:watch": "yarn build:bundle --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build sentry-replay-*.tgz", diff --git a/packages/replay-internal/package.json b/packages/replay-internal/package.json index 1aa5ae2003b9..37f5c3c9453a 100644 --- a/packages/replay-internal/package.json +++ b/packages/replay-internal/package.json @@ -28,13 +28,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" - ] - } - }, "files": [ "/build/npm" ], @@ -43,18 +36,15 @@ "access": "public" }, "scripts": { - "build": "run-p build:transpile build:types build:bundle", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:bundle": "rollup -c rollup.bundle.config.mjs", - "build:dev": "run-p build:transpile build:types", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8", + "build": "run-s build:transpile build:types build:bundle", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:bundle": "rolldown -c rollup.bundle.config.mjs", + "build:dev": "run-s build:transpile build:types", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch", "build:dev:watch": "run-p build:transpile:watch build:types:watch", "build:transpile:watch": "yarn build:transpile --watch", "build:bundle:watch": "yarn build:bundle --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build sentry-replay-*.tgz", diff --git a/packages/replay-internal/rollup.npm.config.mjs b/packages/replay-internal/rollup.npm.config.mjs index f45b4f21b72b..f63bfaf10bcd 100644 --- a/packages/replay-internal/rollup.npm.config.mjs +++ b/packages/replay-internal/rollup.npm.config.mjs @@ -1,5 +1,3 @@ -/* eslint-disable import/no-named-as-default */ -import nodeResolve from '@rollup/plugin-node-resolve'; import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils'; export default makeNPMConfigVariants( @@ -23,10 +21,8 @@ export default makeNPMConfigVariants( input: ['./src/worker-bundler.ts'], output: { file: `./build/npm/${format}/worker-bundler.js`, - strict: false, format, }, treeshake: false, - plugins: [nodeResolve()], })), ); diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index adb5530f5995..e5c9a56b1c5d 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -22,30 +22,20 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "files": [ "/build" ], "sideEffects": false, "private": true, "scripts": { - "build": "run-p build:transpile build:types", - "build:transpile": "rollup -c rollup.worker.config.mjs", - "build:examples": "rollup -c rollup.examples.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build": "run-s build:transpile build:types", + "build:transpile": "rolldown -c rollup.worker.config.mjs", + "build:examples": "rolldown -c rollup.examples.config.mjs", + "build:types": "echo \"Types included with build\"", "build:dev": "yarn build", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", "build:transpile:watch": "yarn build:transpile --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", "clean": "rimraf build", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", diff --git a/packages/replay-worker/rollup.examples.config.mjs b/packages/replay-worker/rollup.examples.config.mjs index cbaacbfcb245..207036538f12 100644 --- a/packages/replay-worker/rollup.examples.config.mjs +++ b/packages/replay-worker/rollup.examples.config.mjs @@ -1,45 +1,24 @@ -import commonjs from '@rollup/plugin-commonjs'; -import resolve from '@rollup/plugin-node-resolve'; -import terser from '@rollup/plugin-terser'; -import typescript from '@rollup/plugin-typescript'; -import { defineConfig } from 'rollup'; -import { makeLicensePlugin } from '../../dev-packages/rollup-utils/plugins/index.mjs'; - -const licensePlugin = makeLicensePlugin('Sentry Replay Worker'); +import { treeShakePreset } from '@sentry-internal/rollup-utils'; +import { defineConfig } from 'rolldown'; const config = defineConfig([ { input: ['./src/_worker.ts'], + tsconfig: './tsconfig.build.json', output: { file: './examples/worker.js', format: 'esm', }, - treeshake: 'smallest', - plugins: [ - commonjs(), - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), - resolve(), - licensePlugin, - ], + treeshake: treeShakePreset('smallest'), }, { input: ['./src/_worker.ts'], + tsconfig: './tsconfig.build.json', output: { file: './examples/worker.min.js', format: 'esm', }, - treeshake: 'smallest', - plugins: [ - commonjs(), - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), - resolve(), - terser({ - mangle: { - module: true, - }, - }), - licensePlugin, - ], + treeshake: treeShakePreset('smallest'), }, ]); diff --git a/packages/replay-worker/rollup.worker.config.mjs b/packages/replay-worker/rollup.worker.config.mjs index 556994570335..e4f6a1868af3 100644 --- a/packages/replay-worker/rollup.worker.config.mjs +++ b/packages/replay-worker/rollup.worker.config.mjs @@ -1,45 +1,33 @@ // inspired by https://justinribeiro.com/chronicle/2020/07/17/building-module-web-workers-for-cross-browser-compatibility-with-rollup/ -import commonjs from '@rollup/plugin-commonjs'; -import resolve from '@rollup/plugin-node-resolve'; -import terser from '@rollup/plugin-terser'; -import typescript from '@rollup/plugin-typescript'; -import { defineConfig } from 'rollup'; +import { treeShakePreset } from '@sentry-internal/rollup-utils'; +import { defineConfig } from 'rolldown'; const config = defineConfig([ { input: ['./src/index.ts'], - treeshake: 'smallest', + treeshake: treeShakePreset('smallest'), + tsconfig: './tsconfig.build.json', output: { dir: './build/esm', format: 'esm', + minify: true, }, external: ['./worker'], - plugins: [ - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), - terser({ - mangle: { - module: true, - }, - }), - ], }, { input: ['./src/_worker.ts'], + tsconfig: './tsconfig.build.json', output: { file: './build/esm/worker.ts', format: 'esm', + minify: true, + }, + treeshake: treeShakePreset('smallest'), + transform: { + target: 'es2020', }, - treeshake: 'smallest', plugins: [ - commonjs(), - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), - resolve(), - terser({ - mangle: { - module: true, - }, - }), { name: 'worker-to-string', renderChunk(code) { @@ -50,21 +38,16 @@ const config = defineConfig([ }, { input: ['./src/_worker.ts'], + tsconfig: './tsconfig.build.json', output: { file: './build/esm/worker-bundler.js', format: 'esm', + minify: true, + }, + treeshake: treeShakePreset('smallest'), + transform: { + target: 'es2020', }, - treeshake: 'smallest', - plugins: [ - commonjs(), - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), - resolve(), - terser({ - mangle: { - module: true, - }, - }), - ], }, ]); diff --git a/packages/replay-worker/tsconfig.build.json b/packages/replay-worker/tsconfig.build.json new file mode 100644 index 000000000000..24cce469ccc3 --- /dev/null +++ b/packages/replay-worker/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "module": "esnext", + "lib": ["webworker", "scripthost"], + "esModuleInterop": true, + "target": "es2020", + "strictPropertyInitialization": false + }, + "include": ["src/**/*.ts"] +} diff --git a/packages/replay-worker/tsconfig.json b/packages/replay-worker/tsconfig.json index 24cce469ccc3..c26c04b81d46 100644 --- a/packages/replay-worker/tsconfig.json +++ b/packages/replay-worker/tsconfig.json @@ -5,7 +5,10 @@ "lib": ["webworker", "scripthost"], "esModuleInterop": true, "target": "es2020", - "strictPropertyInitialization": false + "strictPropertyInitialization": false, + "inlineSourceMap": false, + "sourceMap": false, + "inlineSources": false }, "include": ["src/**/*.ts"] } diff --git a/packages/solid/package.json b/packages/solid/package.json index 5845394ca913..8cc3ca693e4c 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -31,21 +31,21 @@ }, "./solidrouter": { "import": { - "types": "./solidrouter.d.ts", + "types": "./build/types/solidrouter.d.ts", "default": "./build/esm/solidrouter.js" }, "require": { - "types": "./solidrouter.d.ts", + "types": "./build/types/solidrouter.d.ts", "default": "./build/cjs/solidrouter.js" } }, "./tanstackrouter": { "import": { - "types": "./tanstackrouter.d.ts", + "types": "./build/types/tanstackrouter.d.ts", "default": "./build/esm/tanstackrouter.js" }, "require": { - "types": "./tanstackrouter.d.ts", + "types": "./build/types/tanstackrouter.d.ts", "default": "./build/cjs/tanstackrouter.js" } } @@ -84,14 +84,11 @@ "scripts": { "build": "run-p build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:routers", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:routers": "tsc -p tsconfig.routers-types.json", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts && madge --circular src/solidrouter.ts && madge --circular src/tanstackrouter.ts", "clean": "rimraf build coverage sentry-solid-*.tgz ./*.d.ts ./*.d.ts.map", diff --git a/packages/solid/tsconfig.routers-types.json b/packages/solid/tsconfig.routers-types.json deleted file mode 100644 index e173ebc0eb87..000000000000 --- a/packages/solid/tsconfig.routers-types.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - - "compilerOptions": { - "declaration": true, - "declarationMap": true, - "emitDeclarationOnly": true, - "outDir": "./" - }, - - "//": "This type is built separately because it is for a subpath export, which has problems if it is not in the root", - "include": ["src/solidrouter.ts", "src/tanstackrouter.ts"], - "//": "Without this, we cannot output into the root dir", - "exclude": [] -} diff --git a/packages/solid/tsconfig.types.json b/packages/solid/tsconfig.types.json index 510f8c4fae3f..65455f66bd75 100644 --- a/packages/solid/tsconfig.types.json +++ b/packages/solid/tsconfig.types.json @@ -6,8 +6,5 @@ "declarationMap": true, "emitDeclarationOnly": true, "outDir": "build/types" - }, - - "//": "This is built separately in tsconfig.routers-types.json", - "exclude": ["src/solidrouter.ts", "src/tanstackrouter.ts"] + } } diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json index b0a8f5dcaa87..12bf6518ae19 100644 --- a/packages/solidstart/package.json +++ b/packages/solidstart/package.json @@ -40,14 +40,14 @@ } }, "./solidrouter": { - "types": "./solidrouter.d.ts", + "types": "./build/types/solidrouter.d.ts", "browser": { - "types": "./solidrouter.d.ts", + "types": "./build/types/solidrouter.d.ts", "import": "./build/esm/solidrouter.client.js", "require": "./build/cjs/solidrouter.client.js" }, "node": { - "types": "./solidrouter.d.ts", + "types": "./build/types/solidrouter.d.ts", "import": "./build/esm/solidrouter.server.js", "require": "./build/cjs/solidrouter.server.js" } @@ -85,14 +85,11 @@ "scripts": { "build": "run-p build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:subexports", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:subexports": "tsc -p tsconfig.subexports-types.json", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts && madge --circular src/solidrouter.client.ts && madge --circular src/solidrouter.server.ts && madge --circular src/solidrouter.ts", "clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server", diff --git a/packages/solidstart/tsconfig.subexports-types.json b/packages/solidstart/tsconfig.subexports-types.json deleted file mode 100644 index 52dd6d1d268c..000000000000 --- a/packages/solidstart/tsconfig.subexports-types.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig.json", - - "compilerOptions": { - "declaration": true, - "declarationMap": true, - "emitDeclarationOnly": true, - "outDir": "./" - }, - - // These types are built separately because they are for a subpath export, which has problems if they are not in the root - "include": [ - "src/solidrouter.client.ts", - "src/client/solidrouter.ts", - "src/solidrouter.server.ts", - "src/server/solidrouter.ts", - "src/solidrouter.ts" - ], - // Without this, we cannot output into the root dir - "exclude": [] -} diff --git a/packages/solidstart/tsconfig.types.json b/packages/solidstart/tsconfig.types.json index f7cc8c3d1610..65455f66bd75 100644 --- a/packages/solidstart/tsconfig.types.json +++ b/packages/solidstart/tsconfig.types.json @@ -6,14 +6,5 @@ "declarationMap": true, "emitDeclarationOnly": true, "outDir": "build/types" - }, - - // These are built separately in tsconfig.solidrouter-types.json - "exclude": [ - "src/solidrouter.client.ts", - "src/client/solidrouter.ts", - "src/solidrouter.server.ts", - "src/server/solidrouter.ts", - "src/solidrouter.ts" - ] + } } diff --git a/packages/svelte/package.json b/packages/svelte/package.json index c22735e67ac6..46dfd1833123 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -28,13 +28,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -53,16 +46,13 @@ "vite": "^3.0.0" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-svelte-*.tgz", diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index a9eccf52c55f..0d4205444955 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -67,12 +67,11 @@ "scripts": { "build": "run-p build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "tsc -p tsconfig.types.json", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-sveltekit-*.tgz", diff --git a/packages/sveltekit/rollup.npm.config.mjs b/packages/sveltekit/rollup.npm.config.mjs index ca0792cb4868..1db5e025c44c 100644 --- a/packages/sveltekit/rollup.npm.config.mjs +++ b/packages/sveltekit/rollup.npm.config.mjs @@ -6,6 +6,7 @@ export default makeNPMConfigVariants( 'src/index.server.ts', 'src/index.client.ts', 'src/index.worker.ts', + 'src/index.types.ts', 'src/client/index.ts', 'src/server/index.ts', 'src/worker/index.ts', diff --git a/packages/tanstackstart-react/package.json b/packages/tanstackstart-react/package.json index a688622dbdaa..9d3463b8993e 100644 --- a/packages/tanstackstart-react/package.json +++ b/packages/tanstackstart-react/package.json @@ -39,13 +39,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -58,16 +51,13 @@ "@sentry/react": "10.32.1" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", "build:transpile:watch": "nodemon --ext ts --watch src scripts/buildRollup.ts", - "build:types:watch": "tsc -p tsconfig.types.json --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-tanstackstart-react-*.tgz", diff --git a/packages/tanstackstart/package.json b/packages/tanstackstart/package.json index f41714680842..bd1a7d53c46b 100644 --- a/packages/tanstackstart/package.json +++ b/packages/tanstackstart/package.json @@ -29,27 +29,17 @@ } } }, - "typesVersions": { - "<5.0": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", "build:transpile:watch": "nodemon --ext ts --watch src scripts/buildRollup.ts", - "build:types:watch": "tsc -p tsconfig.types.json --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-tanstackstart-*.tgz", diff --git a/packages/types/package.json b/packages/types/package.json index 333c9dcf01c6..a70018a1df38 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -28,27 +28,17 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "clean": "rimraf build sentry-types-*.tgz", "lint": "eslint . --format stylish", diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index 361fbf7094bd..41c16c4b25ab 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -28,13 +28,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -51,16 +44,13 @@ "@sentry/opentelemetry": "10.32.1" }, "scripts": { - "build": "run-p build:transpile build:types", + "build": "run-s build:transpile build:types", "build:dev": "yarn build", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "yarn build:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-vercel-edge-*.tgz", diff --git a/packages/vercel-edge/rollup.npm.config.mjs b/packages/vercel-edge/rollup.npm.config.mjs index ae01f43703d0..c0daf542b1e7 100644 --- a/packages/vercel-edge/rollup.npm.config.mjs +++ b/packages/vercel-edge/rollup.npm.config.mjs @@ -1,5 +1,5 @@ -import replace from '@rollup/plugin-replace'; -import { makeBaseNPMConfig, makeNPMConfigVariants, plugins } from '@sentry-internal/rollup-utils'; +import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils'; +import { replacePlugin } from 'rolldown/plugins'; export default makeNPMConfigVariants( makeBaseNPMConfig({ @@ -11,14 +11,14 @@ export default makeNPMConfigVariants( preserveModules: false, }, plugins: [ - plugins.makeCommonJSPlugin({ transformMixedEsModules: true }), // Needed because various modules in the OTEL toolchain use CJS (require-in-the-middle, shimmer, etc..) - plugins.makeJsonPlugin(), // Needed because `require-in-the-middle` imports json via require - replace({ - preventAssignment: true, - values: { + replacePlugin( + { 'process.argv0': JSON.stringify(''), // needed because otel relies on process.argv0 for the default service name, but that api is not available in the edge runtime. }, - }), + { + preventAssignment: true, + }, + ), { // This plugin is needed because otel imports `performance` from `perf_hooks` and also uses it via the `performance` global. // It also imports `inspect` and `promisify` from node's `util` which are not available in the edge runtime so we need to define a polyfill. diff --git a/packages/vue/package.json b/packages/vue/package.json index f69c3d9e703d..58378b1e97c0 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -31,22 +31,15 @@ }, "./tanstackrouter": { "import": { - "types": "./tanstackrouter.d.ts", + "types": "./build/types/tanstackrouter.d.ts", "default": "./build/esm/tanstackrouter.js" }, "require": { - "types": "./tanstackrouter.d.ts", + "types": "./build/types/tanstackrouter.d.ts", "default": "./build/cjs/tanstackrouter.js" } } }, - "typesVersions": { - "<5.0": { - "build/types/index.d.ts": [ - "build/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -72,17 +65,13 @@ "vue": "~3.2.41" }, "scripts": { - "build": "run-p build:transpile build:types", - "build:dev": "run-p build:transpile build:types", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:router build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:router": "tsc -p tsconfig.router-types.json", - "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8", + "build": "run-s build:transpile build:types", + "build:dev": "run-s build:transpile build:types", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:types:watch", "build:dev:watch": "run-p build:transpile:watch build:types:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts && madge --circular src/tanstackrouter.ts", "clean": "rimraf build coverage sentry-vue-*.tgz", diff --git a/packages/wasm/package.json b/packages/wasm/package.json index de458b34a5db..113e5101ecef 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -28,13 +28,6 @@ } } }, - "typesVersions": { - "<5.0": { - "build/npm/types/index.d.ts": [ - "build/npm/types-ts3.8/index.d.ts" - ] - } - }, "publishConfig": { "access": "public" }, @@ -43,18 +36,15 @@ "@sentry/core": "10.32.1" }, "scripts": { - "build": "run-p build:transpile build:bundle build:types", - "build:bundle": "rollup --config rollup.bundle.config.mjs", - "build:dev": "run-p build:transpile build:types", - "build:transpile": "rollup -c rollup.npm.config.mjs", - "build:types": "run-s build:types:core build:types:downlevel", - "build:types:core": "tsc -p tsconfig.types.json", - "build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8", + "build": "run-s build:transpile build:types build:bundle", + "build:bundle": "rolldown --config rollup.bundle.config.mjs", + "build:dev": "run-s build:transpile build:types", + "build:transpile": "rolldown -c rollup.npm.config.mjs", + "build:types": "echo \"Types included with build\"", "build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch", - "build:bundle:watch": "rollup --config rollup.bundle.config.mjs --watch", + "build:bundle:watch": "rolldown --config rollup.bundle.config.mjs --watch", "build:dev:watch": "run-p build:transpile:watch build:types:watch", - "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", - "build:types:watch": "tsc -p tsconfig.types.json --watch", + "build:transpile:watch": "rolldown -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/yarn.lock b/yarn.lock index ce3d9f3223f9..bd1db5ae0864 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1354,15 +1354,15 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/generator@^7.18.10", "@babel/generator@^7.21.5", "@babel/generator@^7.22.10", "@babel/generator@^7.23.6", "@babel/generator@^7.27.5": - version "7.27.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.5.tgz#3eb01866b345ba261b04911020cbe22dd4be8c8c" - integrity sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw== - dependencies: - "@babel/parser" "^7.27.5" - "@babel/types" "^7.27.3" - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" +"@babel/generator@^7.18.10", "@babel/generator@^7.21.5", "@babel/generator@^7.22.10", "@babel/generator@^7.23.6", "@babel/generator@^7.27.5", "@babel/generator@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.5.tgz#712722d5e50f44d07bc7ac9fe84438742dd61298" + integrity sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ== + dependencies: + "@babel/parser" "^7.28.5" + "@babel/types" "^7.28.5" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" jsesc "^3.0.2" "@babel/helper-annotate-as-pure@7.18.6": @@ -1553,10 +1553,10 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== -"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8" - integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== +"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.27.1", "@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== "@babel/helper-validator-option@^7.18.6", "@babel/helper-validator-option@^7.23.5", "@babel/helper-validator-option@^7.25.9", "@babel/helper-validator-option@^7.27.1": version "7.27.1" @@ -1587,12 +1587,12 @@ dependencies: "@babel/types" "^7.26.9" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.4", "@babel/parser@^7.18.10", "@babel/parser@^7.20.7", "@babel/parser@^7.21.8", "@babel/parser@^7.22.10", "@babel/parser@^7.22.16", "@babel/parser@^7.22.5", "@babel/parser@^7.23.5", "@babel/parser@^7.23.6", "@babel/parser@^7.23.9", "@babel/parser@^7.25.3", "@babel/parser@^7.25.4", "@babel/parser@^7.25.6", "@babel/parser@^7.26.7", "@babel/parser@^7.27.2", "@babel/parser@^7.27.5", "@babel/parser@^7.27.7", "@babel/parser@^7.28.4", "@babel/parser@^7.4.5", "@babel/parser@^7.7.0": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.4.tgz#da25d4643532890932cc03f7705fe19637e03fa8" - integrity sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.4", "@babel/parser@^7.18.10", "@babel/parser@^7.20.7", "@babel/parser@^7.21.8", "@babel/parser@^7.22.10", "@babel/parser@^7.22.16", "@babel/parser@^7.22.5", "@babel/parser@^7.23.5", "@babel/parser@^7.23.6", "@babel/parser@^7.23.9", "@babel/parser@^7.25.3", "@babel/parser@^7.25.4", "@babel/parser@^7.25.6", "@babel/parser@^7.26.7", "@babel/parser@^7.27.2", "@babel/parser@^7.27.7", "@babel/parser@^7.28.4", "@babel/parser@^7.28.5", "@babel/parser@^7.4.5", "@babel/parser@^7.7.0": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" + integrity sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ== dependencies: - "@babel/types" "^7.28.4" + "@babel/types" "^7.28.5" "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.24.4": version "7.24.4" @@ -2655,13 +2655,13 @@ "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" -"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.15", "@babel/types@^7.22.17", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.6", "@babel/types@^7.23.9", "@babel/types@^7.24.7", "@babel/types@^7.25.4", "@babel/types@^7.25.6", "@babel/types@^7.25.9", "@babel/types@^7.26.3", "@babel/types@^7.26.9", "@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.27.6", "@babel/types@^7.27.7", "@babel/types@^7.28.4", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.2": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a" - integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q== +"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.15", "@babel/types@^7.22.17", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.6", "@babel/types@^7.23.9", "@babel/types@^7.24.7", "@babel/types@^7.25.4", "@babel/types@^7.25.6", "@babel/types@^7.25.9", "@babel/types@^7.26.3", "@babel/types@^7.26.9", "@babel/types@^7.27.1", "@babel/types@^7.27.6", "@babel/types@^7.27.7", "@babel/types@^7.28.5", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.7.2": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.5.tgz#10fc405f60897c35f07e85493c932c7b5ca0592b" + integrity sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA== dependencies: "@babel/helper-string-parser" "^7.27.1" - "@babel/helper-validator-identifier" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" "@bcoe/v8-coverage@^1.0.2": version "1.0.2" @@ -2988,10 +2988,25 @@ lodash "^4.17.21" resolve "^1.20.0" -"@emnapi/runtime@^1.2.0": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.4.3.tgz#c0564665c80dc81c448adac23f9dfbed6c838f7d" - integrity sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ== +"@emnapi/core@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.7.1.tgz#3a79a02dbc84f45884a1806ebb98e5746bdfaac4" + integrity sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg== + dependencies: + "@emnapi/wasi-threads" "1.1.0" + tslib "^2.4.0" + +"@emnapi/runtime@^1.2.0", "@emnapi/runtime@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.7.1.tgz#a73784e23f5d57287369c808197288b52276b791" + integrity sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA== + dependencies: + tslib "^2.4.0" + +"@emnapi/wasi-threads@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz#60b2102fddc9ccb78607e4a3cf8403ea69be41bf" + integrity sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ== dependencies: tslib "^2.4.0" @@ -4850,10 +4865,10 @@ "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": - version "0.3.12" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz#2234ce26c62889f03db3d7fea43c1932ab3e927b" - integrity sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg== +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== dependencies: "@jridgewell/sourcemap-codec" "^1.5.0" "@jridgewell/trace-mapping" "^0.3.24" @@ -4889,10 +4904,10 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.25" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== +"@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.28", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== dependencies: "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" @@ -5075,6 +5090,15 @@ dependencies: sparse-bitfield "^3.0.3" +"@napi-rs/wasm-runtime@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.0.tgz#c0180393d7862cff0d412e3e1a7c3bd5ea6d9b2f" + integrity sha512-Fq6DJW+Bb5jaWE69/qOE0D1TUN9+6uWhCeZpdnSBk14pjLcCWR7Q8n49PTSPHazM37JqrsdpEthXy2xn6jWWiA== + dependencies: + "@emnapi/core" "^1.7.1" + "@emnapi/runtime" "^1.7.1" + "@tybys/wasm-util" "^0.10.1" + "@nestjs/common@^10.0.0": version "10.4.15" resolved "https://registry.yarnpkg.com/@nestjs/common/-/common-10.4.15.tgz#27c291466d9100eb86fdbe6f7bbb4d1a6ad55f70" @@ -6232,6 +6256,11 @@ dependencies: "@opentelemetry/core" "^2.0.0" +"@oxc-project/types@=0.103.0": + version "0.103.0" + resolved "https://registry.yarnpkg.com/@oxc-project/types/-/types-0.103.0.tgz#fbfd4e2fb085fe53048372c9b22ca2ffedc357a9" + integrity sha512-bkiYX5kaXWwUessFRSoXFkGIQTmc6dLGdxuRTrC+h8PSnIdZyuXHHlLAeTmOue5Br/a0/a7dHH0Gca6eXn9MKg== + "@parcel/watcher-android-arm64@2.5.1": version "2.5.1" resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz#507f836d7e2042f798c7d07ad19c3546f9848ac1" @@ -6694,6 +6723,78 @@ dependencies: web-streams-polyfill "^3.1.1" +"@rolldown/binding-android-arm64@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-beta.57.tgz#af062713602eecdb42c5ad027f0f406fe03fca50" + integrity sha512-GoOVDy8bjw9z1K30Oo803nSzXJS/vWhFijFsW3kzvZCO8IZwFnNa6pGctmbbJstKl3Fv6UBwyjJQN6msejW0IQ== + +"@rolldown/binding-darwin-arm64@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-beta.57.tgz#0f3b5138cdd1710bb9c301edfd82073d98f3150a" + integrity sha512-9c4FOhRGpl+PX7zBK5p17c5efpF9aSpTPgyigv57hXf5NjQUaJOOiejPLAtFiKNBIfm5Uu6yFkvLKzOafNvlTw== + +"@rolldown/binding-darwin-x64@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-beta.57.tgz#4bb36e45d65ea3f868109e9df27795d87cfb44d2" + integrity sha512-6RsB8Qy4LnGqNGJJC/8uWeLWGOvbRL/KG5aJ8XXpSEupg/KQtlBEiFaYU/Ma5Usj1s+bt3ItkqZYAI50kSplBA== + +"@rolldown/binding-freebsd-x64@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-beta.57.tgz#0d1d9fe093980b91a7c0a841f2e73291f2a57230" + integrity sha512-uA9kG7+MYkHTbqwv67Tx+5GV5YcKd33HCJIi0311iYBd25yuwyIqvJfBdt1VVB8tdOlyTb9cPAgfCki8nhwTQg== + +"@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-beta.57.tgz#80c658120fc911520ff163f56f7eb152971f5478" + integrity sha512-3KkS0cHsllT2T+Te+VZMKHNw6FPQihYsQh+8J4jkzwgvAQpbsbXmrqhkw3YU/QGRrD8qgcOvBr6z5y6Jid+rmw== + +"@rolldown/binding-linux-arm64-gnu@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-beta.57.tgz#f582011c7f5e7200b3fed0fb785b412237c1adfc" + integrity sha512-A3/wu1RgsHhqP3rVH2+sM81bpk+Qd2XaHTl8LtX5/1LNR7QVBFBCpAoiXwjTdGnI5cMdBVi7Z1pi52euW760Fw== + +"@rolldown/binding-linux-arm64-musl@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-beta.57.tgz#e07d3a51152d4930b7aaf062ea93b658025cad2c" + integrity sha512-d0kIVezTQtazpyWjiJIn5to8JlwfKITDqwsFv0Xc6s31N16CD2PC/Pl2OtKgS7n8WLOJbfqgIp5ixYzTAxCqMg== + +"@rolldown/binding-linux-x64-gnu@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-beta.57.tgz#a1f1c93613daf7e8f83feea50648938a20730292" + integrity sha512-E199LPijo98yrLjPCmETx8EF43sZf9t3guSrLee/ej1rCCc3zDVTR4xFfN9BRAapGVl7/8hYqbbiQPTkv73kUg== + +"@rolldown/binding-linux-x64-musl@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-beta.57.tgz#8fb1416555ecb104b3798fe77adc337e402ae50e" + integrity sha512-++EQDpk/UJ33kY/BNsh7A7/P1sr/jbMuQ8cE554ZIy+tCUWCivo9zfyjDUoiMdnxqX6HLJEqqGnbGQOvzm2OMQ== + +"@rolldown/binding-openharmony-arm64@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-beta.57.tgz#416dd05d210cb124e6f268855991933aca157c07" + integrity sha512-voDEBcNqxbUv/GeXKFtxXVWA+H45P/8Dec4Ii/SbyJyGvCqV1j+nNHfnFUIiRQ2Q40DwPe/djvgYBs9PpETiMA== + +"@rolldown/binding-wasm32-wasi@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-beta.57.tgz#cd06367e3156f8554905e1a4009479ee438b3172" + integrity sha512-bRhcF7NLlCnpkzLVlVhrDEd0KH22VbTPkPTbMjlYvqhSmarxNIq5vtlQS8qmV7LkPKHrNLWyJW/V/sOyFba26Q== + dependencies: + "@napi-rs/wasm-runtime" "^1.1.0" + +"@rolldown/binding-win32-arm64-msvc@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-beta.57.tgz#e2dd3c0317d55af32bb169e1ebecb008f6fae56a" + integrity sha512-rnDVGRks2FQ2hgJ2g15pHtfxqkGFGjJQUDWzYznEkE8Ra2+Vag9OffxdbJMZqBWXHVM0iS4dv8qSiEn7bO+n1Q== + +"@rolldown/binding-win32-x64-msvc@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-beta.57.tgz#df73156f77a5f5af4ec7512f9af4913de3352f6e" + integrity sha512-OqIUyNid1M4xTj6VRXp/Lht/qIP8fo25QyAZlCP+p6D2ATCEhyW4ZIFLnC9zAGN/HMbXoCzvwfa8Jjg/8J4YEg== + +"@rolldown/pluginutils@1.0.0-beta.57": + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.57.tgz#664d296f8f7a1158983ec6102d7939ee95b5e1e9" + integrity sha512-aQNelgx14tGA+n2tNSa9x6/jeoCL9fkDeCei7nOKnHx0fEFRRMu5ReiITo+zZD5TzWDGGRjbSYCs93IfRIyTuQ== + "@rollup/plugin-alias@^5.0.0", "@rollup/plugin-alias@^5.1.1": version "5.1.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-5.1.1.tgz#53601d88cda8b1577aa130b4a6e452283605bf26" @@ -6712,7 +6813,7 @@ magic-string "^0.30.3" picomatch "^4.0.2" -"@rollup/plugin-commonjs@^25.0.4", "@rollup/plugin-commonjs@^25.0.7": +"@rollup/plugin-commonjs@^25.0.4": version "25.0.8" resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz#c77e608ab112a666b7f2a6bea625c73224f7dd34" integrity sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A== @@ -6737,13 +6838,6 @@ magic-string "^0.30.3" picomatch "^4.0.2" -"@rollup/plugin-esm-shim@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@rollup/plugin-esm-shim/-/plugin-esm-shim-0.1.5.tgz#74464e9a8a7e664557aae65592c8a3e317802220" - integrity sha512-xnIjDm/0EbqAw0/rR1UE7eAo9db0ftGPqT8RUCFtkFxtCuspbbmj+wutoyxm32jBytyO3SgkxSG17OR893fV7A== - dependencies: - magic-string "^0.30.3" - "@rollup/plugin-inject@^5.0.5": version "5.0.5" resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz#616f3a73fe075765f91c5bec90176608bed277a3" @@ -6802,7 +6896,7 @@ is-module "^1.0.0" resolve "^1.22.1" -"@rollup/plugin-replace@^5.0.2", "@rollup/plugin-replace@^5.0.5", "@rollup/plugin-replace@^5.0.7": +"@rollup/plugin-replace@^5.0.2", "@rollup/plugin-replace@^5.0.7": version "5.0.7" resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.7.tgz#150c9ee9db8031d9e4580a61a0edeaaed3d37687" integrity sha512-PqxSfuorkHz/SPpyngLyg5GCEkOcee9M1bkxiVDr41Pd61mqP1PLOoDPbpl44SB2mQGKwV/In74gqQmGITOhEQ== @@ -6818,14 +6912,6 @@ "@rollup/pluginutils" "^5.0.1" magic-string "^0.30.3" -"@rollup/plugin-sucrase@^5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@rollup/plugin-sucrase/-/plugin-sucrase-5.0.2.tgz#f8b8b54ad789a47fa882b968a76cede0194eea6e" - integrity sha512-4MhIVH9Dy2Hwose1/x5QMs0XF7yn9jDd/yozHqzdIrMWIolgFpGnrnVhQkqTaK1RALY/fpyrEKmwH/04vr1THA== - dependencies: - "@rollup/pluginutils" "^5.0.1" - sucrase "^3.27.0" - "@rollup/plugin-terser@^0.4.4": version "0.4.4" resolved "https://registry.yarnpkg.com/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz#15dffdb3f73f121aa4fbb37e7ca6be9aeea91962" @@ -6835,14 +6921,6 @@ smob "^1.0.0" terser "^5.17.4" -"@rollup/plugin-typescript@^11.1.6": - version "11.1.6" - resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz#724237d5ec12609ec01429f619d2a3e7d4d1b22b" - integrity sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA== - dependencies: - "@rollup/pluginutils" "^5.1.0" - resolve "^1.22.1" - "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.0.9", "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" @@ -8273,6 +8351,13 @@ "@tufjs/canonical-json" "1.0.0" minimatch "^9.0.0" +"@tybys/wasm-util@^0.10.1": + version "0.10.1" + resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz#ecddd3205cf1e2d5274649ff0eedd2991ed7f414" + integrity sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg== + dependencies: + tslib "^2.4.0" + "@types/accepts@^1.3.5": version "1.3.5" resolved "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575" @@ -9410,6 +9495,54 @@ "@typescript-eslint/types" "8.35.0" eslint-visitor-keys "^4.2.1" +"@typescript/native-preview-darwin-arm64@7.0.0-dev.20251210.1": + version "7.0.0-dev.20251210.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-darwin-arm64/-/native-preview-darwin-arm64-7.0.0-dev.20251210.1.tgz#3e8a36be5d37ca906773356034742bcea798c28a" + integrity sha512-6FLhFMAdaW/JMzTPqaIxVTgCFhMQY2v88qVGLUmcf9coCJx5plxuY0zxzXaLrvQulGnDurIKZMW5tBGmQy4Buw== + +"@typescript/native-preview-darwin-x64@7.0.0-dev.20251210.1": + version "7.0.0-dev.20251210.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-darwin-x64/-/native-preview-darwin-x64-7.0.0-dev.20251210.1.tgz#1e0c800bdae84ba9c4a148f9d79d8c42e9c06701" + integrity sha512-JrsZ913/ZyeoFDCVq+k4h0VUJHyqjT6te/IC8aMtLZQRkusQEX+57Anfr/BVXzWBa8+JwIXPGzllilw5dkrHNw== + +"@typescript/native-preview-linux-arm64@7.0.0-dev.20251210.1": + version "7.0.0-dev.20251210.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-linux-arm64/-/native-preview-linux-arm64-7.0.0-dev.20251210.1.tgz#2ca8296b044e78aa0551f7b04b35fc4b225572c2" + integrity sha512-GViH0JIkpEHCo04VYD/iAKqYjIB2uLXXtTmmLaImzBVd+h1dlKFgi2aOMi51mYnSefnbj7P7PeqIQNLKwi4NSQ== + +"@typescript/native-preview-linux-arm@7.0.0-dev.20251210.1": + version "7.0.0-dev.20251210.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-linux-arm/-/native-preview-linux-arm-7.0.0-dev.20251210.1.tgz#2f7a70a1240f842d0ccec71a33ef0fc8e64a50bc" + integrity sha512-v1hyGd8TWHaoRU8BJfGAdW6ML70TLUOB9+0Xeo30m3xHlOdO1zxunXa/FVhqzrChqzOkcty61PGe9tAPhrIh1w== + +"@typescript/native-preview-linux-x64@7.0.0-dev.20251210.1": + version "7.0.0-dev.20251210.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-linux-x64/-/native-preview-linux-x64-7.0.0-dev.20251210.1.tgz#d30c47b98f30f9da9b913a3816c11ee24cfa2227" + integrity sha512-X6p2MrcRcYE9T+ecNHYZHFYew0t+k9Sc2GbyjbNB0+MJ/Lffp3aUH59dp+JASZoyOxugPwN+MCJ/kNzYqiK9vg== + +"@typescript/native-preview-win32-arm64@7.0.0-dev.20251210.1": + version "7.0.0-dev.20251210.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-win32-arm64/-/native-preview-win32-arm64-7.0.0-dev.20251210.1.tgz#dd67823a5e08aec5d070dc2203084ff173c695b6" + integrity sha512-FewUZSh7d9YnX0j3hr+N+zQ5B54k4jsVpZp8QbuDduMtautxI18bNO+vL5oO86ezqLWbUnZajXV/61MGfpEtMg== + +"@typescript/native-preview-win32-x64@7.0.0-dev.20251210.1": + version "7.0.0-dev.20251210.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview-win32-x64/-/native-preview-win32-x64-7.0.0-dev.20251210.1.tgz#7b709dd10968eae6a347cf7ee403586ceff26be9" + integrity sha512-NdqTPzm/Ls3F1amP/e/akCuhY32mjBXT0NMQnYODgT9ltbdkk08b572Bp4GbdfRj9AiJxK70pqoNeZWw4e5fhg== + +"@typescript/native-preview@^7.0.0-dev.20251210.1": + version "7.0.0-dev.20251210.1" + resolved "https://registry.yarnpkg.com/@typescript/native-preview/-/native-preview-7.0.0-dev.20251210.1.tgz#6ae4a3fb5615ff85b9e9315e8e44402ba0e4c890" + integrity sha512-SiSRpp42K80X+qJKAi8qvjo2xMZIgJgROXCJo0MiZ8a6fjQK6IetRfUvwdApUsDltf/VaEc/j8v2Hiqp8SGhLQ== + optionalDependencies: + "@typescript/native-preview-darwin-arm64" "7.0.0-dev.20251210.1" + "@typescript/native-preview-darwin-x64" "7.0.0-dev.20251210.1" + "@typescript/native-preview-linux-arm" "7.0.0-dev.20251210.1" + "@typescript/native-preview-linux-arm64" "7.0.0-dev.20251210.1" + "@typescript/native-preview-linux-x64" "7.0.0-dev.20251210.1" + "@typescript/native-preview-win32-arm64" "7.0.0-dev.20251210.1" + "@typescript/native-preview-win32-x64" "7.0.0-dev.20251210.1" + "@ungap/structured-clone@^1.0.0", "@ungap/structured-clone@^1.2.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" @@ -10617,7 +10750,7 @@ ansicolors@~0.2.1: resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" integrity sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8= -any-promise@^1.0.0, any-promise@^1.1.0: +any-promise@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= @@ -10879,11 +11012,6 @@ array-equal@^1.0.0: resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= -array-find-index@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= - array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -11037,6 +11165,14 @@ ast-kit@^1.0.1, ast-kit@^1.1.0: "@babel/parser" "^7.25.6" pathe "^1.1.2" +ast-kit@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ast-kit/-/ast-kit-2.2.0.tgz#6d9a298acefef5bdfc5a0fa51d94d1334ef2e671" + integrity sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw== + dependencies: + "@babel/parser" "^7.28.5" + pathe "^2.0.3" + ast-module-types@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/ast-module-types/-/ast-module-types-6.0.1.tgz#4b4ca0251c57b815bab62604dcb22f8c903e2523" @@ -11707,6 +11843,11 @@ birpc@^0.2.17: resolved "https://registry.yarnpkg.com/birpc/-/birpc-0.2.17.tgz#d0bdb90d4d063061156637f03b7b0adea1779734" integrity sha512-+hkTxhot+dWsLpp3gia5AkVHIsKlZybNT5gIYiDlNzJrmYPcTM9k5/w2uaj3IPpd7LlEYpmCj4Jj1nC41VhDFg== +birpc@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/birpc/-/birpc-4.0.0.tgz#cceef485926b93496735201896d86c3a182ad30f" + integrity sha512-LShSxJP0KTmd101b6DRyGBj57LZxSDYWKitQNW/mi8GRMvZb078Uf9+pveax1DrVL89vm7mWe+TovdI/UDOuPw== + bl@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/bl/-/bl-2.2.1.tgz#8c11a7b730655c5d56898cdc871224f40fd901d5" @@ -13239,7 +13380,7 @@ commander@^2.20.0, commander@^2.20.3, commander@^2.6.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^4.0.0, commander@^4.1.1: +commander@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== @@ -13264,11 +13405,6 @@ comment-parser@1.4.1, comment-parser@^1.1.2: resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.1.tgz#bdafead37961ac079be11eb7ec65c4d021eaf9cc" integrity sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg== -commenting@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/commenting/-/commenting-1.1.0.tgz#fae14345c6437b8554f30bc6aa6c1e1633033590" - integrity sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA== - common-ancestor-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7" @@ -14741,20 +14877,16 @@ dotenv@~10.0.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== -downlevel-dts@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/downlevel-dts/-/downlevel-dts-0.11.0.tgz#514a2d723009c5845730c1db6c994484c596ed9c" - integrity sha512-vo835pntK7kzYStk7xUHDifiYJvXxVhUapt85uk2AI94gUUAQX9HNRtrcMHNSc3YHJUEHGbYIGsM99uIbgAtxw== - dependencies: - semver "^7.3.2" - shelljs "^0.8.3" - typescript next - dset@^3.1.2: version "3.1.4" resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.4.tgz#f8eaf5f023f068a036d08cd07dc9ffb7d0065248" integrity sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA== +dts-resolver@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/dts-resolver/-/dts-resolver-2.1.3.tgz#b930b38fcb2f3dab3b55cb4ac73658c9a5fc0a41" + integrity sha512-bihc7jPC90VrosXNzK0LTE2cuLP6jr0Ro8jk+kMugHReJVLIpHz/xadeq3MhuwyO4TD4OA3L1Q8pBBFRc08Tsw== + dunder-proto@^1.0.0, dunder-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" @@ -16587,11 +16719,6 @@ estree-walker@2.0.2, estree-walker@^2.0.2: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== -estree-walker@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - estree-walker@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" @@ -17916,6 +18043,13 @@ get-symbol-description@^1.1.0: es-errors "^1.3.0" get-intrinsic "^1.2.6" +get-tsconfig@^4.13.0: + version "4.13.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.13.0.tgz#fcdd991e6d22ab9a600f00e91c318707a5d9a0d7" + integrity sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ== + dependencies: + resolve-pkg-maps "^1.0.0" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -18108,7 +18242,7 @@ glob@^5.0.10: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.4, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.3, glob@~7.2.0: +glob@^7.0.4, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -19460,11 +19594,6 @@ internal-slot@^1.0.3, internal-slot@^1.1.0: hasown "^2.0.2" side-channel "^1.1.0" -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - interpret@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" @@ -20279,15 +20408,6 @@ jiti@^2.0.0, jiti@^2.1.2, jiti@^2.4.2: resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.4.2.tgz#d19b7732ebb6116b06e2038da74a55366faef560" integrity sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A== -js-cleanup@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/js-cleanup/-/js-cleanup-1.2.0.tgz#8dbc65954b1d38b255f1e8cf02cd17b3f7a053f9" - integrity sha512-JeDD0yiiSt80fXzAVa/crrS0JDPQljyBG/RpOtaSbyDq03VHa9szJWMaWOYU/bcTn412uMN2MxApXq8v79cUiQ== - dependencies: - magic-string "^0.25.7" - perf-regexes "^1.0.1" - skip-regex "^1.0.2" - js-md4@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/js-md4/-/js-md4-0.3.2.tgz#cd3b3dc045b0c404556c81ddb5756c23e59d7cf5" @@ -21343,7 +21463,7 @@ lodash.uniq@^4.2.0, lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@~4.17.21: +lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -21552,10 +21672,10 @@ magic-string@^0.26.0, magic-string@^0.26.7: dependencies: sourcemap-codec "^1.4.8" -magic-string@^0.30.0, magic-string@^0.30.10, magic-string@^0.30.11, magic-string@^0.30.17, magic-string@^0.30.19, magic-string@^0.30.3, magic-string@^0.30.4, magic-string@^0.30.5, magic-string@^0.30.8, magic-string@~0.30.0: - version "0.30.19" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.19.tgz#cebe9f104e565602e5d2098c5f2e79a77cc86da9" - integrity sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw== +magic-string@^0.30.0, magic-string@^0.30.10, magic-string@^0.30.11, magic-string@^0.30.17, magic-string@^0.30.19, magic-string@^0.30.3, magic-string@^0.30.4, magic-string@^0.30.5, magic-string@^0.30.8: + version "0.30.21" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.21.tgz#56763ec09a0fa8091df27879fd94d19078c00d91" + integrity sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ== dependencies: "@jridgewell/sourcemap-codec" "^1.5.5" @@ -22661,7 +22781,7 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^3.0.1, mkdirp@~3.0.0: +mkdirp@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== @@ -22728,11 +22848,6 @@ module-lookup-amd@^9.0.3: requirejs "^2.3.7" requirejs-config-file "^4.0.0" -moment@~2.30.1: - version "2.30.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" - integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== - mongodb-connection-string-url@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.2.tgz#e223089dfa0a5fa9bf505f8aedcbc67b077b33e7" @@ -22958,15 +23073,6 @@ mysql@^2.18.1: safe-buffer "5.1.2" sqlstring "2.3.1" -mz@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" - integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== - dependencies: - any-promise "^1.0.0" - object-assign "^4.0.1" - thenify-all "^1.0.0" - named-placeholders@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.3.tgz#df595799a36654da55dda6152ba7a137ad1d9351" @@ -23928,7 +24034,7 @@ nypm@^0.6.0: pkg-types "^2.0.0" tinyexec "^0.3.2" -object-assign@4.1.1, object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@4.1.1, object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -24051,6 +24157,11 @@ obuf@^1.0.0, obuf@^1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== +obug@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/obug/-/obug-2.1.1.tgz#2cba74ff241beb77d63055ddf4cd1e9f90b538be" + integrity sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ== + ofetch@^1.3.4, ofetch@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.4.1.tgz#b6bf6b0d75ba616cef6519dd8b6385a8bae480ec" @@ -24495,11 +24606,6 @@ package-manager-detector@^0.2.0: resolved "https://registry.yarnpkg.com/package-manager-detector/-/package-manager-detector-0.2.0.tgz#160395cd5809181f5a047222319262b8c2d8aaea" integrity sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog== -package-name-regex@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/package-name-regex/-/package-name-regex-2.0.6.tgz#b54bcb04d950e38082b7bb38fa558e01c1679334" - integrity sha512-gFL35q7kbE/zBaPA3UKhp2vSzcPYx2ecbYuwv1ucE9Il6IIgBDweBlH8D68UFGZic2MkllKa2KHCfC1IQBQUYA== - pacote@13.6.2: version "13.6.2" resolved "https://registry.yarnpkg.com/pacote/-/pacote-13.6.2.tgz#0d444ba3618ab3e5cd330b451c22967bbd0ca48a" @@ -24860,11 +24966,6 @@ pend@~1.2.0: resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= -perf-regexes@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/perf-regexes/-/perf-regexes-1.0.1.tgz#6da1d62f5a94bf9353a0451bccacf69068b75d0b" - integrity sha512-L7MXxUDtqr4PUaLFCDCXBfGV/6KLIuSEccizDI7JxT+c9x1G1v04BQ4+4oag84SHaCdrBgQAIs/Cqn+flwFPng== - perfect-debounce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/perfect-debounce/-/perfect-debounce-1.0.0.tgz#9c2e8bc30b169cc984a58b7d5b28049839591d2a" @@ -25038,11 +25139,6 @@ pino@9.9.4: sonic-boom "^4.0.1" thread-stream "^3.0.0" -pirates@^4.0.1: - version "4.0.6" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" - integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== - piscina@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/piscina/-/piscina-3.2.0.tgz#f5a1dde0c05567775690cccefe59d9223924d154" @@ -26584,13 +26680,6 @@ recast@^0.20.5: source-map "~0.6.1" tslib "^2.0.1" -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - rechoir@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" @@ -27039,6 +27128,11 @@ resolve-pathname@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve-url-loader@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz#ee3142fb1f1e0d9db9524d539cfa166e9314f795" @@ -27073,7 +27167,7 @@ resolve@1.22.8: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.22.10, resolve@^1.22.4, resolve@^1.22.6, resolve@^1.22.8, resolve@^1.4.0, resolve@^1.5.0: +resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.22.10, resolve@^1.22.4, resolve@^1.22.6, resolve@^1.22.8, resolve@^1.4.0, resolve@^1.5.0: version "1.22.10" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== @@ -27238,13 +27332,41 @@ roarr@^7.0.4: safe-stable-stringify "^2.4.1" semver-compare "^1.0.0" -rollup-plugin-cleanup@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-cleanup/-/rollup-plugin-cleanup-3.2.1.tgz#8cbc92ecf58babd7c210051929797f137bbf777c" - integrity sha512-zuv8EhoO3TpnrU8MX8W7YxSbO4gmOR0ny06Lm3nkFfq0IVKdBUtHwhVzY1OAJyNCIAdLiyPnOrU0KnO0Fri1GQ== - dependencies: - js-cleanup "^1.2.0" - rollup-pluginutils "^2.8.2" +rolldown-plugin-dts@^0.19.2: + version "0.19.2" + resolved "https://registry.yarnpkg.com/rolldown-plugin-dts/-/rolldown-plugin-dts-0.19.2.tgz#42e9ea6abc263d59545b4f6bd71e6f35b09e6213" + integrity sha512-KbP0cnnjD1ubnyklqy6GCahvUsOrPFH4i+RTX6bNpyvh+jUsaxY01e9mLOU2NsGzQkJS/q4hbCbdcQoAmSWIYg== + dependencies: + "@babel/generator" "^7.28.5" + "@babel/parser" "^7.28.5" + "@babel/types" "^7.28.5" + ast-kit "^2.2.0" + birpc "^4.0.0" + dts-resolver "^2.1.3" + get-tsconfig "^4.13.0" + obug "^2.1.1" + +rolldown@^1.0.0-beta.57: + version "1.0.0-beta.57" + resolved "https://registry.yarnpkg.com/rolldown/-/rolldown-1.0.0-beta.57.tgz#9bdb4691202c87a2925b68f3835e39fe71af0901" + integrity sha512-lMMxcNN71GMsSko8RyeTaFoATHkCh4IWU7pYF73ziMYjhHZWfVesC6GQ+iaJCvZmVjvgSks9Ks1aaqEkBd8udg== + dependencies: + "@oxc-project/types" "=0.103.0" + "@rolldown/pluginutils" "1.0.0-beta.57" + optionalDependencies: + "@rolldown/binding-android-arm64" "1.0.0-beta.57" + "@rolldown/binding-darwin-arm64" "1.0.0-beta.57" + "@rolldown/binding-darwin-x64" "1.0.0-beta.57" + "@rolldown/binding-freebsd-x64" "1.0.0-beta.57" + "@rolldown/binding-linux-arm-gnueabihf" "1.0.0-beta.57" + "@rolldown/binding-linux-arm64-gnu" "1.0.0-beta.57" + "@rolldown/binding-linux-arm64-musl" "1.0.0-beta.57" + "@rolldown/binding-linux-x64-gnu" "1.0.0-beta.57" + "@rolldown/binding-linux-x64-musl" "1.0.0-beta.57" + "@rolldown/binding-openharmony-arm64" "1.0.0-beta.57" + "@rolldown/binding-wasm32-wasi" "1.0.0-beta.57" + "@rolldown/binding-win32-arm64-msvc" "1.0.0-beta.57" + "@rolldown/binding-win32-x64-msvc" "1.0.0-beta.57" rollup-plugin-dts@^6.0.0: version "6.1.1" @@ -27255,21 +27377,6 @@ rollup-plugin-dts@^6.0.0: optionalDependencies: "@babel/code-frame" "^7.24.2" -rollup-plugin-license@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-license/-/rollup-plugin-license-3.3.1.tgz#73b68e33477524198d6f3f9befc905f59bf37c53" - integrity sha512-lwZ/J8QgSnP0unVOH2FQuOBkeiyp0EBvrbYdNU33lOaYD8xP9Zoki+PGoWMD31EUq8Q07GGocSABTYlWMKkwuw== - dependencies: - commenting "~1.1.0" - glob "~7.2.0" - lodash "~4.17.21" - magic-string "~0.30.0" - mkdirp "~3.0.0" - moment "~2.30.1" - package-name-regex "~2.0.6" - spdx-expression-validate "~2.0.0" - spdx-satisfies "~5.0.1" - rollup-plugin-sourcemaps@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed" @@ -27298,13 +27405,6 @@ rollup-plugin-visualizer@^6.0.3: source-map "^0.7.4" yargs "^17.5.1" -rollup-pluginutils@^2.8.2: - version "2.8.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" - integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - dependencies: - estree-walker "^0.6.1" - rollup@^2.70.0, rollup@^2.79.1: version "2.79.2" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.2.tgz#f150e4a5db4b121a21a747d762f701e5e9f49090" @@ -27950,15 +28050,6 @@ shell-quote@^1.7.3, shell-quote@^1.8.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== -shelljs@^0.8.3: - version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" - integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" @@ -28146,11 +28237,6 @@ size-limit@~11.1.6: picocolors "^1.1.0" tinyglobby "^0.2.7" -skip-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/skip-regex/-/skip-regex-1.0.2.tgz#ac655d77e7c771ac2b9f37585fea37bff56ad65b" - integrity sha512-pEjMUbwJ5Pl/6Vn6FsamXHXItJXSRftcibixDmNCWbWhic0hzHrwkMZo0IZ7fMRH9KxcWDFSkzhccB4285PutA== - slash@3.0.0, slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -28459,15 +28545,6 @@ spawn-args@^0.2.0: resolved "https://registry.yarnpkg.com/spawn-args/-/spawn-args-0.2.0.tgz#fb7d0bd1d70fd4316bd9e3dec389e65f9d6361bb" integrity sha1-+30L0dcP1DFr2ePew4nmX51jYbs= -spdx-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/spdx-compare/-/spdx-compare-1.0.0.tgz#2c55f117362078d7409e6d7b08ce70a857cd3ed7" - integrity sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A== - dependencies: - array-find-index "^1.0.2" - spdx-expression-parse "^3.0.0" - spdx-ranges "^2.0.0" - spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -28497,32 +28574,11 @@ spdx-expression-parse@^4.0.0: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" -spdx-expression-validate@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-validate/-/spdx-expression-validate-2.0.0.tgz#25c9408e1c63fad94fff5517bb7101ffcd23350b" - integrity sha512-b3wydZLM+Tc6CFvaRDBOF9d76oGIHNCLYFeHbftFXUWjnfZWganmDmvtM5sm1cRwJc/VDBMLyGGrsLFd1vOxbg== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids@^3.0.0: version "3.0.7" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== -spdx-ranges@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/spdx-ranges/-/spdx-ranges-2.1.1.tgz#87573927ba51e92b3f4550ab60bfc83dd07bac20" - integrity sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA== - -spdx-satisfies@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/spdx-satisfies/-/spdx-satisfies-5.0.1.tgz#9feeb2524686c08e5f7933c16248d4fdf07ed6a6" - integrity sha512-Nwor6W6gzFp8XX4neaKQ7ChV4wmpSh2sSDemMFSzHxpTw460jxFYeOn+jq4ybnSSw/5sc3pjka9MQPouksQNpw== - dependencies: - spdx-compare "^1.0.0" - spdx-expression-parse "^3.0.0" - spdx-ranges "^2.0.0" - spdy-transport@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" @@ -29072,18 +29128,6 @@ stylus@0.59.0, stylus@^0.59.0: sax "~1.2.4" source-map "^0.7.3" -sucrase@^3.27.0, sucrase@^3.35.0, sucrase@getsentry/sucrase#es2020-polyfills: - version "3.36.0" - resolved "https://codeload.github.com/getsentry/sucrase/tar.gz/fd682f6129e507c00bb4e6319cc5d6b767e36061" - dependencies: - "@jridgewell/gen-mapping" "^0.3.2" - commander "^4.0.0" - glob "^10.3.10" - lines-and-columns "^1.1.6" - mz "^2.7.0" - pirates "^4.0.1" - ts-interface-checker "^0.1.9" - suf-log@^2.5.3: version "2.5.3" resolved "https://registry.yarnpkg.com/suf-log/-/suf-log-2.5.3.tgz#0919a7fceea532a99b578c97814c4e335b2d64d1" @@ -29498,20 +29542,6 @@ text-table@0.2.0, text-table@^0.2.0: resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.6.0.tgz#d7e4ab13fe54e32e08873be40d51b74229b00fc4" integrity sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ== -thenify-all@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" - integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== - dependencies: - thenify ">= 3.1.0 < 4" - -"thenify@>= 3.1.0 < 4": - version "3.3.1" - resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" - integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== - dependencies: - any-promise "^1.0.0" - thread-stream@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-3.1.0.tgz#4b2ef252a7c215064507d4ef70c05a5e2d34c4f1" @@ -29851,11 +29881,6 @@ ts-graphviz@^2.1.2: "@ts-graphviz/common" "^2.1.5" "@ts-graphviz/core" "^2.0.7" -ts-interface-checker@^0.1.9: - version "0.1.13" - resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" - integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== - ts-node@10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" @@ -30138,11 +30163,6 @@ typescript@^3.9: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== -typescript@next: - version "5.2.0-dev.20230530" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.0-dev.20230530.tgz#4251ade97a9d8a86850c4d5c3c4f3e1cb2ccf52c" - integrity sha512-bIoMajCZWzLB+pWwncaba/hZc6dRnw7x8T/fenOnP9gYQB/gc4xdm48AXp5SH5I/PvvSeZ/dXkUMtc8s8BiDZw== - typescript@~5.8.0: version "5.8.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.3.tgz#92f8a3e5e3cf497356f4178c34cd65a7f5e8440e"