@crossdelta/platform-sdk 0.26.2 → 0.26.3

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,15 @@ 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.3] - 2026-10-21
9
+
10
+ ### Changed
11
+ - **The workspace template's PR tests run only for affected packages.** `lint-and-tests.yml` runs
12
+ `turbo run test --affected` against the PR's base (the merge commit's first parent, checkout depth
13
+ 2). A change to a root file every package reads (`package.json`, `bunfig.toml`, `tsconfig.json`,
14
+ `.npmrc`, `.bun-version`, `patches/`, the workflow itself or `setup-bun-install`) still tests every
15
+ package, because `--affected` does not count them. A PR that touches no package runs no task and passes.
16
+
8
17
  ## [0.26.1] - 2026-10-17
9
18
 
10
19
  ### Fixed
@@ -40,8 +40,12 @@ jobs:
40
40
  timeout-minutes: 20
41
41
  env:
42
42
  steps:
43
+ # A pull_request run checks out the PR merged into its base; depth 2 brings that merge
44
+ # commit's first parent, the base, which the test scope is diffed against.
43
45
  - name: Checkout code
44
46
  uses: actions/checkout@v6
47
+ with:
48
+ fetch-depth: 2
45
49
 
46
50
  - name: Setup Bun and install dependencies
47
51
  uses: ./.github/actions/setup-bun-install
@@ -50,8 +54,35 @@ jobs:
50
54
  cache-key: bun-v4-$\{{ runner.os }}-$\{{ hashFiles('bun.lock', 'bunfig.toml') }}
51
55
  cache-restore-keys: bun-v4-$\{{ runner.os }}-
52
56
 
57
+ # `turbo run test --affected` tests the changed packages and their dependents, all of them
58
+ # for a turbo.json or lockfile change. It ignores the root files every package reads, though:
59
+ # an override, the Bun version or the test script in the root package.json selects nothing.
60
+ # Those paths test every package. A PR that touches no package runs no task and passes.
61
+ - name: Decide test scope
62
+ id: test-scope
63
+ env:
64
+ GLOBAL_PATHS: package.json bunfig.toml tsconfig.json .npmrc .bun-version patches/ .github/workflows/lint-and-tests.yml .github/actions/setup-bun-install/
65
+ run: |
66
+ # shellcheck disable=SC2086 # GLOBAL_PATHS is a space-separated pathspec list
67
+ CHANGED=$(git diff --name-only HEAD^1 HEAD -- $GLOBAL_PATHS | head -1)
68
+ if [ -n "$CHANGED" ]; then
69
+ echo "::notice::${CHANGED} changed: testing every package."
70
+ echo "affected_only=false" >> "$GITHUB_OUTPUT"
71
+ else
72
+ echo "affected_only=true" >> "$GITHUB_OUTPUT"
73
+ fi
74
+
53
75
  - name: Run Tests
54
- run: bun run --if-present test
76
+ env:
77
+ AFFECTED_ONLY: $\{{ steps.test-scope.outputs.affected_only }}
78
+ TURBO_SCM_BASE: HEAD^1
79
+ TURBO_SCM_HEAD: HEAD
80
+ run: |
81
+ if [ "$AFFECTED_ONLY" = "true" ]; then
82
+ bun run --if-present test --affected
83
+ else
84
+ bun run --if-present test
85
+ fi
55
86
 
56
87
  e2e:
57
88
  runs-on: ubuntu-latest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossdelta/platform-sdk",
3
- "version": "0.26.2",
3
+ "version": "0.26.3",
4
4
  "description": "Platform toolkit for event-driven microservices — keeping code and infrastructure in lockstep.",
5
5
  "keywords": [
6
6
  "cli",