Skip to content

Commit 5d3b479

Browse files
authored
Merge branch 'main' into mdtro/bump-unplugin
2 parents 584d42a + 07c25ce commit 5d3b479

File tree

93 files changed

+4580
-1739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+4580
-1739
lines changed

.github/workflows/checks.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,11 @@ jobs:
125125
# "10.24.1",
126126
# vite uses optional chaining which isn't compatible with node 12
127127
# "12.22.12",
128-
"14.21.1",
129-
"16.18.1",
130-
"18.12.1",
128+
"14",
129+
"16",
130+
"18",
131+
"20",
132+
"22",
131133
]
132134
os: [ubuntu-latest, windows-latest]
133135
runs-on: ${{ matrix.os }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ yarn-error.log
77
*.tgz
88

99
.nxcache
10+
packages/**/yarn.lock
11+
12+
.DS_Store

CHANGELOG.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,148 @@
44

55
- "You know what they say ‘Fool me once, strike one, but fool me twice… strike three.’" — Michael Scott
66

7+
## 4.2.0
8+
9+
- feat(core): Add `prepareArtifacts` option for uploading sourcemaps ([#794](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/794))
10+
- perf: use premove for build clean ([#792](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/792))
11+
- fix(core): Forward headers option to sentry-cli ([#797](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/797))
12+
13+
Work in this release contributed by @liAmirali. Thank you for your contribution!
14+
15+
## 4.1.1
16+
17+
- fix(react-native): Enhance fragment detection for indirect references ([#767](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/767))
18+
19+
## 4.1.0
20+
21+
- feat(deps): Bump @sentry/cli to 2.51.0 [#786](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/786)
22+
- feat(core): Add flag for disabling sourcemaps upload [#785](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/785)
23+
- fix(debugId): Add guards for injected code to avoid errors [#783](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/783)
24+
- docs(options): Improve JSDoc for options [#781](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/781)
25+
- feat(core): Expose method for injecting debug Ids from plugin manager [#784](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/784)
26+
27+
## 4.0.2
28+
29+
- fix(core): Make `moduleMetadata` injection snippet ES5-compliant ([#774](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/774))
30+
31+
## 4.0.1
32+
33+
- fix(core): Make plugin inject ES5-friendly code ([#770](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/770))
34+
- fix(core): Use `renderChunk` for release injection for Rollup/Rolldown/Vite ([#761](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/761))
35+
36+
Work in this release was contributed by @grushetsky. Thank you for your contribution!
37+
38+
## 4.0.0
39+
40+
### Breaking Changes
41+
42+
- (Type change) Vite plugin now returns `VitePlugin` type instead of `any`
43+
- Deprecated function `getBuildInformation` has been removed
44+
45+
### List of Changes
46+
47+
- feat(core)!: Remove `getBuildInformation` export ([#765](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/765))
48+
- feat(vite)!: Update return type of vite plugin ([#728](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/728))
49+
50+
## 3.6.1
51+
52+
- fix(core): Observe and handle Sentry CLI sourcemap upload failures ([#763](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/763))
53+
54+
## 3.6.0
55+
56+
- feat(core): Don't add `debugIdUploadPlugin` when sourcemaps option is disabled ([#753](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/753))
57+
- fix(core): Avoid showing success message if upload was disabled or nothing was uploaded ([#757](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/757))
58+
59+
## 3.5.0
60+
61+
- feat(core): Add hook to customize source map file resolution ([#732](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/732))
62+
- fix(core): Avoid console output and telemetry init when plugins are disabled ([#741](https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/741))
63+
64+
Work in this release was contributed by @thecodewarrior. Thank you for your contribution!
65+
66+
## 3.4.0
67+
68+
- fix: Replace existing debug ID comments (#730)
69+
- feat: Expose bundler plugin primitives via `createSentryBuildPluginManager` (#714)
70+
71+
## 3.3.1
72+
73+
- fix(webpack5): All `esm` files must have `.mjs` postfix (#721)
74+
75+
## 3.3.0
76+
77+
- feat(webpack): Add `@sentry/webpack-plugin/webpack5` export for webpack 5.1+ and compatible environments (#715)
78+
- feat: Only do automatic commit association for Vercel production environments (#711)
79+
80+
## 3.2.4
81+
82+
- Revert "feat(core): Use path instead of debug IDs as artifact names for debug ID upload (#700)" (#709)
83+
- ref: Remove deprecated use of `useArtifacBundles` (#707)
84+
85+
## 3.2.3
86+
87+
- feat(core): Use path instead of debug IDs as artifact names for debug ID upload (#700)
88+
- feat(webpack): Primarily use `contentHash` for debug ID hash (#702)
89+
- feat: Detect Vercel commits and env (#694)
90+
- feat: Default to automatically setting commits on release (#692)
91+
92+
## 3.2.2
93+
94+
- feat(annotation): Handle JSX member expressions (#690)
95+
- fix(core): Don't crash on recoverable CLI command error (#682)
96+
- chore: Suggest putting `SENTRY_AUTH_TOKEN`, `SENTRY_ORG` and `SENTRY_PROJECT` in `passThroughEnv` when using Turborepo (#675)
97+
98+
## 3.2.1
99+
100+
- deps: Bump @sentry/cli to 2.42.2 (#685)
101+
102+
## 3.2.0
103+
104+
- feat(core): Accept and await a promise in `sourcemaps.filesToDeleteAfterUpload` (#677)
105+
106+
## 3.1.2
107+
108+
- deps: Bump `@sentry/cli` to `2.41.1` (#671)
109+
110+
## 3.1.1
111+
112+
- fix(core): Disable release creation and source maps upload in dev mode (#666)
113+
114+
This fix disables any external calls to the Sentry API for managing releases or uploading source maps, when detecting that the plugin is running in dev-mode. While this rarely actually happened,
115+
it also polluted the dev server output with unnecessary logs about missing auth tokens, which shouldn't
116+
be required in dev mode.
117+
118+
## 3.1.0
119+
120+
- feat(webpack): Gate forced process exit behind experimental flag (#663)
121+
122+
## 3.0.0
123+
124+
### Breaking Changes
125+
126+
- Injected code will now use `let`, which was added in ES6 (ES2015).
127+
This means that ES6 is the minimum JavaScript version that the Sentry bundler plugins support.
128+
129+
- Deprecated options have been removed:
130+
- `deleteFilesAfterUpload` - Use `filesToDeleteAfterUpload` instead
131+
- `bundleSizeOptimizations.excludePerformanceMonitoring` - Use `bundleSizeOptimizations.excludeTracing` instead
132+
- `_experiments.moduleMetadata` - Use `moduleMetadata` instead
133+
- `cleanArtifacts` - Did not do anything
134+
135+
### List of Changes
136+
137+
- fix!: Wrap injected code in block-statement to contain scope (#646)
138+
- chore!: Remove deprecated options (#654)
139+
- feat(logger): Use console methods respective to log level (#652)
140+
- fix(webpack): Ensure process exits when done (#653)
141+
- fix: Use correct replacement matcher for `bundleSizeOptimizations.excludeTracing` (#644)
142+
143+
Work in this release contributed by @jdelStrother. Thank you for your contribution!
144+
145+
## 2.23.1
146+
147+
- fix(v2/core): Make `moduleMetadata` injection code ES5-compliant (#773)
148+
7149
## 2.23.0
8150

9151
- chore(deps): bump nanoid from 3.3.6 to 3.3.8 (#641)

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ _These steps are only relevant to Sentry employees when preparing and publishing
8181
### Updating the Changelog
8282

8383
1. Create a new branch.
84-
2. Run `git log --format="- %s"` and copy everything since the last release.
84+
2. Run `yarn changelog` and copy all commits in the list.
8585
3. Create a new section in the changelog, deciding based on the changes whether it should be a minor bump or a patch release.
86-
4. Paste in the logs you copied earlier.
86+
4. Paste in the commits you copied earlier.
8787
5. Delete any which aren't user-facing changes.
8888
6. Alphabetize the rest.
8989
7. If any of the PRs are from external contributors, include underneath the commits `Work in this release contributed by <list of external contributors' GitHub usernames>. Thank you for your contributions!`. If there's only one external PR, don't forget to remove the final `s`. If there are three or more, use an Oxford comma. (It's in the Sentry styleguide!)
90-
8. Commit, push, and open a PR with the title `meta: Update changelog for <fill in relevant version here>`.
90+
8. Commit, push, and open a PR against `main` with the title `meta: Update changelog for <fill in relevant version here>`.

LICENSE

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
# MIT License
1+
MIT License
22

3-
Copyright (c) 2022, Sentry
4-
All rights reserved.
3+
Copyright (c) 2022 Functional Software, Inc. dba Sentry
54

6-
Redistribution and use in source and binary forms, with or without
7-
modification, are permitted provided that the following conditions are met:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9+
of the Software, and to permit persons to whom the Software is furnished to do
10+
so, subject to the following conditions:
811

9-
- Redistributions of source code must retain the above copyright notice, this
10-
list of conditions and the following disclaimer.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
1114

12-
- Redistributions in binary form must reproduce the above copyright notice,
13-
this list of conditions and the following disclaimer in the documentation
14-
and/or other materials provided with the distribution.
15-
16-
- Neither the name of the copyright holder nor the names of its
17-
contributors may be used to endorse or promote products derived from
18-
this software without specific prior written permission.
19-
20-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The Sentry Bundler Plugins take care of Sentry-related tasks at build time of yo
2323
- Release creation in Sentry
2424
- Automatic release name discovery (based on CI environment - Vercel, AWS, Heroku, CircleCI, or current Git SHA)
2525
- Automatically associate errors with releases (Release injection)
26+
- [Show React component display names for breadcrumbs and Session Replays](https://docs.sentry.io/platforms/javascript/guides/react/features/component-names/)
2627

2728
### More information
2829

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "2.23.0",
3+
"version": "4.2.0",
44
"npmClient": "yarn",
55
"useWorkspaces": true
66
}

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"build:watch": "nx run-many --target=build:watch --all",
1414
"build:graph": "nx graph",
1515
"build:npm": "nx run-many --target=build:npm --all",
16+
"changelog": "ts-node ./scripts/get-commit-list.ts",
1617
"check:types": "nx run-many --target=check:types --all",
1718
"clean": "nx run-many --target=clean --all",
1819
"clean:all": "nx run-many --target=clean:all --all && yarn",
@@ -32,10 +33,11 @@
3233
"nx": "14.5.10",
3334
"prettier": "^2.7.1",
3435
"pretty-quick": "^3.1.3",
35-
"npm-run-all": "^4.1.5"
36+
"npm-run-all": "^4.1.5",
37+
"ts-node": "^10.9.2"
3638
},
3739
"volta": {
38-
"node": "14.21.2",
40+
"node": "18.20.8",
3941
"yarn": "1.22.19"
4042
}
4143
}

packages/babel-plugin-component-annotate/.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ module.exports = {
99
tsconfigRootDir: __dirname,
1010
project: ["./src/tsconfig.json", "./test/tsconfig.json"],
1111
},
12+
globals: {
13+
Set: "readonly",
14+
},
1215
env: {
1316
node: true,
1417
},

packages/babel-plugin-component-annotate/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/babel-plugin-component-annotate",
3-
"version": "2.23.0",
3+
"version": "4.2.0",
44
"description": "A Babel plugin that annotates frontend components with additional data to enrich the experience in Sentry",
55
"repository": "git://github.com/getsentry/sentry-javascript-bundler-plugins.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/babel-plugin-component-annotate",
@@ -32,7 +32,7 @@
3232
"module": "dist/esm/index.mjs",
3333
"types": "dist/types/index.d.ts",
3434
"scripts": {
35-
"build": "rimraf ./out && run-p build:rollup build:types",
35+
"build": "premove ./out && run-p build:rollup build:types",
3636
"build:watch": "run-p build:rollup:watch build:types:watch",
3737
"build:rollup": "rollup --config rollup.config.js",
3838
"build:rollup:watch": "rollup --config rollup.config.js --watch --no-watch.clearScreen",
@@ -44,8 +44,8 @@
4444
"check:types:test": "tsc --project ./test/tsconfig.json --noEmit",
4545
"clean": "run-s clean:build",
4646
"clean:all": "run-p clean clean:deps",
47-
"clean:build": "rimraf ./dist *.tgz",
48-
"clean:deps": "rimraf node_modules",
47+
"clean:build": "premove ./dist *.tgz",
48+
"clean:deps": "premove node_modules",
4949
"test": "jest",
5050
"lint": "eslint ./src ./test"
5151
},
@@ -56,16 +56,16 @@
5656
"@babel/preset-typescript": "7.17.12",
5757
"@rollup/plugin-babel": "5.3.1",
5858
"@rollup/plugin-node-resolve": "13.3.0",
59-
"@sentry-internal/eslint-config": "2.23.0",
60-
"@sentry-internal/sentry-bundler-plugin-tsconfig": "2.23.0",
59+
"@sentry-internal/eslint-config": "4.2.0",
60+
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.2.0",
6161
"@swc/core": "^1.2.205",
6262
"@swc/jest": "^0.2.21",
6363
"@types/jest": "^28.1.3",
6464
"@types/node": "^18.6.3",
6565
"@types/uuid": "^9.0.1",
6666
"eslint": "^8.18.0",
6767
"jest": "^28.1.1",
68-
"rimraf": "^3.0.2",
68+
"premove": "^4.0.0",
6969
"rollup": "2.75.7",
7070
"ts-node": "^10.9.1",
7171
"typescript": "^4.7.4"

0 commit comments

Comments
 (0)