@cedarjs/cli 1.0.0-canary.13059 → 1.0.0-canary.13061

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.
@@ -529,7 +529,7 @@ async function runPreUpgradeScripts(ctx, task, { verbose, force }) {
529
529
  return;
530
530
  }
531
531
  const checkLevels = [];
532
- if (parsed) {
532
+ if (parsed && !parsed.prerelease.length) {
533
533
  checkLevels.push({
534
534
  id: "exact",
535
535
  candidates: [`${version}.ts`, `${version}/index.ts`]
@@ -545,10 +545,13 @@ async function runPreUpgradeScripts(ctx, task, { verbose, force }) {
545
545
  id: "minor",
546
546
  candidates: [`${parsed.major}.x.ts`, `${parsed.major}.x/index.ts`]
547
547
  });
548
- } else {
548
+ } else if (parsed && parsed.prerelease.length > 0) {
549
549
  checkLevels.push({
550
550
  id: "tag",
551
- candidates: [`${version}.ts`, `${version}/index.ts`]
551
+ candidates: [
552
+ `${parsed.prerelease[0]}.ts`,
553
+ `${parsed.prerelease[0]}/index.ts`
554
+ ]
552
555
  });
553
556
  }
554
557
  const scriptsToRun = [];
@@ -574,7 +577,7 @@ async function runPreUpgradeScripts(ctx, task, { verbose, force }) {
574
577
  // realpath: https://github.com/e18e/ecosystem-issues/issues/168
575
578
  path.join(fs.realpathSync(os.tmpdir()), "cedar-upgrade-")
576
579
  );
577
- const scriptPath = path.join(tempDir, "script.ts");
580
+ const scriptPath = path.join(tempDir, "script.mts");
578
581
  const isDirectoryScript = scriptName.includes("/");
579
582
  if (isDirectoryScript) {
580
583
  const dirName = scriptName.split("/")[0];
@@ -643,14 +646,14 @@ async function runPreUpgradeScripts(ctx, task, { verbose, force }) {
643
646
  dependencies: {}
644
647
  })
645
648
  );
646
- await execa("yarn", ["add", ...deps], { cwd: tempDir });
649
+ await execa("npm", ["install", ...deps], { cwd: tempDir });
647
650
  }
648
651
  task.output = `Running pre-upgrade script: ${scriptName}...`;
649
652
  let shouldCleanup = true;
650
653
  try {
651
654
  const { stdout } = await execa(
652
655
  "node",
653
- ["script.ts", "--verbose", verbose, "--force", force],
656
+ ["script.mts", "--verbose", verbose, "--force", force],
654
657
  { cwd: tempDir }
655
658
  );
656
659
  if (stdout) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "1.0.0-canary.13059+116fecc5a",
3
+ "version": "1.0.0-canary.13061+d491a22a5",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,15 +31,15 @@
31
31
  "dependencies": {
32
32
  "@babel/preset-typescript": "7.28.5",
33
33
  "@babel/runtime-corejs3": "7.28.4",
34
- "@cedarjs/api-server": "1.0.0-canary.13059",
35
- "@cedarjs/cli-helpers": "1.0.0-canary.13059",
36
- "@cedarjs/fastify-web": "1.0.0-canary.13059",
37
- "@cedarjs/internal": "1.0.0-canary.13059",
38
- "@cedarjs/prerender": "1.0.0-canary.13059",
39
- "@cedarjs/project-config": "1.0.0-canary.13059",
40
- "@cedarjs/structure": "1.0.0-canary.13059",
41
- "@cedarjs/telemetry": "1.0.0-canary.13059",
42
- "@cedarjs/web-server": "1.0.0-canary.13059",
34
+ "@cedarjs/api-server": "1.0.0-canary.13061",
35
+ "@cedarjs/cli-helpers": "1.0.0-canary.13061",
36
+ "@cedarjs/fastify-web": "1.0.0-canary.13061",
37
+ "@cedarjs/internal": "1.0.0-canary.13061",
38
+ "@cedarjs/prerender": "1.0.0-canary.13061",
39
+ "@cedarjs/project-config": "1.0.0-canary.13061",
40
+ "@cedarjs/structure": "1.0.0-canary.13061",
41
+ "@cedarjs/telemetry": "1.0.0-canary.13061",
42
+ "@cedarjs/web-server": "1.0.0-canary.13061",
43
43
  "@listr2/prompt-adapter-enquirer": "2.0.16",
44
44
  "@opentelemetry/api": "1.8.0",
45
45
  "@opentelemetry/core": "1.22.0",
@@ -101,5 +101,5 @@
101
101
  "publishConfig": {
102
102
  "access": "public"
103
103
  },
104
- "gitHead": "116fecc5afb244a5d314e0af34e26d98cee3e483"
104
+ "gitHead": "d491a22a511b6070b06c853ce94889955bcbdbaf"
105
105
  }