Skip to content

Commit

Permalink
Merge pull request #1154 from endojs/mfig-bundle-source-override-mistake
Browse files Browse the repository at this point in the history
build(bundle-source): pin to a fixed rollup tarball
  • Loading branch information
michaelfig committed Apr 13, 2022
2 parents c9b1909 + df55651 commit aebabe8
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 5 deletions.
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

0 comments on commit aebabe8

Please sign in to comment.