Skip to content
Open
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
7 changes: 7 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changesets

One intent file per change to a publishable package, named by its frontmatter
(`"<pkg>": <none|patch|minor|major>`) and followed by a line for a consumer.
The Release workflow consumes the pending intents into a version PR, writes each
package's `CHANGELOG.md`, and on merge pushes the `<pkg>@vX.Y.Z` tags and
creates the GitHub Releases. Packages are published to npm.
5 changes: 5 additions & 0 deletions .changeset/restore-upstream-reset-order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@systemfsoftware/react-error-boundary": patch
---

A `resetKeys` change reports `onReset` and then resets the boundary after commit, as upstream does, so a caller that clears the failed state in `onReset` has its children retry with that state already cleared. `useErrorBoundary`'s `resetBoundary` forwards its arguments to `onReset`, and `withErrorBoundary` renders the wrapped component with `createElement` and names memoized and forwarded components in `displayName`.
5 changes: 5 additions & 0 deletions .changeset/scope-under-systemfsoftware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@systemfsoftware/react-error-boundary": minor
---

Published under the `@systemfsoftware` scope as `@systemfsoftware/react-error-boundary`. The library is the react-error-boundary 6.1.6 component.
5 changes: 5 additions & 0 deletions .changeset/with-error-boundary-pipeable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@systemfsoftware/react-error-boundary": patch
---

`withErrorBoundary` accepts the error boundary props alone and returns a function that takes the wrapped component, so it composes in a pipe. Passing the component first keeps working.
5 changes: 5 additions & 0 deletions .changeset/with-error-boundary-ref-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@systemfsoftware/react-error-boundary": patch
---

`withErrorBoundary` keeps the wrapped component's props and ref type.
41 changes: 41 additions & 0 deletions .github/actions/pnpm-store/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: pnpm store cache
description: Restore the pnpm store in every run; let only a push to main write it, so a pull request never creates a cache entry.

inputs:
mode:
description: restore locates and restores the store; save writes the store after an install, and only from a push to main
required: false
default: restore
key:
description: the primary key a restore resolved, required when mode is save
required: false
default: ""

outputs:
hit:
description: whether the store was restored under its own lockfile key
value: ${{ steps.restore.outputs.cache-hit }}
key:
description: the primary key the restore resolved, to hand to a save
value: ${{ steps.restore.outputs.cache-primary-key }}

runs:
using: composite
steps:
- id: store
name: Locate the pnpm store
shell: bash
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- id: restore
if: inputs.mode == 'restore'
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.store.outputs.path }}
key: pnpm-store-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: pnpm-store-${{ runner.os }}-${{ runner.arch }}-
- name: Save the pnpm store from main
if: inputs.mode == 'save' && github.event_name == 'push' && github.ref == 'refs/heads/main' && inputs.key != ''
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.store.outputs.path }}
key: ${{ inputs.key }}
121 changes: 121 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# The org's one Dependabot configuration (public-repo standard, item 5). Only the ecosystems and the extra
# major-version ignores differ by repository. The 3-day cooldown matches pnpm's minimumReleaseAge; vendored
# subtrees under repos/ are never updated in place; @systemfsoftware/* moves with the flake input.
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: weekly
day: monday
cooldown:
default-days: 3
exclude-paths:
- "repos/**"
versioning-strategy: "increase"
open-pull-requests-limit: 20
ignore:
- dependency-name: "@systemfsoftware/*"
- dependency-name: "@types/node"
update-types: ["version-update:semver-major"]
- dependency-name: "typescript"
update-types: ["version-update:semver-major"]
groups:
effect-minor-patch:
patterns:
- "@effect/*"
- "effect"
- "oxlint"
- "@oxlint/*"
- "oxlint-tsgolint"
update-types: ["minor", "patch"]
effect-major:
patterns:
- "@effect/*"
- "effect"
- "oxlint"
- "@oxlint/*"
- "oxlint-tsgolint"
update-types: ["major"]
turborepo-minor-patch:
patterns:
- "turbo"
update-types: ["minor", "patch"]
testing-minor-patch:
patterns:
- "vitest"
- "@vitest/*"
update-types: ["minor", "patch"]
testing-major:
patterns:
- "vitest"
- "@vitest/*"
update-types: ["major"]
commitlint-minor-patch:
patterns:
- "@commitlint/*"
update-types: ["minor", "patch"]
typescript-minor-patch:
patterns:
- "typescript"
update-types: ["minor", "patch"]
types-node-minor-patch:
patterns:
- "@types/node"
update-types: ["minor", "patch"]
other-minor-patch:
patterns:
- "*"
exclude-patterns:
- "oxlint"
- "@oxlint/*"
- "@effect/*"
- "effect"
- "@commitlint/*"
- "typescript"
- "@types/node"
- "oxlint-tsgolint"
update-types: ["minor", "patch"]
major-updates:
patterns:
- "*"
exclude-patterns:
- "oxlint"
- "@oxlint/*"
- "@commitlint/*"
- "typescript"
- "@types/node"
- "@effect/*"
- "effect"
- "oxlint-tsgolint"
update-types: ["major"]

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
day: monday
cooldown:
default-days: 3
exclude-paths:
- "repos/**"
labels:
- "automerge"
groups:
github-actions-minor-patch:
patterns: ["*"]
update-types: ["minor", "patch"]

- package-ecosystem: "nix"
directory: "/"
schedule:
interval: weekly
day: monday
cooldown:
default-days: 3
exclude-paths:
- "repos/**"
groups:
minor-and-patch:
patterns: ["*"]
update-types: ["minor", "patch"]
135 changes: 135 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: CI

# One full gate per tree. A pull request runs it on its head; a Mergify queue draft runs it on the merged tree and is
# the binding result, because the ruleset's required check is injected on the queue branch. A long-lived branch that
# is not a pull request runs nothing, and a push to main runs it once for the commit that landed. Commit linting of
# the squashed message lives in `squash-message.yml`, so a title or body edit never re-runs this gate.
# A newer push to a pull request cancels its older run; main and Mergify queue drafts never cancel.
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

permissions:
contents: read
pull-requests: read

env:
CI: "true"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' && !startsWith(github.head_ref, 'mergify/merge-queue/') }}

jobs:
static-checks:
name: static checks
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 26
- id: pnpm-store
uses: ./.github/actions/pnpm-store
- run: pnpm install --frozen-lockfile
# Only this job, and only on a push to main, writes the pnpm store; every other run restores it read-only.
- if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.pnpm-store.outputs.hit != 'true'
uses: ./.github/actions/pnpm-store
with:
mode: save
key: ${{ steps.pnpm-store.outputs.key }}
- run: pnpm format:check
- run: pnpm lint
- run: pnpm typecheck
# attw and publint guard the built dual-format output, so the build precedes them.
- run: pnpm build
- run: pnpm --filter @systemfsoftware/react-error-boundary exec attw --pack .
- run: pnpm --filter @systemfsoftware/react-error-boundary exec publint

changeset:
name: change intent
if: github.event_name == 'pull_request' && github.head_ref != 'changeset-release/main'
uses: systemfsoftware/pnpm-release-management/.github/workflows/changeset-check.yml@1e897828d917341fb7dd444c7bbd6cfa0998caa9
permissions:
contents: read
pull-requests: read

test:
name: test (node ${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
node: [26]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.node }}
- uses: ./.github/actions/pnpm-store
- run: pnpm install --frozen-lockfile
# The storybook project drives real Chromium, so the lane fetches the browser build the lockfile's playwright
# version names, with the system libraries headless Chromium needs.
- id: browser
name: Restore the Playwright browser
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: playwright-${{ runner.os }}-
- name: Install the Playwright browser
run: pnpm --filter @systemfsoftware/react-error-boundary exec playwright install --with-deps chromium
# Only a push to main writes the browser cache, as with the pnpm store.
- if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.browser.outputs.cache-hit != 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/ms-playwright
key: ${{ steps.browser.outputs.cache-primary-key }}
- run: pnpm test

# The one check the ruleset requires and the Mergify queue gates on; the name matches the shared CI of the other
# systemfsoftware repositories. List every other job in `needs`: a job left out is not gated. The job always runs,
# and any dependency that did not conclude `success` — skipped, cancelled or failed — fails it, so a run that did
# not execute the gate can never stand in for one that passed.
check:
name: checks / check
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [static-checks, changeset, test]
if: ${{ always() }}
steps:
- name: Require every job to succeed
env:
STATIC_CHECKS: ${{ needs.static-checks.result }}
TEST: ${{ needs.test.result }}
CHANGESET: ${{ needs.changeset.result }}
EVENT: ${{ github.event_name }}
HEAD_REF: ${{ github.head_ref }}
run: |
status=0
for pair in "static-checks:$STATIC_CHECKS" "test:$TEST"; do
case "$pair" in
*:success) ;;
*) echo "A required job finished as: $pair"; status=1 ;;
esac
done
if [ "$CHANGESET" != success ]; then
if [ "$CHANGESET" = skipped ] && { [ "$EVENT" != pull_request ] || [ "$HEAD_REF" = changeset-release/main ]; }; then
:
else
echo "A required job finished as: changeset:$CHANGESET"
status=1
fi
fi
exit "$status"
15 changes: 0 additions & 15 deletions .github/workflows/eslint.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Nix

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
nix:
name: nix
uses: systemfsoftware/systemfsoftware/.github/workflows/reusable-nix.yml@15b4d2ab1e2af0a154fad2b9af7bd1f6449b3606
with:
systems: '[{"system": "x86_64-linux", "runner": "ubuntu-latest"}]'
28 changes: 0 additions & 28 deletions .github/workflows/pending-changes.yml

This file was deleted.

Loading