weboptimizer 2.0.1161 → 2.0.1164

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.
package/jest.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "forceCoverageMatch": ["**/testBundle.js"],
3
- "globalSetup": "./jestSetup.js",
4
3
  "moduleNameMapper": {
5
4
  "\\.((css)|(less)|(sass)|(scss))$": "identity-obj-proxy"
6
5
  },
7
6
  "rootDir": "../../",
7
+ "setupFilesAfterEnv": ["./node_modules/weboptimizer/jestSetup.js"],
8
8
  "testPathIgnorePatterns": ["^(.*[/])?testHelper([./].*)?$"]
9
9
  }
package/jestSetup.js CHANGED
@@ -17,36 +17,12 @@
17
17
  */
18
18
  // region imports
19
19
 
20
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
21
-
22
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
23
-
24
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
20
+ var _clientnode = require("clientnode");
25
21
 
26
22
  var _util = require("util");
27
23
 
28
- // endregion
29
- module.exports = /*#__PURE__*/function () {
30
- var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(globalConfig, projectConfig) {
31
- return _regenerator["default"].wrap(function _callee$(_context) {
32
- while (1) {
33
- switch (_context.prev = _context.next) {
34
- case 0:
35
- global.TextEncoder = _util.TextEncoder;
36
- global.TextDecoder = _util.TextDecoder;
37
-
38
- case 2:
39
- case "end":
40
- return _context.stop();
41
- }
42
- }
43
- }, _callee);
44
- }));
45
-
46
- return function (_x, _x2) {
47
- return _ref.apply(this, arguments);
48
- };
49
- }(); // region vim modline
24
+ _clientnode.globalContext.TextEncoder = _util.TextEncoder;
25
+ _clientnode.globalContext.TextDecoder = _util.TextDecoder; // region vim modline
50
26
  // vim: set tabstop=4 shiftwidth=4 expandtab:
51
27
  // vim: foldmethod=marker foldmarker=region,endregion:
52
28
  // endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weboptimizer",
3
- "version": "2.0.1161",
3
+ "version": "2.0.1164",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -112,7 +112,10 @@ var libraryName;
112
112
  if (configuration.libraryName) libraryName = configuration.libraryName;else if (Object.keys(configuration.injection.entry.normalized).length > 1) libraryName = '[name]';else {
113
113
  libraryName = configuration.name;
114
114
  if (['assign', 'global', 'this', 'var', 'window'].includes(configuration.exportFormat.self)) libraryName = _clientnode["default"].stringConvertToValidVariableName(libraryName);
115
- } /// endregion
115
+ }
116
+ if (libraryName === '*') libraryName = Object.keys(configuration.injection.entry.normalized).map(function (name) {
117
+ return _clientnode["default"].stringConvertToValidVariableName(name);
118
+ }); /// endregion
116
119
  /// region plugins
117
120
 
118
121
  var pluginInstances = []; //// region define modules to ignore
@@ -1282,7 +1285,7 @@ var webpackConfiguration = _clientnode["default"].extend(true, {
1282
1285
  globalObject: configuration.exportFormat.globalObject,
1283
1286
  hashFunction: configuration.hashAlgorithm,
1284
1287
  library: {
1285
- name: libraryName === '*' ? undefined : libraryName,
1288
+ name: libraryName,
1286
1289
  type: configuration.exportFormat.self,
1287
1290
  umdNamedDefine: true
1288
1291
  },