umi 4.0.20 → 4.0.21

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,3 +1,4 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/regeneratorRuntime";
1
2
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
4
  import _typeof from "@babel/runtime/helpers/typeof";
@@ -6,7 +7,6 @@ import _toArray from "@babel/runtime/helpers/toArray";
6
7
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
7
8
  import _createClass from "@babel/runtime/helpers/createClass";
8
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
  import { assert, compose, isPromiseLike } from "./utils";
11
11
  export var ApplyPluginsType;
12
12
 
@@ -98,9 +98,9 @@ export var PluginManager = /*#__PURE__*/function () {
98
98
  case ApplyPluginsType.modify:
99
99
  if (async) {
100
100
  return hooks.reduce( /*#__PURE__*/function () {
101
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(memo, hook) {
101
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(memo, hook) {
102
102
  var ret;
103
- return _regeneratorRuntime.wrap(function _callee$(_context) {
103
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
104
104
  while (1) {
105
105
  switch (_context.prev = _context.next) {
106
106
  case 0:
@@ -184,10 +184,10 @@ export var PluginManager = /*#__PURE__*/function () {
184
184
  }
185
185
 
186
186
  case ApplyPluginsType.event:
187
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
187
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
188
188
  var _iterator2, _step2, hook, ret;
189
189
 
190
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
190
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
191
191
  while (1) {
192
192
  switch (_context2.prev = _context2.next) {
193
193
  case 0:
@@ -1,26 +1,9 @@
1
1
  var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
5
  var __getProtoOf = Object.getPrototypeOf;
9
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
7
  var __export = (target, all) => {
25
8
  for (var name in all)
26
9
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -52,7 +35,8 @@ var Service = class extends import_core.Service {
52
35
  process.env.UMI_DIR = (0, import_path.dirname)(require.resolve("../../package"));
53
36
  const cwd = (0, import_cwd.getCwd)();
54
37
  require("./requireHook");
55
- super(__spreadProps(__spreadValues({}, opts), {
38
+ super({
39
+ ...opts,
56
40
  env: process.env.NODE_ENV,
57
41
  cwd,
58
42
  defaultConfigFiles: import_constants.DEFAULT_CONFIG_FILES,
@@ -62,7 +46,7 @@ var Service = class extends import_core.Service {
62
46
  (0, import_fs.existsSync)((0, import_path.join)(cwd, "plugin.ts")) && (0, import_path.join)(cwd, "plugin.ts"),
63
47
  (0, import_fs.existsSync)((0, import_path.join)(cwd, "plugin.js")) && (0, import_path.join)(cwd, "plugin.js")
64
48
  ].filter(Boolean)
65
- }));
49
+ });
66
50
  }
67
51
  async run2(opts) {
68
52
  let name = opts.name;
@@ -71,7 +55,7 @@ var Service = class extends import_core.Service {
71
55
  } else if ((opts == null ? void 0 : opts.args.help) || !name || name === "h") {
72
56
  name = "help";
73
57
  }
74
- return await this.run(__spreadProps(__spreadValues({}, opts), { name }));
58
+ return await this.run({ ...opts, name });
75
59
  }
76
60
  };
77
61
  // Annotate the CommonJS export names for ESM import in node:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umi",
3
- "version": "4.0.20",
3
+ "version": "4.0.21",
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",
@@ -38,15 +38,15 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@babel/runtime": "7.18.9",
41
- "@umijs/bundler-utils": "4.0.20",
42
- "@umijs/bundler-webpack": "4.0.20",
43
- "@umijs/core": "4.0.20",
44
- "@umijs/lint": "4.0.20",
45
- "@umijs/preset-umi": "4.0.20",
46
- "@umijs/renderer-react": "4.0.20",
47
- "@umijs/server": "4.0.20",
48
- "@umijs/test": "4.0.20",
49
- "@umijs/utils": "4.0.20",
41
+ "@umijs/bundler-utils": "4.0.21",
42
+ "@umijs/bundler-webpack": "4.0.21",
43
+ "@umijs/core": "4.0.21",
44
+ "@umijs/lint": "4.0.21",
45
+ "@umijs/preset-umi": "4.0.21",
46
+ "@umijs/renderer-react": "4.0.21",
47
+ "@umijs/server": "4.0.21",
48
+ "@umijs/test": "4.0.21",
49
+ "@umijs/utils": "4.0.21",
50
50
  "prettier-plugin-organize-imports": "^2.3.4",
51
51
  "prettier-plugin-packagejson": "^2.2.17"
52
52
  },