webpack 2.3.3 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +148 -133
  2. package/lib/APIPlugin.js +0 -6
  3. package/lib/AsyncDependenciesBlock.js +1 -1
  4. package/lib/AutomaticPrefetchPlugin.js +2 -2
  5. package/lib/BannerPlugin.js +30 -8
  6. package/lib/CachePlugin.js +2 -2
  7. package/lib/CaseSensitiveModulesWarning.js +6 -3
  8. package/lib/ChunkRenderError.js +3 -1
  9. package/lib/ChunkTemplate.js +2 -2
  10. package/lib/Compilation.js +17 -17
  11. package/lib/Compiler.js +30 -25
  12. package/lib/ContextModule.js +4 -3
  13. package/lib/ContextModuleFactory.js +5 -5
  14. package/lib/DelegatedModule.js +69 -63
  15. package/lib/DependenciesBlock.js +65 -59
  16. package/lib/Dependency.js +1 -0
  17. package/lib/EntryModuleNotFoundError.js +16 -10
  18. package/lib/ExtendedAPIPlugin.js +7 -2
  19. package/lib/ExternalModule.js +1 -1
  20. package/lib/ExternalModuleFactoryPlugin.js +26 -23
  21. package/lib/FlagDependencyUsagePlugin.js +63 -75
  22. package/lib/HotModuleReplacement.runtime.js +25 -27
  23. package/lib/HotModuleReplacementPlugin.js +3 -5
  24. package/lib/IgnorePlugin.js +48 -17
  25. package/lib/JsonpChunkTemplatePlugin.js +24 -24
  26. package/lib/JsonpMainTemplatePlugin.js +182 -182
  27. package/lib/LibManifestPlugin.js +51 -46
  28. package/lib/MainTemplate.js +17 -18
  29. package/lib/Module.js +158 -160
  30. package/lib/ModuleBuildError.js +4 -2
  31. package/lib/ModuleDependencyError.js +2 -1
  32. package/lib/ModuleDependencyWarning.js +2 -1
  33. package/lib/ModuleError.js +2 -2
  34. package/lib/ModuleFilenameHelpers.js +27 -27
  35. package/lib/ModuleNotFoundError.js +3 -1
  36. package/lib/ModuleParseError.js +6 -4
  37. package/lib/ModuleWarning.js +2 -2
  38. package/lib/MultiCompiler.js +3 -4
  39. package/lib/MultiStats.js +3 -3
  40. package/lib/MultiWatching.js +2 -2
  41. package/lib/NamedChunksPlugin.js +30 -0
  42. package/lib/NodeStuffPlugin.js +80 -79
  43. package/lib/NormalModule.js +7 -3
  44. package/lib/NormalModuleFactory.js +244 -240
  45. package/lib/Parser.js +1256 -1079
  46. package/lib/ProgressPlugin.js +2 -2
  47. package/lib/RawModule.js +1 -1
  48. package/lib/RecordIdsPlugin.js +5 -9
  49. package/lib/SetVarMainTemplatePlugin.js +1 -1
  50. package/lib/SourceMapDevToolPlugin.js +153 -157
  51. package/lib/Stats.js +34 -6
  52. package/lib/TemplatedPathPlugin.js +1 -0
  53. package/lib/UnsupportedFeatureWarning.js +2 -1
  54. package/lib/WebpackError.js +11 -0
  55. package/lib/WebpackOptionsApply.js +4 -4
  56. package/lib/WebpackOptionsValidationError.js +2 -3
  57. package/lib/dependencies/AMDDefineDependency.js +10 -6
  58. package/lib/dependencies/AMDDefineDependencyParserPlugin.js +8 -1
  59. package/lib/dependencies/AMDPlugin.js +3 -3
  60. package/lib/dependencies/ContextDependencyHelpers.js +19 -16
  61. package/lib/dependencies/CriticalDependencyWarning.js +4 -1
  62. package/lib/dependencies/DepBlockHelpers.js +3 -3
  63. package/lib/dependencies/HarmonyCompatibilityDependency.js +1 -1
  64. package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +3 -3
  65. package/lib/dependencies/ImportContextDependency.js +2 -1
  66. package/lib/dependencies/ImportDependenciesBlock.js +2 -2
  67. package/lib/dependencies/ImportParserPlugin.js +16 -2
  68. package/lib/dependencies/RequireEnsureDependenciesBlock.js +11 -3
  69. package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +42 -13
  70. package/lib/dependencies/RequireEnsureDependency.js +9 -2
  71. package/lib/formatLocation.js +44 -27
  72. package/lib/optimize/AggressiveSplittingPlugin.js +10 -17
  73. package/lib/optimize/CommonsChunkPlugin.js +2 -2
  74. package/lib/performance/AssetsOverSizeLimitWarning.js +4 -1
  75. package/lib/performance/EntrypointsOverSizeLimitWarning.js +5 -1
  76. package/lib/performance/NoAsyncChunksWarning.js +5 -1
  77. package/lib/removeAndDo.js +6 -4
  78. package/lib/util/identifier.js +16 -0
  79. package/lib/webpack.js +2 -1
  80. package/package.json +7 -4
  81. package/schemas/webpackOptionsSchema.json +35 -0
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "2.3.3",
3
+ "version": "2.5.1",
4
4
  "author": "Tobias Koppers @sokra",
5
5
  "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
6
6
  "dependencies": {
7
- "acorn": "^4.0.4",
7
+ "acorn": "^5.0.0",
8
8
  "acorn-dynamic-import": "^2.0.0",
9
9
  "ajv": "^4.7.0",
10
10
  "ajv-keywords": "^1.1.1",
@@ -12,6 +12,7 @@
12
12
  "enhanced-resolve": "^3.0.0",
13
13
  "interpret": "^1.0.0",
14
14
  "json-loader": "^0.5.4",
15
+ "json5": "^0.5.1",
15
16
  "loader-runner": "^2.3.0",
16
17
  "loader-utils": "^0.2.16",
17
18
  "memory-fs": "~0.4.1",
@@ -93,11 +94,13 @@
93
94
  "travis:benchmark": "npm run benchmark",
94
95
  "appveyor:test": "node --max_old_space_size=4096 node_modules\\mocha\\bin\\mocha --harmony test/*.test.js",
95
96
  "appveyor:benchmark": "npm run benchmark",
97
+ "circleci:test": "node --max_old_space_size=4096 node_modules/mocha/bin/mocha --harmony test/*.test.js",
98
+ "circleci:lint": "npm run lint-files && npm run nsp",
96
99
  "build:examples": "cd examples && node buildAll.js",
97
100
  "pretest": "npm run lint-files",
98
101
  "lint-files": "npm run lint && npm run beautify-lint",
99
- "lint": "eslint lib bin hot buildin test/**/webpack.config.js test/binCases/**/test.js examples/**/webpack.config.js",
100
- "beautify-lint": "beautify-lint 'lib/**/*.js' 'hot/**/*.js' 'bin/**/*.js' 'benchmark/*.js' 'test/*.js'",
102
+ "lint": "eslint lib bin hot buildin \"test/**/webpack.config.js\" \"test/binCases/**/test.js\" \"examples/**/webpack.config.js\"",
103
+ "beautify-lint": "beautify-lint \"lib/**/*.js\" \"hot/**/*.js\" \"bin/**/*.js\" \"benchmark/*.js\" \"test/*.js\"",
101
104
  "nsp": "nsp check --output summary",
102
105
  "benchmark": "mocha test/*.benchmark.js --harmony -R spec",
103
106
  "cover": "node --harmony ./node_modules/istanbul/lib/cli.js cover -x '**/*.runtime.js' node_modules/mocha/bin/_mocha -- test/*.test.js",
@@ -333,6 +333,10 @@
333
333
  "minLength": 1,
334
334
  "type": "string"
335
335
  },
336
+ "hashSalt": {
337
+ "minLength": 1,
338
+ "type": "string"
339
+ },
336
340
  "hotUpdateChunkFilename": {
337
341
  "description": "The filename of the Hot Update Chunks. They are inside the output.path directory.",
338
342
  "type": "string",
@@ -707,6 +711,19 @@
707
711
  "type": "object"
708
712
  }
709
713
  ]
714
+ },
715
+ "warning-filters-types": {
716
+ "anyOf": [
717
+ {
718
+ "instanceof": "RegExp"
719
+ },
720
+ {
721
+ "type": "string"
722
+ },
723
+ {
724
+ "instanceof": "Function"
725
+ }
726
+ ]
710
727
  }
711
728
  },
712
729
  "properties": {
@@ -950,6 +967,20 @@
950
967
  "type": "boolean",
951
968
  "description": "add the source code of modules"
952
969
  },
970
+ "warningsFilter": {
971
+ "description": "Suppress warnings that match the specified filters. Filters can be Strings, RegExps or Functions",
972
+ "anyOf": [
973
+ {
974
+ "type": "array",
975
+ "items": {
976
+ "$ref": "#/definitions/warning-filters-types"
977
+ }
978
+ },
979
+ {
980
+ "$ref": "#/definitions/warning-filters-types"
981
+ }
982
+ ]
983
+ },
953
984
  "errorDetails": {
954
985
  "type": "boolean",
955
986
  "description": "add details to errors (like resolving log)"
@@ -962,6 +993,10 @@
962
993
  "type": "string",
963
994
  "description": "sort the modules by that field"
964
995
  },
996
+ "moduleTrace": {
997
+ "type": "boolean",
998
+ "description": "add dependencies and origin of warnings/errors"
999
+ },
965
1000
  "chunksSort": {
966
1001
  "type": "string",
967
1002
  "description": "sort the chunks by that field"