@modern-js/upgrade 2.60.5-alpha.0 → 2.60.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +99 -67
- package/package.json +9 -8
package/dist/index.js
CHANGED
@@ -8407,10 +8407,10 @@ var require_lodash2 = __commonJS({
|
|
8407
8407
|
}
|
8408
8408
|
});
|
8409
8409
|
|
8410
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
8410
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
|
8411
8411
|
var LoggerLevel;
|
8412
8412
|
var init_constants = __esm({
|
8413
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
8413
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js"() {
|
8414
8414
|
"use strict";
|
8415
8415
|
(function(LoggerLevel2) {
|
8416
8416
|
LoggerLevel2["Error"] = "error";
|
@@ -9973,10 +9973,10 @@ var require_source = __commonJS({
|
|
9973
9973
|
}
|
9974
9974
|
});
|
9975
9975
|
|
9976
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
9976
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/chalk.js
|
9977
9977
|
var import_chalk;
|
9978
9978
|
var init_chalk = __esm({
|
9979
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
9979
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/chalk.js"() {
|
9980
9980
|
"use strict";
|
9981
9981
|
import_chalk = __toESM(require_source());
|
9982
9982
|
}
|
@@ -10756,10 +10756,10 @@ var require_src = __commonJS({
|
|
10756
10756
|
}
|
10757
10757
|
});
|
10758
10758
|
|
10759
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
10759
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
|
10760
10760
|
var import_debug, Logger;
|
10761
10761
|
var init_logger = __esm({
|
10762
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
10762
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js"() {
|
10763
10763
|
"use strict";
|
10764
10764
|
init_chalk();
|
10765
10765
|
import_debug = __toESM(require_src());
|
@@ -13207,10 +13207,10 @@ var require_glob = __commonJS({
|
|
13207
13207
|
}
|
13208
13208
|
});
|
13209
13209
|
|
13210
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
13210
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/glob.js
|
13211
13211
|
var import_glob;
|
13212
13212
|
var init_glob = __esm({
|
13213
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
13213
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/glob.js"() {
|
13214
13214
|
"use strict";
|
13215
13215
|
import_glob = __toESM(require_glob());
|
13216
13216
|
}
|
@@ -15821,19 +15821,19 @@ var require_lib = __commonJS({
|
|
15821
15821
|
}
|
15822
15822
|
});
|
15823
15823
|
|
15824
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
15824
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/fs-extra.js
|
15825
15825
|
var import_fs_extra;
|
15826
15826
|
var init_fs_extra = __esm({
|
15827
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
15827
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/fs-extra.js"() {
|
15828
15828
|
"use strict";
|
15829
15829
|
import_fs_extra = __toESM(require_lib());
|
15830
15830
|
}
|
15831
15831
|
});
|
15832
15832
|
|
15833
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15833
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
|
15834
15834
|
var IMAGE_EXT_LIST;
|
15835
15835
|
var init_constants2 = __esm({
|
15836
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15836
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js"() {
|
15837
15837
|
"use strict";
|
15838
15838
|
IMAGE_EXT_LIST = [
|
15839
15839
|
".jpg",
|
@@ -15850,10 +15850,10 @@ var init_constants2 = __esm({
|
|
15850
15850
|
}
|
15851
15851
|
});
|
15852
15852
|
|
15853
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15853
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
15854
15854
|
var import_path, FS_RESOURCE, FsResource;
|
15855
15855
|
var init_FsResource = __esm({
|
15856
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15856
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js"() {
|
15857
15857
|
"use strict";
|
15858
15858
|
import_path = __toESM(require("path"));
|
15859
15859
|
init_fs_extra();
|
@@ -15884,10 +15884,10 @@ var init_FsResource = __esm({
|
|
15884
15884
|
}
|
15885
15885
|
});
|
15886
15886
|
|
15887
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15887
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
15888
15888
|
var import_path2, promisifyGlob, FsMaterial;
|
15889
15889
|
var init_FsMaterial = __esm({
|
15890
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15890
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js"() {
|
15891
15891
|
"use strict";
|
15892
15892
|
import_path2 = __toESM(require("path"));
|
15893
15893
|
init_glob();
|
@@ -15920,7 +15920,7 @@ var init_FsMaterial = __esm({
|
|
15920
15920
|
}
|
15921
15921
|
});
|
15922
15922
|
|
15923
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15923
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
15924
15924
|
function fsExists(path8) {
|
15925
15925
|
return __async(this, null, function* () {
|
15926
15926
|
try {
|
@@ -15932,16 +15932,16 @@ function fsExists(path8) {
|
|
15932
15932
|
});
|
15933
15933
|
}
|
15934
15934
|
var init_fsExists = __esm({
|
15935
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15935
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js"() {
|
15936
15936
|
"use strict";
|
15937
15937
|
init_fs_extra();
|
15938
15938
|
}
|
15939
15939
|
});
|
15940
15940
|
|
15941
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15941
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
|
15942
15942
|
var nodeRequire;
|
15943
15943
|
var init_nodeRequire = __esm({
|
15944
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
15944
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js"() {
|
15945
15945
|
"use strict";
|
15946
15946
|
nodeRequire = (path8) => {
|
15947
15947
|
try {
|
@@ -17919,16 +17919,16 @@ var require_execa = __commonJS({
|
|
17919
17919
|
}
|
17920
17920
|
});
|
17921
17921
|
|
17922
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
17922
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/execa.js
|
17923
17923
|
var import_execa;
|
17924
17924
|
var init_execa = __esm({
|
17925
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
17925
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/execa.js"() {
|
17926
17926
|
"use strict";
|
17927
17927
|
import_execa = __toESM(require_execa());
|
17928
17928
|
}
|
17929
17929
|
});
|
17930
17930
|
|
17931
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
17931
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
|
17932
17932
|
function canUseYarn() {
|
17933
17933
|
return __async(this, null, function* () {
|
17934
17934
|
try {
|
@@ -18013,7 +18013,7 @@ function runInstall(targetDir, registryUrl, logger) {
|
|
18013
18013
|
}
|
18014
18014
|
var import_path3;
|
18015
18015
|
var init_packageManager = __esm({
|
18016
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
18016
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js"() {
|
18017
18017
|
"use strict";
|
18018
18018
|
import_path3 = __toESM(require("path"));
|
18019
18019
|
init_execa();
|
@@ -18021,7 +18021,7 @@ var init_packageManager = __esm({
|
|
18021
18021
|
}
|
18022
18022
|
});
|
18023
18023
|
|
18024
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
18024
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
|
18025
18025
|
function timeoutPromise(promise, ms, reason = "Operation") {
|
18026
18026
|
return __async(this, null, function* () {
|
18027
18027
|
let timeoutId = null;
|
@@ -18045,15 +18045,15 @@ function timeoutPromise(promise, ms, reason = "Operation") {
|
|
18045
18045
|
});
|
18046
18046
|
}
|
18047
18047
|
var init_timeoutPromise = __esm({
|
18048
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
18048
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js"() {
|
18049
18049
|
"use strict";
|
18050
18050
|
}
|
18051
18051
|
});
|
18052
18052
|
|
18053
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
18053
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
|
18054
18054
|
var NPM_API_TIMEOUT, CATCHE_VALIDITY_PREIOD;
|
18055
18055
|
var init_constants3 = __esm({
|
18056
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
18056
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/constants.js"() {
|
18057
18057
|
"use strict";
|
18058
18058
|
NPM_API_TIMEOUT = 3e4;
|
18059
18059
|
CATCHE_VALIDITY_PREIOD = 7 * 24 * 3600 * 1e3;
|
@@ -20545,10 +20545,10 @@ var require_semver2 = __commonJS({
|
|
20545
20545
|
}
|
20546
20546
|
});
|
20547
20547
|
|
20548
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
20548
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/semver.js
|
20549
20549
|
var import_semver;
|
20550
20550
|
var init_semver = __esm({
|
20551
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
20551
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/semver.js"() {
|
20552
20552
|
"use strict";
|
20553
20553
|
import_semver = __toESM(require_semver2());
|
20554
20554
|
}
|
@@ -40172,7 +40172,7 @@ var require_tar = __commonJS({
|
|
40172
40172
|
}
|
40173
40173
|
});
|
40174
40174
|
|
40175
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40175
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmRegistry.js
|
40176
40176
|
function getNpmRegistry() {
|
40177
40177
|
return __async(this, null, function* () {
|
40178
40178
|
const { stdout } = yield (0, import_execa.default)("npm", [
|
@@ -40184,13 +40184,37 @@ function getNpmRegistry() {
|
|
40184
40184
|
});
|
40185
40185
|
}
|
40186
40186
|
var init_getNpmRegistry = __esm({
|
40187
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40187
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmRegistry.js"() {
|
40188
40188
|
"use strict";
|
40189
40189
|
init_execa();
|
40190
40190
|
}
|
40191
40191
|
});
|
40192
40192
|
|
40193
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40193
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmPackageInfo.js
|
40194
|
+
function getNpmPackageInfoWithCommand(pkgName, pkgVersion, options) {
|
40195
|
+
return __async(this, null, function* () {
|
40196
|
+
const { registryUrl } = options || {};
|
40197
|
+
const params = [
|
40198
|
+
"view",
|
40199
|
+
`${pkgName}@${pkgVersion}`,
|
40200
|
+
"dist",
|
40201
|
+
"version",
|
40202
|
+
"--json"
|
40203
|
+
];
|
40204
|
+
if (registryUrl) {
|
40205
|
+
params.push("--registry");
|
40206
|
+
params.push(registryUrl);
|
40207
|
+
}
|
40208
|
+
const getPkgInfoPromise = (0, import_execa.default)("npm", params);
|
40209
|
+
const { stdout } = yield timeoutPromise(getPkgInfoPromise, NPM_API_TIMEOUT, `Get npm tarball of '${pkgName}'`);
|
40210
|
+
try {
|
40211
|
+
const pkgDistInfo = JSON.parse(stdout);
|
40212
|
+
return pkgDistInfo;
|
40213
|
+
} catch (e) {
|
40214
|
+
throw new Error(`Version \`${pkgVersion}\` for package \`${pkgName}\` could not be found`);
|
40215
|
+
}
|
40216
|
+
});
|
40217
|
+
}
|
40194
40218
|
function getNpmPackageInfo(pkgName, pkgVersion, options) {
|
40195
40219
|
return __async(this, null, function* () {
|
40196
40220
|
const packageName = `${pkgName}@${pkgVersion}`;
|
@@ -40198,19 +40222,26 @@ function getNpmPackageInfo(pkgName, pkgVersion, options) {
|
|
40198
40222
|
if (packageInfo) {
|
40199
40223
|
return packageInfo;
|
40200
40224
|
}
|
40201
|
-
const { registryUrl = yield getNpmRegistry() } = options || {};
|
40202
|
-
const url2 = `${registryUrl.replace(/\/$/, "")}/${pkgName}/${pkgVersion}`;
|
40203
|
-
|
40204
|
-
|
40205
|
-
|
40206
|
-
|
40225
|
+
const { registryUrl = yield getNpmRegistry(), logger } = options || {};
|
40226
|
+
const url2 = `${registryUrl.replace(/\/$/, "")}/${pkgName}/${pkgVersion || "latest"}`;
|
40227
|
+
let response;
|
40228
|
+
try {
|
40229
|
+
response = (yield timeoutPromise(axios_default.get(url2), NPM_API_TIMEOUT, `Get npm package info of '${pkgName}'`)).data;
|
40230
|
+
} catch (e) {
|
40231
|
+
logger === null || logger === void 0 ? void 0 : logger.error(e);
|
40232
|
+
response = yield getNpmPackageInfoWithCommand(pkgName, pkgVersion, options);
|
40233
|
+
}
|
40234
|
+
const { version } = response;
|
40235
|
+
NpmPackageInfoCache.set(`${pkgName}@${version || pkgVersion}`, response);
|
40236
|
+
return response;
|
40207
40237
|
});
|
40208
40238
|
}
|
40209
40239
|
var NpmPackageInfoCache;
|
40210
40240
|
var init_getNpmPackageInfo = __esm({
|
40211
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40241
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmPackageInfo.js"() {
|
40212
40242
|
"use strict";
|
40213
40243
|
init_constants3();
|
40244
|
+
init_execa();
|
40214
40245
|
init_axios2();
|
40215
40246
|
init_getNpmRegistry();
|
40216
40247
|
init_timeoutPromise();
|
@@ -40218,7 +40249,7 @@ var init_getNpmPackageInfo = __esm({
|
|
40218
40249
|
}
|
40219
40250
|
});
|
40220
40251
|
|
40221
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40252
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
40222
40253
|
function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
40223
40254
|
return __async(this, null, function* () {
|
40224
40255
|
const packageInfo = yield getNpmPackageInfo(pkgName, pkgVersion, options);
|
@@ -40226,13 +40257,13 @@ function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
40226
40257
|
});
|
40227
40258
|
}
|
40228
40259
|
var init_getNpmTarballUrl = __esm({
|
40229
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40260
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js"() {
|
40230
40261
|
"use strict";
|
40231
40262
|
init_getNpmPackageInfo();
|
40232
40263
|
}
|
40233
40264
|
});
|
40234
40265
|
|
40235
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40266
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
|
40236
40267
|
function getNpmVersion(packageName, options) {
|
40237
40268
|
return __async(this, null, function* () {
|
40238
40269
|
const { version = "latest" } = options || {};
|
@@ -40241,13 +40272,13 @@ function getNpmVersion(packageName, options) {
|
|
40241
40272
|
});
|
40242
40273
|
}
|
40243
40274
|
var init_getNpmVersion = __esm({
|
40244
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40275
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js"() {
|
40245
40276
|
"use strict";
|
40246
40277
|
init_getNpmPackageInfo();
|
40247
40278
|
}
|
40248
40279
|
});
|
40249
40280
|
|
40250
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40281
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
40251
40282
|
function getGeneratorVersion(_0) {
|
40252
40283
|
return __async(this, arguments, function* (pkgName, pkgVersion = "latest", options = {}) {
|
40253
40284
|
const cacheKey = `${pkgName}@${pkgVersion}`;
|
@@ -40264,7 +40295,8 @@ function getGeneratorVersion(_0) {
|
|
40264
40295
|
try {
|
40265
40296
|
version = yield getNpmVersion(pkgName, {
|
40266
40297
|
registryUrl,
|
40267
|
-
version: pkgVersion
|
40298
|
+
version: pkgVersion,
|
40299
|
+
logger
|
40268
40300
|
});
|
40269
40301
|
} catch (error) {
|
40270
40302
|
throw new Error(`Failed to get version for package ${pkgName}@${pkgVersion}: ${error.message}`);
|
@@ -40341,7 +40373,8 @@ function downloadPackage(_0) {
|
|
40341
40373
|
logger === null || logger === void 0 ? void 0 : logger.timing(`🕒 get ${pkgName} version`);
|
40342
40374
|
version = yield getNpmVersion(pkgName, {
|
40343
40375
|
registryUrl,
|
40344
|
-
version: pkgVersion
|
40376
|
+
version: pkgVersion,
|
40377
|
+
logger
|
40345
40378
|
});
|
40346
40379
|
logger === null || logger === void 0 ? void 0 : logger.timing(`🕒 get ${pkgName} version`, true);
|
40347
40380
|
if (version === void 0) {
|
@@ -40359,7 +40392,8 @@ function downloadPackage(_0) {
|
|
40359
40392
|
yield import_fs_extra.default.mkdirp(targetDir);
|
40360
40393
|
logger === null || logger === void 0 ? void 0 : logger.timing(`🕒 get ${pkgName}@${version} tarball url`);
|
40361
40394
|
const tarballPkg = yield getNpmTarballUrl(pkgName, version, {
|
40362
|
-
registryUrl
|
40395
|
+
registryUrl,
|
40396
|
+
logger
|
40363
40397
|
});
|
40364
40398
|
logger === null || logger === void 0 ? void 0 : logger.timing(`🕒 get ${pkgName}@${version} tarball url`, true);
|
40365
40399
|
logger === null || logger === void 0 ? void 0 : logger.timing(`🕒 download ${pkgName}@${version} tarball`);
|
@@ -40380,7 +40414,7 @@ function downloadPackage(_0) {
|
|
40380
40414
|
}
|
40381
40415
|
var import_os, import_tar, GeneratorVersionMap;
|
40382
40416
|
var init_downloadPackage = __esm({
|
40383
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40417
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js"() {
|
40384
40418
|
"use strict";
|
40385
40419
|
import_os = __toESM(require("os"));
|
40386
40420
|
init_constants3();
|
@@ -40396,7 +40430,7 @@ var init_downloadPackage = __esm({
|
|
40396
40430
|
}
|
40397
40431
|
});
|
40398
40432
|
|
40399
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40433
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
|
40400
40434
|
function getPackageInfo(packageName) {
|
40401
40435
|
if (!packageName) {
|
40402
40436
|
throw new Error("package is not exisit");
|
@@ -40420,15 +40454,15 @@ function getPackageInfo(packageName) {
|
|
40420
40454
|
};
|
40421
40455
|
}
|
40422
40456
|
var init_getPackageInfo = __esm({
|
40423
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40457
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js"() {
|
40424
40458
|
"use strict";
|
40425
40459
|
init_semver();
|
40426
40460
|
}
|
40427
40461
|
});
|
40428
40462
|
|
40429
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40463
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/index.js
|
40430
40464
|
var init_utils3 = __esm({
|
40431
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40465
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/index.js"() {
|
40432
40466
|
"use strict";
|
40433
40467
|
init_nodeRequire();
|
40434
40468
|
init_downloadPackage();
|
@@ -40436,7 +40470,7 @@ var init_utils3 = __esm({
|
|
40436
40470
|
}
|
40437
40471
|
});
|
40438
40472
|
|
40439
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40473
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
40440
40474
|
function getGeneratorDir(generator) {
|
40441
40475
|
return __async(this, null, function* () {
|
40442
40476
|
let result = generator;
|
@@ -40457,7 +40491,7 @@ function getGeneratorDir(generator) {
|
|
40457
40491
|
}
|
40458
40492
|
var import_path4, MaxTimes;
|
40459
40493
|
var init_getGeneratorDir = __esm({
|
40460
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
40494
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js"() {
|
40461
40495
|
"use strict";
|
40462
40496
|
import_path4 = __toESM(require("path"));
|
40463
40497
|
init_fs_extra();
|
@@ -45953,19 +45987,19 @@ var require_ora = __commonJS({
|
|
45953
45987
|
}
|
45954
45988
|
});
|
45955
45989
|
|
45956
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
45990
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/ora.js
|
45957
45991
|
var import_ora;
|
45958
45992
|
var init_ora = __esm({
|
45959
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
45993
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.5/node_modules/@modern-js/codesmith-utils/dist/esm/ora.js"() {
|
45960
45994
|
"use strict";
|
45961
45995
|
import_ora = __toESM(require_ora());
|
45962
45996
|
}
|
45963
45997
|
});
|
45964
45998
|
|
45965
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
45999
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
45966
46000
|
var import_events2, import_path5, GeneratorCore;
|
45967
46001
|
var init_generator = __esm({
|
45968
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
46002
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js"() {
|
45969
46003
|
"use strict";
|
45970
46004
|
import_events2 = require("events");
|
45971
46005
|
import_path5 = __toESM(require("path"));
|
@@ -46192,10 +46226,10 @@ check path: ${import_chalk.default.blue.underline(generator)} exist a package.js
|
|
46192
46226
|
}
|
46193
46227
|
});
|
46194
46228
|
|
46195
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
46229
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
46196
46230
|
var import_path6, MaterialsManager;
|
46197
46231
|
var init_materials = __esm({
|
46198
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
46232
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js"() {
|
46199
46233
|
"use strict";
|
46200
46234
|
import_path6 = __toESM(require("path"));
|
46201
46235
|
init_utils3();
|
@@ -46266,10 +46300,10 @@ var init_materials = __esm({
|
|
46266
46300
|
}
|
46267
46301
|
});
|
46268
46302
|
|
46269
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
46303
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
46270
46304
|
var import_path7, CodeSmith;
|
46271
46305
|
var init_codesmith = __esm({
|
46272
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
46306
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js"() {
|
46273
46307
|
"use strict";
|
46274
46308
|
import_path7 = __toESM(require("path"));
|
46275
46309
|
init_generator();
|
@@ -46337,9 +46371,9 @@ var init_codesmith = __esm({
|
|
46337
46371
|
}
|
46338
46372
|
});
|
46339
46373
|
|
46340
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
46374
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/index.js
|
46341
46375
|
var init_esm_node = __esm({
|
46342
|
-
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
46376
|
+
"../../../node_modules/.pnpm/@modern-js+codesmith@2.6.5/node_modules/@modern-js/codesmith/dist/esm-node/index.js"() {
|
46343
46377
|
"use strict";
|
46344
46378
|
init_codesmith();
|
46345
46379
|
init_utils3();
|
@@ -46373,14 +46407,12 @@ function upgradeAction(options) {
|
|
46373
46407
|
spinner: "runner"
|
46374
46408
|
}).start();
|
46375
46409
|
const prepareGlobalPromise = smith.prepareGlobal();
|
46376
|
-
const prepareGeneratorPromise = smith.prepareGenerators([UPGRADE_GENERATOR]);
|
46377
46410
|
smith.logger.debug("@modern-js/upgrade", projectDir || "", options);
|
46378
46411
|
let generator = UPGRADE_GENERATOR;
|
46379
46412
|
if (process.env.CODESMITH_ENV === "development") {
|
46380
46413
|
generator = require.resolve(UPGRADE_GENERATOR);
|
46381
46414
|
} else if (distTag) {
|
46382
46415
|
generator = `${UPGRADE_GENERATOR}@${distTag}`;
|
46383
|
-
yield prepareGeneratorPromise;
|
46384
46416
|
}
|
46385
46417
|
yield prepareGlobalPromise;
|
46386
46418
|
spinner.stop();
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.60.5
|
18
|
+
"version": "2.60.5",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/index.d.ts",
|
21
21
|
"main": "./dist/index.js",
|
@@ -38,22 +38,23 @@
|
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"commander": "10.0.1",
|
41
|
-
"@modern-js/codesmith": "2.6.
|
42
|
-
"@modern-js/codesmith-utils": "2.6.
|
41
|
+
"@modern-js/codesmith": "2.6.5",
|
42
|
+
"@modern-js/codesmith-utils": "2.6.5",
|
43
43
|
"@types/jest": "^29",
|
44
44
|
"@types/node": "^14",
|
45
45
|
"jest": "^29",
|
46
46
|
"ts-node": "^10.9.1",
|
47
47
|
"typescript": "^5",
|
48
|
-
"@modern-js/plugin-i18n": "2.60.
|
49
|
-
"@
|
50
|
-
"@
|
51
|
-
"@scripts/
|
48
|
+
"@modern-js/plugin-i18n": "2.60.5",
|
49
|
+
"@modern-js/upgrade-generator": "3.7.1",
|
50
|
+
"@scripts/jest-config": "2.60.5",
|
51
|
+
"@scripts/build": "2.60.5"
|
52
52
|
},
|
53
53
|
"sideEffects": false,
|
54
54
|
"publishConfig": {
|
55
55
|
"registry": "https://registry.npmjs.org/",
|
56
|
-
"access": "public"
|
56
|
+
"access": "public",
|
57
|
+
"provenance": true
|
57
58
|
},
|
58
59
|
"scripts": {
|
59
60
|
"new": "modern-lib new",
|