@umijs/bundler-webpack 4.0.0-rc.3 → 4.0.0-rc.4

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.
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -114,7 +114,7 @@ const logUnusedFiles = (unusedFiles) => {
114
114
  if (!(unusedFiles === null || unusedFiles === void 0 ? void 0 : unusedFiles.length)) {
115
115
  return;
116
116
  }
117
- console.log(utils_1.chalk.yellow.bold('\nWarning:'), utils_1.chalk.yellow(`There are ${unusedFiles.length} unused files:\n`), ...unusedFiles.map((file, index) => `${index + 1}. ${utils_1.chalk.yellow(file)}\n`), utils_1.chalk.red.bold('Please be careful if you want to remove them (¬º-°)¬.\n'));
117
+ console.log(utils_1.chalk.yellow.bold('\nWarning:'), utils_1.chalk.yellow(`There are ${unusedFiles.length} unused files:`), ...unusedFiles.map((file, index) => `\n${index + 1}. ${utils_1.chalk.yellow(file)}`), utils_1.chalk.red.bold('\nPlease be careful if you want to remove them (¬º-°)¬.\n'));
118
118
  };
119
119
  const convertToUnixPath = (path) => path.replace(/\\+/g, '/');
120
120
  exports.default = detectDeadCode;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -13,7 +13,7 @@ class UmiProgressPlugin extends webpack_1.ProgressPlugin {
13
13
  }
14
14
  apply(compiler) {
15
15
  compiler.hooks.invalid.tap(PLUGIN_NAME, () => {
16
- utils_1.logger.wait('compiling...');
16
+ utils_1.logger.wait('Compiling...');
17
17
  });
18
18
  compiler.hooks.done.tap(PLUGIN_NAME, (stats) => {
19
19
  const { errors, warnings } = stats.toJson({
@@ -33,7 +33,7 @@ class UmiProgressPlugin extends webpack_1.ProgressPlugin {
33
33
  }
34
34
  else {
35
35
  const prefix = this.options.name ? `${this.options.name} ` : '';
36
- utils_1.logger.event(`${prefix}compiled successfully in ${stats.endTime - stats.startTime} ms (${stats.compilation.modules.size} modules)`);
36
+ utils_1.logger.event(`${prefix}Compiled successfully in ${stats.endTime - stats.startTime} ms (${stats.compilation.modules.size} modules)`);
37
37
  }
38
38
  });
39
39
  }
@@ -1,4 +1,4 @@
1
- import { ImportDeclaration } from '@swc/core';
1
+ import type { ImportDeclaration } from '@swc/core';
2
2
  import Visitor from '@swc/core/Visitor';
3
3
  declare class LockCoreJS extends Visitor {
4
4
  visitImportDeclaration(expression: ImportDeclaration): ImportDeclaration;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-webpack",
3
- "version": "4.0.0-rc.3",
3
+ "version": "4.0.0-rc.4",
4
4
  "description": "@umijs/bundler-webpack",
5
5
  "homepage": "https://github.com/umijs/umi-next/tree/master/packages/bundler-webpack#readme",
6
6
  "bugs": "https://github.com/umijs/umi-next/issues",
@@ -28,35 +28,35 @@
28
28
  "generate:webpackPackages": "zx ./scripts/generateWebpackPackages.mjs"
29
29
  },
30
30
  "dependencies": {
31
- "@parcel/css": "1.3.2",
31
+ "@parcel/css": "1.5.0",
32
32
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
33
33
  "@svgr/core": "6.2.1",
34
34
  "@svgr/plugin-jsx": "^6.2.1",
35
35
  "@svgr/plugin-svgo": "^6.2.0",
36
- "@swc/core": "1.2.143",
37
36
  "@types/hapi__joi": "17.1.8",
38
- "@umijs/babel-preset-umi": "4.0.0-rc.3",
39
- "@umijs/mfsu": "4.0.0-rc.3",
40
- "@umijs/utils": "4.0.0-rc.3",
37
+ "@umijs/babel-preset-umi": "4.0.0-rc.4",
38
+ "@umijs/mfsu": "4.0.0-rc.4",
39
+ "@umijs/utils": "4.0.0-rc.4",
41
40
  "css-loader": "6.6.0",
42
41
  "es5-imcompatible-versions": "^0.1.73",
43
42
  "jest-worker": "27.5.1",
44
43
  "node-libs-browser": "2.2.1",
45
- "postcss": "^8.4.6",
46
- "postcss-preset-env": "7.4.1",
44
+ "postcss": "^8.4.7",
45
+ "postcss-preset-env": "7.4.2",
47
46
  "react-error-overlay": "6.0.9"
48
47
  },
49
48
  "devDependencies": {
49
+ "@swc/core": "1.2.147",
50
50
  "@types/express": "4.17.13",
51
51
  "@types/webpack-sources": "3.2.0",
52
- "@types/ws": "8.2.3",
52
+ "@types/ws": "8.5.2",
53
53
  "autoprefixer": "10.4.2",
54
54
  "babel-loader": "8.2.3",
55
55
  "compression": "1.7.4",
56
56
  "connect-history-api-fallback": "1.6.0",
57
57
  "copy-webpack-plugin": "10.2.4",
58
58
  "css-minimizer-webpack-plugin": "3.4.1",
59
- "cssnano": "5.0.17",
59
+ "cssnano": "5.1.0",
60
60
  "express": "4.17.3",
61
61
  "fork-ts-checker-webpack-plugin": "7.2.1",
62
62
  "http-proxy-middleware": "2.0.3",
@@ -73,7 +73,7 @@
73
73
  "style-loader": "3.3.1",
74
74
  "svgo-loader": "3.0.0",
75
75
  "tapable": "2.2.1",
76
- "terser": "5.11.0",
76
+ "terser": "5.12.0",
77
77
  "terser-webpack-plugin": "5.3.1",
78
78
  "url-loader": "4.1.1",
79
79
  "webpack": "5.69.1",