@stacksjs/actions 0.70.156 → 0.70.157

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.
Files changed (2) hide show
  1. package/dist/bump.js +14 -6
  2. package/package.json +17 -17
package/dist/bump.js CHANGED
@@ -2,7 +2,7 @@ import { execSync, log, parseOptions } from "@stacksjs/cli";
2
2
  import { path as p } from "@stacksjs/path";
3
3
  import { versionBump } from "@stacksjs/bumpx";
4
4
  import { generateChangelog, loadLogsmithConfig } from "@stacksjs/logsmith";
5
- import { existsSync, readFileSync, writeFileSync } from "node:fs";
5
+ import { existsSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
6
6
  import { join, relative } from "node:path";
7
7
  const options = parseOptions(), allowedBumps = new Set(["patch", "minor", "major", "prepatch", "preminor", "premajor", "prerelease"]), rawBump = options?.bump?.toString(), bumpArg = rawBump ? allowedBumps.has(rawBump) || /^\d+\.\d+\.\d+(?:-[\w.]+)?$/.test(rawBump) ? rawBump : null : null;
8
8
  if (rawBump && !bumpArg)
@@ -126,11 +126,19 @@ async function writeChangelog() {
126
126
  await writeChangelog();
127
127
  if (!isDryRun && isFrameworkRelease)
128
128
  pinMetaCoreDeps(nextVersion);
129
- if (!isDryRun && existsSync(p.projectPath("bun.lock")))
130
- await execSync(["bun", "install", "--lockfile-only"], {
131
- cwd: p.projectPath(),
132
- stdin: "inherit"
133
- });
129
+ if (!isDryRun && existsSync(p.projectPath("bun.lock"))) {
130
+ const lockPath = p.projectPath("bun.lock"), previousLock = readFileSync(lockPath);
131
+ unlinkSync(lockPath);
132
+ try {
133
+ await execSync(["bun", "install", "--lockfile-only"], {
134
+ cwd: p.projectPath(),
135
+ stdin: "inherit"
136
+ });
137
+ } catch (error) {
138
+ writeFileSync(lockPath, previousLock);
139
+ throw error;
140
+ }
141
+ }
134
142
  function pinMetaCoreDeps(version) {
135
143
  const metaPath = p.frameworkPath("core/package.json"), meta = JSON.parse(readFileSync(metaPath, "utf-8"));
136
144
  let pinned = 0;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.70.156",
5
+ "version": "0.70.157",
6
6
  "description": "The Stacks actions.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -62,7 +62,7 @@
62
62
  "prepublishOnly": "bun run build"
63
63
  },
64
64
  "dependencies": {
65
- "@stacksjs/config": "0.70.156",
65
+ "@stacksjs/config": "0.70.157",
66
66
  "@stacksjs/bumpx": "^0.2.6",
67
67
  "@stacksjs/bunpress": "^0.1.12",
68
68
  "@stacksjs/logsmith": "^0.2.3",
@@ -70,23 +70,23 @@
70
70
  "@stacksjs/ts-md": "^0.1.1"
71
71
  },
72
72
  "devDependencies": {
73
- "@stacksjs/api": "0.70.156",
74
- "@stacksjs/cli": "0.70.156",
75
- "@stacksjs/config": "0.70.156",
76
- "@stacksjs/database": "0.70.156",
73
+ "@stacksjs/api": "0.70.157",
74
+ "@stacksjs/cli": "0.70.157",
75
+ "@stacksjs/config": "0.70.157",
76
+ "@stacksjs/database": "0.70.157",
77
77
  "@stacksjs/tlsx": "^0.13.2",
78
78
  "better-dx": "^0.2.17",
79
- "@stacksjs/dns": "0.70.156",
80
- "@stacksjs/enums": "0.70.156",
81
- "@stacksjs/env": "0.70.156",
82
- "@stacksjs/error-handling": "0.70.156",
83
- "@stacksjs/logging": "0.70.156",
84
- "@stacksjs/path": "0.70.156",
85
- "@stacksjs/security": "0.70.156",
86
- "@stacksjs/storage": "0.70.156",
87
- "@stacksjs/strings": "0.70.156",
88
- "@stacksjs/utils": "0.70.156",
89
- "@stacksjs/validation": "0.70.156"
79
+ "@stacksjs/dns": "0.70.157",
80
+ "@stacksjs/enums": "0.70.157",
81
+ "@stacksjs/env": "0.70.157",
82
+ "@stacksjs/error-handling": "0.70.157",
83
+ "@stacksjs/logging": "0.70.157",
84
+ "@stacksjs/path": "0.70.157",
85
+ "@stacksjs/security": "0.70.157",
86
+ "@stacksjs/storage": "0.70.157",
87
+ "@stacksjs/strings": "0.70.157",
88
+ "@stacksjs/utils": "0.70.157",
89
+ "@stacksjs/validation": "0.70.157"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "pickier": "^0.1.35"