Skip to content

Commit e5563c9

Browse files
authored
Merge pull request #477 from mzgoddard/fix-things->_>
Apply fixes in #444 and #436 and for the DLL plugin
2 parents ffe2e64 + f15bd9f commit e5563c9

15 files changed

+39
-68
lines changed

index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,8 @@ class HardSourceWebpackPlugin {
433433
const TransformModuleErrorsPlugin = require('./lib/TransformModuleErrorsPlugin');
434434
const SupportExtractTextPlugin = require('./lib/SupportExtractTextPlugin');
435435
let SupportMiniCssExtractPlugin;
436-
let ExcludeMiniCssModulePlugin;
437436
if (webpackFeatures.generator) {
438437
SupportMiniCssExtractPlugin = require('./lib/SupportMiniCssExtractPlugin');
439-
ExcludeMiniCssModulePlugin = require('./lib/ExcludeMiniCssModulePlugin');
440438
}
441439
const TransformDependencyBlockPlugin = require('./lib/TransformDependencyBlockPlugin');
442440
const TransformBasicDependencyPlugin = require('./lib/TransformBasicDependencyPlugin');
@@ -479,7 +477,6 @@ class HardSourceWebpackPlugin {
479477

480478
if (SupportMiniCssExtractPlugin) {
481479
new SupportMiniCssExtractPlugin().apply(compiler);
482-
new ExcludeMiniCssModulePlugin().apply(compiler);
483480
}
484481

485482
new TransformDependencyBlockPlugin({

lib/ExcludeMiniCssModulePlugin.js

Lines changed: 0 additions & 45 deletions
This file was deleted.

lib/SerializerAppend.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,13 @@ class AppendSerializer {
436436
}
437437

438438
return _lock(_this, mustLock, promise =>
439-
promise.then(() => _read()).catch(e =>
440-
_closeLog(_this).then(() => {
441-
throw e;
442-
}),
443-
),
439+
promise
440+
.then(() => _read())
441+
.catch(e =>
442+
_closeLog(_this).then(() => {
443+
throw e;
444+
}),
445+
),
444446
);
445447
}
446448

lib/TransformBasicDependencyPluginLegacy.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ const DependencySchemas2 = [
111111
'originModule',
112112
'range',
113113
'rangeStatement',
114+
'prefix',
114115
],
115116
['HarmonyExportHeaderDependency', 'range', 'rangeStatement'],
116117
[
@@ -248,6 +249,7 @@ const DependencySchemas3 = [
248249
'originModule',
249250
'range',
250251
'rangeStatement',
252+
'prefix',
251253
],
252254
['HarmonyExportHeaderDependency', 'range', 'rangeStatement'],
253255
[
@@ -692,11 +694,10 @@ class TransformBasicDependencyPluginLegacy {
692694
if (frozen && dependency.getWarnings) {
693695
const warnings = dependency.getWarnings();
694696
if (warnings && warnings.length) {
695-
frozen.warnings = warnings.map(
696-
({ stack }) =>
697-
stack.includes('\n at pluginCompat.tap')
698-
? stack.split('\n at pluginCompat.tap')[0]
699-
: stack.split('\n at Compiler.pluginCompat.tap')[0],
697+
frozen.warnings = warnings.map(({ stack }) =>
698+
stack.includes('\n at pluginCompat.tap')
699+
? stack.split('\n at pluginCompat.tap')[0]
700+
: stack.split('\n at Compiler.pluginCompat.tap')[0],
700701
);
701702
}
702703
}

lib/schema-4/basic-dependency.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"HarmonyExportExpressionDependency",
2828
"originModule",
2929
"range",
30-
"rangeStatement"
30+
"rangeStatement",
31+
"prefix"
3132
],
3233
["HarmonyExportHeaderDependency", "range", "rangeStatement"],
3334
[

lib/schema-4/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,13 +549,15 @@ const HarmonyExportExpressionDependencySerial = serial.serial('HarmonyExportExpr
549549
originModule: null,
550550
range: dependency.range,
551551
rangeStatement: dependency.rangeStatement,
552+
prefix: dependency.prefix,
552553
};
553554
},
554555
thaw(thawed, frozen, extra, methods) {
555556
return new HarmonyExportExpressionDependency(
556557
extra.module,
557558
frozen.range,
558559
frozen.rangeStatement,
560+
frozen.prefix,
559561
);
560562
},
561563
},

lib/util/parity.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,10 @@ class ParityCache {
9191
}
9292

9393
const createParityToken = (id, ids = null) => {
94-
const token = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
95-
/[xy]/g,
96-
c =>
97-
c === 'x'
98-
? ((Math.random() * 16) | 0).toString(16)
99-
: (((Math.random() * 4) | 0) + 8).toString(16),
94+
const token = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c =>
95+
c === 'x'
96+
? ((Math.random() * 16) | 0).toString(16)
97+
: (((Math.random() * 4) | 0) + 8).toString(16),
10098
);
10199

102100
return new ParityToken(id, token, ids);

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"node-object-hash": "^1.2.0",
7575
"pkg-dir": "^3.0.0",
7676
"rimraf": "^2.6.2",
77+
"semver": "^5.6.0",
7778
"tapable": "^1.0.0-beta.5",
7879
"webpack-sources": "^1.0.1",
7980
"write-json-file": "^2.3.0"

tests/fixtures/plugin-dll-reference-scope/dll-4.27.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"dll_b44bb155bbcb19ee9c89","content":{"./fib.js":{"id":1,"buildMeta":{"providedExports":true}}}}

0 commit comments

Comments
 (0)