diff --git a/dev-packages/rollup-utils/bundleHelpers.mjs b/dev-packages/rollup-utils/bundleHelpers.mjs index 8dd2ebd21999..6ac5f6aff06d 100644 --- a/dev-packages/rollup-utils/bundleHelpers.mjs +++ b/dev-packages/rollup-utils/bundleHelpers.mjs @@ -8,14 +8,13 @@ import deepMerge from 'deepmerge'; import { makeBrowserBuildPlugin, - makeCleanupPlugin, makeCommonJSPlugin, + makeEsbuildPlugin, makeIsDebugBuildPlugin, makeLicensePlugin, makeNodeResolvePlugin, makeRrwebBuildPlugin, makeSetSDKSourcePlugin, - makeSucrasePlugin, makeTerserPlugin, } from './plugins/index.mjs'; import { mergePlugins } from './utils.mjs'; @@ -24,11 +23,10 @@ import { makeProductionReplacePlugin } from './plugins/npmPlugins.mjs'; const BUNDLE_VARIANTS = ['.js', '.min.js', '.debug.min.js']; export function makeBaseBundleConfig(options) { - const { bundleType, entrypoints, licenseTitle, outputFileBase, packageSpecificConfig, sucrase } = options; + const { bundleType, entrypoints, licenseTitle, outputFileBase, packageSpecificConfig, esbuild } = options; const nodeResolvePlugin = makeNodeResolvePlugin(); - const sucrasePlugin = makeSucrasePlugin({}, sucrase); - const cleanupPlugin = makeCleanupPlugin(); + const transpilePlugin = makeEsbuildPlugin(esbuild); const markAsBrowserBuildPlugin = makeBrowserBuildPlugin(true); const licensePlugin = makeLicensePlugin(licenseTitle); const rrwebBuildPlugin = makeRrwebBuildPlugin({ @@ -118,7 +116,7 @@ export function makeBaseBundleConfig(options) { strict: false, esModule: false, }, - plugins: [productionReplacePlugin, sucrasePlugin, nodeResolvePlugin, cleanupPlugin], + plugins: [productionReplacePlugin, transpilePlugin, nodeResolvePlugin], treeshake: 'smallest', }; diff --git a/dev-packages/rollup-utils/npmHelpers.mjs b/dev-packages/rollup-utils/npmHelpers.mjs index e361b00ef2b8..4a184d1ea4e5 100644 --- a/dev-packages/rollup-utils/npmHelpers.mjs +++ b/dev-packages/rollup-utils/npmHelpers.mjs @@ -13,12 +13,11 @@ import deepMerge from 'deepmerge'; import { defineConfig } from 'rollup'; import { - makeCleanupPlugin, makeDebugBuildStatementReplacePlugin, + makeEsbuildPlugin, makeNodeResolvePlugin, makeProductionReplacePlugin, makeRrwebBuildPlugin, - makeSucrasePlugin, } from './plugins/index.mjs'; import { makePackageNodeEsm } from './plugins/make-esm-plugin.mjs'; import { mergeExternals, mergePlugins } from './utils.mjs'; @@ -34,14 +33,13 @@ export function makeBaseNPMConfig(options = {}) { entrypoints = ['src/index.ts'], hasBundles = false, packageSpecificConfig = {}, - sucrase = {}, + esbuild = {}, bundledBuiltins = [], } = options; const nodeResolvePlugin = makeNodeResolvePlugin(); - const sucrasePlugin = makeSucrasePlugin({}, sucrase); + const transpilePlugin = makeEsbuildPlugin(esbuild); const debugBuildStatementReplacePlugin = makeDebugBuildStatementReplacePlugin(); - const cleanupPlugin = makeCleanupPlugin(); const rrwebBuildPlugin = makeRrwebBuildPlugin({ excludeShadowDom: undefined, excludeIframe: undefined, @@ -104,7 +102,7 @@ export function makeBaseNPMConfig(options = {}) { }, }, - plugins: [nodeResolvePlugin, sucrasePlugin, debugBuildStatementReplacePlugin, rrwebBuildPlugin, cleanupPlugin], + plugins: [nodeResolvePlugin, transpilePlugin, debugBuildStatementReplacePlugin, rrwebBuildPlugin], // don't include imported modules from outside the package in the final output // also treat subpath exports (e.g. `@sentry/core/browser`) as external @@ -154,8 +152,9 @@ export function makeNPMConfigVariants(baseConfig, options = {}) { output: { format: 'esm', dir: path.join(baseConfig.output.dir, 'esm/prod'), - plugins: [makeProductionReplacePlugin(), makePackageNodeEsm()], + plugins: [makePackageNodeEsm()], }, + plugins: [makeProductionReplacePlugin()], }); } else { variantSpecificConfigs.push({ @@ -168,7 +167,13 @@ export function makeNPMConfigVariants(baseConfig, options = {}) { } } - return variantSpecificConfigs.map(variant => deepMerge(baseConfig, variant)); + return variantSpecificConfigs.map(variant => + // Plugin arrays must be merged in the right order or the build silently misbehaves + // (e.g. esbuild strips dev-mode marker comments before the replace plugin can act). + deepMerge(baseConfig, variant, { + customMerge: key => (key === 'plugins' ? mergePlugins : undefined), + }), + ); } /** diff --git a/dev-packages/rollup-utils/plugins/bundlePlugins.mjs b/dev-packages/rollup-utils/plugins/bundlePlugins.mjs index 782e5d36c443..56712e33a458 100644 --- a/dev-packages/rollup-utils/plugins/bundlePlugins.mjs +++ b/dev-packages/rollup-utils/plugins/bundlePlugins.mjs @@ -46,7 +46,7 @@ export function makeLicensePlugin(title) { * 'false` */ export function makeIsDebugBuildPlugin(includeDebugging) { - return replace({ + const plugin = 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.) @@ -58,16 +58,28 @@ export function makeIsDebugBuildPlugin(includeDebugging) { __SENTRY_DEBUG__: includeDebugging, }, }); + plugin.name = 'replace-debug-flags'; + return plugin; } +/** + * Replaces the comment marker `/*! __SENTRY_SDK_SOURCE__ *\/` in core's `getSDKSource()` with a + * `return '';` statement so the bundle reports the correct distribution channel. + * + * The marker uses the `/*! ... *\/` legal-comment syntax so it survives esbuild's transpile + * (esbuild strips ordinary block comments). The plugin sort order in utils.mjs also pins + * this name before `esbuild`, in case it ever runs on un-transpiled source directly. + */ export function makeSetSDKSourcePlugin(sdkSource) { - return replace({ + const plugin = replace({ preventAssignment: false, delimiters: ['', ''], values: { - '/* __SENTRY_SDK_SOURCE__ */': `return ${JSON.stringify(sdkSource)};`, + '/*! __SENTRY_SDK_SOURCE__ */': `return ${JSON.stringify(sdkSource)};`, }, }); + plugin.name = 'replace-sdk-source'; + return plugin; } /** @@ -77,13 +89,15 @@ 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({ + const plugin = replace({ // TODO This will be the default in the next version of the `replace` plugin preventAssignment: true, values: { __SENTRY_BROWSER_BUNDLE__: isBrowserBuild, }, }); + plugin.name = 'replace-browser-bundle-flag'; + return plugin; } // `terser` options reference: https://github.com/terser/terser#api-reference diff --git a/dev-packages/rollup-utils/plugins/npmPlugins.mjs b/dev-packages/rollup-utils/plugins/npmPlugins.mjs index 221a4a34f8c4..22e24decdfaf 100644 --- a/dev-packages/rollup-utils/plugins/npmPlugins.mjs +++ b/dev-packages/rollup-utils/plugins/npmPlugins.mjs @@ -2,37 +2,50 @@ * 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 + * esbuild plugin docs: https://github.com/egoist/rollup-plugin-esbuild * Replace plugin docs: https://github.com/rollup/plugins/tree/master/packages/replace - * Sucrase plugin docs: https://github.com/rollup/plugins/tree/master/packages/sucrase */ 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'; +import esbuild from 'rollup-plugin-esbuild'; /** - * Create a plugin to transpile TS syntax using `sucrase`. + * Create a plugin to transpile TS/JSX syntax using `esbuild`. * - * @returns An instance of the `@rollup/plugin-sucrase` plugin + * `target: 'es2020'` keeps ES2020-native syntax (`?.`, `??`, optional catch binding) and + * downlevels everything newer (logical assignment, numeric separators, class private + * fields, static class blocks, ...). + * + * `esbuildOptions` are forwarded to `rollup-plugin-esbuild` verbatim and can override + * any of the pinned defaults (e.g. JSX-related keys like `jsxFactory` / `jsxFragment` + * for packages that use a non-React pragma). */ -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, +export function makeEsbuildPlugin(esbuildOptions = {}) { + const plugin = esbuild({ + // `.json` is handled by the JSON plugin further down the pipeline. + exclude: ['**/*.json'], + // ES2020 is our floor — keeps `?.`/`??` native, downlevels everything newer. + target: 'es2020', + // Don't read per-package tsconfig (they vary and can pull in unrelated settings). + // Pin only the compilerOptions that affect codegen. + tsconfig: false, + tsconfigRaw: { + compilerOptions: { + // Match the project tsconfig's effective behavior at target=es2020: class + // field initializers compile to `this.x = v` (set semantics), not via the + // `Object.defineProperty`-based `__publicField` helper esbuild emits by + // default. This is what tsc itself outputs at this target. + useDefineForClassFields: false, + }, }, - ); + sourceMap: true, + ...esbuildOptions, + }); + + // Force a stable plugin name so the plugin sort order in utils.mjs can target it. + plugin.name = 'esbuild'; + return plugin; } export function makeJsonPlugin() { @@ -89,23 +102,6 @@ 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` @@ -114,28 +110,30 @@ export function makeCleanupPlugin() { * @returns A `@rollup/plugin-replace` instance. */ export function makeDebugBuildStatementReplacePlugin() { - return replace({ + const plugin = replace({ preventAssignment: false, values: { __DEBUG_BUILD__: "(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)", }, }); + plugin.name = 'replace-debug-build-statement'; + return plugin; } export function makeProductionReplacePlugin() { - 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 }; - } + // Markers use the `/*! ... */` legal-comment syntax so esbuild preserves them through + // transpile. We still run as a `transform` (per-module) hook rather than `renderChunk`: + // the block typically uses imports declared at the module top, and stripping it before + // rollup analyses module-graph imports lets those now-unused imports be tree-shaken away. + // The plugin sort order in utils.mjs pins this before `esbuild`. + const pattern = + /\/\*! rollup-include-development-only \*\/[\s\S]*?\/\*! rollup-include-development-only-end \*\/\s*/g; return { name: 'remove-dev-mode-blocks', - renderChunk(code) { - return stripDevBlocks(code); + transform(code) { + if (!code.includes('rollup-include-development-only')) return null; + return { code: code.replace(pattern, ''), map: null }; }, }; } @@ -159,8 +157,10 @@ export function makeRrwebBuildPlugin({ excludeShadowDom, excludeIframe } = {}) { values['__RRWEB_EXCLUDE_IFRAME__'] = excludeIframe; } - return replace({ + const plugin = replace({ preventAssignment: true, values, }); + plugin.name = 'replace-rrweb-build-flags'; + return plugin; } 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 dd64e1e38c10..503a4876d223 100644 --- a/dev-packages/rollup-utils/utils.mjs +++ b/dev-packages/rollup-utils/utils.mjs @@ -31,30 +31,44 @@ export function mergeExternals(base, specific) { /** * Merge two arrays of plugins, making sure they're sorted in the correct order. + * + * Each entry in `order` is pinned for a real reason; `...` is where every other plugin lands. */ export function mergePlugins(pluginsA, pluginsB) { + const order = [ + // (transform) Strips `/*! rollup-include-development-only */` marker blocks. Must precede `esbuild` so the + // now-unused imports inside the block can be tree-shaken by rollup. + 'remove-dev-mode-blocks', + // (transform) Rewrites the `/*! __SENTRY_SDK_SOURCE__ */` comment marker in `getSDKSource()` for CDN builds. + // Comment-based → must precede `esbuild` (the marker uses `/*!` legal-comment syntax, but pinning is defensive). + 'replace-sdk-source', + // (transform) TS/JSX → JS, strips non-legal block comments, strips `declare const` lines. + 'esbuild', + // The identifier-based `replace-*` plugins below MUST run AFTER `esbuild`. Each of these identifiers is also + // declared in TS via `declare const __FOO__: ...;` lines. If the replace runs before esbuild, it rewrites the + // declaration's identifier into an expression and produces invalid TS. esbuild strips `declare const` lines, + // so by the time these plugins run the only remaining occurrences are real references. + 'replace-debug-build-statement', + 'replace-browser-bundle-flag', + 'replace-debug-flags', + 'replace-rrweb-build-flags', + // Every other plugin lands here — including additional identifier-based `replace-*` plugins (e.g. + // `replace-sdk-version`), which intentionally run AFTER `esbuild` for the same reason as the ones pinned above. + '...', + // (renderChunk) Minifies and strips comments (we use `comments: false`). Anything that contributes code to a + // chunk must run before this. + 'terser', + // (renderChunk) Prepends the license banner, which is a comment. Must run AFTER `terser`, otherwise terser + // would strip it. + 'license', + // (renderChunk) Captures the final chunk text as base64, so it must run last. + 'output-base64-worker-script', + ]; const plugins = [...pluginsA, ...pluginsB]; plugins.sort((a, b) => { - // Hacky way to make sure the ones we care about end up where they belong in the order. Really the TS and sucrase - // plugins are tied - both should come first - but they're mutually exclusive, so they can come in arbitrary order - // 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 sortKeyA = order.includes(a.name) ? a.name : '...'; const sortKeyB = order.includes(b.name) ? b.name : '...'; - return order.indexOf(sortKeyA) - order.indexOf(sortKeyB); }); - return plugins; } diff --git a/package.json b/package.json index f2e88c15b553..21457ec324a3 100644 --- a/package.json +++ b/package.json @@ -113,14 +113,10 @@ ], "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-esm-shim": "^0.1.5", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^16.0.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/esbuild": "~12.1.0", "@size-limit/file": "~12.1.0", "@size-limit/webpack": "~12.1.0", @@ -130,6 +126,7 @@ "deepmerge": "^4.2.2", "downlevel-dts": "~0.11.0", "es-check": "^7.2.1", + "esbuild": "^0.28.0", "jsdom": "^21.1.2", "madge": "8.0.0", "nodemon": "^3.1.10", @@ -140,10 +137,9 @@ "oxlint-tsgolint": "^0.16.0", "rimraf": "^5.0.10", "rollup": "^4.60.3", - "rollup-plugin-cleanup": "^3.2.1", + "rollup-plugin-esbuild": "^6.2.1", "rollup-plugin-license": "^3.7.1", "size-limit": "~12.1.0", - "sucrase": "^3.35.0", "ts-node": "10.9.2", "typescript": "~5.8.0", "vitest": "^3.2.4", @@ -154,7 +150,6 @@ "**/nx/minimatch": "10.2.5", "**/ng-packagr/postcss-url/minimatch": "3.1.5", "**/@angular-devkit/build-angular/minimatch": "5.1.9", - "sucrase": "getsentry/sucrase#es2020-polyfills", "**/nitropack/rollup-plugin-visualizer": "^6.0.3" }, "version": "0.0.0", diff --git a/packages/aws-serverless/scripts/buildLambdaLayer.ts b/packages/aws-serverless/scripts/buildLambdaLayer.ts index 520a456c63ce..9d590a96ae22 100644 --- a/packages/aws-serverless/scripts/buildLambdaLayer.ts +++ b/packages/aws-serverless/scripts/buildLambdaLayer.ts @@ -220,21 +220,27 @@ function replaceSDKSource(): void { './build/aws/dist-serverless/nodejs/node_modules/@sentry/core/build/esm/utils/env.js', ]; + // Tolerant of whitespace/quote variations: esbuild emits the marker and `return` on + // separate lines and uses double quotes, while the source uses a single line and single + // quotes. The marker itself uses `/*! */` legal-comment syntax so esbuild preserves it. + const pattern = /\/\*! __SENTRY_SDK_SOURCE__ \*\/\s*return ["']npm["'];/; + const replacement = `/*! __SENTRY_SDK_SOURCE__ */ return 'aws-lambda-layer';`; + for (const envFile of envFiles) { + let content: string; try { - let content = fs.readFileSync(envFile, 'utf-8'); + content = fs.readFileSync(envFile, 'utf-8'); + } catch { + throw new Error(`Could not read ${envFile} while updating the SDK source for the Lambda layer.`); + } - // 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';", + if (!pattern.test(content)) { + throw new Error( + `Could not find the __SENTRY_SDK_SOURCE__ marker in ${envFile}. The Lambda layer would silently report its SDK source as 'npm'. Has the marker or the transpile output changed?`, ); - - fs.writeFileSync(envFile, content); - console.log(`Updated SDK source in ${envFile}`); - } catch { - console.warn(`Warning: Could not update SDK source in ${envFile}`); } + + fs.writeFileSync(envFile, content.replace(pattern, replacement)); + console.log(`Updated SDK source in ${envFile}`); } } diff --git a/packages/browser/src/sdk.ts b/packages/browser/src/sdk.ts index 68a48ec461d1..dc1be3382664 100644 --- a/packages/browser/src/sdk.ts +++ b/packages/browser/src/sdk.ts @@ -98,7 +98,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 = []; @@ -106,7 +106,7 @@ 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 */ + /*! rollup-include-development-only-end */ const clientOptions: BrowserClientOptions = { ...options, diff --git a/packages/core/src/utils/env.ts b/packages/core/src/utils/env.ts index 86872017707a..14893b553e15 100644 --- a/packages/core/src/utils/env.ts +++ b/packages/core/src/utils/env.ts @@ -30,6 +30,8 @@ export function isBrowserBundle(): boolean { * Get source of SDK. */ 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'; + // The `/*! ... */` marker is replaced by our CDN bundle build step with `return 'cdn';`. + // It uses the `/*!` legal-comment syntax specifically so it survives esbuild's transpile + // (which strips ordinary `/* ... */` block comments). + /*! __SENTRY_SDK_SOURCE__ */ return 'npm'; } diff --git a/packages/feedback/rollup.bundle.config.mjs b/packages/feedback/rollup.bundle.config.mjs index a5efc6140c06..a7527f58b3b1 100644 --- a/packages/feedback/rollup.bundle.config.mjs +++ b/packages/feedback/rollup.bundle.config.mjs @@ -10,12 +10,10 @@ 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, + esbuild: { + // The feedback widget uses preact, so override esbuild's React defaults. + jsxFactory: 'h', + jsxFragment: 'Fragment', }, }), ), @@ -26,12 +24,10 @@ 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, + esbuild: { + // The feedback widget uses preact, so override esbuild's React defaults. + jsxFactory: 'h', + jsxFragment: 'Fragment', }, }), ), diff --git a/packages/feedback/rollup.npm.config.mjs b/packages/feedback/rollup.npm.config.mjs index c91c37ec84f8..103eb72c68dc 100644 --- a/packages/feedback/rollup.npm.config.mjs +++ b/packages/feedback/rollup.npm.config.mjs @@ -15,12 +15,10 @@ 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, + esbuild: { + // The feedback widget uses preact, so override esbuild's React defaults. + jsxFactory: 'h', + jsxFragment: 'Fragment', }, }), ); diff --git a/packages/nextjs/test/config/wrappingLoader.test.ts b/packages/nextjs/test/config/wrappingLoader.test.ts index 97e2b016301e..cdba71caeb17 100644 --- a/packages/nextjs/test/config/wrappingLoader.test.ts +++ b/packages/nextjs/test/config/wrappingLoader.test.ts @@ -100,7 +100,9 @@ describe('wrappingLoader', () => { await loaderPromise; - expect(callback).toHaveBeenCalledWith(null, expect.stringContaining("'/my/route'"), expect.anything()); + // Accept either single- or double-quoted string literals — the wrapper-template source + // uses single quotes, but esbuild rewrites them to double quotes during transpile. + expect(callback).toHaveBeenCalledWith(null, expect.stringMatching(/['"]\/my\/route['"]/), expect.anything()); }); describe('middleware wrapping', () => { @@ -148,8 +150,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 +198,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 +247,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/react-router/rollup.npm.config.mjs b/packages/react-router/rollup.npm.config.mjs index 4a52f4ab57a7..edd3e56f0cb8 100644 --- a/packages/react-router/rollup.npm.config.mjs +++ b/packages/react-router/rollup.npm.config.mjs @@ -1,5 +1,9 @@ import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils'; +// We rely on esbuild's defaults for JSX (`jsx: 'transform'` = classic runtime, no +// __self/__source attributes). React 19 prefers the new automatic transform, but switching +// to it would break React 17 support — so we intentionally stay on classic for now. +// https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html export default [ ...makeNPMConfigVariants( makeBaseNPMConfig({ @@ -11,12 +15,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/rollup.npm.config.mjs b/packages/react/rollup.npm.config.mjs index 923dfafb85d7..66c3b16aba58 100644 --- a/packages/react/rollup.npm.config.mjs +++ b/packages/react/rollup.npm.config.mjs @@ -1,15 +1,13 @@ import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils'; +// We rely on esbuild's defaults for JSX (`jsx: 'transform'` = classic runtime, no +// __self/__source attributes). React 19 prefers the new automatic transform, but switching +// to it would break React 17 support — so we intentionally stay on classic for now. +// https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html export default makeNPMConfigVariants( makeBaseNPMConfig({ 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/rollup.npm.config.mjs b/packages/remix/rollup.npm.config.mjs index 8ba7eac8051b..23b3b4452816 100644 --- a/packages/remix/rollup.npm.config.mjs +++ b/packages/remix/rollup.npm.config.mjs @@ -1,5 +1,9 @@ import { makeBaseNPMConfig, makeNPMConfigVariants, makeOtelLoaders } from '@sentry-internal/rollup-utils'; +// We rely on esbuild's defaults for JSX (`jsx: 'transform'` = classic runtime, no +// __self/__source attributes). React 19 prefers the new automatic transform, but switching +// to it would break React 17 support — so we intentionally stay on classic for now. +// https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html export default [ ...makeNPMConfigVariants( makeBaseNPMConfig({ @@ -17,12 +21,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/replay-worker/examples/worker.js b/packages/replay-worker/examples/worker.js index 1643d2d253db..faae283fa1d1 100644 --- a/packages/replay-worker/examples/worker.js +++ b/packages/replay-worker/examples/worker.js @@ -1,4 +1,4 @@ -/*! Sentry Replay Worker 10.53.1 (1b85ea392a) | https://github.com/getsentry/sentry-javascript */ +/*! Sentry Replay Worker 10.53.1 (d8e086f796) | https://github.com/getsentry/sentry-javascript */ // DEFLATE is a complex format; to read this code, you should probably check the RFC first: // https://tools.ietf.org/html/rfc1951 // You may also wish to take a look at the guide I made about this program: @@ -803,9 +803,6 @@ function strToU8(str, latin1) { return slc(ar, 0, ai); } -/** - * A stateful compressor that can be used to batch compress events. - */ class Compressor { constructor() { this._init(); @@ -823,8 +820,6 @@ class Compressor { if (!data) { throw new Error('Adding invalid event'); } - // If the event is not the first event, we need to prefix it with a `,` so - // that we end up with a list of events const prefix = this._hasEvents ? ',' : ''; this.stream.push(prefix + data); this._hasEvents = true; @@ -833,10 +828,7 @@ class Compressor { * Finish compression of the current buffer. */ finish() { - // We should always have a list, it can be empty this.stream.push(']', true); - // Copy result before we create a new deflator and return the compressed - // result const result = mergeUInt8Arrays(this._deflatedData); this._init(); return result; @@ -854,26 +846,19 @@ class Compressor { this.stream = new EncodeUTF8((data, final) => { this.deflate.push(data, final); }); - // Fake an array by adding a `[` this.stream.push('['); } } -/** - * Compress a string. - */ function compress(data) { return gzipSync(strToU8(data)); } function mergeUInt8Arrays(chunks) { - // calculate data length let len = 0; for (const chunk of chunks) { len += chunk.length; } - // join chunks const result = new Uint8Array(len); for (let i = 0, pos = 0, l = chunks.length; i < l; i++) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const chunk = chunks[i]; result.set(chunk, pos); pos += chunk.length; @@ -881,7 +866,6 @@ function mergeUInt8Arrays(chunks) { return result; } -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ const compressor = new Compressor(); const handlers = { clear: () => { @@ -897,17 +881,12 @@ const handlers = { return compress(data); }, }; -/** - * Handler for worker messages. - */ function handleMessage(e) { const method = e.data.method; const id = e.data.id; const data = e.data.arg; - // @ts-expect-error this syntax is actually fine if (method in handlers && typeof handlers[method] === 'function') { try { - // @ts-expect-error this syntax is actually fine const response = handlers[method](data); postMessage({ id, @@ -922,17 +901,15 @@ function handleMessage(e) { success: false, response: err.message, }); - // eslint-disable-next-line no-console console.error(err); } } } addEventListener('message', handleMessage); -// Immediately send a message when worker loads, so we know the worker is ready postMessage({ - id: undefined, + id: void 0, method: 'init', success: true, - response: undefined, + response: void 0, }); diff --git a/packages/replay-worker/examples/worker.min.js b/packages/replay-worker/examples/worker.min.js index 15069746d7d2..6ee8f6e7ef64 100644 --- a/packages/replay-worker/examples/worker.min.js +++ b/packages/replay-worker/examples/worker.min.js @@ -1,2 +1,2 @@ -/*! Sentry Replay Worker 10.53.1 (1b85ea392a) | https://github.com/getsentry/sentry-javascript */ +/*! Sentry Replay Worker 10.53.1 (d8e086f796) | https://github.com/getsentry/sentry-javascript */ var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s>f]=l}else for(o=new n(i),s=0;s>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;sd&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<e))break;w+=m-(1<>=y;w>0;){var M=o[s].s;p[M]=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;oi.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0}); diff --git a/packages/replay-worker/rollup.examples.config.mjs b/packages/replay-worker/rollup.examples.config.mjs index cbaacbfcb245..7ca68e89556d 100644 --- a/packages/replay-worker/rollup.examples.config.mjs +++ b/packages/replay-worker/rollup.examples.config.mjs @@ -1,12 +1,14 @@ 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 esbuild from 'rollup-plugin-esbuild'; import { makeLicensePlugin } from '../../dev-packages/rollup-utils/plugins/index.mjs'; const licensePlugin = makeLicensePlugin('Sentry Replay Worker'); +const esbuildPlugin = esbuild({ tsconfig: './tsconfig.json', target: 'es2020', sourceMap: false }); + const config = defineConfig([ { input: ['./src/_worker.ts'], @@ -15,12 +17,7 @@ const config = defineConfig([ format: 'esm', }, treeshake: 'smallest', - plugins: [ - commonjs(), - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), - resolve(), - licensePlugin, - ], + plugins: [commonjs(), esbuildPlugin, resolve(), licensePlugin], }, { input: ['./src/_worker.ts'], @@ -31,7 +28,7 @@ const config = defineConfig([ treeshake: 'smallest', plugins: [ commonjs(), - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), + esbuildPlugin, resolve(), terser({ mangle: { diff --git a/packages/replay-worker/rollup.worker.config.mjs b/packages/replay-worker/rollup.worker.config.mjs index 556994570335..36f18cb2a7e6 100644 --- a/packages/replay-worker/rollup.worker.config.mjs +++ b/packages/replay-worker/rollup.worker.config.mjs @@ -3,8 +3,10 @@ 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 esbuild from 'rollup-plugin-esbuild'; + +const esbuildPlugin = esbuild({ tsconfig: './tsconfig.json', target: 'es2020', sourceMap: false }); const config = defineConfig([ { @@ -16,7 +18,7 @@ const config = defineConfig([ }, external: ['./worker'], plugins: [ - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), + esbuildPlugin, terser({ mangle: { module: true, @@ -33,7 +35,7 @@ const config = defineConfig([ treeshake: 'smallest', plugins: [ commonjs(), - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), + esbuildPlugin, resolve(), terser({ mangle: { @@ -57,7 +59,7 @@ const config = defineConfig([ treeshake: 'smallest', plugins: [ commonjs(), - typescript({ tsconfig: './tsconfig.json', inlineSourceMap: false, sourceMap: false, inlineSources: false }), + esbuildPlugin, resolve(), terser({ mangle: { diff --git a/yarn.lock b/yarn.lock index 08c5b05e7a86..8c22a18834e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7411,13 +7411,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" @@ -7492,14 +7485,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" @@ -7509,14 +7494,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" @@ -11225,7 +11202,7 @@ ansis@^4.1.0: resolved "https://registry.yarnpkg.com/ansis/-/ansis-4.2.0.tgz#2e6e61c46b11726ac67f78785385618b9e658780" integrity sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig== -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= @@ -13662,7 +13639,7 @@ commander@^2.20.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== @@ -15907,7 +15884,7 @@ es-module-lexer@^0.9.0: resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== -es-module-lexer@^1.3.0, es-module-lexer@^1.3.1, es-module-lexer@^1.7.0: +es-module-lexer@^1.3.0, es-module-lexer@^1.3.1, es-module-lexer@^1.6.0, es-module-lexer@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz#9159601561880a85f2734560a9099b2c31e5372a" integrity sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA== @@ -16849,11 +16826,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" @@ -18102,6 +18074,13 @@ get-symbol-description@^1.1.0: es-errors "^1.3.0" get-intrinsic "^1.2.6" +get-tsconfig@^4.10.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.14.0.tgz#985d85c52a9903864280ccc2448d413fbf1efed8" + integrity sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA== + 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" @@ -18179,7 +18158,7 @@ glob@8.0.3: minimatch "^5.0.1" once "^1.3.0" -glob@^10.0.0, glob@^10.3.10, glob@^10.3.7, glob@^10.4.1: +glob@^10.0.0, glob@^10.3.7, glob@^10.4.1: version "10.5.0" resolved "https://registry.yarnpkg.com/glob/-/glob-10.5.0.tgz#8ec0355919cd3338c28428a23d4f24ecc5fe738c" integrity sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg== @@ -20194,15 +20173,6 @@ jiti@^2.1.2, jiti@^2.4.2, jiti@^2.6.1: resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.6.1.tgz#178ef2fc9a1a594248c20627cd820187a4d78d92" integrity sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ== -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" @@ -22559,15 +22529,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.6: version "1.1.6" resolved "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.6.tgz#c50c6920b43f258f59c16add1e56654f5cc02bb5" @@ -23414,7 +23375,7 @@ nypm@^0.6.0, nypm@^0.6.2, nypm@^0.6.5: pathe "^2.0.3" tinyexec "^1.0.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= @@ -24332,11 +24293,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" @@ -24518,11 +24474,6 @@ pino@9.10.0: 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" @@ -26489,6 +26440,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" @@ -26704,14 +26660,6 @@ rolldown@^1.0.0-rc.15, rolldown@^1.0.0-rc.8: "@rolldown/binding-win32-arm64-msvc" "1.0.0-rc.15" "@rolldown/binding-win32-x64-msvc" "1.0.0-rc.15" -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" - rollup-plugin-dts@^6.0.0: version "6.1.1" resolved "https://registry.yarnpkg.com/rollup-plugin-dts/-/rollup-plugin-dts-6.1.1.tgz#46b33f4d1d7f4e66f1171ced9b282ac11a15a254" @@ -26721,6 +26669,16 @@ rollup-plugin-dts@^6.0.0: optionalDependencies: "@babel/code-frame" "^7.24.2" +rollup-plugin-esbuild@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-esbuild/-/rollup-plugin-esbuild-6.2.1.tgz#c556195465bf452965686e0f21adfe306b90c219" + integrity sha512-jTNOMGoMRhs0JuueJrJqbW8tOwxumaWYq+V5i+PD+8ecSCVkuX27tGW7BXqDgoULQ55rO7IdNxPcnsWtshz3AA== + dependencies: + debug "^4.4.0" + es-module-lexer "^1.6.0" + get-tsconfig "^4.10.0" + unplugin-utils "^0.2.4" + rollup-plugin-license@^3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/rollup-plugin-license/-/rollup-plugin-license-3.7.1.tgz#b99329f1c840142559789e3d6cb9f69e9e5b36ef" @@ -26753,13 +26711,6 @@ rollup-plugin-visualizer@^6.0.3, rollup-plugin-visualizer@^6.0.5: 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: version "2.80.0" resolved "https://registry.npmjs.org/rollup/-/rollup-2.80.0.tgz" @@ -27581,11 +27532,6 @@ size-limit@~12.1.0: picocolors "^1.1.1" tinyglobby "^0.2.16" -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: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -28479,18 +28425,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" - sum-up@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/sum-up/-/sum-up-1.0.3.tgz#1c661f667057f63bcb7875aa1438bc162525156e" @@ -28880,20 +28814,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" @@ -29221,11 +29141,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.2: version "10.9.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f"