@comet/upgrade 1.61.0 → 1.63.0
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.
- package/lib/index.js +1 -0
- package/lib/v8/update-swc-dependencies.js +16 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -119,6 +119,7 @@ function getCurrentVersion() {
|
|
|
119
119
|
return semver_1.default.major(version);
|
|
120
120
|
}
|
|
121
121
|
async function updateDependencies(targetVersion, isMajorUpdate = false) {
|
|
122
|
+
await (0, execute_command_util_1.executeCommand)("npm", ["install", "--no-audit", "--loglevel", "error", "--save-exact", `@comet/cli@${targetVersion.version}`]);
|
|
122
123
|
const packages = {
|
|
123
124
|
api: ["@comet/blocks-api", "@comet/cms-api"],
|
|
124
125
|
admin: [
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stage = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const package_json_util_1 = require("../util/package-json.util");
|
|
6
|
+
exports.stage = "before-install";
|
|
7
|
+
async function updateSwcDependencies() {
|
|
8
|
+
if (!(0, fs_1.existsSync)("admin/package.json")) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const packageJson = new package_json_util_1.PackageJson("admin/package.json");
|
|
12
|
+
packageJson.updateDependency("@vitejs/plugin-react-swc", "^3.8.0");
|
|
13
|
+
packageJson.updateDependency("@swc/plugin-emotion", "^8.7.2");
|
|
14
|
+
packageJson.save();
|
|
15
|
+
}
|
|
16
|
+
exports.default = updateSwcDependencies;
|