@cedarjs/cli 1.0.0-canary.12722 → 1.0.0-canary.12728
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.
|
@@ -94,20 +94,9 @@ const handler = async ({ force, install }) => {
|
|
|
94
94
|
{
|
|
95
95
|
title: `Install ${projectPackages.join(", ")}`,
|
|
96
96
|
task: async () => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"yarn",
|
|
101
|
-
[
|
|
102
|
-
"add",
|
|
103
|
-
"-D",
|
|
104
|
-
...isYarnV1 ? ["-W"] : [],
|
|
105
|
-
...projectPackages
|
|
106
|
-
],
|
|
107
|
-
{
|
|
108
|
-
cwd: rwPaths.base
|
|
109
|
-
}
|
|
110
|
-
);
|
|
97
|
+
await execa("yarn", ["add", "-D", ...projectPackages], {
|
|
98
|
+
cwd: rwPaths.base
|
|
99
|
+
});
|
|
111
100
|
}
|
|
112
101
|
}
|
|
113
102
|
],
|
|
@@ -3,7 +3,6 @@ import concurrently from "concurrently";
|
|
|
3
3
|
import execa from "execa";
|
|
4
4
|
import { Listr } from "listr2";
|
|
5
5
|
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
6
|
-
import { getCmdMajorVersion } from "../commands/upgrade.js";
|
|
7
6
|
import { generatePrismaClient } from "../lib/generatePrismaClient.js";
|
|
8
7
|
import { getPaths } from "../lib/index.js";
|
|
9
8
|
const handler = async ({ sides, verbose, prisma, generate }) => {
|
|
@@ -16,12 +15,11 @@ const handler = async ({ sides, verbose, prisma, generate }) => {
|
|
|
16
15
|
});
|
|
17
16
|
const typeCheck = async () => {
|
|
18
17
|
let conclusiveExitCode = 0;
|
|
19
|
-
const yarnVersion = await getCmdMajorVersion("yarn");
|
|
20
18
|
const tscForAllSides = sides.map((side) => {
|
|
21
19
|
const projectDir = path.join(getPaths().base, side);
|
|
22
20
|
return {
|
|
23
21
|
cwd: projectDir,
|
|
24
|
-
command: `yarn
|
|
22
|
+
command: `yarn tsc --noEmit --skipLibCheck`
|
|
25
23
|
};
|
|
26
24
|
});
|
|
27
25
|
const { result } = concurrently(tscForAllSides, {
|
package/dist/commands/upgrade.js
CHANGED
|
@@ -204,17 +204,12 @@ const handler = async ({ dryRun, tag, verbose, dedupe, yes }) => {
|
|
|
204
204
|
await tasks.run();
|
|
205
205
|
};
|
|
206
206
|
async function yarnInstall({ verbose }) {
|
|
207
|
-
const yarnVersion = await getCmdMajorVersion("yarn");
|
|
208
207
|
try {
|
|
209
|
-
await execa(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
stdio: verbose ? "inherit" : "pipe",
|
|
215
|
-
cwd: getPaths().base
|
|
216
|
-
}
|
|
217
|
-
);
|
|
208
|
+
await execa("yarn install", {
|
|
209
|
+
shell: true,
|
|
210
|
+
stdio: verbose ? "inherit" : "pipe",
|
|
211
|
+
cwd: getPaths().base
|
|
212
|
+
});
|
|
218
213
|
} catch (e) {
|
|
219
214
|
throw new Error(
|
|
220
215
|
"Could not finish installation. Please run `yarn install` and then `yarn dedupe`, before continuing"
|
|
@@ -433,31 +428,13 @@ async function refreshPrismaClient(task, { verbose }) {
|
|
|
433
428
|
console.log(c.error(e.message));
|
|
434
429
|
}
|
|
435
430
|
}
|
|
436
|
-
const getCmdMajorVersion = async (command2) => {
|
|
437
|
-
const { stdout } = await execa(command2, ["--version"], {
|
|
438
|
-
cwd: getPaths().base
|
|
439
|
-
});
|
|
440
|
-
if (!SEMVER_REGEX.test(stdout)) {
|
|
441
|
-
throw new Error(`Unable to verify ${command2} version.`);
|
|
442
|
-
}
|
|
443
|
-
const version = stdout.match(SEMVER_REGEX)[0];
|
|
444
|
-
return parseInt(version.split(".")[0]);
|
|
445
|
-
};
|
|
446
431
|
const dedupeDeps = async (task, { verbose }) => {
|
|
447
432
|
try {
|
|
448
|
-
|
|
449
|
-
const baseExecaArgsForDedupe = {
|
|
433
|
+
await execa("yarn dedupe", {
|
|
450
434
|
shell: true,
|
|
451
435
|
stdio: verbose ? "inherit" : "pipe",
|
|
452
436
|
cwd: getPaths().base
|
|
453
|
-
};
|
|
454
|
-
if (yarnVersion > 1) {
|
|
455
|
-
await execa("yarn", ["dedupe"], baseExecaArgsForDedupe);
|
|
456
|
-
} else {
|
|
457
|
-
task.skip(
|
|
458
|
-
"Yarn 1.x doesn't support dedupe directly. Please upgrade yarn or use npx with `npx yarn-deduplicate` manually."
|
|
459
|
-
);
|
|
460
|
-
}
|
|
437
|
+
});
|
|
461
438
|
} catch (e) {
|
|
462
439
|
console.log(c.error(e.message));
|
|
463
440
|
throw new Error(
|
|
@@ -470,7 +447,6 @@ export {
|
|
|
470
447
|
builder,
|
|
471
448
|
command,
|
|
472
449
|
description,
|
|
473
|
-
getCmdMajorVersion,
|
|
474
450
|
handler,
|
|
475
451
|
validateTag
|
|
476
452
|
};
|
package/dist/lib/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { execSync } from "child_process";
|
|
2
1
|
import https from "https";
|
|
3
2
|
import path from "path";
|
|
4
3
|
import * as babel from "@babel/core";
|
|
@@ -375,16 +374,11 @@ const addPackagesTask = async ({
|
|
|
375
374
|
].filter(Boolean)
|
|
376
375
|
];
|
|
377
376
|
} else {
|
|
378
|
-
const stdout = execSync("yarn --version");
|
|
379
|
-
const yarnVersion = stdout.toString().trim();
|
|
380
377
|
installCommand = [
|
|
381
378
|
"yarn",
|
|
382
|
-
[
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
devDependency && "--dev",
|
|
386
|
-
...packagesWithSameRWVersion
|
|
387
|
-
].filter(Boolean)
|
|
379
|
+
["add", devDependency && "--dev", ...packagesWithSameRWVersion].filter(
|
|
380
|
+
Boolean
|
|
381
|
+
)
|
|
388
382
|
];
|
|
389
383
|
}
|
|
390
384
|
return {
|
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.12728+3953ec3e6",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/preset-typescript": "7.27.1",
|
|
34
34
|
"@babel/runtime-corejs3": "7.27.6",
|
|
35
|
-
"@cedarjs/api-server": "1.0.0-canary.
|
|
36
|
-
"@cedarjs/cli-helpers": "1.0.0-canary.
|
|
37
|
-
"@cedarjs/fastify-web": "1.0.0-canary.
|
|
38
|
-
"@cedarjs/internal": "1.0.0-canary.
|
|
39
|
-
"@cedarjs/prerender": "1.0.0-canary.
|
|
40
|
-
"@cedarjs/project-config": "1.0.0-canary.
|
|
41
|
-
"@cedarjs/structure": "1.0.0-canary.
|
|
42
|
-
"@cedarjs/telemetry": "1.0.0-canary.
|
|
43
|
-
"@cedarjs/web-server": "1.0.0-canary.
|
|
35
|
+
"@cedarjs/api-server": "1.0.0-canary.12728",
|
|
36
|
+
"@cedarjs/cli-helpers": "1.0.0-canary.12728",
|
|
37
|
+
"@cedarjs/fastify-web": "1.0.0-canary.12728",
|
|
38
|
+
"@cedarjs/internal": "1.0.0-canary.12728",
|
|
39
|
+
"@cedarjs/prerender": "1.0.0-canary.12728",
|
|
40
|
+
"@cedarjs/project-config": "1.0.0-canary.12728",
|
|
41
|
+
"@cedarjs/structure": "1.0.0-canary.12728",
|
|
42
|
+
"@cedarjs/telemetry": "1.0.0-canary.12728",
|
|
43
|
+
"@cedarjs/web-server": "1.0.0-canary.12728",
|
|
44
44
|
"@listr2/prompt-adapter-enquirer": "2.0.16",
|
|
45
45
|
"@opentelemetry/api": "1.8.0",
|
|
46
46
|
"@opentelemetry/core": "1.22.0",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "3953ec3e6653502060786ab8ea1746bafa585bf2"
|
|
106
106
|
}
|