@crossdelta/platform-sdk 0.26.4 → 0.26.5
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to `@crossdelta/platform-sdk` will be documented in this fil
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.26.5] - 2026-10-23
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **The workspace template's `publish-packages.yml` queues its runs and skips a version npm already
|
|
12
|
+
holds.** A `concurrency` group (`publish-packages`, no cancelling) stops two merges in a row from
|
|
13
|
+
publishing the same version at once, and the publish step reads `npm view "<name>@<version>"`
|
|
14
|
+
right before `npm publish`: a hit ends the step with a skip line, any other failure of `npm view`
|
|
15
|
+
publishes as before (the read ignores setup-node's placeholder token). On a push the matrix now
|
|
16
|
+
checks every public package against npm instead of only the changed ones: a queued run can be
|
|
17
|
+
replaced by a newer one, and the replaced push's version bump would otherwise never publish.
|
|
18
|
+
|
|
8
19
|
## [0.26.4] - 2026-10-21
|
|
9
20
|
|
|
10
21
|
### Changed
|
|
@@ -16,6 +16,11 @@ on:
|
|
|
16
16
|
default: all
|
|
17
17
|
required: true
|
|
18
18
|
|
|
19
|
+
# Runs queue one behind the other: two merges in a row must not publish the same version at once.
|
|
20
|
+
concurrency:
|
|
21
|
+
group: publish-packages
|
|
22
|
+
cancel-in-progress: false
|
|
23
|
+
|
|
19
24
|
# id-token: write only where it is used: the publish job sets it itself.
|
|
20
25
|
permissions:
|
|
21
26
|
contents: read
|
|
@@ -32,38 +37,18 @@ jobs:
|
|
|
32
37
|
with:
|
|
33
38
|
fetch-depth: 0
|
|
34
39
|
|
|
35
|
-
- name: Detect changed packages
|
|
36
|
-
id: changed
|
|
37
|
-
uses: tj-actions/changed-files@v47
|
|
38
|
-
with:
|
|
39
|
-
json: true
|
|
40
|
-
safe_output: false
|
|
41
|
-
files: packages/*/**
|
|
42
|
-
|
|
43
40
|
- name: Build package matrix
|
|
44
41
|
id: set-matrix
|
|
45
42
|
env:
|
|
46
43
|
INPUT_PACKAGE: ${{ github.event.inputs.package || '' }}
|
|
47
|
-
CHANGED_FILES: ${{ steps.changed.outputs.all_changed_files }}
|
|
48
44
|
run: |
|
|
49
45
|
declare -a packages=()
|
|
50
|
-
declare -A changed_packages
|
|
51
46
|
|
|
52
47
|
# Compare semver: true if $1 > $2
|
|
53
48
|
version_gt() {
|
|
54
49
|
[ "$(printf '%s\n' "$1" "$2" | sort -V | tail -1)" = "$1" ] && [ "$1" != "$2" ]
|
|
55
50
|
}
|
|
56
51
|
|
|
57
|
-
# Extract package names from changed file paths (e.g. packages/platform-sdk/src/foo.ts → platform-sdk)
|
|
58
|
-
if [ "${{ github.event_name }}" == "push" ] && [ -n "$CHANGED_FILES" ]; then
|
|
59
|
-
CLEAN_FILES=$(echo "$CHANGED_FILES" | sed 's/\\"/"/g')
|
|
60
|
-
for file in $(echo "$CLEAN_FILES" | jq -r '.[]' 2>/dev/null); do
|
|
61
|
-
if [[ $file =~ ^packages/([^/]+)/ ]]; then
|
|
62
|
-
changed_packages["${BASH_REMATCH[1]}"]=1
|
|
63
|
-
fi
|
|
64
|
-
done
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
52
|
# Iterate all packages
|
|
68
53
|
for dir in packages/*/; do
|
|
69
54
|
[ ! -f "$dir/package.json" ] && continue
|
|
@@ -76,17 +61,13 @@ jobs:
|
|
|
76
61
|
[ "$is_private" = "true" ] && continue
|
|
77
62
|
[ -z "$name" ] && continue
|
|
78
63
|
|
|
79
|
-
#
|
|
80
|
-
|
|
81
|
-
if [ -n "$INPUT_PACKAGE" ]; then
|
|
82
|
-
|
|
83
|
-
else
|
|
84
|
-
[ -n "${changed_packages[$slug]}" ] && should_include=true
|
|
64
|
+
# A dispatch may name one package; a push checks every public package. A queued run can be
|
|
65
|
+
# replaced by a newer one, so a changed-files delta would lose the bump of the replaced push.
|
|
66
|
+
if [ -n "$INPUT_PACKAGE" ] && [ "$INPUT_PACKAGE" != "all" ] && [ "$INPUT_PACKAGE" != "$slug" ]; then
|
|
67
|
+
continue
|
|
85
68
|
fi
|
|
86
|
-
|
|
87
|
-
[ "$should_include" = true ] || continue
|
|
88
69
|
|
|
89
|
-
# Skip if local version <= npm version
|
|
70
|
+
# Skip if local version <= npm version (this check, not a changed-files filter, selects what publishes)
|
|
90
71
|
local_ver=$(jq -r '.version' "$dir/package.json")
|
|
91
72
|
npm_ver=$(npm view "$name" version 2>/dev/null || echo "0.0.0")
|
|
92
73
|
if ! version_gt "$local_ver" "$npm_ver"; then
|
|
@@ -214,7 +195,7 @@ jobs:
|
|
|
214
195
|
# The kit is published for other people's repositories: nothing of this one may ride along. The check packs
|
|
215
196
|
# the package as npm receives it and scans every text file against the kit's built-in patterns.
|
|
216
197
|
- name: Setup Bun for the leak check
|
|
217
|
-
if: matrix.package.name == 'jackherd'
|
|
198
|
+
if: matrix.package.name == 'jackherd'
|
|
218
199
|
# Pinned to a commit: this job holds id-token: write, which npm Trusted Publishing accepts.
|
|
219
200
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
220
201
|
with:
|
|
@@ -225,11 +206,6 @@ jobs:
|
|
|
225
206
|
working-directory: ${{ matrix.package.dir }}
|
|
226
207
|
run: bun scripts/check-package-leaks.ts
|
|
227
208
|
|
|
228
|
-
- name: Leak check on the agent-kit shell tarball
|
|
229
|
-
if: matrix.package.name == '@crossdelta/agent-kit'
|
|
230
|
-
working-directory: ${{ matrix.package.dir }}
|
|
231
|
-
run: bun ../jackherd/scripts/check-package-leaks.ts .
|
|
232
|
-
|
|
233
209
|
- name: Publish to npm
|
|
234
210
|
working-directory: ${{ matrix.package.dir }}
|
|
235
211
|
run: |
|
|
@@ -242,6 +218,13 @@ jobs:
|
|
|
242
218
|
(if .peerDependencies[$n] then .peerDependencies[$n] = $v else . end)
|
|
243
219
|
' package.json > "$tmp" && mv "$tmp" package.json
|
|
244
220
|
done
|
|
221
|
+
NAME=$(jq -r '.name' package.json)
|
|
245
222
|
VERSION=$(jq -r '.version' package.json)
|
|
246
|
-
|
|
223
|
+
# Only a hit skips; any other npm view failure (network) falls through to the publish.
|
|
224
|
+
# Empty NODE_AUTH_TOKEN: setup-node's placeholder token must not turn a public read into a 401.
|
|
225
|
+
if [ "$(NODE_AUTH_TOKEN= npm view --registry=https://registry.npmjs.org "$NAME@$VERSION" version 2>/dev/null)" = "$VERSION" ]; then
|
|
226
|
+
echo "⏭️ $NAME@$VERSION is on npm already — skipping"
|
|
227
|
+
exit 0
|
|
228
|
+
fi
|
|
229
|
+
echo "📦 Publishing $NAME@$VERSION"
|
|
247
230
|
npm publish --access=public --ignore-scripts
|