Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(bundle-source): pin to a fixed rollup tarball #1154

Merged
merged 2 commits into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/bundle-source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"acorn": "^8.2.4",
"rollup": "^2.47.0",
"rollup": "file:rollup-2.70.1-endo.1.tgz",
"source-map": "^0.7.3"
},
"devDependencies": {
Expand All @@ -38,6 +38,7 @@
"files": [
"LICENSE*",
"SECURITY*",
"rollup-*.tgz",
"src",
"*.js",
"*.ts"
Expand Down
48 changes: 48 additions & 0 deletions packages/bundle-source/rollup-2.70.1-endo.1.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
This patch is necessary until:

```sh
tarball=$(npm pack -q rollup@^2.70.1)
tar -zxf "$tarball" package/package.json
grep '"magic-string":' package/package.json
```

Outputs something with a version specifier that is greater than or equal to `^0.26.1`.

When that happens, we can switch to that new version of rollup and delete this patch file
and `rollup-2.70.1-endo.1.tgz`.

diff -ur rollup-2.70.1/dist/es/shared/rollup.js rollup-2.70.1-endo.1/dist/es/shared/rollup.js
--- rollup-2.70.1/dist/es/shared/rollup.js 1985-10-26 02:15:00.000000000 -0600
+++ rollup-2.70.1-endo.1/dist/es/shared/rollup.js 2022-04-13 11:12:09.000000000 -0600
@@ -501,7 +501,7 @@
filename: { writable: true, value: options.filename },
indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
sourcemapLocations: { writable: true, value: new BitSet() },
- storedNames: { writable: true, value: {} },
+ storedNames: { writable: true, value: Object.create(null) },
indentStr: { writable: true, value: guessIndent(string) }
});

diff -ur rollup-2.70.1/dist/shared/rollup.js rollup-2.70.1-endo.1/dist/shared/rollup.js
--- rollup-2.70.1/dist/shared/rollup.js 1985-10-26 02:15:00.000000000 -0600
+++ rollup-2.70.1-endo.1/dist/shared/rollup.js 2022-04-13 11:13:13.000000000 -0600
@@ -1148,7 +1148,7 @@
filename: { writable: true, value: options.filename },
indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
sourcemapLocations: { writable: true, value: new BitSet() },
- storedNames: { writable: true, value: {} },
+ storedNames: { writable: true, value: Object.create(null) },
indentStr: { writable: true, value: guessIndent(string) }
});

diff -ur rollup-2.70.1/package.json rollup-2.70.1-endo.1/package.json
--- rollup-2.70.1/package.json 1985-10-26 02:15:00.000000000 -0600
+++ rollup-2.70.1-endo.1/package.json 2022-04-13 11:14:16.000000000 -0600
@@ -1,6 +1,6 @@
{
"name": "rollup",
- "version": "2.70.1",
+ "version": "2.70.1-endo.1",
"description": "Next-generation ES module bundler",
"main": "dist/rollup.js",
"module": "dist/es/rollup.js",
Binary file added packages/bundle-source/rollup-2.70.1-endo.1.tgz
Binary file not shown.
7 changes: 3 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11033,10 +11033,9 @@ rollup@1.31.0:
"@types/node" "*"
acorn "^7.1.0"

rollup@^2.47.0:
version "2.64.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.64.0.tgz#f0f59774e21fbb56de438a37d06a2189632b207a"
integrity sha512-+c+lbw1lexBKSMb1yxGDVfJ+vchJH3qLbmavR+awDinTDA2C5Ug9u7lkOzj62SCu0PKUExsW36tpgW7Fmpn3yQ==
"rollup@file:packages/bundle-source/rollup-2.70.1-endo.1.tgz":
version "2.70.1-endo.1"
resolved "file:packages/bundle-source/rollup-2.70.1-endo.1.tgz#1a701379177af0caadcaae0ecfd15b7aeb9ac8e6"
optionalDependencies:
fsevents "~2.3.2"

Expand Down