Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,18 @@ targets:
- name: npm
id: '@sentry/bundler-plugins'
includeNames: /^sentry-bundler-plugins-\d.*\.tgz$/
- name: npm
id: '@sentry/esbuild-plugin'
includeNames: /^sentry-esbuild-plugin-\d.*\.tgz$/
- name: npm
id: '@sentry/rollup-plugin'
includeNames: /^sentry-rollup-plugin-\d.*\.tgz$/
- name: npm
id: '@sentry/vite-plugin'
includeNames: /^sentry-vite-plugin-\d.*\.tgz$/
- name: npm
id: '@sentry/webpack-plugin'
includeNames: /^sentry-webpack-plugin-\d.*\.tgz$/
- name: npm
id: '@sentry/typescript'
includeNames: /^sentry-typescript-\d.*\.tgz$/
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ body:
- '@sentry/tanstackstart-react'
- '@sentry/vue'
- '@sentry/wasm'
- '@sentry/esbuild-plugin'
- '@sentry/rollup-plugin'
- '@sentry/vite-plugin'
- '@sentry/webpack-plugin'
- Sentry Browser Loader
- Sentry Browser CDN bundle
validations:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ env:
# upload-artifact globs drop the path through the first `*` (see upload-artifact
# README). Tarballs therefore land in the artifact as <pkg>/*.tgz; download
# build-tarball-output into packages/ so they resolve to packages/<pkg>/*.tgz.
TARBALL_ARTIFACT_GLOB: packages/*/*.tgz
TARBALL_ARTIFACT_GLOB: |
packages/*/*.tgz
packages/legacy/*/*.tgz
Comment thread
timfish marked this conversation as resolved.
TARBALL_ARTIFACT_DOWNLOAD_PATH: ${{ github.workspace }}/packages

BUILD_LAYER_PATH: ${{ github.workspace }}/packages/aws-serverless/build/aws/dist-serverless
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/issue-package-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ jobs:
"@sentry.wasm": {
"label": "WASM"
},
"@sentry.esbuild-plugin": {
"label": "Feature: Source Maps"
},
"@sentry.rollup-plugin": {
"label": "Feature: Source Maps"
},
"@sentry.vite-plugin": {
"label": "Feature: Source Maps"
},
"@sentry.webpack-plugin": {
"label": "Feature: Source Maps"
},
"Sentry.Browser.Loader": {
"label": "Browser"
},
Expand Down
4 changes: 3 additions & 1 deletion dev-packages/e2e-tests/lib/packedTarballUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { sync as globSync } from 'glob';
const E2E_TESTS_ROOT = path.resolve(__dirname, '..');
const REPOSITORY_ROOT = path.resolve(E2E_TESTS_ROOT, '../..');

export const PACKAGE_JSON_GLOB = '{packages/*,packages/legacy/*}/package.json';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E2E tarball counts will mismatch

Medium Severity

PACKAGE_JSON_GLOB now also discovers packages under packages/legacy/*, so syncPackedTarballSymlinks creates extra packed symlinks for those tarballs. validate-packed-tarball-setup.ts still globs only packages/*/sentry-*-${version}.tgz, so test:validate fails once the new plugin tarballs exist.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b2f3bc1. Configure here.


/**
* Workspace @sentry and @sentry-internal packages that have a built tarball for the E2E version.
* @returns The names of the published Sentry tarball packages.
Expand All @@ -13,7 +15,7 @@ export function getPublishedSentryTarballPackageNames(): string[] {
const version = getE2eTestsPackageVersion();
const names: string[] = [];

for (const packageJsonPath of globSync('packages/*/package.json', {
for (const packageJsonPath of globSync(PACKAGE_JSON_GLOB, {
cwd: REPOSITORY_ROOT,
absolute: true,
})) {
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/e2e-tests/lib/syncPackedTarballSymlinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as fs from 'fs';
import * as path from 'path';
import { sync as globSync } from 'glob';
import { packedSymlinkFilename, versionedTarballFilename } from './packedTarballUtils';
import { PACKAGE_JSON_GLOB, packedSymlinkFilename, versionedTarballFilename } from './packedTarballUtils';

const e2eTestsRoot = path.resolve(__dirname, '..');
const repositoryRoot = path.resolve(e2eTestsRoot, '../..');
Expand All @@ -28,7 +28,7 @@ export function syncPackedTarballSymlinks(): void {
fs.rmSync(path.join(packedDir, entry.name), { recursive: true, force: true });
}

const packageJsonPaths = globSync('packages/*/package.json', {
const packageJsonPaths = globSync(PACKAGE_JSON_GLOB, {
cwd: repositoryRoot,
absolute: true,
});
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"clean:build": "nx run-many -t clean",
"clean:caches": "yarn rimraf eslintcache .nxcache .nx",
"clean:deps": "rimraf packages/*/node_modules dev-packages/*/node_modules && rm -rf node_modules && yarn",
"clean:tarballs": "rimraf {packages,dev-packages}/*/*.tgz",
"clean:tarballs": "rimraf {packages,dev-packages}/*/*.tgz packages/legacy/*/*.tgz",
"clean:watchman": "watchman watch-del \".\"",
"clean:all": "run-s clean:build clean:tarballs clean:caches clean:deps clean:watchman",
"format": "oxfmt . --write",
Expand Down Expand Up @@ -99,6 +99,10 @@
"packages/vercel-edge",
"packages/vue",
"packages/wasm",
"packages/legacy/esbuild-plugin",
"packages/legacy/rollup-plugin",
"packages/legacy/vite-plugin",
"packages/legacy/webpack-plugin",
Comment thread
cursor[bot] marked this conversation as resolved.
Comment thread
cursor[bot] marked this conversation as resolved.
"dev-packages/browser-integration-tests",
"dev-packages/bundler-plugin-integration-tests",
"dev-packages/e2e-tests",
Expand Down
2 changes: 2 additions & 0 deletions packages/legacy/esbuild-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
*.tgz
29 changes: 29 additions & 0 deletions packages/legacy/esbuild-plugin/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# MIT License

Copyright (c) 2022-2026, Sentry
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

- Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 changes: 45 additions & 0 deletions packages/legacy/esbuild-plugin/README.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just reminded me: did we migrate the options documentation for the new packages? Right now, I think https://www.npmjs.com/package/@sentry/vite-plugin is the only place where all plugin options are documented. Unless we already took care of this when we added @sentry/bundler-plugins to the repo?

If not, I'd say the cheapest thing we can do is add the options table to the readme of the legacy and probably also of the new package. WDYT?

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<p align="center">
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
</a>
</p>

# Sentry esbuild Plugin

A esbuild plugin that uploads source maps to Sentry and injects release and Debug ID information into your bundles.

This package re-exports `@sentry/bundler-plugins/esbuild`.

## Installation

```bash
npm install @sentry/esbuild-plugin --save-dev
```

## Usage

```js
// build.js
import * as esbuild from 'esbuild';
import { sentryEsbuildPlugin } from '@sentry/esbuild-plugin';

await esbuild.build({
sourcemap: true,
plugins: [
sentryEsbuildPlugin({
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
],
});
```

## Documentation

- [Uploading source maps](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/)

## Support

- [Report a bug](https://github.com/getsentry/sentry-javascript/issues/new/choose)
- [Contributing](https://github.com/getsentry/sentry-javascript/blob/develop/CONTRIBUTING.md)
56 changes: 56 additions & 0 deletions packages/legacy/esbuild-plugin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "@sentry/esbuild-plugin",
"version": "11.5.0",
"description": "Official Sentry esbuild plugin",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/develop/packages/legacy/esbuild-plugin",
"author": "Sentry",
"license": "MIT",
"keywords": [
"Sentry",
"esbuild",
"bundler",
"plugin"
],
"engines": {
"node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0"
},
"publishConfig": {
"access": "public"
},
"files": [
"/build"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./build/types/index.d.ts",
"import": "./build/esm/index.js",
"require": "./build/cjs/index.js"
}
},
"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:watch": "run-p build:transpile:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:tarball": "npm pack",
"clean": "rimraf build coverage sentry-esbuild-plugin-*.tgz",
"lint": "oxlint . --type-aware",
"lint:fix": "oxlint . --fix --type-aware",
"test": "vitest run",
"test:unit": "vitest run"
},
"dependencies": {
"@sentry/bundler-plugins": "11.5.0"
},
"volta": {
"extends": "../../../package.json"
}
}
12 changes: 12 additions & 0 deletions packages/legacy/esbuild-plugin/rollup.npm.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils';

export default makeNPMConfigVariants(
makeBaseNPMConfig({
entrypoints: ['src/index.ts'],
packageSpecificConfig: {
output: {
exports: 'named',
},
},
}),
);
2 changes: 2 additions & 0 deletions packages/legacy/esbuild-plugin/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from '@sentry/bundler-plugins/esbuild';
export { default } from '@sentry/bundler-plugins/esbuild';
Comment thread
timfish marked this conversation as resolved.
14 changes: 14 additions & 0 deletions packages/legacy/esbuild-plugin/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as bundlerPlugins from '@sentry/bundler-plugins/esbuild';
import { describe, expect, it } from 'vitest';
import * as plugin from '../src/index';

describe('@sentry/esbuild-plugin', () => {
it('re-exports @sentry/bundler-plugins/esbuild', () => {
expect(plugin.sentryEsbuildPlugin).toBe(bundlerPlugins.sentryEsbuildPlugin);
expect(Object.keys(plugin).sort()).toEqual(Object.keys(bundlerPlugins).sort());
});

it('re-exports the default export', () => {
expect(plugin.default).toBe(bundlerPlugins.default);
});
});
Comment thread
timfish marked this conversation as resolved.
8 changes: 8 additions & 0 deletions packages/legacy/esbuild-plugin/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../tsconfig.json",
"include": ["../src/**/*", "./**/*"],
"compilerOptions": {
"types": ["node"]
}
}
5 changes: 5 additions & 0 deletions packages/legacy/esbuild-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../../../tsconfig.json",
"include": ["./src/**/*.ts", "./package.json"]
}
12 changes: 12 additions & 0 deletions packages/legacy/esbuild-plugin/tsconfig.types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.json",
"include": ["./src/**/*"],
"compilerOptions": {
"rootDir": "./src",
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "build/types"
}
}
8 changes: 8 additions & 0 deletions packages/legacy/esbuild-plugin/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import baseConfig from '../../../vite/vite.config';

export default {
...baseConfig,
test: {
...baseConfig.test,
},
};
2 changes: 2 additions & 0 deletions packages/legacy/rollup-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
*.tgz
29 changes: 29 additions & 0 deletions packages/legacy/rollup-plugin/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# MIT License

Copyright (c) 2022-2026, Sentry
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

- Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46 changes: 46 additions & 0 deletions packages/legacy/rollup-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<p align="center">
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
</a>
</p>

# Sentry Rollup Plugin

A Rollup plugin that uploads source maps to Sentry and injects release and Debug ID information into your bundles.

This package re-exports `@sentry/bundler-plugins/rollup`.

## Installation

```bash
npm install @sentry/rollup-plugin --save-dev
```

## Usage

```js
// rollup.config.js
import { sentryRollupPlugin } from '@sentry/rollup-plugin';

export default {
output: {
sourcemap: true,
},
plugins: [
sentryRollupPlugin({
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
],
};
```

## Documentation

- [Uploading source maps](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/)

## Support

- [Report a bug](https://github.com/getsentry/sentry-javascript/issues/new/choose)
- [Contributing](https://github.com/getsentry/sentry-javascript/blob/develop/CONTRIBUTING.md)
Loading
Loading