ferrflow 5.18.0 → 5.22.2

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/bin/ferrflow.js CHANGED
@@ -4,6 +4,7 @@ import { existsSync } from "fs";
4
4
  import { join, dirname } from "path";
5
5
  import { fileURLToPath } from "url";
6
6
  import { createRequire } from "module";
7
+ import { constants } from "os";
7
8
 
8
9
  const __dirname = dirname(fileURLToPath(import.meta.url));
9
10
  const require = createRequire(import.meta.url);
@@ -14,6 +15,8 @@ const PLATFORMS = {
14
15
  "darwin-x64": "@ferrflow/darwin-x64",
15
16
  "darwin-arm64": "@ferrflow/darwin-arm64",
16
17
  "win32-x64": "@ferrflow/win32-x64",
18
+ "win32-arm64": "@ferrflow/win32-arm64",
19
+ "linux-arm": "@ferrflow/linux-arm",
17
20
  };
18
21
 
19
22
  function getBinaryPath() {
@@ -43,4 +46,11 @@ function getBinaryPath() {
43
46
 
44
47
  const binary = getBinaryPath();
45
48
  const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
49
+ if (result.error) {
50
+ console.error(`ferrflow: failed to launch ${binary}: ${result.error.message}`);
51
+ process.exit(1);
52
+ }
53
+ if (result.signal) {
54
+ process.exit(128 + (constants.signals[result.signal] ?? 0));
55
+ }
46
56
  process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -3,6 +3,12 @@
3
3
  "ferrflow": "./bin/ferrflow.js"
4
4
  },
5
5
  "description": "Universal semantic versioning for monorepos and classic repos",
6
+ "engines": {
7
+ "node": ">=18"
8
+ },
9
+ "files": [
10
+ "bin"
11
+ ],
6
12
  "homepage": "https://ferrflow.com",
7
13
  "keywords": [
8
14
  "semver",
@@ -14,16 +20,18 @@
14
20
  "license": "MPL-2.0",
15
21
  "name": "ferrflow",
16
22
  "optionalDependencies": {
17
- "@ferrflow/darwin-arm64": "5.18.0",
18
- "@ferrflow/darwin-x64": "5.18.0",
19
- "@ferrflow/linux-arm64": "5.18.0",
20
- "@ferrflow/linux-x64": "5.18.0",
21
- "@ferrflow/win32-x64": "5.18.0"
23
+ "@ferrflow/darwin-arm64": "5.22.2",
24
+ "@ferrflow/darwin-x64": "5.22.2",
25
+ "@ferrflow/linux-arm": "5.22.2",
26
+ "@ferrflow/linux-arm64": "5.22.2",
27
+ "@ferrflow/linux-x64": "5.22.2",
28
+ "@ferrflow/win32-arm64": "5.22.2",
29
+ "@ferrflow/win32-x64": "5.22.2"
22
30
  },
23
31
  "repository": {
24
32
  "type": "git",
25
33
  "url": "git+https://github.com/FerrLabs/FerrFlow.git"
26
34
  },
27
35
  "type": "module",
28
- "version": "5.18.0"
36
+ "version": "5.22.2"
29
37
  }
@@ -1,16 +0,0 @@
1
- {
2
- "cpu": [
3
- "arm64"
4
- ],
5
- "description": "FerrFlow macOS arm64 binary",
6
- "license": "MPL-2.0",
7
- "name": "@ferrflow/darwin-arm64",
8
- "os": [
9
- "darwin"
10
- ],
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/FerrLabs/FerrFlow.git"
14
- },
15
- "version": "5.18.0"
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "cpu": [
3
- "x64"
4
- ],
5
- "description": "FerrFlow macOS x64 binary",
6
- "license": "MPL-2.0",
7
- "name": "@ferrflow/darwin-x64",
8
- "os": [
9
- "darwin"
10
- ],
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/FerrLabs/FerrFlow.git"
14
- },
15
- "version": "5.18.0"
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "cpu": [
3
- "arm64"
4
- ],
5
- "description": "FerrFlow Linux arm64 binary",
6
- "license": "MPL-2.0",
7
- "name": "@ferrflow/linux-arm64",
8
- "os": [
9
- "linux"
10
- ],
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/FerrLabs/FerrFlow.git"
14
- },
15
- "version": "5.18.0"
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "cpu": [
3
- "x64"
4
- ],
5
- "description": "FerrFlow Linux x64 binary",
6
- "license": "MPL-2.0",
7
- "name": "@ferrflow/linux-x64",
8
- "os": [
9
- "linux"
10
- ],
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/FerrLabs/FerrFlow.git"
14
- },
15
- "version": "5.18.0"
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "cpu": [
3
- "x64"
4
- ],
5
- "description": "FerrFlow Windows x64 binary",
6
- "license": "MPL-2.0",
7
- "name": "@ferrflow/win32-x64",
8
- "os": [
9
- "win32"
10
- ],
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/FerrLabs/FerrFlow.git"
14
- },
15
- "version": "5.18.0"
16
- }
@@ -1,34 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- VERSION="${1:?Usage: publish-wasm.sh <version>}"
5
-
6
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
7
- REPO_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")"
8
- WASM_DIR="${REPO_DIR}/ferrflow-wasm"
9
-
10
- echo "Building @ferrlabs/ferrflow-wasm@${VERSION}..."
11
-
12
- cd "$WASM_DIR"
13
- wasm-pack build --target bundler --scope ferrlabs
14
-
15
- cd pkg
16
-
17
- node -e "
18
- const fs = require('fs');
19
- const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
20
- pkg.name = '@ferrlabs/ferrflow-wasm';
21
- pkg.version = '${VERSION}';
22
- pkg.repository = {
23
- type: 'git',
24
- url: 'git+https://github.com/FerrLabs/FerrFlow.git',
25
- directory: 'ferrflow-wasm'
26
- };
27
- pkg.homepage = 'https://ferrflow.com';
28
- fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
29
- "
30
-
31
- echo "Publishing @ferrlabs/ferrflow-wasm@${VERSION}..."
32
- npm publish --access public
33
-
34
- echo "Published @ferrlabs/ferrflow-wasm@${VERSION}"
@@ -1,83 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- VERSION="${1:?Usage: publish.sh <version>}"
5
-
6
- # Map: archive name -> platform dir
7
- declare -A ARCHIVES=(
8
- ["ferrflow-linux-x64.tar.gz"]="linux-x64"
9
- ["ferrflow-linux-arm64.tar.gz"]="linux-arm64"
10
- ["ferrflow-darwin-x64.tar.gz"]="darwin-x64"
11
- ["ferrflow-darwin-arm64.tar.gz"]="darwin-arm64"
12
- ["ferrflow-windows-x64.zip"]="win32-x64"
13
- )
14
-
15
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
16
- NPM_DIR="$(dirname "$SCRIPT_DIR")"
17
- WORK_DIR="$(mktemp -d)"
18
-
19
- echo "Downloading release binaries for v${VERSION}..."
20
-
21
- for archive in "${!ARCHIVES[@]}"; do
22
- platform="${ARCHIVES[$archive]}"
23
- echo " ${archive} -> @ferrflow/${platform}"
24
-
25
- gh release download "v${VERSION}" -p "$archive" -D "$WORK_DIR"
26
-
27
- # Prepare platform package
28
- pkg_dir="${WORK_DIR}/packages/${platform}"
29
- mkdir -p "${pkg_dir}/bin"
30
-
31
- # Extract binary
32
- if [[ "$archive" == *.zip ]]; then
33
- unzip -q "${WORK_DIR}/${archive}" -d "${pkg_dir}/bin/"
34
- else
35
- tar xzf "${WORK_DIR}/${archive}" -C "${pkg_dir}/bin/"
36
- fi
37
-
38
- # Copy package.json, README, and LICENSE
39
- cp "${NPM_DIR}/platforms/${platform}/package.json" "${pkg_dir}/package.json"
40
- cp "${NPM_DIR}/../README.md" "${pkg_dir}/README.md"
41
- cp "${NPM_DIR}/../LICENSE" "${pkg_dir}/LICENSE" 2>/dev/null || true
42
- cd "$pkg_dir"
43
- npm version "$VERSION" --no-git-tag-version --allow-same-version
44
- npm publish --access public
45
- cd - > /dev/null
46
- done
47
-
48
- # Publish main wrapper
49
- echo "Publishing main package ferrflow@${VERSION}..."
50
- cp "${NPM_DIR}/../README.md" "${NPM_DIR}/README.md"
51
- cp "${NPM_DIR}/../LICENSE" "${NPM_DIR}/LICENSE" 2>/dev/null || true
52
- cd "$NPM_DIR"
53
-
54
- # Update version and optionalDependencies versions
55
- npm version "$VERSION" --no-git-tag-version --allow-same-version
56
-
57
- node -e "
58
- const pkg = JSON.parse(require('fs').readFileSync('package.json', 'utf8'));
59
- for (const dep of Object.keys(pkg.optionalDependencies || {})) {
60
- pkg.optionalDependencies[dep] = '${VERSION}';
61
- }
62
- require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
63
- "
64
-
65
- npm publish --access public
66
-
67
- echo "Publishing brand alias @ferrlabs/ferrflow@${VERSION}..."
68
- ALIAS_DIR="$(mktemp -d)"
69
- cp -a "${NPM_DIR}/." "${ALIAS_DIR}/"
70
- cd "$ALIAS_DIR"
71
- node -e "
72
- const pkg = JSON.parse(require('fs').readFileSync('package.json', 'utf8'));
73
- pkg.name = '@ferrlabs/ferrflow';
74
- require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
75
- "
76
- npm publish --access public
77
- cd - > /dev/null
78
- rm -rf "$ALIAS_DIR"
79
-
80
- echo "Published ferrflow@${VERSION} (+ @ferrlabs/ferrflow alias) with all platform packages"
81
-
82
- # Cleanup
83
- rm -rf "$WORK_DIR"