@_linked/cli 1.7.0 → 1.8.1

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.
@@ -15,8 +15,20 @@ jobs:
15
15
  contents: write
16
16
  pull-requests: write
17
17
  steps:
18
+ # Author the changesets "Version Packages" PR as the org release App (not the default
19
+ # GITHUB_TOKEN) so its CI runs without a manual "Approve and run" gate. Requires the org
20
+ # App installed on this repo + org secrets RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY.
21
+ - name: Generate GitHub App token
22
+ id: app-token
23
+ uses: actions/create-github-app-token@v2
24
+ with:
25
+ app-id: ${{ secrets.RELEASE_APP_ID }}
26
+ private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
27
+
18
28
  - name: Checkout
19
29
  uses: actions/checkout@v4
30
+ with:
31
+ token: ${{ steps.app-token.outputs.token }}
20
32
 
21
33
  - name: Setup Node.js
22
34
  uses: actions/setup-node@v4
@@ -37,6 +49,6 @@ jobs:
37
49
  title: 'chore: release'
38
50
  commit: 'chore: release'
39
51
  env:
40
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52
+ GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
41
53
  NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
42
54
  NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#54](https://github.com/linked-cm/cli/pull/54) [`5d475c7`](https://github.com/linked-cm/cli/commit/5d475c718a5435ebf8d9ce0db358ebcb84a91642) Thanks [@flyon](https://github.com/flyon)! - `setup-publish` now generates publish workflows that author the changesets "Version Packages"
8
+ PR (and, for dual-branch, the post-release sync) via an org **GitHub App token**
9
+ (`actions/create-github-app-token`, org secrets `RELEASE_APP_ID` / `RELEASE_APP_PRIVATE_KEY`)
10
+ instead of the default `GITHUB_TOKEN` — so those PRs' checks run without a manual "Approve and
11
+ run" gate. The dual-branch template's version-only `sync-version-to-dev` job is replaced by a full
12
+ **back-merge `main -> dev`** (carrying the version bump, CHANGELOG, and changeset deletions, so dev
13
+ never re-releases consumed changesets). `--configure-github` also enables "Allow auto-merge" so the
14
+ back-merge PR self-merges once checks pass.
15
+
16
+ ## 1.8.0
17
+
18
+ ### Minor Changes
19
+
20
+ - [#52](https://github.com/linked-cm/cli/pull/52) [`3b5d645`](https://github.com/linked-cm/cli/commit/3b5d645ac6f10851bc3aee055a9f312186fbf606) Thanks [@flyon](https://github.com/flyon)! - Four scaffolding/runtime fixes from first external-user feedback:
21
+ - **Template `src/package.ts` now imports from `@_linked/react/package`** instead of `@_linked/core/utils/Package`. Core's `LinkedPackageObject` doesn't expose `linkedComponent` / `linkedSetComponent` (they're React-only) — the old import caused `tsc` to error on a fresh scaffold the moment a user added their first shape. Requires `@_linked/react@>=1.3.1` (which fixed the recursion in `linkedPackage`).
22
+ - **`linked` CLI swapped `tsx` for a custom esbuild-based ESM loader** for TS/TSX user code. tsx hardcodes esbuild's default decorator emit (TC39 standard) and ignores `experimentalDecorators` in the user's tsconfig — silently breaking `@literalProperty` / `@objectProperty` / `@linkedShape` everywhere, since `@_linked/core` ships legacy-signature `(target, propertyKey, descriptor)` decorators. The new loader at `lib/esm/loaders/ts-loader.mjs` reads the user's `tsconfig.json`, force-enables `experimentalDecorators: true` in the esbuild `tsconfigRaw`, preserves import-attribute (`with { type: 'json' }`) syntax, and backfills extension-less relative imports. Net effect: legacy decorator emit just works, no esbuild-bundle workaround needed for scripts.
23
+ - **`create-app` now writes an empty `yarn.lock` in the new app**. Without it, Yarn climbs ancestor dirs looking for a project root and may decide an ancestor's stray `yarn.lock` is "the project" — aborting install with "the nearest package directory doesn't seem to be part of the project declared in <ancestor>".
24
+ - **Template `linked.backend.storage.ts` and `src/linked.frontend.storage.ts` use `with { type: 'json' }`** for the JSON dataset config imports, replacing the deprecated `assert { type: 'json' }` syntax (which Node 22+ rejects).
25
+
3
26
  ## 1.7.0
4
27
 
5
28
  ### Minor Changes
@@ -3,7 +3,7 @@
3
3
  // Reads linked.backend.datasets.json, dynamically imports each alias's
4
4
  // store class via its npm path, and instantiates with the entry's `config`
5
5
  // verbatim. See the mirror at src/linked.frontend.storage.ts.
6
- import datasetsConfig from './linked.backend.datasets.json' assert { type: 'json' };
6
+ import datasetsConfig from './linked.backend.datasets.json' with { type: 'json' };
7
7
  import { parseDatasetsConfig } from '@_linked/core/utils/parseDatasetsConfig';
8
8
  import { loadStores } from '@_linked/core/utils/loadStores';
9
9
  import { LinkedStorage } from '@_linked/core/utils/LinkedStorage';
@@ -7,7 +7,7 @@
7
7
  //
8
8
  // Aliases on this side are independent from backend aliases — the
9
9
  // framework re-routes by shape on each side.
10
- import datasetsConfig from './linked.frontend.datasets.json' assert { type: 'json' };
10
+ import datasetsConfig from './linked.frontend.datasets.json' with { type: 'json' };
11
11
  import { parseDatasetsConfig } from '@_linked/core/utils/parseDatasetsConfig';
12
12
  import { LinkedFileStorage } from '@_linked/core/utils/LinkedFileStorage';
13
13
  import { LinkedStorage } from '@_linked/core/utils/LinkedStorage';
@@ -1,4 +1,8 @@
1
- import { linkedPackage } from '@_linked/core/utils/Package';
1
+ // Imports from `@_linked/react/package` (not `@_linked/core/utils/Package`)
2
+ // because `linkedComponent` / `linkedSetComponent` are React-only — they
3
+ // don't exist on core's LinkedPackageObject. The react helper composes
4
+ // React-only fns on top of everything core's linkedPackage provides.
5
+ import { linkedPackage } from '@_linked/react/package';
2
6
 
3
7
  export const {
4
8
  linkedComponent,
@@ -17,8 +17,20 @@ jobs:
17
17
  contents: write
18
18
  pull-requests: write
19
19
  steps:
20
+ # Author the changesets "Version Packages" PR as the org release App (not the default
21
+ # GITHUB_TOKEN) so its CI runs without a manual "Approve and run" gate. Requires the org
22
+ # App installed on this repo + org secrets RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY.
23
+ - name: Generate GitHub App token
24
+ id: app-token
25
+ uses: actions/create-github-app-token@v2
26
+ with:
27
+ app-id: ${{ secrets.RELEASE_APP_ID }}
28
+ private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
29
+
20
30
  - name: Checkout
21
31
  uses: actions/checkout@v4
32
+ with:
33
+ token: ${{ steps.app-token.outputs.token }}
22
34
 
23
35
  - name: Setup Node.js
24
36
  uses: actions/setup-node@v4
@@ -40,12 +52,16 @@ jobs:
40
52
  title: "chore: release"
41
53
  commit: "chore: release"
42
54
  env:
43
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55
+ GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
44
56
  NODE_AUTH_TOKEN: ${{ secrets.{{NPM_SECRET_NAME}} }}
45
57
  NPM_TOKEN: ${{ secrets.{{NPM_SECRET_NAME}} }}
46
58
 
47
- sync-version-to-dev:
48
- name: Sync Version to Dev
59
+ backmerge-to-dev:
60
+ # Full back-merge of main into dev after a release. Unlike a version-only sync, this also
61
+ # carries the CHANGELOG and — critically — the changeset *deletions* the release made, so dev
62
+ # never keeps already-released changesets that would otherwise re-release on the next dev->main.
63
+ # Requires "Allow auto-merge" enabled on the repo for the PR to self-merge once checks pass.
64
+ name: Back-merge main into dev
49
65
  needs: release
50
66
  if: github.ref == 'refs/heads/main'
51
67
  runs-on: ubuntu-latest
@@ -53,33 +69,43 @@ jobs:
53
69
  contents: write
54
70
  pull-requests: write
55
71
  steps:
56
- - name: Checkout dev
72
+ - name: Generate GitHub App token
73
+ id: app-token
74
+ uses: actions/create-github-app-token@v2
75
+ with:
76
+ app-id: ${{ secrets.RELEASE_APP_ID }}
77
+ private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
78
+
79
+ - name: Checkout
57
80
  uses: actions/checkout@v4
58
81
  with:
59
- ref: dev
60
82
  fetch-depth: 0
83
+ token: ${{ steps.app-token.outputs.token }}
61
84
 
62
- - name: Sync package.json version from main via PR
85
+ - name: Open & auto-merge back-merge PR (main -> dev)
63
86
  env:
64
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87
+ GH_TOKEN: ${{ steps.app-token.outputs.token }}
65
88
  run: |
66
- MAIN_VERSION=$(git show origin/main:package.json | node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).version")
67
- DEV_VERSION=$(node -p "require('./package.json').version")
68
- if [ "$MAIN_VERSION" != "$DEV_VERSION" ]; then
69
- BRANCH="chore/sync-version-${MAIN_VERSION}"
70
- git config user.name "github-actions[bot]"
71
- git config user.email "github-actions[bot]@users.noreply.github.com"
72
- git checkout -b "$BRANCH"
73
- npm version "$MAIN_VERSION" --no-git-tag-version --allow-same-version
74
- git add package.json package-lock.json
75
- git commit -m "chore: sync package.json version to $MAIN_VERSION from main"
76
- git push origin "$BRANCH"
77
- gh pr create \
78
- --base dev \
79
- --head "$BRANCH" \
80
- --title "chore: sync package.json version to $MAIN_VERSION from main" \
81
- --body "Automated version sync from main after release."
89
+ git fetch origin main dev
90
+ # Nothing to do when dev already contains main.
91
+ if git merge-base --is-ancestor origin/main origin/dev; then
92
+ echo "dev already contains main — nothing to back-merge."
93
+ exit 0
94
+ fi
95
+ # Reuse an existing open back-merge PR if present, else open one.
96
+ pr=$(gh pr list --base dev --head main --state open --json number --jq '.[0].number // empty')
97
+ if [ -z "$pr" ]; then
98
+ url=$(gh pr create --base dev --head main \
99
+ --title "chore: back-merge main into dev (post-release sync)" \
100
+ --body "Automated post-release back-merge: brings the version bump, CHANGELOG, and changeset deletions from main into dev so dev stays clean and a future dev->main never re-releases consumed changesets.")
101
+ pr="${url##*/}"
102
+ echo "Opened back-merge PR #$pr"
103
+ else
104
+ echo "Reusing existing back-merge PR #$pr"
82
105
  fi
106
+ # Auto-merge once required checks pass (needs "Allow auto-merge" enabled on the repo).
107
+ gh pr merge "$pr" --auto --merge \
108
+ || echo "Auto-merge unavailable (disabled or conflicts) — PR #$pr left open for manual merge."
83
109
 
84
110
  dev-release:
85
111
  name: Publish Dev Release
@@ -15,8 +15,20 @@ jobs:
15
15
  contents: write
16
16
  pull-requests: write
17
17
  steps:
18
+ # Author the changesets "Version Packages" PR as the org release App (not the default
19
+ # GITHUB_TOKEN) so its CI runs without a manual "Approve and run" gate. Requires the org
20
+ # App installed on this repo + org secrets RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY.
21
+ - name: Generate GitHub App token
22
+ id: app-token
23
+ uses: actions/create-github-app-token@v2
24
+ with:
25
+ app-id: ${{ secrets.RELEASE_APP_ID }}
26
+ private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
27
+
18
28
  - name: Checkout
19
29
  uses: actions/checkout@v4
30
+ with:
31
+ token: ${{ steps.app-token.outputs.token }}
20
32
 
21
33
  - name: Setup Node.js
22
34
  uses: actions/setup-node@v4
@@ -37,6 +49,6 @@ jobs:
37
49
  title: 'chore: release'
38
50
  commit: 'chore: release'
39
51
  env:
40
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52
+ GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
41
53
  NODE_AUTH_TOKEN: ${{ secrets.{{NPM_SECRET_NAME}} }}
42
54
  NPM_TOKEN: ${{ secrets.{{NPM_SECRET_NAME}} }}
@@ -1 +1 @@
1
- {"version":3,"file":"cli-methods.d.ts","sourceRoot":"","sources":["../../src/cli-methods.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAoE5C,eAAO,MAAM,SAAS,GAAU,SAAI,EAAE,iBAAwB,EAAE,UAAS;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAM,kBAsK9J,CAAC;AAmBF,wBAAgB,IAAI,CAAC,GAAG,QAAQ,OAAA,QAK/B;AACD,wBAAgB,QAAQ,CAAC,GAAG,MAAM,O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BAyB/D,CAAC;AACF,eAAO,MAAM,iBAAiB,GAAU,oBAA2B,qBAWlE,CAAC;AACF,eAAO,MAAM,iBAAiB,GAAU,oBAA2B;;EAelE,CAAC;AAEF,eAAO,IAAI,cAAc,GAAa,OAAM,OAAe,kBA0K1D,CAAC;AAsBF,eAAO,IAAI,cAAc,GACvB,SAAI,EACJ,UAAK,EACL,UAAK,EACL,oBAAe,oBA6DhB,CAAC;AAEF,eAAO,IAAI,YAAY,GACrB,SAAI,EACJ,WAAM,EACN,YAAO,EACP,wBAAuB,OAAe,EACtC,OAAM,OAAe,kBAqHtB,CAAC;AAeF,eAAO,IAAI,4BAA4B,GACrC,aAAQ,EACR,YAAO,EACP,iBAAY,EACZ,gBAAW,qBA4CZ,CAAC;AAOF,eAAO,IAAI,cAAc,GAAa,aAAQ,EAAE,YAAO,SAMtD,CAAC;AACF,eAAO,IAAI,YAAY,GAAmB,iBAAwB,kBA8FjE,CAAC;AAEF,eAAO,IAAI,wBAAwB,GAAa,gBAAW,EAAE,YAAO,SA6BnE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAU,gBAAW,qBA8B/C,CAAC"}
@@ -165,6 +165,15 @@ const createApp = async (name, basePath = process.cwd(), options = {}) => {
165
165
  });
166
166
  fs_extra_1.default.renameSync(path_1.default.join(targetFolder, 'gitignore.template'), path_1.default.join(targetFolder, '.gitignore'));
167
167
  fs_extra_1.default.renameSync(path_1.default.join(targetFolder, 'yarnrc.yml.template'), path_1.default.join(targetFolder, '.yarnrc.yml'));
168
+ // Mark the new app as a self-contained Yarn project root. Without this,
169
+ // Yarn climbs ancestor dirs looking for the project root and may decide
170
+ // a stray yarn.lock further up the tree is "the project" — aborting
171
+ // install with "the nearest package directory doesn't seem to be part
172
+ // of the project declared in <ancestor>".
173
+ const yarnLockPath = path_1.default.join(targetFolder, 'yarn.lock');
174
+ if (!fs_extra_1.default.existsSync(yarnLockPath)) {
175
+ fs_extra_1.default.writeFileSync(yarnLockPath, '');
176
+ }
168
177
  // Seed the real (gitignored) Layer 2 config from the committed example so
169
178
  // the scaffolded app boots first try. Users can edit either file later.
170
179
  const datasetsExample = path_1.default.join(targetFolder, 'linked.backend.datasets.example.json');