umi 4.0.0-rc.1 → 4.0.0-rc.2

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/bin/forkedDev.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- require('v8-compile-cache');
3
+ // require('v8-compile-cache');
4
4
  require('../dist/cli/forkedDev');
package/bin/umi.js CHANGED
@@ -1,6 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- require('v8-compile-cache');
3
+ // disable since it's conflicted with typescript cjs + dynamic import
4
+ // require('v8-compile-cache');
5
+
6
+ // patch console for debug
7
+ // ref: https://remysharp.com/2014/05/23/where-is-that-console-log
8
+ if (process.env.DEBUG_CONSOLE) {
9
+ ['log', 'warn', 'error'].forEach((method) => {
10
+ const old = console[method];
11
+ console[method] = function () {
12
+ let stack = new Error().stack.split(/\n/);
13
+ // Chrome includes a single "Error" line, FF doesn't.
14
+ if (stack[0].indexOf('Error') === 0) {
15
+ stack = stack.slice(1);
16
+ }
17
+ const args = [].slice.apply(arguments).concat([stack[1].trim()]);
18
+ return old.apply(console, args);
19
+ };
20
+ });
21
+ }
22
+
4
23
  require('../dist/cli/cli')
5
24
  .run()
6
25
  .catch((e) => {
@@ -1,4 +1,4 @@
1
- export declare const MIN_NODE_VERSION = 14;
1
+ export declare const MIN_NODE_VERSION = 16;
2
2
  export declare const EXCLUDE_NODE_VERSION = 15;
3
3
  export declare const DEV_COMMAND = "dev";
4
4
  export declare const DEFAULT_CONFIG_FILES: string[];
package/dist/constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FRAMEWORK_NAME = exports.DEFAULT_CONFIG_FILES = exports.DEV_COMMAND = exports.EXCLUDE_NODE_VERSION = exports.MIN_NODE_VERSION = void 0;
4
- exports.MIN_NODE_VERSION = 14;
4
+ exports.MIN_NODE_VERSION = 16;
5
5
  exports.EXCLUDE_NODE_VERSION = 15;
6
6
  exports.DEV_COMMAND = 'dev';
7
7
  exports.DEFAULT_CONFIG_FILES = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umi",
3
- "version": "4.0.0-rc.1",
3
+ "version": "4.0.0-rc.2",
4
4
  "description": "umi",
5
5
  "homepage": "https://github.com/umijs/umi-next/tree/master/packages/umi#readme",
6
6
  "bugs": "https://github.com/umijs/umi-next/issues",
@@ -10,7 +10,6 @@
10
10
  },
11
11
  "license": "MIT",
12
12
  "main": "dist/index.js",
13
- "module": "index.esm.js",
14
13
  "types": "index.d.ts",
15
14
  "bin": {
16
15
  "umi": "bin/umi.js"
@@ -32,11 +31,10 @@
32
31
  "dev": "pnpm build -- --watch"
33
32
  },
34
33
  "dependencies": {
35
- "@umijs/core": "4.0.0-rc.1",
36
- "@umijs/preset-umi": "4.0.0-rc.1",
37
- "@umijs/renderer-react": "4.0.0-rc.1",
38
- "@umijs/utils": "4.0.0-rc.1",
39
- "v8-compile-cache": "2.3.0"
34
+ "@umijs/core": "4.0.0-rc.2",
35
+ "@umijs/preset-umi": "4.0.0-rc.2",
36
+ "@umijs/renderer-react": "4.0.0-rc.2",
37
+ "@umijs/utils": "4.0.0-rc.2"
40
38
  },
41
39
  "publishConfig": {
42
40
  "access": "public"