@modern-js/upgrade-generator 3.1.22 → 3.1.24

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -46
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -115330,10 +115330,14 @@ var require_chainId = __commonJS({
115330
115330
  SVG: "svg",
115331
115331
  /** Rule for pug */
115332
115332
  PUG: "pug",
115333
+ /** Rule for Vue */
115334
+ VUE: "vue",
115333
115335
  /** Rule for toml */
115334
115336
  TOML: "toml",
115335
115337
  /** Rule for yaml */
115336
115338
  YAML: "yaml",
115339
+ /** Rule for wasm */
115340
+ WASM: "wasm",
115337
115341
  /** Rule for bff */
115338
115342
  JS_BFF_API: "js-bff-api"
115339
115343
  },
@@ -115360,6 +115364,8 @@ var require_chainId = __commonJS({
115360
115364
  URL: "url",
115361
115365
  /** pug-loader */
115362
115366
  PUG: "pug",
115367
+ /** vue-loader */
115368
+ VUE: "vue",
115363
115369
  /** file-loader */
115364
115370
  FILE: "file",
115365
115371
  /** @svgr/webpack */
@@ -115429,12 +115435,16 @@ var require_chainId = __commonJS({
115429
115435
  BUNDLE_ANALYZER: "bundle-analyze",
115430
115436
  /** BottomTemplatePlugin */
115431
115437
  BOTTOM_TEMPLATE: "bottom-template",
115432
- /** HtmlCrossOriginPlugin */
115433
- HTML_CROSS_ORIGIN: "html-cross-origin",
115438
+ /** HtmlTagsPlugin */
115439
+ HTML_TAGS: "html-tags",
115434
115440
  /** HtmlNoncePlugin */
115435
115441
  HTML_NONCE: "html-nonce",
115442
+ /** HtmlCrossOriginPlugin */
115443
+ HTML_CROSS_ORIGIN: "html-cross-origin",
115436
115444
  /** MiniCssExtractPlugin */
115437
115445
  MINI_CSS_EXTRACT: "mini-css-extract",
115446
+ /** VueLoaderPlugin */
115447
+ VUE_LOADER_PLUGIN: "vue-loader-plugin",
115438
115448
  /** ReactFastRefreshPlugin */
115439
115449
  REACT_FAST_REFRESH: "react-fast-refresh",
115440
115450
  /** ProvidePlugin for node polyfill */
@@ -115448,9 +115458,7 @@ var require_chainId = __commonJS({
115448
115458
  /** HtmlAsyncChunkPlugin */
115449
115459
  HTML_ASYNC_CHUNK: "html-async-chunk",
115450
115460
  /** SWC_POLYFILL_CHECKER */
115451
- SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin",
115452
- /** HtmlTagsPlugin */
115453
- HTML_TAGS: "html-tags"
115461
+ SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
115454
115462
  },
115455
115463
  /** Predefined minimizers */
115456
115464
  MINIMIZER: {
@@ -116107,6 +116115,7 @@ var require_project = __commonJS({
116107
116115
  });
116108
116116
  var _interop_require_default = require_interop_require_default();
116109
116117
  var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
116118
+ var _pkgup = /* @__PURE__ */ _interop_require_default._(require_pkg_up2());
116110
116119
  var _commands = require_commands();
116111
116120
  var _compiled = require_compiled();
116112
116121
  var _common = require_common3();
@@ -116146,8 +116155,10 @@ var require_project = __commonJS({
116146
116155
  return Boolean(options["web-only"]);
116147
116156
  });
116148
116157
  var isBeyondReact17 = (cwd) => {
116149
- const pkgPath = _path.default.join(cwd, "package.json");
116150
- if (!_compiled.fs.existsSync(pkgPath)) {
116158
+ const pkgPath = _pkgup.default.sync({
116159
+ cwd
116160
+ });
116161
+ if (!pkgPath) {
116151
116162
  return false;
116152
116163
  }
116153
116164
  const pkgInfo = JSON.parse(_compiled.fs.readFileSync(pkgPath, "utf8"));
@@ -116417,11 +116428,10 @@ var require_config3 = __commonJS({
116417
116428
  }
116418
116429
  });
116419
116430
  var _is = require_is();
116420
- var _constants = require_constants();
116421
- var getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
116431
+ var getEntryOptions = (name, isMainEntry, baseOptions, optionsByEntries, packageName) => {
116422
116432
  if (optionsByEntries) {
116423
116433
  let optionsByEntry = getOptionsByEntryName(name, optionsByEntries);
116424
- if (optionsByEntry === void 0 && name === _constants.MAIN_ENTRY_NAME && packageName) {
116434
+ if (optionsByEntry === void 0 && isMainEntry && packageName) {
116425
116435
  optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
116426
116436
  }
116427
116437
  return optionsByEntry !== void 0 ? (0, _is.isPlainObject)(optionsByEntry) && (0, _is.isPlainObject)(baseOptions) ? __spreadValues(__spreadValues({}, baseOptions), optionsByEntry) : optionsByEntry : baseOptions;
@@ -117422,41 +117432,6 @@ var require_require = __commonJS({
117422
117432
  }
117423
117433
  });
117424
117434
 
117425
- // ../../../toolkit/utils/dist/cjs/cli/routes.js
117426
- var require_routes = __commonJS({
117427
- "../../../toolkit/utils/dist/cjs/cli/routes.js"(exports) {
117428
- "use strict";
117429
- Object.defineProperty(exports, "__esModule", {
117430
- value: true
117431
- });
117432
- Object.defineProperty(exports, "getRouteId", {
117433
- enumerable: true,
117434
- get: function() {
117435
- return getRouteId;
117436
- }
117437
- });
117438
- var _interop_require_default = require_interop_require_default();
117439
- var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
117440
- var _constants = require_constants();
117441
- var _path1 = require_path();
117442
- var getPathWithoutExt = (filename) => {
117443
- const extname = _path.default.extname(filename);
117444
- return filename.slice(0, -extname.length);
117445
- };
117446
- var getRouteId = (componentPath, routesDir, entryName) => {
117447
- const relativePath = (0, _path1.normalizeToPosixPath)(_path.default.relative(routesDir, componentPath));
117448
- const pathWithoutExt = getPathWithoutExt(relativePath);
117449
- let id = ``;
117450
- if (entryName === _constants.MAIN_ENTRY_NAME) {
117451
- id = pathWithoutExt;
117452
- } else {
117453
- id = `${entryName}_${pathWithoutExt}`;
117454
- }
117455
- return id.replace(/\[(.*?)\]/g, "($1)");
117456
- };
117457
- }
117458
- });
117459
-
117460
117435
  // ../../../toolkit/utils/dist/cjs/cli/runtimeExports.js
117461
117436
  var require_runtimeExports = __commonJS({
117462
117437
  "../../../toolkit/utils/dist/cjs/cli/runtimeExports.js"(exports) {
@@ -117603,7 +117578,6 @@ var require_cli = __commonJS({
117603
117578
  _export_star._(require_prettyInstructions(), exports);
117604
117579
  _export_star._(require_print(), exports);
117605
117580
  _export_star._(require_require(), exports);
117606
- _export_star._(require_routes(), exports);
117607
117581
  _export_star._(require_runtimeExports(), exports);
117608
117582
  _export_star._(require_watch(), exports);
117609
117583
  }
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.22",
18
+ "version": "3.1.24",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -30,11 +30,11 @@
30
30
  "@types/node": "^14",
31
31
  "jest": "^29",
32
32
  "typescript": "^5",
33
- "@modern-js/plugin-i18n": "2.23.0",
34
- "@scripts/jest-config": "2.23.0",
35
- "@modern-js/generator-utils": "3.1.22",
36
- "@scripts/build": "2.23.0",
37
- "@modern-js/generator-common": "3.1.22"
33
+ "@modern-js/generator-utils": "3.1.24",
34
+ "@scripts/build": "2.24.0",
35
+ "@scripts/jest-config": "2.24.0",
36
+ "@modern-js/generator-common": "3.1.24",
37
+ "@modern-js/plugin-i18n": "2.24.0"
38
38
  },
39
39
  "sideEffects": false,
40
40
  "publishConfig": {