Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0194f9f
feat!: Injecting check utility into Assertion
cmath10 Nov 30, 2025
7492bda
feat!: isObject now returns false on null values, added isShape predi…
cmath10 Nov 30, 2025
8cc3132
test: Raised node's minimum version to v22
cmath10 Nov 30, 2025
6193d15
feat!: redesign assertion API around structured violations
cmath10 Mar 7, 2026
c2cde0e
docs: Validator agent guidance and local skills were added
cmath10 Mar 7, 2026
39c835f
docs: README was rewritten for project positioning
cmath10 Mar 7, 2026
1dbfc96
test: Coverage was expanded to 100%
cmath10 Mar 7, 2026
918b444
docs: Added code of conduct
cmath10 Mar 7, 2026
e90947b
feat!: Validation API was redesigned around typed tuples
cmath10 Mar 7, 2026
13bc348
refactor: Violation semantics were unified
cmath10 Mar 7, 2026
73690a7
refactor(combinators): Structural helpers were consolidated
cmath10 Mar 7, 2026
9a81af0
feat(combinators): Added tuple and record validators
cmath10 Mar 7, 2026
b4722ac
feat(combinators): Added union variant validators
cmath10 Mar 7, 2026
8b1b7f8
feat: Shape object API was unified
cmath10 Mar 7, 2026
3688f9c
test(assertions): Assertion tests were consolidated
cmath10 Mar 7, 2026
45f66a6
test(tests): Validation API tests were reorganized
cmath10 Mar 7, 2026
9507741
feat(combinators): Added object-level shape refinement runtime
cmath10 Mar 7, 2026
6137594
feat(combinators): Extended fieldsMatch with nested selectors
cmath10 Mar 7, 2026
7cce91e
feat: Added violation collection utilities
cmath10 Mar 7, 2026
b6ea612
test: Validator coverage was raised to 100%
cmath10 Mar 7, 2026
e96f520
feat: Added metadata and introspection API
cmath10 Mar 7, 2026
7bd7531
feat: Expanded metadata introspection contracts
cmath10 Mar 8, 2026
9d1b783
feat: Added JSON Schema export entrypoint
cmath10 Mar 8, 2026
614df17
docs: Added localized documentation guides
cmath10 Mar 8, 2026
00227ce
ci: Type tests were added to workflow
cmath10 Mar 8, 2026
67571fa
ci: Release workflow and actionlint checks were added
cmath10 Mar 8, 2026
99ddaa4
build: Yarn 4 toolchain was adopted
cmath10 Mar 8, 2026
26279c4
test: Coverage was raised to 100 percent
cmath10 Mar 8, 2026
cb97828
docs: Recipes and AI reference were added
cmath10 Mar 8, 2026
4de0cc1
build: Commitlint packages were updated
cmath10 Mar 8, 2026
318e83a
chore: Updated yarn.lock
cmath10 Mar 8, 2026
da9b64d
build: ESLint packages were updated
cmath10 Mar 8, 2026
68902ff
chore: Updated yarn.lock
cmath10 Mar 8, 2026
8a9da87
test: V8 coverage provider was adopted
cmath10 Mar 9, 2026
3208556
chore: Updated yarn.lock
cmath10 Mar 9, 2026
610134c
feat: Added simple runtime predicates for built-in values
cmath10 Mar 9, 2026
c588e81
feat(assertions): Added reusable assertion mixins for strings and num…
cmath10 Mar 9, 2026
db773b7
build: Updated Vite entrypoints
cmath10 Mar 9, 2026
8f96f4b
chore: Added drafts ignore
cmath10 Mar 9, 2026
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
40 changes: 40 additions & 0 deletions .github/actions/setup-node-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Setup Node and dependencies
description: Setup Node.js runtime, restore Yarn cache, and install dependencies.

inputs:
node-version:
description: Node.js version
required: false
default: 24.x
registry-url:
description: Optional npm registry URL for setup-node
required: false
default: ''
install-args:
description: Extra arguments passed to yarn install
required: false
default: --immutable

runs:
using: composite
steps:
- name: Setup Node.js
if: ${{ inputs.registry-url == '' }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: yarn
cache-dependency-path: yarn.lock

- name: Setup Node.js with registry
if: ${{ inputs.registry-url != '' }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
registry-url: ${{ inputs.registry-url }}
cache: yarn
cache-dependency-path: yarn.lock

- name: Install dependencies
shell: bash
run: yarn install ${{ inputs.install-args }}
116 changes: 116 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Release

on:
workflow_dispatch:
inputs:
release:
description: "Release type"
required: true
default: "auto"
type: choice
options:
- auto
- patch
- minor
- major
prerelease:
description: "Prerelease channel"
required: true
default: "none"
type: choice
options:
- none
- alpha
- beta
- rc
npm_tag:
description: "npm dist-tag for publication"
required: true
default: "latest"
type: string

permissions:
contents: write

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Validate release branch and npm tag
env:
NPM_TAG: ${{ inputs.npm_tag }}
run: |
if [ "$NPM_TAG" = "latest" ] && [ "$GITHUB_REF" != "refs/heads/main" ]; then
echo "Release to npm tag 'latest' must be started from the main branch."
exit 1
fi

- name: Setup Node.js and dependencies
uses: ./.github/actions/setup-node-deps
with:
node-version: 24.x
registry-url: https://registry.npmjs.org

- name: Configure git user
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Run release checks
run: |
yarn lint
yarn typecheck
yarn test

- name: Run release script
env:
RELEASE_TYPE: ${{ inputs.release }}
PRERELEASE: ${{ inputs.prerelease }}
run: |
case "$RELEASE_TYPE" in
auto)
RELEASE_SCRIPT="release"
;;
patch)
RELEASE_SCRIPT="release:patch"
;;
minor)
RELEASE_SCRIPT="release:minor"
;;
major)
RELEASE_SCRIPT="release:major"
;;
*)
echo "Unknown release type: $RELEASE_TYPE"
exit 1
;;
esac

CMD=(yarn run "$RELEASE_SCRIPT")
if [ "$PRERELEASE" != "none" ]; then
CMD+=(--prerelease "$PRERELEASE")
fi

"${CMD[@]}"

- name: Build package
run: yarn build

- name: Push release commit and tags
run: git push origin "HEAD:${GITHUB_REF_NAME}" --follow-tags

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TAG: ${{ inputs.npm_tag }}
run: npm publish --access public --tag "$NPM_TAG"
124 changes: 59 additions & 65 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,83 +6,77 @@ on:
pull_request:
branches: [ "main" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
actionlint:
runs-on: ubuntu-22.04

steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4

- name: Run actionlint
run: make actionlint

eslint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
matrix:
node-version: [ 18.x, 20.x ]
node-version: [ 22.x, 24.x ]

steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Cache dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: .yarn
key: ${{ runner.OS }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-${{ matrix.node-version }}-yarn-

- name: Install dependencies
run: |
yarn install

- name: Run lint
run: |
yarn lint
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4

- name: Setup Node.js and dependencies
uses: ./.github/actions/setup-node-deps
with:
node-version: ${{ matrix.node-version }}

- name: Run lint
run: yarn lint

tests:
needs: eslint
needs: [ actionlint, eslint ]

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [22.x, 24.x]

steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Cache dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: .yarn
key: ${{ runner.OS }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-${{ matrix.node-version }}-yarn-

- name: Install dependencies
run: |
yarn install

- name: Run tests
run: |
yarn test:coverage

- name: Upload coverage to GitHub Artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.node-version }}
path: coverage/

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4

- name: Setup Node.js and dependencies
uses: ./.github/actions/setup-node-deps
with:
node-version: ${{ matrix.node-version }}

- name: Run tests
run: yarn test:coverage

- name: Run type tests
run: yarn test:d

- name: Upload coverage to GitHub Artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.node-version }}
path: coverage/
retention-days: 30

- name: Upload coverage reports to Codecov
if: matrix.node-version == '24.x'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
disable_search: true
fail_ci_if_error: true
verbose: true
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ coverage/
dist/
node_modules/
reports/
.yarn/cache/
.yarn/unplugged/
.yarn/build-state.yml
.yarn/install-state.gz

.npmrc
.npmrc
Loading