@modern-js/upgrade-generator 3.3.6 → 3.3.7

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 +27 -27
  2. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -52698,12 +52698,12 @@ function _define_property(obj, key, value) {
52698
52698
  return obj;
52699
52699
  }
52700
52700
 
52701
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
52701
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
52702
52702
  var import_utils13 = require("@modern-js/utils");
52703
52703
  var import_lodash5 = require("@modern-js/utils/lodash");
52704
52704
  var import_comment_json = __toESM(require_src2());
52705
52705
 
52706
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
52706
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.3/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
52707
52707
  var import_utils = require("@modern-js/utils");
52708
52708
  async function canUseNvm() {
52709
52709
  try {
@@ -52753,7 +52753,7 @@ async function canUsePnpm() {
52753
52753
  }
52754
52754
  }
52755
52755
 
52756
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
52756
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.3/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
52757
52757
  var import_utils2 = require("@modern-js/utils");
52758
52758
  function execaWithStreamLog(command, args, options) {
52759
52759
  const promise = (0, import_utils2.execa)(command, args, {
@@ -52849,7 +52849,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
52849
52849
  throw new Error("please install pnpm first");
52850
52850
  }
52851
52851
 
52852
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
52852
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.3/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
52853
52853
  var NpmAPI = class {
52854
52854
  npmInstall({ cwd, registryUrl, ignoreScripts }) {
52855
52855
  return npmInstall({
@@ -52878,7 +52878,7 @@ var NpmAPI = class {
52878
52878
  }
52879
52879
  };
52880
52880
 
52881
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
52881
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.3_@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
52882
52882
  var import_utils4 = require("@modern-js/utils");
52883
52883
  async function canUseGit() {
52884
52884
  try {
@@ -52953,7 +52953,7 @@ async function gitCommit(cwd, commitMessage) {
52953
52953
  });
52954
52954
  }
52955
52955
 
52956
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
52956
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.3_@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
52957
52957
  var GitAPI = class {
52958
52958
  async isInGitRepo(cwd = this.generatorCore.outputPath) {
52959
52959
  const canUse = await canUseGit();
@@ -53005,12 +53005,12 @@ var GitAPI = class {
53005
53005
  }
53006
53006
  };
53007
53007
 
53008
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
53008
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
53009
53009
  var import_path = __toESM(require("path"));
53010
53010
  var import_utils6 = require("@modern-js/utils");
53011
53011
  var FS_RESOURCE = "_codesmith_core_fs_resource";
53012
53012
 
53013
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
53013
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
53014
53014
  var import_utils7 = require("@modern-js/utils");
53015
53015
  async function fsExists(path6) {
53016
53016
  try {
@@ -53021,7 +53021,7 @@ async function fsExists(path6) {
53021
53021
  }
53022
53022
  }
53023
53023
 
53024
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
53024
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.3_@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
53025
53025
  var import_handlebars = __toESM(require_lib());
53026
53026
  function renderString(template, fullData, registers) {
53027
53027
  const helpers = {
@@ -53035,7 +53035,7 @@ function renderString(template, fullData, registers) {
53035
53035
  return import_handlebars.default.compile(template)(fullData) || "";
53036
53036
  }
53037
53037
 
53038
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
53038
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.3_@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
53039
53039
  var HandlebarsAPI = class {
53040
53040
  async registerHelp(helpers) {
53041
53041
  this.registers.helpers = {
@@ -53085,13 +53085,13 @@ var HandlebarsAPI = class {
53085
53085
  }
53086
53086
  };
53087
53087
 
53088
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
53088
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.3_@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
53089
53089
  var import_ejs = __toESM(require_ejs());
53090
53090
  function renderString2(template, fullData) {
53091
53091
  return import_ejs.default.render(template, fullData) || "";
53092
53092
  }
53093
53093
 
53094
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
53094
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.3_@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
53095
53095
  var EjsAPI = class {
53096
53096
  async renderTemplate(templateResource, target, parameters = {}) {
53097
53097
  if (templateResource._type !== FS_RESOURCE) {
@@ -53124,7 +53124,7 @@ var EjsAPI = class {
53124
53124
  }
53125
53125
  };
53126
53126
 
53127
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.2_@modern-js+codesmith@2.3.2/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
53127
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.3_@modern-js+codesmith@2.3.3/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
53128
53128
  var import_path2 = __toESM(require("path"));
53129
53129
  var import_utils10 = require("@modern-js/utils");
53130
53130
  var FsAPI = class {
@@ -62708,10 +62708,10 @@ var Schema = (
62708
62708
  }()
62709
62709
  );
62710
62710
 
62711
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
62711
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
62712
62712
  var import_inquirer = __toESM(require_inquirer());
62713
62713
 
62714
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
62714
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
62715
62715
  var import_lodash = require("@modern-js/utils/lodash");
62716
62716
  function validateSchema(schema) {
62717
62717
  const { type, properties } = schema;
@@ -62803,7 +62803,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
62803
62803
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
62804
62804
  }
62805
62805
 
62806
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
62806
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
62807
62807
  var compileRule = (rule, scope) => {
62808
62808
  const state = Schema.compile(rule, {
62809
62809
  $self: {},
@@ -62907,7 +62907,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
62907
62907
  return answers;
62908
62908
  }
62909
62909
 
62910
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
62910
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
62911
62911
  var CLIReader = class {
62912
62912
  getAnswers() {
62913
62913
  return this.answers;
@@ -62938,7 +62938,7 @@ var CLIReader = class {
62938
62938
  }
62939
62939
  };
62940
62940
 
62941
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
62941
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
62942
62942
  var import_inquirer2 = __toESM(require_inquirer2());
62943
62943
 
62944
62944
  // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
@@ -63004,7 +63004,7 @@ var I18n = class {
63004
63004
  }
63005
63005
  };
63006
63006
 
63007
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
63007
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
63008
63008
  var ZH_LOCALE = {
63009
63009
  environment: {
63010
63010
  node_version: "请升级 Node 版本至 LIS",
@@ -63031,7 +63031,7 @@ var ZH_LOCALE = {
63031
63031
  }
63032
63032
  };
63033
63033
 
63034
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
63034
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
63035
63035
  var EN_LOCALE = {
63036
63036
  environment: {
63037
63037
  node_version: "please upgrade node to lts version",
@@ -63058,14 +63058,14 @@ var EN_LOCALE = {
63058
63058
  }
63059
63059
  };
63060
63060
 
63061
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
63061
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
63062
63062
  var i18n = new I18n();
63063
63063
  var localeKeys = i18n.init("zh", {
63064
63064
  zh: ZH_LOCALE,
63065
63065
  en: EN_LOCALE
63066
63066
  });
63067
63067
 
63068
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
63068
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
63069
63069
  var import_lodash4 = require("@modern-js/utils/lodash");
63070
63070
  function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
63071
63071
  for (const question of questions) {
@@ -63093,7 +63093,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
63093
63093
  return questions;
63094
63094
  }
63095
63095
 
63096
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
63096
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
63097
63097
  var import_path4 = __toESM(require("path"));
63098
63098
  var import_utils12 = require("@modern-js/utils");
63099
63099
  var NODE_MAJOR_VERSION_MAP = {
@@ -63141,7 +63141,7 @@ async function checkUseNvm(cwd, logger2) {
63141
63141
  }
63142
63142
  }
63143
63143
 
63144
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.2_@modern-js+codesmith@2.3.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
63144
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.3_@modern-js+codesmith@2.3.3_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
63145
63145
  var AppAPI = class {
63146
63146
  async checkEnvironment(nodeVersion) {
63147
63147
  if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
@@ -63381,11 +63381,11 @@ var AppAPI = class {
63381
63381
  }
63382
63382
  };
63383
63383
 
63384
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.2/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
63384
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.3/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
63385
63385
  var import_comment_json2 = __toESM(require_src2());
63386
63386
  var declarationUpdate = __toESM(require_dist());
63387
63387
 
63388
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.2/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
63388
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.3/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
63389
63389
  async function editJson(generatorCore, resource, getNewJsonValue) {
63390
63390
  const originJsonValue = await resource.value();
63391
63391
  const newJsonString = await getNewJsonValue(originJsonValue.content);
@@ -63398,7 +63398,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
63398
63398
  return newJsonString;
63399
63399
  }
63400
63400
 
63401
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.2/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
63401
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.3/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
63402
63402
  var JsonAPI = class {
63403
63403
  async get(resource) {
63404
63404
  const originJsonValue = await resource.value();
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.3.6",
18
+ "version": "3.3.7",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -23,21 +23,21 @@
23
23
  "/dist/index.js"
24
24
  ],
25
25
  "dependencies": {
26
- "@modern-js/utils": "2.45.0"
26
+ "@modern-js/utils": "2.46.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@modern-js/codesmith": "2.3.2",
30
- "@modern-js/codesmith-api-app": "2.3.2",
31
- "@modern-js/codesmith-api-json": "2.3.2",
29
+ "@modern-js/codesmith": "2.3.3",
30
+ "@modern-js/codesmith-api-app": "2.3.3",
31
+ "@modern-js/codesmith-api-json": "2.3.3",
32
32
  "@types/jest": "^29",
33
33
  "@types/node": "^14",
34
34
  "jest": "^29",
35
35
  "typescript": "^5",
36
- "@modern-js/generator-common": "3.3.6",
37
- "@modern-js/generator-utils": "3.3.6",
38
- "@scripts/jest-config": "2.45.0",
39
- "@scripts/build": "2.45.0",
40
- "@modern-js/plugin-i18n": "2.45.0"
36
+ "@modern-js/generator-utils": "3.3.7",
37
+ "@modern-js/generator-common": "3.3.7",
38
+ "@scripts/build": "2.46.0",
39
+ "@modern-js/plugin-i18n": "2.46.0",
40
+ "@scripts/jest-config": "2.46.0"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {