@cedarjs/cli 1.0.0-canary.12394 → 1.0.0-canary.12396
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/dist/commands/upgrade.js +21 -19
- package/package.json +11 -11
package/dist/commands/upgrade.js
CHANGED
|
@@ -43,8 +43,8 @@ const builder = (yargs) => {
|
|
|
43
43
|
type: "boolean"
|
|
44
44
|
}).epilogue(
|
|
45
45
|
`Also see the ${terminalLink(
|
|
46
|
-
"
|
|
47
|
-
"https://
|
|
46
|
+
"CedarJS CLI Reference for the upgrade command",
|
|
47
|
+
"https://cedarjs.com/docs/cli-commands#upgrade"
|
|
48
48
|
)}.
|
|
49
49
|
And the ${terminalLink(
|
|
50
50
|
"GitHub releases page",
|
|
@@ -56,11 +56,11 @@ const SEMVER_REGEX = /(?<=^v?|\sv?)(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*
|
|
|
56
56
|
const isValidSemver = (string) => {
|
|
57
57
|
return SEMVER_REGEX.test(string);
|
|
58
58
|
};
|
|
59
|
-
const
|
|
59
|
+
const isValidCedarJSTag = (tag) => {
|
|
60
60
|
return ["rc", "canary", "latest", "next", "experimental"].includes(tag);
|
|
61
61
|
};
|
|
62
62
|
const validateTag = (tag) => {
|
|
63
|
-
const isTagValid = isValidSemver(tag) ||
|
|
63
|
+
const isTagValid = isValidSemver(tag) || isValidCedarJSTag(tag);
|
|
64
64
|
if (!isTagValid) {
|
|
65
65
|
throw new Error(
|
|
66
66
|
c.error(
|
|
@@ -91,7 +91,7 @@ const handler = async ({ dryRun, tag, verbose, dedupe, yes }) => {
|
|
|
91
91
|
const prompt = task.prompt(ListrEnquirerPromptAdapter);
|
|
92
92
|
const proceed = await prompt.run({
|
|
93
93
|
type: "Confirm",
|
|
94
|
-
message: "This will upgrade your
|
|
94
|
+
message: "This will upgrade your CedarJS project to the latest version. Do you want to proceed?",
|
|
95
95
|
initial: "Y",
|
|
96
96
|
default: "(Yes/no)",
|
|
97
97
|
format: function(value) {
|
|
@@ -113,7 +113,7 @@ const handler = async ({ dryRun, tag, verbose, dedupe, yes }) => {
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
title: "Updating your CedarJS version",
|
|
116
|
-
task: (ctx) =>
|
|
116
|
+
task: (ctx) => updateCedarJSDepsForAllSides(ctx, { dryRun, verbose }),
|
|
117
117
|
enabled: (ctx) => !!ctx.versionToUpgradeTo
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -159,24 +159,26 @@ const handler = async ({ dryRun, tag, verbose, dedupe, yes }) => {
|
|
|
159
159
|
`
|
|
160
160
|
];
|
|
161
161
|
if ([void 0, "latest", "rc"].includes(tag)) {
|
|
162
|
+
const ghReleasesLink = terminalLink(
|
|
163
|
+
`GitHub Release notes`,
|
|
164
|
+
`https://github.com/cedarjs/cedar/releases`
|
|
165
|
+
// intentionally not linking to specific version
|
|
166
|
+
);
|
|
167
|
+
const discordLink = terminalLink(
|
|
168
|
+
`Discord`,
|
|
169
|
+
`https://cedarjs.com/discord`
|
|
170
|
+
);
|
|
162
171
|
messageSections.push(
|
|
163
|
-
` Please review the release notes for any manual steps:
|
|
164
|
-
\u2756 ${
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
)}
|
|
168
|
-
\u2756 ${terminalLink(
|
|
169
|
-
`GitHub Release notes`,
|
|
170
|
-
`https://github.com/cedarjs/cedar/releases`
|
|
171
|
-
// intentionally not linking to specific version
|
|
172
|
-
)}
|
|
173
|
-
|
|
172
|
+
` Please review the release notes for any manual steps:
|
|
173
|
+
\u2756 ${ghReleasesLink}
|
|
174
|
+
Join our Discord community if you have any questions or need support:
|
|
175
|
+
\u2756 ${discordLink}
|
|
174
176
|
`
|
|
175
177
|
);
|
|
176
178
|
}
|
|
177
179
|
if (tag) {
|
|
178
180
|
const additionalMessages = [];
|
|
179
|
-
if (!getConfig().notifications.versionUpdates.includes(tag) &&
|
|
181
|
+
if (!getConfig().notifications.versionUpdates.includes(tag) && isValidCedarJSTag(tag)) {
|
|
180
182
|
additionalMessages.push(
|
|
181
183
|
` \u2756 You may want to update your redwood.toml config so that \`notifications.versionUpdates\` includes "${tag}"
|
|
182
184
|
`
|
|
@@ -279,7 +281,7 @@ function updatePackageJsonVersion(pkgPath, version, { dryRun, verbose }) {
|
|
|
279
281
|
);
|
|
280
282
|
}
|
|
281
283
|
}
|
|
282
|
-
function
|
|
284
|
+
function updateCedarJSDepsForAllSides(ctx, options) {
|
|
283
285
|
if (!ctx.versionToUpgradeTo) {
|
|
284
286
|
throw new Error("Failed to upgrade");
|
|
285
287
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.12396+e00256bad",
|
|
4
4
|
"description": "The Redwood Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime-corejs3": "7.27.6",
|
|
32
|
-
"@cedarjs/api-server": "1.0.0-canary.
|
|
33
|
-
"@cedarjs/cli-helpers": "1.0.0-canary.
|
|
34
|
-
"@cedarjs/fastify-web": "1.0.0-canary.
|
|
35
|
-
"@cedarjs/internal": "1.0.0-canary.
|
|
36
|
-
"@cedarjs/prerender": "1.0.0-canary.
|
|
37
|
-
"@cedarjs/project-config": "1.0.0-canary.
|
|
38
|
-
"@cedarjs/structure": "1.0.0-canary.
|
|
39
|
-
"@cedarjs/telemetry": "1.0.0-canary.
|
|
40
|
-
"@cedarjs/web-server": "1.0.0-canary.
|
|
32
|
+
"@cedarjs/api-server": "1.0.0-canary.12396",
|
|
33
|
+
"@cedarjs/cli-helpers": "1.0.0-canary.12396",
|
|
34
|
+
"@cedarjs/fastify-web": "1.0.0-canary.12396",
|
|
35
|
+
"@cedarjs/internal": "1.0.0-canary.12396",
|
|
36
|
+
"@cedarjs/prerender": "1.0.0-canary.12396",
|
|
37
|
+
"@cedarjs/project-config": "1.0.0-canary.12396",
|
|
38
|
+
"@cedarjs/structure": "1.0.0-canary.12396",
|
|
39
|
+
"@cedarjs/telemetry": "1.0.0-canary.12396",
|
|
40
|
+
"@cedarjs/web-server": "1.0.0-canary.12396",
|
|
41
41
|
"@listr2/prompt-adapter-enquirer": "2.0.12",
|
|
42
42
|
"@opentelemetry/api": "1.8.0",
|
|
43
43
|
"@opentelemetry/core": "1.22.0",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"typescript": "5.6.2",
|
|
97
97
|
"vitest": "3.2.4"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "e00256bad9ae7e7fc57742a8b26d5e7baf12faa6"
|
|
100
100
|
}
|