Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
- run:
name: Add examples/* to yarn workspace
command: |
npm pkg delete workspaces[6]
npm pkg delete workspaces[5]
npm pkg delete workspaces[4]
npm pkg delete workspaces[3]
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/benchmark-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ jobs:
node-version: '24'
cache: 'yarn'
- name: Install packages
run: |
corepack enable
yarn install --immutable
run: ./scripts/ci-install.sh examples/benchmark-react
- name: Install Playwright (Chromium + system deps)
run: npx playwright install chromium --with-deps
- name: Build packages
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ jobs:
node-version: '24'
cache: 'yarn'
- name: Install packages
run: |
corepack enable
yarn install --immutable
run: ./scripts/ci-install.sh examples/benchmark
- name: Build packages
run: yarn build:benchmark
- name: Run benchmark
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ jobs:
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Install packages
run: |
corepack enable
yarn install --immutable
run: ./scripts/ci-install.sh

- name: Create Beta Release Pull Request or Publish to npm
id: changesets
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/bundle_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,12 @@ jobs:
node-version: '24'
cache: 'yarn'
- name: Install packages
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: true
run: |
# npm pkg delete workspaces[5]
# npm pkg delete workspaces[4]
# npm pkg delete workspaces[3]
# npm pkg delete workspaces[1]
corepack enable
run: ./scripts/ci-install.sh examples/test-bundlesize
- name: compressed-size-action
uses: preactjs/compressed-size-action@v2
continue-on-error: true
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
build-script: "ci:build:bundlesize"
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ jobs:
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Install packages
run: |
corepack enable
yarn install --immutable
run: ./scripts/ci-install.sh

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Monorepo for `@data-client` npm packages.
- **CircleCI** (`.circleci/config.yml`) — PR validation: lint, typecheck, unit tests (React 17/18/native/latest), Node matrix, ESM type checks (TS 4.0–5.3+), browser build.
- **GitHub Actions** (`.github/workflows/`) — release (`changesets`), bundle size PR comments, benchmark regression detection.

Changing root `package.json` `workspaces` requires updating `.circleci/config.yml` (`setup` job) and `.github/workflows/` install steps.

## Changesets

Any user-facing change in `packages/*` requires a changeset. Core packages are version-linked (bumping one bumps all). See skill "changeset" for full workflow.
Expand Down
29 changes: 29 additions & 0 deletions scripts/ci-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# Installs only the workspaces needed for a CI job, then restores
# package.json and yarn.lock so later steps never see a dirty tree.
#
# Usage: scripts/ci-install.sh [extra-workspace ...]
# Always includes packages/* and scripts/rollup-plugins.
# Pass additional workspace paths as arguments.
#
# Examples:
# scripts/ci-install.sh # release / beta-release
# scripts/ci-install.sh examples/benchmark # node benchmark
set -euo pipefail

WORKSPACES='["packages/*","scripts/rollup-plugins"'
for ws in "$@"; do
WORKSPACES+=',"'"$ws"'"'
done
WORKSPACES+=']'

node -e "
const f = 'package.json';
const p = JSON.parse(require('fs').readFileSync(f, 'utf8'));
p.workspaces = $WORKSPACES;
require('fs').writeFileSync(f, JSON.stringify(p, null, 2) + '\n');
"
corepack enable
YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install

git checkout -- package.json yarn.lock
Loading