umi 4.6.66 → 4.6.68

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,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  interface IOpts {
3
2
  scriptPath: string;
4
3
  }
package/dist/cli/fork.js CHANGED
@@ -71,7 +71,8 @@ function start({ scriptPath }) {
71
71
  }
72
72
  function utilPortValid(port, totalTry, callback) {
73
73
  import_utils.portfinder.getPort({ startPort: port }, (err, findPort) => {
74
- if (err) callback(err);
74
+ if (err)
75
+ callback(err);
75
76
  else {
76
77
  if (findPort === port) {
77
78
  callback();
@@ -7,7 +7,8 @@ var import_service = require("../service/service");
7
7
  (async () => {
8
8
  try {
9
9
  let onSignal = function(signal) {
10
- if (closed) return;
10
+ if (closed)
11
+ return;
11
12
  closed = true;
12
13
  service.applyPlugins({
13
14
  key: "onExit",
@@ -1,6 +1,6 @@
1
1
  import { IConfigFromPlugins } from '@@/core/pluginConfig';
2
2
  import type { IConfig } from '@umijs/preset-umi';
3
- declare type ConfigType = IConfigFromPlugins & IConfig;
3
+ type ConfigType = IConfigFromPlugins & IConfig;
4
4
  /**
5
5
  * 通过方法的方式配置umi,能带来更好的 typescript 体验
6
6
  * @param {ConfigType} config
@@ -1,5 +1,5 @@
1
1
  import type { RequestHandler } from '@umijs/bundler-webpack/compiled/express';
2
- declare type MockDeclare = string | number | null | undefined | boolean | Record<string, any> | RequestHandler;
2
+ type MockDeclare = string | number | null | undefined | boolean | Record<string, any> | RequestHandler;
3
3
  export declare function defineMock(mockData: {
4
4
  [key: string]: MockDeclare;
5
5
  }): {
package/dist/index.d.ts CHANGED
@@ -5,4 +5,4 @@ export { RUNTIME_TYPE_FILE_NAME } from './constants';
5
5
  export { defineConfig } from './defineConfig';
6
6
  export { defineMock } from './defineMock';
7
7
  export * from './service/service';
8
- export declare type IApi = PluginAPI & IServicePluginAPI;
8
+ export type IApi = PluginAPI & IServicePluginAPI;
@@ -8,6 +8,7 @@ var mod = require("module");
8
8
  var resolveFilename = mod._resolveFilename;
9
9
  mod._resolveFilename = function(request, parent, isMain, options) {
10
10
  const hookResolved = hookPropertyMap.get(request);
11
- if (hookResolved) request = hookResolved;
11
+ if (hookResolved)
12
+ request = hookResolved;
12
13
  return resolveFilename.call(mod, request, parent, isMain, options);
13
14
  };
package/dist/test.d.ts CHANGED
@@ -4,20 +4,20 @@ export declare function getAliasPathWithKey(alias: Record<string, string>, key:
4
4
  export declare function getUmiAlias(): Promise<any>;
5
5
  export declare function configUmiAlias(config: Config.InitialOptions): Promise<Partial<{
6
6
  automock: boolean;
7
- bail: number | boolean;
7
+ bail: boolean | number;
8
8
  cache: boolean;
9
- cacheDirectory: string;
9
+ cacheDirectory: Config.Path;
10
10
  ci: boolean;
11
11
  clearMocks: boolean;
12
12
  changedFilesWithAncestor: boolean;
13
13
  changedSince: string;
14
14
  collectCoverage: boolean;
15
- collectCoverageFrom: string[];
15
+ collectCoverageFrom: Array<Config.Glob>;
16
16
  collectCoverageOnlyFrom: {
17
17
  [key: string]: boolean;
18
18
  };
19
19
  coverageDirectory: string;
20
- coveragePathIgnorePatterns: string[];
20
+ coveragePathIgnorePatterns: Array<string>;
21
21
  coverageProvider: "babel" | "v8";
22
22
  coverageReporters: Config.CoverageReporters;
23
23
  coverageThreshold: {
@@ -29,11 +29,11 @@ export declare function configUmiAlias(config: Config.InitialOptions): Promise<P
29
29
  detectOpenHandles: boolean;
30
30
  displayName: string | Config.DisplayName;
31
31
  expand: boolean;
32
- extensionsToTreatAsEsm: string[];
33
- extraGlobals: string[];
34
- filter: string;
32
+ extensionsToTreatAsEsm: Array<Config.Path>;
33
+ extraGlobals: Array<string>;
34
+ filter: Config.Path;
35
35
  findRelatedTests: boolean;
36
- forceCoverageMatch: string[];
36
+ forceCoverageMatch: Array<Config.Glob>;
37
37
  forceExit: boolean;
38
38
  json: boolean;
39
39
  globals: Config.ConfigGlobals;
@@ -41,79 +41,79 @@ export declare function configUmiAlias(config: Config.InitialOptions): Promise<P
41
41
  globalTeardown: string | null | undefined;
42
42
  haste: Config.HasteConfig;
43
43
  injectGlobals: boolean;
44
- reporters: (string | Config.ReporterConfig)[];
44
+ reporters: Array<string | Config.ReporterConfig>;
45
45
  logHeapUsage: boolean;
46
46
  lastCommit: boolean;
47
47
  listTests: boolean;
48
48
  maxConcurrency: number;
49
- maxWorkers: string | number;
50
- moduleDirectories: string[];
51
- moduleFileExtensions: string[];
52
- moduleLoader: string;
49
+ maxWorkers: number | string;
50
+ moduleDirectories: Array<string>;
51
+ moduleFileExtensions: Array<string>;
52
+ moduleLoader: Config.Path;
53
53
  moduleNameMapper: {
54
- [key: string]: string | string[];
54
+ [key: string]: string | Array<string>;
55
55
  };
56
- modulePathIgnorePatterns: string[];
57
- modulePaths: string[];
56
+ modulePathIgnorePatterns: Array<string>;
57
+ modulePaths: Array<string>;
58
58
  name: string;
59
59
  noStackTrace: boolean;
60
60
  notify: boolean;
61
61
  notifyMode: string;
62
62
  onlyChanged: boolean;
63
63
  onlyFailures: boolean;
64
- outputFile: string;
64
+ outputFile: Config.Path;
65
65
  passWithNoTests: boolean;
66
- preprocessorIgnorePatterns: string[];
66
+ preprocessorIgnorePatterns: Array<Config.Glob>;
67
67
  preset: string | null | undefined;
68
68
  prettierPath: string | null | undefined;
69
- projects: (string | Config.InitialProjectOptions)[];
69
+ projects: Array<Config.Glob | Config.InitialProjectOptions>;
70
70
  replname: string | null | undefined;
71
71
  resetMocks: boolean;
72
72
  resetModules: boolean;
73
- resolver: string | null | undefined;
73
+ resolver: Config.Path | null | undefined;
74
74
  restoreMocks: boolean;
75
- rootDir: string;
76
- roots: string[];
75
+ rootDir: Config.Path;
76
+ roots: Array<Config.Path>;
77
77
  runner: string;
78
78
  runTestsByPath: boolean;
79
79
  scriptPreprocessor: string;
80
- setupFiles: string[];
81
- setupTestFrameworkScriptFile: string;
82
- setupFilesAfterEnv: string[];
80
+ setupFiles: Array<Config.Path>;
81
+ setupTestFrameworkScriptFile: Config.Path;
82
+ setupFilesAfterEnv: Array<Config.Path>;
83
83
  silent: boolean;
84
84
  skipFilter: boolean;
85
85
  skipNodeResolution: boolean;
86
86
  slowTestThreshold: number;
87
- snapshotResolver: string;
88
- snapshotSerializers: string[];
87
+ snapshotResolver: Config.Path;
88
+ snapshotSerializers: Array<Config.Path>;
89
89
  snapshotFormat: Config.PrettyFormatOptions;
90
90
  errorOnDeprecated: boolean;
91
91
  testEnvironment: string;
92
92
  testEnvironmentOptions: Record<string, unknown>;
93
93
  testFailureExitCode: string | number;
94
94
  testLocationInResults: boolean;
95
- testMatch: string[];
95
+ testMatch: Array<Config.Glob>;
96
96
  testNamePattern: string;
97
- testPathDirs: string[];
98
- testPathIgnorePatterns: string[];
99
- testRegex: string | string[];
97
+ testPathDirs: Array<Config.Path>;
98
+ testPathIgnorePatterns: Array<string>;
99
+ testRegex: string | Array<string>;
100
100
  testResultsProcessor: string;
101
101
  testRunner: string;
102
102
  testSequencer: string;
103
103
  testURL: string;
104
104
  testTimeout: number;
105
- timers: "real" | "fake" | "modern" | "legacy";
105
+ timers: "fake" | "legacy" | "modern" | "real";
106
106
  transform: {
107
107
  [regex: string]: string | Config.TransformerConfig;
108
108
  };
109
- transformIgnorePatterns: string[];
110
- watchPathIgnorePatterns: string[];
111
- unmockedModulePathPatterns: string[];
109
+ transformIgnorePatterns: Array<Config.Glob>;
110
+ watchPathIgnorePatterns: Array<string>;
111
+ unmockedModulePathPatterns: Array<string>;
112
112
  updateSnapshot: boolean;
113
113
  useStderr: boolean;
114
- verbose?: boolean | undefined;
114
+ verbose?: boolean;
115
115
  watch: boolean;
116
116
  watchAll: boolean;
117
117
  watchman: boolean;
118
- watchPlugins: (string | [string, Record<string, unknown>])[];
118
+ watchPlugins: Array<string | [string, Record<string, unknown>]>;
119
119
  }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umi",
3
- "version": "4.6.66",
3
+ "version": "4.6.68",
4
4
  "description": "umi",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/umi#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -34,15 +34,17 @@
34
34
  "@babel/runtime": "7.23.6",
35
35
  "prettier-plugin-organize-imports": "^3.2.2",
36
36
  "prettier-plugin-packagejson": "2.4.3",
37
- "@umijs/bundler-utils": "4.6.66",
38
- "@umijs/bundler-webpack": "4.6.66",
39
- "@umijs/lint": "4.6.66",
40
- "@umijs/preset-umi": "4.6.66",
41
- "@umijs/server": "4.6.66",
42
- "@umijs/renderer-react": "4.6.66",
43
- "@umijs/utils": "4.6.66",
44
- "@umijs/test": "4.6.66",
45
- "@umijs/core": "4.6.66"
37
+ "@umijs/bundler-utils": "4.6.68",
38
+ "@umijs/preset-umi": "4.6.68",
39
+ "@umijs/bundler-webpack": "4.6.68",
40
+ "@umijs/renderer-react": "4.6.68",
41
+ "@umijs/test": "4.6.68",
42
+ "@umijs/core": "4.6.68",
43
+ "@umijs/server": "4.6.68",
44
+ "@umijs/utils": "4.6.68"
45
+ },
46
+ "devDependencies": {
47
+ "@umijs/lint": "4.6.68"
46
48
  },
47
49
  "engines": {
48
50
  "node": ">=14"