Skip to content

Commit a1e6109

Browse files
authored
Merge pull request #79 from bugsnag/release/v2.3.1
Release/v2.3.1
2 parents bed48e9 + 0d67cc4 commit a1e6109

29 files changed

+1222
-43
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 2.3.1 (2022-02-04)
4+
5+
### Fixed
6+
7+
- handle the webpack 5 default devtoolModuleFilenameTemplate format [#78](https://github.com/bugsnag/bugsnag-source-maps/pull/78)
8+
39
## 2.3.0 (2021-08-05)
410

511
- Add `--idle-timeout` flag to control the HTTP request timeout ([see Node documentation](https://nodejs.org/api/http.html#http_request_settimeout_timeout_callback)) [#74](https://github.com/bugsnag/bugsnag-source-maps/pull/74)

CONTRIBUTING.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ To start a release:
1717

1818
Once the release PR has been approved, merge the PR into `main`. You are now ready to make the release. Ensure you are logged in to npm and that you have access to publish the package.
1919

20-
- Bump the package version:
20+
- Make sure you are on the latest `main`.
21+
22+
- Bump the package version and push the new commit and tag:
2123

2224
```
2325
npm version <major|minor|patch>
26+
git push origin main
27+
git push --tags
2428
```
2529

2630
- Publish the new version to npm:
@@ -32,7 +36,7 @@ Once the release PR has been approved, merge the PR into `main`. You are now rea
3236
Finally:
3337

3438
- create a release on GitHub https://github.com/bugsnag/bugsnag-source-maps/releases/new
35-
- A new tag vX.Y.Z will be created on publish
39+
- Use the existing tag created during the version step above
3640
- copy the release notes from `CHANGELOG.md`
3741
- publish the release
3842
- update and push `next`:

features/browser-upload-one.feature

+21
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,24 @@ Feature: Browser source map upload one
295295
And the sourcemap payload field "minifiedUrl" equals "http://myapp.url/static/js/main.js" for all requests
296296
And the sourcemap payload field "sourceMap" matches the expected source map for "single-source-map-webpack" for all requests
297297
And the sourcemap payload field "minifiedFile" matches the expected minified file for "single-source-map-webpack" for all requests
298+
299+
Scenario: Sources are added to the upload when devtool: nosources-source-map is used
300+
When I run the service "webpack-nosources" with the command
301+
"""
302+
bugsnag-source-maps upload-browser
303+
--api-key 123
304+
--app-version 2.0.0
305+
--source-map dist/main.js.map
306+
--bundle dist/main.js
307+
--bundle-url "http://myapp.url/static/js/main.js"
308+
--endpoint http://maze-runner:9339
309+
"""
310+
And I wait to receive 1 sourcemap
311+
Then the sourcemap payload field "apiKey" equals "123"
312+
And the sourcemap payload field "appVersion" equals "2.0.0"
313+
And the sourcemap payload field "overwrite" is null
314+
And the sourcemap payload field "minifiedUrl" equals "http://myapp.url/static/js/main.js"
315+
And the sourcemap payload field "sourceMap" matches the expected source map for "webpack-nosources"
316+
And the sourcemap payload field "minifiedFile" matches the expected minified file for "webpack-nosources"
317+
And the Content-Type header is valid multipart form-data
318+
And the last run docker command exited successfully

features/expected/multiple-source-map-webpack/main-b3944033.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"version": 3,
33
"sources": [
4-
"dist/webpack:/multiple-source-map-webpack/src/lib/b.js",
5-
"dist/webpack:/multiple-source-map-webpack/webpack/bootstrap",
6-
"dist/webpack:/multiple-source-map-webpack/webpack/runtime/hasOwnProperty shorthand",
7-
"dist/webpack:/multiple-source-map-webpack/webpack/runtime/jsonp chunk loading",
8-
"dist/webpack:/multiple-source-map-webpack/webpack/startup"
4+
"src/lib/b.js",
5+
"webpack://multiple-source-map-webpack/webpack/bootstrap",
6+
"webpack://multiple-source-map-webpack/webpack/runtime/hasOwnProperty shorthand",
7+
"webpack://multiple-source-map-webpack/webpack/runtime/jsonp chunk loading",
8+
"webpack://multiple-source-map-webpack/webpack/startup"
99
],
1010
"names": [
1111
"console",

features/expected/multiple-source-map-webpack/main-cb48d68d.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": 3,
33
"sources": [
4-
"dist/webpack:/multiple-source-map-webpack/src/lib/a.js"
4+
"src/lib/a.js"
55
],
66
"names": [
77
"console",

features/expected/multiple-source-map-webpack/main-d89fcf10.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": 3,
33
"sources": [
4-
"dist/webpack:/multiple-source-map-webpack/src/index.js"
4+
"src/index.js"
55
],
66
"names": [
77
"console",

features/expected/single-source-map-webpack/source-map.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"version": 3,
33
"sources": [
4-
"dist/webpack:/single-source-map-webpack/src/lib/a.js",
5-
"dist/webpack:/single-source-map-webpack/src/lib/b.js",
6-
"dist/webpack:/single-source-map-webpack/webpack/bootstrap",
7-
"dist/webpack:/single-source-map-webpack/src/index.js"
4+
"src/lib/a.js",
5+
"src/lib/b.js",
6+
"webpack://single-source-map-webpack/webpack/bootstrap",
7+
"src/index.js"
88
],
99
"names": [
1010
"console",

features/expected/webpack-nosources/minified-file.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"version": 3,
3+
"sources": [
4+
"src/lib/a.js",
5+
"src/lib/b.js",
6+
"webpack://webpack-nosources/webpack/bootstrap",
7+
"src/index.js"
8+
],
9+
"names": [
10+
"console",
11+
"log",
12+
"__webpack_module_cache__",
13+
"__webpack_require__",
14+
"moduleId",
15+
"exports",
16+
"module",
17+
"__webpack_modules__"
18+
],
19+
"mappings": "sBAAAA,QAAQC,IAAI,c,SCAZD,QAAQC,IAAI,eCCRC,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,GAAGF,EAAyBE,GAC3B,OAAOF,EAAyBE,GAAUC,QAG3C,IAAIC,EAASJ,EAAyBE,GAAY,CAGjDC,QAAS,IAOV,OAHAE,EAAoBH,GAAUE,EAAQA,EAAOD,QAASF,GAG/CG,EAAOD,QCpBfL,QAAQC,IAAI,MAEZ,EAAQ,KACR,EAAQ,M",
20+
"file": "main.js",
21+
"sourceRoot": "",
22+
"sourcesContent": [
23+
"console.log('hi from a')\n",
24+
"console.log('hi from b')\n",
25+
null,
26+
"console.log('hi')\n\nrequire('./lib/a')\nrequire('./lib/b')\n"
27+
]
28+
}

features/fixtures/docker-compose.yml

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ services:
3636
context: source-map-babel
3737
dockerfile: Dockerfile.browser-multiple
3838

39+
webpack-nosources:
40+
build:
41+
context: webpack-nosources
42+
3943
single-source-map-react-native-0-60-ios:
4044
build:
4145
context: rn0_60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:lts-alpine
2+
3+
WORKDIR /app
4+
5+
COPY build/bugsnag-source-maps.tgz build/bugsnag-source-maps.tgz
6+
COPY src/ src/
7+
COPY package.json package-lock.json ./
8+
COPY webpack.config.js ./
9+
10+
RUN npm ci
11+
RUN npm install -g ./build/bugsnag-source-maps.tgz
12+
RUN npm run build
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)