Skip to content

Commit c3f800c

Browse files
alan-agius4clydin
authored andcommitted
build: patch rollup-license-plugin to fix on windows
Upstream PR: codepunkt/rollup-license-plugin#178 (cherry picked from commit a723cee)
1 parent da505d1 commit c3f800c

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/dist/index.js b/dist/index.js
2+
index 9baea0c8023c03d19b1494f818e1e11578f05b32..8f1a7a6050980d88e050423e63ef041195011fcc 100644
3+
--- a/dist/index.js
4+
+++ b/dist/index.js
5+
@@ -101,7 +101,7 @@ function createRollupLicensePlugin(pluginOptions = {}, pluginName = "rollup-lice
6+
Object.entries(chunk.modules).filter(
7+
([path, module]) => Boolean(path.match(/node_modules/)) && module.renderedLength > 0
8+
).map(
9+
- ([path]) => path.startsWith("\0") ? path.replace(/^\0/, "") : path
10+
+ ([path]) => (path.startsWith("\0") ? path.replace(/^\0/, "") : path).replace(/\\/g, '/')
11+
).map((path) => [path, path.split("node_modules").pop()]).map(([path, filePath]) => {
12+
const segments = filePath.replace(/^\//, "").split("/");
13+
const packageName = segments[0].startsWith("@") ? `${segments[0]}/${segments[1]}` : segments[0];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
"quicktype-core": "23.0.170",
187187
"resolve-url-loader": "5.0.0",
188188
"rollup": "4.24.2",
189-
"rollup-license-plugin": "^3.0.0",
189+
"rollup-license-plugin": "patch:rollup-license-plugin@npm%3A3.0.0#~/.yarn/patches/rollup-license-plugin-npm-3.0.0-038e5f6edc.patch",
190190
"rollup-plugin-sourcemaps": "^0.6.0",
191191
"rxjs": "7.8.1",
192192
"sass": "1.80.4",

yarn.lock

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ __metadata:
764764
quicktype-core: "npm:23.0.170"
765765
resolve-url-loader: "npm:5.0.0"
766766
rollup: "npm:4.24.2"
767-
rollup-license-plugin: "npm:^3.0.0"
767+
rollup-license-plugin: "patch:rollup-license-plugin@npm%3A3.0.0#~/.yarn/patches/rollup-license-plugin-npm-3.0.0-038e5f6edc.patch"
768768
rollup-plugin-sourcemaps: "npm:^0.6.0"
769769
rxjs: "npm:7.8.1"
770770
sass: "npm:1.80.4"
@@ -16104,7 +16104,7 @@ __metadata:
1610416104
languageName: node
1610516105
linkType: hard
1610616106

16107-
"rollup-license-plugin@npm:^3.0.0":
16107+
"rollup-license-plugin@npm:3.0.0":
1610816108
version: 3.0.0
1610916109
resolution: "rollup-license-plugin@npm:3.0.0"
1611016110
dependencies:
@@ -16115,6 +16115,17 @@ __metadata:
1611516115
languageName: node
1611616116
linkType: hard
1611716117

16118+
"rollup-license-plugin@patch:rollup-license-plugin@npm%3A3.0.0#~/.yarn/patches/rollup-license-plugin-npm-3.0.0-038e5f6edc.patch":
16119+
version: 3.0.0
16120+
resolution: "rollup-license-plugin@patch:rollup-license-plugin@npm%3A3.0.0#~/.yarn/patches/rollup-license-plugin-npm-3.0.0-038e5f6edc.patch::version=3.0.0&hash=be9ba3"
16121+
dependencies:
16122+
get-npm-tarball-url: "npm:^2.1.0"
16123+
node-fetch: "npm:^3.3.2"
16124+
spdx-expression-validate: "npm:^2.0.0"
16125+
checksum: 10c0/d4f340c704cce97ba36251f43859945c15e5865edacdca71da2470067041ea66bda792a5da63ea02e5d72713731e1a42a898b517fd3ffc59f6887fc1491516b0
16126+
languageName: node
16127+
linkType: hard
16128+
1611816129
"rollup-plugin-sourcemaps@npm:^0.6.0":
1611916130
version: 0.6.3
1612016131
resolution: "rollup-plugin-sourcemaps@npm:0.6.3"

0 commit comments

Comments
 (0)