@_linked/primitives 1.2.0 → 1.2.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.
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ package-lock.json linguist-generated=true -diff merge=ours
@@ -0,0 +1,18 @@
1
+ name: PR
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ checks:
10
+ uses: linked-fw/.github/.github/workflows/pr.yml@v1
11
+ # The changeset reminder posts a PR comment. A reusable workflow only holds what its
12
+ # caller granted, and the org default is read-only.
13
+ permissions:
14
+ contents: read
15
+ pull-requests: write
16
+ with:
17
+ require-tests: false
18
+ run-e2e: false
@@ -1,3 +1,8 @@
1
+ # Calls the shared workflow in linked-fw/.github.
2
+ #
3
+ # This FILENAME is what npm's trusted-publisher check validates — not the shared workflow's.
4
+ # Renaming this file invalidates this package's trusted publisher, and the only symptom is
5
+ # that releases quietly start needing manual approval again.
1
6
  name: Publish
2
7
 
3
8
  on:
@@ -9,136 +14,17 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
9
14
 
10
15
  jobs:
11
16
  release:
12
- name: Publish Release
13
- runs-on: ubuntu-latest
17
+ uses: linked-fw/.github/.github/workflows/publish.yml@v1
14
18
  permissions:
15
19
  contents: write
16
20
  pull-requests: write
17
- # `npm stage publish --provenance` signs the tarball with a GitHub OIDC token, so the
18
- # job needs to be able to mint one. This does NOT switch the package to OIDC trusted
19
- # publishing — authentication is still the org npm token. It only lets npm attest where
20
- # the tarball was built, which is worth having on a package a human is about to approve
21
- # sight-unseen.
21
+ # Needed HERE as well as in the shared workflow: a reusable workflow cannot widen the
22
+ # permissions its caller was granted, and without this npm never gets an id-token and
23
+ # every release silently falls back to the approval queue.
22
24
  id-token: write
23
- steps:
24
- # Author the changesets "Version Packages" PR as the org release App (not the default
25
- # GITHUB_TOKEN) so its CI runs without a manual "Approve and run" gate. Requires the org
26
- # App installed on this repo + org secrets RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY.
27
- - name: Generate GitHub App token
28
- id: app-token
29
- uses: actions/create-github-app-token@v2
30
- with:
31
- app-id: ${{ secrets.RELEASE_APP_ID }}
32
- private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
33
-
34
- - name: Checkout
35
- uses: actions/checkout@v4
36
- with:
37
- token: ${{ steps.app-token.outputs.token }}
38
-
39
- - name: Setup Node.js
40
- uses: actions/setup-node@v4
41
- with:
42
- node-version: 22.16.0
43
- registry-url: 'https://registry.npmjs.org'
44
-
45
- # `npm stage` landed in CLI 11.15.0; Node 22.16 ships npm 10.x, so the bundled one
46
- # cannot stage. Pinned rather than `@latest` so a future npm release cannot change how
47
- # releases behave without a commit here.
48
- - name: Use an npm that can stage
49
- run: npm i -g npm@^11.15.0
50
-
51
- - name: Install dependencies
52
- run: npm ci --legacy-peer-deps
53
-
54
- - name: Build
55
- run: npm run build
56
-
57
- # No `publish:` — changesets only opens/updates the version PR here. Publishing is the
58
- # step below, because `changeset publish` shells out to `npm publish`, which a
59
- # stage-only token cannot do (changesets/changesets#2025 is open for first-class
60
- # support). Splitting them keeps changesets doing what it is good at — versions and
61
- # changelogs — and leaves the registry call to us.
62
- - name: Create release Pull Request
63
- id: changesets
64
- uses: changesets/action@v1
65
- with:
66
- title: 'chore: release'
67
- commit: 'chore: release'
68
- env:
69
- GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
70
-
71
- # Stage the version for a human to approve.
72
- #
73
- # A staged version is uploaded but NOT public: a maintainer reviews it and approves with
74
- # 2FA, from the Staged Packages tab in the npm user menu or `npm stage approve`. That is
75
- # the point — every release keeps a proof-of-presence step even though CI is
76
- # unattended — and it is why the org token is scoped "read and write (stage only)".
77
- #
78
- # Idempotent: this workflow runs on every push to main, including the merge of the
79
- # version PR and any later commit, so it must do nothing when the version is already on
80
- # the registry or already sitting in the queue.
81
- - name: Stage the release for approval
82
- if: steps.changesets.outputs.hasChangesets != 'true'
83
- env:
84
- NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
85
- NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
86
- run: |
87
- set -euo pipefail
88
- name=$(node -p "require('./package.json').name")
89
- version=$(node -p "require('./package.json').version")
90
- private=$(node -p "require('./package.json').private === true")
91
- if [ "$private" = "true" ]; then
92
- echo "$name is private — nothing to publish."; exit 0
93
- fi
94
-
95
- if npm view "$name@$version" version >/dev/null 2>&1; then
96
- echo "$name@$version is already on the registry — nothing to do."
97
- exit 0
98
- fi
99
-
100
- if npm stage list "$name" 2>/dev/null | grep -q "$version"; then
101
- echo "$name@$version is already staged and waiting for approval."
102
- exit 0
103
- fi
104
-
105
- echo "Staging $name@$version…"
106
- npm stage publish --access public --provenance
107
-
108
- {
109
- echo "### 📦 \`$name@$version\` is staged, not published"
110
- echo
111
- echo "It is uploaded and held for review. **Approve it to make it public:**"
112
- echo
113
- echo "- **CLI:** \`npm stage approve $name@$version\`"
114
- echo "- **Web:** [npmjs.com](https://www.npmjs.com) → your avatar → **Staged"
115
- echo " Packages** → **Approve**. The button stays disabled until npm has"
116
- echo " finished scanning the tarball; the page refreshes every minute."
117
- echo
118
- echo "Both prompt for 2FA. Until then \`npm install $name\` still resolves"
119
- echo "\`$(npm view "$name" version 2>/dev/null || echo 'nothing')\`."
120
- } >> "$GITHUB_STEP_SUMMARY"
121
-
122
- echo "::notice title=Approval needed::$name@$version is staged. Run: npm stage approve $name@$version — or approve it from Staged Packages in the npm user menu."
123
-
124
- # When changesets opened/updated the version PR, merge it so the release reaches the
125
- # staging queue without a manual click. App token → the merge's push re-triggers this
126
- # workflow, which then stages. DIRECT-merge (not `--auto`): GitHub
127
- # auto-merge ignores branch-protection review-bypass allowances; main is check-only so a
128
- # direct merge lands once the required check is green — retry until then.
129
- - name: Merge the version PR to stage the release
130
- if: steps.changesets.outputs.hasChangesets == 'true'
131
- env:
132
- GH_TOKEN: ${{ steps.app-token.outputs.token }}
133
- run: |
134
- pr=$(gh pr list --base main --head changeset-release/main --state open --json number --jq '.[0].number // empty')
135
- if [ -z "$pr" ]; then echo "No open version PR (nothing to merge)."; exit 0; fi
136
- for i in $(seq 1 40); do
137
- if gh pr merge "$pr" --merge 2>/tmp/merge_err; then
138
- echo "Merged version PR #$pr on attempt $i."
139
- exit 0
140
- fi
141
- echo "Attempt $i/40: version PR #$pr not mergeable yet ($(tr -d '\n' < /tmp/merge_err)); waiting for the required check…"
142
- sleep 15
143
- done
144
- echo "::warning::Version PR #$pr not merged after retries — merge it manually."
25
+ # Named rather than `inherit`: `inherit` forwards everything this repo can see, which is
26
+ # how a community repo would end up forwarding a first-party token.
27
+ secrets:
28
+ NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
29
+ RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
30
+ RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @\_linked/primitives
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#24](https://github.com/linked-fw/primitives/pull/24) [`781aebc`](https://github.com/linked-fw/primitives/commit/781aebcdd83d3222acf9a00e54175687bb91b848) Thanks [@flyon](https://github.com/flyon)! - Declare npm as the package manager for this repo, convert the build scripts off `yarn`, and mark `package-lock.json` as a generated file.
8
+
3
9
  ## 1.2.0
4
10
 
5
11
  ### Minor Changes
@@ -1,4 +1,13 @@
1
- export declare const loadData: () => Promise<any>;
1
+ export declare const loadData: () => Promise<{
2
+ "@context": {
3
+ dc: string;
4
+ owl: string;
5
+ rdf: string;
6
+ rdfs: string;
7
+ primitives: string;
8
+ };
9
+ "@graph": any[];
10
+ }>;
2
11
  export declare const ns: (term: string) => import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
3
12
  export declare const _self: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
4
13
  export declare const radix: {
@@ -43,7 +43,7 @@ const base = 'http://lincd.org/ont/radix/';
43
43
  Prefix_1.Prefix.add('radix', base);
44
44
  const loadData = () => {
45
45
  //@ts-ignore
46
- return Promise.resolve(`${dataFile}`).then(s => __importStar(require(s))).then((data) => data.default);
46
+ return Promise.resolve().then(() => __importStar(require('../data/primitives.json'))).then((data) => data.default);
47
47
  };
48
48
  exports.loadData = loadData;
49
49
  exports.ns = (0, NameSpace_1.createNameSpace)(base);
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../../src/ontologies/primitives.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAoD;AACpD,6DAAgE;AAChE,8CAA+C;AAC/C,uDAAyC;AAEzC,MAAM,QAAQ,GAAG,yBAAyB,CAAC;AAC3C,MAAM,IAAI,GAAG,6BAA6B,CAAC;AAE3C,eAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAEnB,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,YAAY;IACZ,OAAO,mBAAO,QAAQ,wCAA8B,IAAI,CACtD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CACvB,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,QAAQ,YAKnB;AAEW,QAAA,EAAE,GAAG,IAAA,2BAAe,EAAC,IAAI,CAAC,CAAC;AAC3B,QAAA,KAAK,GAAG,IAAA,UAAE,EAAC,EAAE,CAAC,CAAC;AAEf,QAAA,KAAK,GAAG;IACnB,KAAK,EAAL,aAAK;CACN,CAAC;AAEF,IAAA,2BAAc,EAAC,KAAK,EAAE,UAAE,EAAE,OAAO,EAAE,gBAAQ,EAAE,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../../src/ontologies/primitives.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAoD;AACpD,6DAAgE;AAChE,8CAA+C;AAC/C,uDAAyC;AAEzC,MAAM,QAAQ,GAAG,yBAAyB,CAAC;AAC3C,MAAM,IAAI,GAAG,6BAA6B,CAAC;AAE3C,eAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAEnB,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,YAAY;IACZ,OAAO,kDAAO,yBAAyB,IAEpC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC,CAAC;AALW,QAAA,QAAQ,YAKnB;AAEW,QAAA,EAAE,GAAG,IAAA,2BAAe,EAAC,IAAI,CAAC,CAAC;AAC3B,QAAA,KAAK,GAAG,IAAA,UAAE,EAAC,EAAE,CAAC,CAAC;AAEf,QAAA,KAAK,GAAG;IACnB,KAAK,EAAL,aAAK;CACN,CAAC;AAEF,IAAA,2BAAc,EAAC,KAAK,EAAE,UAAE,EAAE,OAAO,EAAE,gBAAQ,EAAE,QAAQ,CAAC,CAAC"}
@@ -8,19 +8,20 @@
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/linked-cm/primitives.git"
11
+ "url": "git+https://github.com/linked-fw/primitives.git"
12
12
  },
13
- "version": "1.2.0",
13
+ "version": "1.2.1",
14
+ "packageManager": "npm@11.19.1",
14
15
  "linkedPackage": true,
15
16
  "license": "ISC",
16
17
  "scripts": {
17
18
  "start": "npm exec linked dev",
18
19
  "test": "node --test test/*.test.mjs",
19
- "build": "rimraf ./lib && yarn build-esm && yarn build-cjs && yarn copy-to-lib && yarn dual-package",
20
- "build-esm": "echo \"compiling ESM\" && rimraf ./lib/esm && yarn tsc -p tsconfig-esm.json",
21
- "build-cjs": "echo \"compiling CJS\" && rimraf ./lib/cjs && yarn tsc -p tsconfig-cjs.json",
22
- "copy-to-lib": "echo 'copying CSS + JSON assets to lib folder' && yarn copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/esm && yarn copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/cjs",
23
- "dual-package": "echo 'adding package.json to each lib folder for dual output support' && yarn tsconfig-to-dual-package ./tsconfig-cjs.json ./tsconfig-esm.json"
20
+ "build": "rimraf ./lib && npm run build-esm && npm run build-cjs && npm run copy-to-lib && npm run dual-package",
21
+ "build-esm": "echo \"compiling ESM\" && rimraf ./lib/esm && tsc -p tsconfig-esm.json",
22
+ "build-cjs": "echo \"compiling CJS\" && rimraf ./lib/cjs && tsc -p tsconfig-cjs.json",
23
+ "copy-to-lib": "echo 'copying CSS + JSON assets to lib folder' && copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/esm && copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/cjs",
24
+ "dual-package": "echo 'adding package.json to each lib folder for dual output support' && tsconfig-to-dual-package ./tsconfig-cjs.json ./tsconfig-esm.json"
24
25
  },
25
26
  "keywords": [
26
27
  "lincd",
@@ -1,4 +1,13 @@
1
- export declare const loadData: () => Promise<any>;
1
+ export declare const loadData: () => Promise<{
2
+ "@context": {
3
+ dc: string;
4
+ owl: string;
5
+ rdf: string;
6
+ rdfs: string;
7
+ primitives: string;
8
+ };
9
+ "@graph": any[];
10
+ }>;
2
11
  export declare const ns: (term: string) => import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
3
12
  export declare const _self: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
4
13
  export declare const radix: {
@@ -7,7 +7,9 @@ const base = 'http://lincd.org/ont/radix/';
7
7
  Prefix.add('radix', base);
8
8
  export const loadData = () => {
9
9
  //@ts-ignore
10
- return import(dataFile, { with: { type: 'json' } }).then((data) => data.default);
10
+ return import('../data/primitives.json', {
11
+ with: { type: 'json' },
12
+ }).then((data) => data.default);
11
13
  };
12
14
  export const ns = createNameSpace(base);
13
15
  export const _self = ns('');
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../../src/ontologies/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAC;AAEzC,MAAM,QAAQ,GAAG,yBAAyB,CAAC;AAC3C,MAAM,IAAI,GAAG,6BAA6B,CAAC;AAE3C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,YAAY;IACZ,OAAO,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CACtD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAE5B,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK;CACN,CAAC;AAEF,cAAc,CAAC,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../../src/ontologies/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAC;AAEzC,MAAM,QAAQ,GAAG,yBAAyB,CAAC;AAC3C,MAAM,IAAI,GAAG,6BAA6B,CAAC;AAE3C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,YAAY;IACZ,OAAO,MAAM,CAAC,yBAAyB,EAAE;QACvC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACvB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAE5B,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK;CACN,CAAC;AAEF,cAAc,CAAC,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC"}
@@ -8,19 +8,20 @@
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/linked-cm/primitives.git"
11
+ "url": "git+https://github.com/linked-fw/primitives.git"
12
12
  },
13
- "version": "1.2.0",
13
+ "version": "1.2.1",
14
+ "packageManager": "npm@11.19.1",
14
15
  "linkedPackage": true,
15
16
  "license": "ISC",
16
17
  "scripts": {
17
18
  "start": "npm exec linked dev",
18
19
  "test": "node --test test/*.test.mjs",
19
- "build": "rimraf ./lib && yarn build-esm && yarn build-cjs && yarn copy-to-lib && yarn dual-package",
20
- "build-esm": "echo \"compiling ESM\" && rimraf ./lib/esm && yarn tsc -p tsconfig-esm.json",
21
- "build-cjs": "echo \"compiling CJS\" && rimraf ./lib/cjs && yarn tsc -p tsconfig-cjs.json",
22
- "copy-to-lib": "echo 'copying CSS + JSON assets to lib folder' && yarn copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/esm && yarn copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/cjs",
23
- "dual-package": "echo 'adding package.json to each lib folder for dual output support' && yarn tsconfig-to-dual-package ./tsconfig-cjs.json ./tsconfig-esm.json"
20
+ "build": "rimraf ./lib && npm run build-esm && npm run build-cjs && npm run copy-to-lib && npm run dual-package",
21
+ "build-esm": "echo \"compiling ESM\" && rimraf ./lib/esm && tsc -p tsconfig-esm.json",
22
+ "build-cjs": "echo \"compiling CJS\" && rimraf ./lib/cjs && tsc -p tsconfig-cjs.json",
23
+ "copy-to-lib": "echo 'copying CSS + JSON assets to lib folder' && copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/esm && copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/cjs",
24
+ "dual-package": "echo 'adding package.json to each lib folder for dual output support' && tsconfig-to-dual-package ./tsconfig-cjs.json ./tsconfig-esm.json"
24
25
  },
25
26
  "keywords": [
26
27
  "lincd",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_linked/primitives",
3
- "description": "A UI component library: a headless behaviour source (Radix UI, cmdk, vaul, or hand-written) plus a CSS module reading @_linked/css design tokens \u2014 and no knowledge of data, of shapes, or of any particular application.",
3
+ "description": "A UI component library: a headless behaviour source (Radix UI, cmdk, vaul, or hand-written) plus a CSS module reading @_linked/css design tokens — and no knowledge of data, of shapes, or of any particular application.",
4
4
  "author": {
5
5
  "name": "",
6
6
  "email": "",
@@ -8,20 +8,21 @@
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/linked-cm/primitives.git"
11
+ "url": "git+https://github.com/linked-fw/primitives.git"
12
12
  },
13
- "version": "1.2.0",
13
+ "version": "1.2.1",
14
+ "packageManager": "npm@11.19.1",
14
15
  "linkedPackage": true,
15
16
  "main": "lib/cjs/index.js",
16
17
  "license": "ISC",
17
18
  "scripts": {
18
19
  "start": "npm exec linked dev",
19
20
  "test": "node --test test/*.test.mjs",
20
- "build": "rimraf ./lib && yarn build-esm && yarn build-cjs && yarn copy-to-lib && yarn dual-package",
21
- "build-esm": "echo \"compiling ESM\" && rimraf ./lib/esm && yarn tsc -p tsconfig-esm.json",
22
- "build-cjs": "echo \"compiling CJS\" && rimraf ./lib/cjs && yarn tsc -p tsconfig-cjs.json",
23
- "copy-to-lib": "echo 'copying CSS + JSON assets to lib folder' && yarn copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/esm && yarn copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/cjs",
24
- "dual-package": "echo 'adding package.json to each lib folder for dual output support' && yarn tsconfig-to-dual-package ./tsconfig-cjs.json ./tsconfig-esm.json"
21
+ "build": "rimraf ./lib && npm run build-esm && npm run build-cjs && npm run copy-to-lib && npm run dual-package",
22
+ "build-esm": "echo \"compiling ESM\" && rimraf ./lib/esm && tsc -p tsconfig-esm.json",
23
+ "build-cjs": "echo \"compiling CJS\" && rimraf ./lib/cjs && tsc -p tsconfig-cjs.json",
24
+ "copy-to-lib": "echo 'copying CSS + JSON assets to lib folder' && copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/esm && copyfiles -u 1 'src/**/*.css' 'src/**/*.json' lib/cjs",
25
+ "dual-package": "echo 'adding package.json to each lib folder for dual output support' && tsconfig-to-dual-package ./tsconfig-cjs.json ./tsconfig-esm.json"
25
26
  },
26
27
  "keywords": [
27
28
  "lincd",
@@ -1,44 +0,0 @@
1
- name: Changeset Check
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- changeset-check:
10
- name: Check for changeset
11
- # Skip the check on the automated Release PR.
12
- if: ${{ github.head_ref != 'changeset-release/main' }}
13
- runs-on: ubuntu-latest
14
- steps:
15
- - name: Checkout
16
- uses: actions/checkout@v4
17
- with:
18
- fetch-depth: 0
19
-
20
- - name: Check for changeset files
21
- uses: actions/github-script@v7
22
- with:
23
- script: |
24
- const { data: files } = await github.rest.pulls.listFiles({
25
- owner: context.repo.owner,
26
- repo: context.repo.repo,
27
- pull_number: context.issue.number,
28
- });
29
-
30
- const hasChangeset = files.some(f =>
31
- f.filename.startsWith('.changeset/') &&
32
- f.filename.endsWith('.md') &&
33
- f.filename !== '.changeset/README.md'
34
- );
35
-
36
- if (!hasChangeset) {
37
- await github.rest.issues.createComment({
38
- owner: context.repo.owner,
39
- repo: context.repo.repo,
40
- issue_number: context.issue.number,
41
- body: "No changeset found. If this PR should trigger a release, run `npx changeset` and commit the generated file.\n\nIf this change doesn't need a release (docs, CI config, etc.), you can ignore this message."
42
- });
43
- core.warning('No changeset file found in this PR.');
44
- }
@@ -1,43 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- build-and-test:
10
- name: Build & Test
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Detect Release PR
14
- id: rpr
15
- run: |
16
- if [[ "${{ github.event.pull_request.head.ref }}" == "changeset-release/main" ]]; then
17
- echo "is_release_pr=true" >> $GITHUB_OUTPUT
18
- echo "Release PR from changesets/action detected — skipping build/test (auto-generated version+CHANGELOG only)."
19
- else
20
- echo "is_release_pr=false" >> $GITHUB_OUTPUT
21
- fi
22
-
23
- - name: Checkout
24
- if: steps.rpr.outputs.is_release_pr == 'false'
25
- uses: actions/checkout@v4
26
-
27
- - name: Setup Node.js
28
- if: steps.rpr.outputs.is_release_pr == 'false'
29
- uses: actions/setup-node@v4
30
- with:
31
- node-version: 22.16.0
32
-
33
- - name: Install dependencies
34
- if: steps.rpr.outputs.is_release_pr == 'false'
35
- run: npm ci --legacy-peer-deps
36
-
37
- - name: Build
38
- if: steps.rpr.outputs.is_release_pr == 'false'
39
- run: npm run build
40
-
41
- - name: Test
42
- if: steps.rpr.outputs.is_release_pr == 'false'
43
- run: npm test --if-present