Skip to content

Commit ef72ba5

Browse files
committed
Revert source-map package flattening: webpack/webpack-sources#34
1 parent 7929585 commit ef72ba5

5 files changed

Lines changed: 27 additions & 8 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"@types/yargs": "^11.0.0"
5555
},
5656
"resolutions": {
57-
"**/@types/node": "8",
58-
"**/source-map": "0.7.1"
57+
"**/@types/node": "8"
5958
}
6059
}

‎src/SassBuildTool.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ export class SassBuildTool {
112112

113113
let t1 = logAndWriteUtf8FileAsync(cssOutput, cssResult.css);
114114
if (cssResult.map) {
115-
let sm: RawSourceMap = cssResult.map.toJSON();
116-
this.fixSourceMap(sm);
115+
let sm = cssResult.map.toJSON();
116+
// HACK: SourceMap version 0.7.1 changes RawSourceMap typing...
117+
this.fixSourceMap(sm as any);
117118
await logAndWriteUtf8FileAsync(cssOutput + '.map', JSON.stringify(sm));
118119
}
119120
await t1;

‎src/loaders/core-typescript-loader.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ module.exports = function (this: loader.LoaderContext, source: string) {
2525
// console.log(this.resourcePath);
2626
let sm: RawSourceMap = JSON.parse(result.sourceMapText);
2727
sm.sources = [this.resourcePath];
28-
29-
this.callback(null, result.outputText, sm);
28+
// HACK: https://github.com/webpack/webpack-sources/issues/34
29+
this.callback(null, result.outputText, sm as any);
3030
} else {
3131
this.callback(null, result.outputText);
3232
}

‎src/loaders/template-loader.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ module.exports = function (this: loader.LoaderContext, html: string) {
102102

103103
gen.setSourceContent(this.resourcePath, html);
104104
let sm = gen.toJSON();
105-
this.callback(null, template, sm);
105+
// HACK: https://github.com/webpack/webpack-sources/issues/34
106+
this.callback(null, template, sm as any);
106107
} else {
107108
this.callback(null, template);
108109
}

‎yarn.lock‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ align-text@^0.1.1, align-text@^0.1.3:
141141
longest "^1.0.1"
142142
repeat-string "^1.5.2"
143143

144+
amdefine@>=0.0.4:
145+
version "1.0.1"
146+
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
147+
144148
ansi-regex@^2.0.0:
145149
version "2.1.1"
146150
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
@@ -2607,10 +2611,24 @@ source-list-map@^2.0.0:
26072611
version "2.0.0"
26082612
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085"
26092613

2610-
[email protected], [email protected], source-map@^0.4.2, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.5.1, source-map@~0.6.1:
2614+
[email protected], source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1:
2615+
version "0.5.7"
2616+
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
2617+
2618+
26112619
version "0.7.1"
26122620
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.1.tgz#493620ba1692945d680b93862435bf0ed95a2aa4"
26132621

2622+
source-map@^0.4.2:
2623+
version "0.4.4"
2624+
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
2625+
dependencies:
2626+
amdefine ">=0.0.4"
2627+
2628+
source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
2629+
version "0.6.1"
2630+
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
2631+
26142632
spdx-correct@~1.0.0:
26152633
version "1.0.2"
26162634
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"

0 commit comments

Comments
 (0)