2 Commits
Author SHA1 Message Date
CatoandClaude Sonnet 5.5 a198f6a9f7 fix: icon scales with the field's text; codemod skips comments (0.3.1)
A fixed 20px calendar icon made a dense 12px input taller than its
neighbours (34px vs 30px). The icon is now 1.25em. The browser check has a
compact input and fails on the old icon (it first passed on it — the limit
was exactly the old height; tightened and re-proven).

The codemod no longer edits comments or files already on whenkit (it
rewrote its own shim, whose comment mentioned the tag).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
2026-10-08 14:56:11 +02:00
CatoandClaude Sonnet 5.5 15ed5a9c84 chore: codemod to migrate date inputs to DateInput
A JSX tag scanner (braces, strings, template literals — not a regex over
attributes) that changes <input type=date|datetime-local> to DateInput and
adds one import. Lists what it will not guess. Tested on tricky fixtures,
including the blank-line-after-imports bug its own test caught; a second run
changes nothing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
2026-10-08 14:40:38 +02:00
17 changed files with 172 additions and 707 deletions

No files matched your search

-21
View File
@@ -1,21 +0,0 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
ignore:
# typescript-eslint does not support TypeScript 7 yet (CI: "typescript-eslint
# does not support TS 7.0"), so every dev-dependency PR that carries it is red.
# Take it when typescript-eslint does.
- dependency-name: typescript
update-types: ["version-update:semver-major"]
groups:
dev:
dependency-type: development
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 3
-45
View File
@@ -1,45 +0,0 @@
name: Verified Git release
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
permissions:
contents: write
concurrency:
group: verified-git-release
cancel-in-progress: false
jobs:
release:
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_repository.full_name == github.repository &&
github.event.workflow_run.head_branch == 'main' &&
github.event.workflow_run.event != 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.event.workflow_run.head_sha }}
fetch-depth: 0
- name: Tag the verified immutable artifact, even before npm bootstrap
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERIFIED_SHA: ${{ github.event.workflow_run.head_sha }}
run: |
set -euo pipefail
version=$(node -p "require('./package.json').version")
if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Only stable package versions get a Git release" >&2
exit 1
fi
tag="v$version"
if git show-ref --verify --quiet "refs/tags/$tag"; then
echo "$tag already exists; immutable tags are never moved."
exit 0
fi
git tag "$tag" "$VERIFIED_SHA"
git push origin "refs/tags/$tag"
gh release create "$tag" --repo "$GITHUB_REPOSITORY" \
--verify-tag --title "$tag" --generate-notes
+50 -131
View File
@@ -1,45 +1,30 @@
# prettier-ignore
name: Publish
# The same file in every @bitbaum package. A merged version bump releases
# itself; so does a pushed v* tag, and "Run workflow" re-tries by hand.
# Publishing is driven by a version tag, so the released artifact is always
# traceable to a commit. `npm version` creates the tag; pushing it ships.
#
# Two ways to npm, picked per run:
# Auth is npm Trusted Publishing (OIDC): npmjs.com trusts exactly THIS
# workflow in THIS repo. No token exists anywhere — nothing to store, leak, or
# rotate — and provenance is attested on the registry. `npm publish`
# (npm >= 11.5) exchanges the id-token itself. Copied from chatkit (which copied speechkit and ai-kit).
#
# - The package is already on npm → tokenless. npmjs.com trusts exactly THIS
# workflow in THIS repo (Trusted Publishing, OIDC): no token exists, nothing
# to leak or rotate, and every release carries a signed provenance statement.
#
# - The package is NOT on npm yet → npm will not trust a publisher for a
# package that does not exist, so the first version needs the account once.
# Put a short-lived npm token in the org secret NPM_BOOTSTRAP_TOKEN (made on
# npmjs.com from a phone; see docs in bitbaum/fleet) and this job publishes
# the first version with it. Without the token it skips GREEN and says so, so
# a new package never paints CI red.
# NOTE (npm docs, `npm trust`): trust commands do NOT accept a granular token,
# not even one with "bypass 2FA" — they need the account's interactive 2FA.
# So the auto-link step below is best-effort and is EXPECTED to fall through
# to the printed fallback. The human step is then ONE form per package on
# npmjs.com (repo + "publish.yml"), or one local `npm trust` loop
# (bootstrap-local.sh, step 2). After that, every release is tokenless.
#
# Publishing is idempotent: a version already on the registry is a green
# no-op, so re-runs and repeat merges are harmless.
# NOT YET BOOTSTRAPPED. npm cannot trust a publisher for a package that does
# not exist, and the account's second factor is a passkey only a human holds,
# so the FIRST publish is manual (see README → "npm"). Until then every tag
# would fail here — a red run that means nothing is wrong. So the job checks
# the repo variable NPM_PUBLISHING and skips GREEN, saying why, unless it is
# "on". Set it after the bootstrap: gh variable set NPM_PUBLISHING -b on
on:
push:
tags: ["v*"]
branches: [main]
# The auto-merge sweep re-arms this after a GITHUB_TOKEN merge, which
# starts no push workflow on its own (rearm_workflows in auto-merge.yml).
workflow_dispatch:
inputs:
diagnose_auth:
description: Test the npm trusted-publisher link without publishing anything.
type: boolean
default: false
# Never two at once, never cancelled: a cancelled publish is a half-shipped
# release.
# Publishing is idempotent: the job first asks the registry whether
# package.json's version already exists and skips (green) if it does. A
# re-pushed tag, a re-run, or two runs for the same version cannot paint a
# spurious E403 red — a red run that means "nothing is wrong" trains everyone
# to ignore the workflow (bip-kit 0.2.6 and 0.2.7, 2026-09-11). Runs are also
# serialised so two cannot race past the check; never cancelled, because a
# cancelled publish is a half-shipped release.
concurrency:
group: publish
cancel-in-progress: false
@@ -47,11 +32,11 @@ concurrency:
jobs:
publish:
runs-on: ubuntu-latest
if: vars.NPM_PUBLISHING == 'on'
permissions:
# write: tag the released commit v<version> when the release came from
# main rather than from a pushed tag.
contents: write
# Required for OIDC publishing and npm provenance.
contents: read
# Required for npm provenance — proves on the registry that this tarball
# was built by this workflow from this commit.
id-token: write
steps:
- uses: actions/checkout@v7
@@ -59,78 +44,33 @@ jobs:
# pnpm version comes from "packageManager" in package.json (SSOT).
- uses: pnpm/action-setup@v6
# No registry-url: setup-node would write an _authToken line that makes
# npm skip the OIDC exchange whenever no token is set.
- uses: actions/setup-node@v7
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
# Trusted publishing and `npm trust` need npm >= 11.10; do not trust
# whatever the runner's Node happens to bundle.
- run: npm install -g npm@11
# "Run workflow" with diagnose_auth ticked asks npm whether it trusts
# THIS workflow for this package, and publishes nothing. HTTP 200 =
# linked; 404 = the one form on npmjs.com is still to be filled in. The
# response body holds a short-lived token, so it is never printed.
- name: Is the npm trusted publisher linked? (no publish)
if: inputs.diagnose_auth == true
run: |
node --input-type=module <<'NODE'
const url = new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);
url.searchParams.set('audience', 'npm:registry.npmjs.org');
const identity = await fetch(url, {
headers: { authorization: `Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}` },
signal: AbortSignal.timeout(30000),
});
if (!identity.ok) throw new Error(`GitHub OIDC request failed: HTTP ${identity.status}`);
const { value: jwt } = await identity.json();
const claims = JSON.parse(Buffer.from(jwt.split('.')[1], 'base64url'));
console.log('Publisher identity:', JSON.stringify({ repository: claims.repository, workflow_ref: claims.workflow_ref, ref: claims.ref }));
const name = JSON.parse(await (await import('node:fs/promises')).readFile('package.json', 'utf8')).name;
const exchange = await fetch(`https://registry.npmjs.org/-/npm/v1/oidc/token/exchange/package/${encodeURIComponent(name)}`, {
method: 'POST', headers: { authorization: `Bearer ${jwt}` },
signal: AbortSignal.timeout(30000),
});
console.log(`npm trust exchange for ${name}: HTTP ${exchange.status}`);
await exchange.body?.cancel();
if (!exchange.ok) throw new Error('npm does not trust this workflow for this package yet');
NODE
- name: What does npm have?
- name: Is this version already on the registry?
id: check
if: inputs.diagnose_auth != true
env:
BOOTSTRAP: ${{ secrets.NPM_BOOTSTRAP_TOKEN != '' }}
run: |
name=$(node -p "require('./package.json').name")
version=$(node -p "require('./package.json').version")
echo "name=$name" >> "$GITHUB_OUTPUT"
echo "version=$version" >> "$GITHUB_OUTPUT"
if npm view "$name@$version" version >/dev/null 2>&1; then
echo "→ $name@$version is already published; nothing to do."
echo "publish=false" >> "$GITHUB_OUTPUT"
echo "✅ \`$name@$version\` is already on npm — nothing to do." >> "$GITHUB_STEP_SUMMARY"
elif npm view "$name" version >/dev/null 2>&1; then
echo "publish=true" >> "$GITHUB_OUTPUT"
echo "mode=oidc" >> "$GITHUB_OUTPUT"
elif [ "$BOOTSTRAP" = "true" ]; then
echo "publish=true" >> "$GITHUB_OUTPUT"
echo "mode=first" >> "$GITHUB_OUTPUT"
echo "✅ \`$name@$version\` is already published — nothing to do." >> "$GITHUB_STEP_SUMMARY"
else
echo "publish=false" >> "$GITHUB_OUTPUT"
{
echo "⏸ \`$name\` is not on npm yet, and its first version needs the account once."
echo "Add the org secret NPM_BOOTSTRAP_TOKEN (a short-lived npm token) and run this workflow again."
echo "Meanwhile it installs from GitHub: \`pnpm add github:${GITHUB_REPOSITORY}\`"
} >> "$GITHUB_STEP_SUMMARY"
echo "→ $name@$version is not on the registry; releasing it."
echo "publish=true" >> "$GITHUB_OUTPUT"
fi
- if: steps.check.outputs.publish == 'true'
run: pnpm install --frozen-lockfile --ignore-scripts
# verify includes the real-browser test (test/browser.mjs) where a
# package has one; without the browser it fails before reaching npm.
- if: steps.check.outputs.publish == 'true' && hashFiles('test/browser.mjs') != ''
# verify includes the real-browser test (test/browser.mjs), as in ci.yml;
# without the browser the v0.2.1 publish failed before reaching npm.
- if: steps.check.outputs.publish == 'true'
run: pnpm exec playwright install --with-deps chromium
# Never publish something that would not have passed CI.
@@ -140,7 +80,7 @@ jobs:
# Refuse to publish a tag whose version does not match package.json,
# rather than silently shipping the wrong number.
- name: Check tag matches package version
if: steps.check.outputs.publish == 'true' && github.ref_type == 'tag'
if: steps.check.outputs.publish == 'true'
run: |
tag="${GITHUB_REF_NAME#v}"
pkg=$(node -p "require('./package.json').version")
@@ -149,52 +89,31 @@ jobs:
exit 1
fi
- name: Publish to npm
# npm >= 11.5 exchanges the OIDC id-token itself — no secret involved.
- name: Publish to npm (OIDC, tokenless)
if: steps.check.outputs.publish == 'true'
env:
NAME: ${{ steps.check.outputs.name }}
VERSION: ${{ steps.check.outputs.version }}
MODE: ${{ steps.check.outputs.mode }}
FIRST_TOKEN: ${{ secrets.NPM_BOOTSTRAP_TOKEN }}
run: |
if [ "$MODE" = "first" ]; then
# The one token-based publish in a package's life.
echo "//registry.npmjs.org/:_authToken=${FIRST_TOKEN}" > "$RUNNER_TEMP/.npmrc"
export NPM_CONFIG_USERCONFIG="$RUNNER_TEMP/.npmrc"
fi
if npm publish --access public --provenance; then
if npm publish; then
echo "🚀 Published \`$NAME@$VERSION\`." >> "$GITHUB_STEP_SUMMARY"
elif npm view "$NAME@$VERSION" version >/dev/null 2>&1; then
# Another run slipped in between the check and this publish: the
# version is on the registry, which is the goal state.
echo "✅ \`$NAME@$VERSION\` was published by a concurrent run." >> "$GITHUB_STEP_SUMMARY"
# The check above and this publish are not atomic. If another run
# slipped between them, the version is on the registry — which is
# the goal state, not an error.
echo "→ $NAME@$VERSION was published by a concurrent run; nothing to do."
echo "✅ \`$NAME@$VERSION\` was published by a concurrent run — nothing to do." >> "$GITHUB_STEP_SUMMARY"
else
exit 1
fi
if [ "$MODE" = "first" ]; then
# From now on this workflow publishes without any token.
if npm trust github "$NAME" --file publish.yml --repo "$GITHUB_REPOSITORY" --allow-publish --yes; then
echo "🔗 Linked \`$NAME\` to this workflow — later releases need no token." >> "$GITHUB_STEP_SUMMARY"
else
{
echo "⚠️ Published. npm does not let a token link the workflow (expected)."
echo "Link it once on https://www.npmjs.com/package/$NAME/access → Trusted Publisher → GitHub Actions:"
echo "repository \`$GITHUB_REPOSITORY\`, workflow \`publish.yml\`, tick *Allow npm publish*."
} >> "$GITHUB_STEP_SUMMARY"
fi
fi
rm -f "$RUNNER_TEMP/.npmrc"
# A release from main gets its tag here, so every published version is
# still traceable to a commit by name.
- name: Tag the released commit
if: steps.check.outputs.publish == 'true' && github.ref_type != 'tag'
env:
VERSION: ${{ steps.check.outputs.version }}
run: |
if git ls-remote --exit-code --tags origin "refs/tags/v$VERSION" >/dev/null; then
echo "→ v$VERSION already tagged."
else
git tag "v$VERSION" "$GITHUB_SHA"
git push origin "v$VERSION"
fi
# Present only so a tag before the bootstrap reads as a decision, not a
# silent no-op: the run is green and its summary says what to do.
not-yet:
runs-on: ubuntu-latest
if: vars.NPM_PUBLISHING != 'on'
steps:
- run: |
echo "npm publishing is not bootstrapped for this repo yet — nothing published." >> "$GITHUB_STEP_SUMMARY"
echo "Consumers install from git meanwhile: pnpm add github:bitbaum/whenkit#${GITHUB_REF_NAME}" >> "$GITHUB_STEP_SUMMARY"
-55
View File
@@ -1,55 +0,0 @@
# A release is useful only when the registry and consumers learn about it.
# No checkout or execution of the completed workflow's code: metadata only.
name: Notify Fleet of verified release
on:
workflow_run:
workflows: [CI, Release, Publish]
types: [completed]
permissions:
contents: read
actions: read
concurrency:
group: release-notify
cancel-in-progress: false
jobs:
notify:
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'pull_request' && github.event.workflow_run.head_repository.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Resolve a verified immutable release before requesting reconciliation
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
SHA: ${{ github.event.workflow_run.head_sha }}
FLEET_TOKEN: ${{ secrets.FLEET_PAT }}
shell: bash
run: |
set -euo pipefail
manifest="$(gh api "repos/$GH_REPO/contents/package.json?ref=$SHA" --jq .content | base64 --decode)"
version="$(jq -r .version <<< "$manifest")"
if [[ ! "$version" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
echo 'No stable version; no reconciliation requested.'
exit 0
fi
# Source commits with no matching release tag are not releases.
if ! tagged="$(gh api "repos/$GH_REPO/commits/v$version" --jq .sha 2>/dev/null)" || [ "$tagged" != "$SHA" ]; then
echo 'This commit is not the versioned release; no reconciliation requested.'
exit 0
fi
ci="$(gh api "repos/$GH_REPO/actions/runs?head_sha=$SHA&per_page=100" --jq '[.workflow_runs[] | select(.path == ".github/workflows/ci.yml" and (.event == "push" or .event == "workflow_dispatch"))] | first | .conclusion')"
if [ "$ci" != success ]; then
echo 'Release CI is not successful yet; its completion will retry notification.'
exit 0
fi
if [ -z "$FLEET_TOKEN" ]; then
echo '::error::FLEET_PAT is required to notify Fleet; scheduled reconciliation remains the fallback.'
exit 1
fi
payload="$(jq -n --arg repository "$GH_REPO" --arg version "$version" --arg commit "$SHA" '{event_type:"shared-package-release",client_payload:{repository:$repository,version:$version,commit:$commit}}')"
GH_TOKEN="$FLEET_TOKEN" gh api --method POST repos/bitbaum/fleet/dispatches --input - <<< "$payload"
echo "Requested authoritative registry and consumer reconciliation for $GH_REPO v$version ($SHA)." >> "$GITHUB_STEP_SUMMARY"
-212
View File
@@ -1,212 +0,0 @@
# Release — a new version of this package, from one button.
#
# Rendered from bitbaum/fleet templates/package. Loki's package page starts it
# ("Release vX.Y.Z"), and so can anyone from the Actions tab. It:
#
# 1. refuses unless main's CI is green on the exact commit it starts from,
# 2. raises the version in package.json (the bump, or the exact version
# asked for) — `npm version --no-git-tag-version`, so npm makes no commit
# and no tag of its own,
# 3. runs the package's own `verify`, which rebuilds the committed dist/,
# 4. commits "release vX.Y.Z" with the rebuilt dist/, tags vX.Y.Z, and pushes
# both in one atomic push,
# 5. creates a GitHub release with generated notes.
#
# Consumers pick the tag up through Dependabot (`github:bitbaum/whenkit#vX.Y.Z`),
# and publish.yml ships it to npm once npm publishing is switched on.
#
# WHY THE PUSH USES FLEET_PAT. A push made with GITHUB_TOKEN starts no workflow.
# publish.yml listens for the tag push, and CI must run on the release commit
# (the auto-merge sweep merges nothing onto a main whose CI it cannot see). So
# the release commit and tag are pushed with FLEET_PAT, the org secret every
# bitbaum repo already has (auto-merge.yml passes it to the sweep), and both
# workflows fire exactly as they would for a person's push. Calling publish.yml
# from here instead was the other option and is not the honest one: package
# repos keep the publish.yml they were created with (the template sync adds
# missing files and never rewrites one), so the tag push is the only path every
# repo's publish.yml is guaranteed to answer. No FLEET_PAT → no release, said
# plainly, rather than a tag that silently publishes nothing.
#
# If main is ever protected against direct pushes, FLEET_PAT's identity must be
# allowed to bypass it, or this fails at the push — after verify, before any
# tag exists, so nothing half-ships.
name: Release
run-name: Release ${{ inputs.version != '' && format('v{0}', inputs.version) || inputs.bump }}
on:
workflow_dispatch:
inputs:
bump:
description: Which part of the version to raise (ignored when an exact version is given)
type: choice
options: [patch, minor, major]
default: patch
version:
description: Exact version to release, e.g. 0.3.0 (optional — wins over bump)
type: string
required: false
default: ""
# One release at a time, never cancelled: a cancelled release is a commit
# without its tag, or a tag without its notes.
concurrency:
group: release
cancel-in-progress: false
permissions:
contents: write # the GitHub release (the push itself uses FLEET_PAT)
actions: read # main's CI runs
checks: read
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Only from main
run: |
if [ "$GITHUB_REF" != "refs/heads/main" ]; then
echo "::error::A release starts from main, not $GITHUB_REF."
exit 1
fi
- name: FLEET_PAT is available
env:
PAT: ${{ secrets.FLEET_PAT }}
run: |
if [ -z "$PAT" ]; then
echo "::error::FLEET_PAT is not available to this repo. A tag pushed without it starts no workflow, so publish.yml would never run — refusing instead."
exit 1
fi
# The commit this run would release is github.sha: main's head when the
# run was started. Its CI must have FINISHED green — running is not green,
# and no run at all is not green either.
- name: Main's CI is green on this commit
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
SHA: ${{ github.sha }}
run: |
set -euo pipefail
run="$(gh run list --workflow ci.yml --branch main --commit "$SHA" --limit 1 \
--json status,conclusion,url --jq '.[0] // empty')"
if [ -z "$run" ]; then
echo "::error::CI has not run on main at ${SHA:0:7}. Nothing proves this commit works, so it is not released."
exit 1
fi
status="$(jq -r .status <<<"$run")"
conclusion="$(jq -r .conclusion <<<"$run")"
url="$(jq -r .url <<<"$run")"
if [ "$status" != "completed" ]; then
echo "::error::CI is still running on ${SHA:0:7} ($url). Start the release again when it finishes."
exit 1
fi
if [ "$conclusion" != "success" ]; then
echo "::error::CI on ${SHA:0:7} ended '$conclusion' ($url). Fix main first; a red commit is not released."
exit 1
fi
echo "CI on ${SHA:0:7} is green: $url"
- uses: actions/checkout@v7
with:
ref: ${{ github.sha }}
token: ${{ secrets.FLEET_PAT }}
fetch-depth: 0
fetch-tags: true
# pnpm version comes from "packageManager" in package.json (SSOT).
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: "24"
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Install Chromium when the package uses Playwright
run: |
if node -e 'const p = require("./package.json"); const d = { ...p.dependencies, ...p.devDependencies }; process.exit(d.playwright || d["@playwright/test"] ? 0 : 1)'; then
pnpm exec playwright install --with-deps chromium
fi
# Inputs reach the shell as environment variables, never pasted into the
# script: a `version` is free text typed by whoever started the run.
- name: Decide the version
id: version
env:
BUMP: ${{ inputs.bump }}
EXACT: ${{ inputs.version }}
run: |
set -euo pipefail
next="$(node -e '
const cur = require("./package.json").version;
const bump = process.env.BUMP, exact = process.env.EXACT.trim().replace(/^v/, "");
const parse = (v) => /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.exec(v)?.slice(1).map(Number);
const c = parse(cur);
if (!c) { console.error(`package.json version "${cur}" is not x.y.z`); process.exit(1); }
let n;
if (exact) {
n = parse(exact);
if (!n) { console.error(`"${exact}" is not a version like 0.3.0`); process.exit(1); }
} else if (bump === "major") n = [c[0] + 1, 0, 0];
else if (bump === "minor") n = [c[0], c[1] + 1, 0];
else if (bump === "patch") n = [c[0], c[1], c[2] + 1];
else { console.error(`bump must be patch, minor or major, not "${bump}"`); process.exit(1); }
const cmp = n[0] - c[0] || n[1] - c[1] || n[2] - c[2];
if (cmp <= 0) { console.error(`${n.join(".")} is not newer than ${cur}`); process.exit(1); }
console.log(n.join("."));
')"
if git rev-parse -q --verify "refs/tags/v$next" >/dev/null \
|| [ -n "$(git ls-remote --tags origin "refs/tags/v$next")" ]; then
echo "::error::v$next is already tagged. Nothing to do — Loki shows it on the next read."
exit 1
fi
echo "next=$next" >> "$GITHUB_OUTPUT"
echo "Releasing v$next (package.json was $(node -p 'require("./package.json").version'))."
- name: Raise the version
env:
NEXT: ${{ steps.version.outputs.next }}
run: npm version "$NEXT" --no-git-tag-version
# The package's own gate. It rebuilds dist/, which is committed so a
# `github:` install needs no build step.
- run: pnpm run verify
- name: Commit, tag and push
env:
NEXT: ${{ steps.version.outputs.next }}
run: |
set -euo pipefail
# Only the version and the build it implies may change. Anything else
# means verify rewrote source, and that is a change to review, not to
# release.
stray="$(git status --porcelain --untracked-files=all | awk '{print $2}' | grep -v -E '^(package\.json|dist/)' || true)"
if [ -n "$stray" ]; then
echo "::error::verify changed files outside package.json and dist/: $stray"
exit 1
fi
git config user.name "bitbaum-fleet"
git config user.email "fleet@bitbaum.invalid"
git add package.json dist
git commit -q -m "release v$NEXT"
git tag -a "v$NEXT" -m "v$NEXT"
# Atomic: the commit and the tag land together or not at all. A main
# that moved since this run started refuses the push (not a fast
# forward), and the release is simply started again.
git push --atomic origin "HEAD:refs/heads/main" "refs/tags/v$NEXT"
- name: GitHub release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
NEXT: ${{ steps.version.outputs.next }}
run: |
set -euo pipefail
gh release create "v$NEXT" --verify-tag --title "v$NEXT" --generate-notes
{
echo "## Released v$NEXT"
echo
echo "Install: \`github:$GITHUB_REPOSITORY#v$NEXT\`. Dependabot proposes it to every project that uses this package."
} >> "$GITHUB_STEP_SUMMARY"
-46
View File
@@ -1,46 +0,0 @@
# Agents
<!-- fleet:rules:begin — generated from bitbaum/fleet templates/agent-rules.md; edit it there, not here -->
## Org rules
Read `bitbaum/fleet` `AGENTS.md`, `SHARED.md` and the registers it names before
inventing a host, a name, a page or a shared behaviour. Do not copy their facts
into this file.
- **Packages first.** If a `@bitbaum/*` package (or `bip-kit`, `limitkit`,
`threadkit`, `ai-forms`) already does it, use it and fix a defect in the
package, not in this app. Every chat is `@bitbaum/chatkit`, every search box
`@bitbaum/searchkit`, every chart `@bitbaum/chartkit`, accounts
`@bitbaum/accountkit`, model calls `@bitbaum/ai-kit`. Review this product's
`package-plan.json` before building anything.
- **One shape per kind.** Things of the same kind look the same and sit in the
same place (fleet `AGENTS.md`, "One shape per kind").
- **Finished work ships by itself.** Open a non-draft pull request; the fleet
auto-merge sweep is the only merge path. Never merge by hand, through the
merge API, with `--auto` or with an admin bypass, and never force-push a
shared branch.
- **Nothing made up.** A fact on a page or in a doc needs a source that was
opened; where there is none, the line is removed or softened.
- **Bitcoin orange is for Bitcoin and top-of-funnel actions only.**
- **No model identifier** in anything pushed to a repository.
- Before you finish, run `node <fleet>/scripts/ci/docs-truth-audit.mjs --dir .`:
the same check the sweep runs on every pull request.
<!-- fleet:rules:end -->
Read `bitbaum/fleet` `AGENTS.md` and `SHARED.md` for shared-package ownership,
release and merge policy. Repository-specific instructions belong below.
This repository owns a reusable package. Fix shared defects here, verify the
package's public exports and affected consumer behavior, release through its
verified release workflow, then update consumers. Preserve product-specific
roles, tenancy, provider configuration and domain behavior in app adapters.
Before adding another implementation, inspect Fleet's package registry for an
existing owner. Shared authentication belongs to `@bitbaum/accountkit`, chat
behavior to `@bitbaum/chatkit`, and model/provider transport to `@bitbaum/ai-kit`.
Read `package.json` for this package's verification command and run it before
publishing changes. Use Fleet's auto-merge sweep; do not bypass its required
checks or rollout holds with manual merging or built-in `--auto`.
-14
View File
@@ -1,14 +0,0 @@
# Changelog
This retrospective record was added on 2026-10-27 from the immutable sources
linked below. Git commit dates are source dates, not inferred npm publication
dates. A GitHub release does not itself establish npm publication.
Application adoption and deployment evidence are tracked separately.
## 0.3.2
- [Tagged source `v0.3.2`](https://github.com/bitbaum/whenkit/tree/f5e0a24208187091c2ca792008cdd7695a19910f)
- [Source commit](https://github.com/bitbaum/whenkit/commit/f5e0a24208187091c2ca792008cdd7695a19910f), dated 2026-10-08.
No authored release notes were found for this tag when this record was made.
The links identify the verified source; missing feature history is not invented.
-1
View File
@@ -1 +0,0 @@
Read and follow [AGENTS.md](AGENTS.md).
+1 -1
View File
@@ -5,7 +5,7 @@ length chips, a readable date field over the native picker, and a booking
request that resolves to `{ startsAt, endsAt }` in the provider's time zone.
```bash
pnpm add @bitbaum/whenkit
pnpm add github:bitbaum/whenkit#v0.3.1
```
```tsx
-6
View File
@@ -47,12 +47,6 @@ createRoot(document.getElementById("dialog")!).render(
createRoot(document.getElementById("own-class")!).render(
<DateInput className="app-input" defaultValue="2026-10-11" id="own" />,
);
createRoot(document.getElementById("match-date")!).render(
<DateInput className="match-input" defaultValue="2026-10-11" id="match" />,
);
createRoot(document.getElementById("block-class")!).render(
<DateInput className="block-input" defaultValue="2026-10-11" id="blocked" />,
);
createRoot(document.getElementById("compact-class")!).render(
<DateInput className="compact-input" defaultValue="2026-10-11" id="compact" />,
);
-20
View File
@@ -67,21 +67,6 @@
border-color: rgb(0, 0, 255);
}
}
/* An app's input, applied to a native input AND to DateInput: they must end up
the same height (a serif so its natural line height differs from 1.3). */
.match-input {
font-family: Georgia, serif;
font-size: 14px;
padding: 10px 14px;
border: 1.5px solid rgb(150, 150, 150);
border-radius: 10px;
width: 100%;
box-sizing: border-box;
}
/* A hostile app class: display:block on the same element (unlayered, later). */
.block-input {
display: block;
}
.resolved {
font-size: 11px;
opacity: 0.5;
@@ -110,11 +95,6 @@
<section><div id="own-class"></div></section>
<section><div id="util-class"></div></section>
<section><div id="compact-class"></div></section>
<section>
<input id="match-native" class="match-input" value="Bello" />
<div id="match-date" style="margin-top: 8px"></div>
</section>
<section><div id="block-class"></div></section>
</div>
<div class="dialog-like" id="dialog"></div>
</main>
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@bitbaum/whenkit",
"version": "0.3.3",
"version": "0.3.1",
"description": "Dates and times people can pick without typing: day chips, time chips, length chips, a readable date field over the native picker, and a low-friction booking request that resolves to {startsAt, endsAt} in the provider's zone.",
"license": "MIT",
"author": "Cato",
@@ -61,7 +61,7 @@
"test:browser": "pnpm run demo && node test/browser.mjs"
},
"devDependencies": {
"@bitbaum/design-tokens": "^1.2.0",
"@bitbaum/design-tokens": "^1.1.0",
"@eslint/js": "^10.0.1",
"@types/node": "^26.4.0",
"@types/react": "^19.2.18",
@@ -69,7 +69,7 @@
"esbuild": "^0.28.2",
"eslint": "^10.9.1",
"globals": "^17.11.0",
"playwright": "1.64.1",
"playwright": "1.63.0",
"prettier": "^3.9.6",
"react": "^19.2.8",
"react-dom": "^19.2.8",
+111 -111
View File
@@ -9,14 +9,14 @@ importers:
.:
devDependencies:
'@bitbaum/design-tokens':
specifier: ^1.2.0
version: 1.2.0
specifier: ^1.1.0
version: 1.1.0
'@eslint/js':
specifier: ^10.0.1
version: 10.0.1(eslint@10.13.0)
version: 10.0.1(eslint@10.12.0)
'@types/node':
specifier: ^26.4.0
version: 26.6.5
version: 26.6.4
'@types/react':
specifier: ^19.2.18
version: 19.3.0
@@ -28,33 +28,33 @@ importers:
version: 0.28.2
eslint:
specifier: ^10.9.1
version: 10.13.0
version: 10.12.0
globals:
specifier: ^17.11.0
version: 17.13.0
playwright:
specifier: 1.64.1
version: 1.64.1
specifier: 1.63.0
version: 1.63.0
prettier:
specifier: ^3.9.6
version: 3.9.10
version: 3.9.9
react:
specifier: ^19.2.8
version: 19.3.1
version: 19.3.0
react-dom:
specifier: ^19.2.8
version: 19.3.1(react@19.3.1)
version: 19.3.0(react@19.3.0)
typescript:
specifier: ^6.0.3
version: 6.0.3
typescript-eslint:
specifier: ^8.68.0
version: 8.72.0(eslint@10.13.0)(typescript@6.0.3)
version: 8.71.1(eslint@10.12.0)(typescript@6.0.3)
packages:
'@bitbaum/design-tokens@1.2.0':
resolution: {integrity: sha512-13TSrgYbEzSqt5FNfW3HSJIFcenUto8nKlk4J4IUsepL0gsTBoZ0YDMiJTaJKmR8sPPmcCS94Z/xgUBQW43itw==}
'@bitbaum/design-tokens@1.1.0':
resolution: {integrity: sha512-sDVplKP4jKe0WHCOnW7xk75RC46JsAYqUngcVlctyAs9f1TQqZqbYTfbmyYipYCOaCIHMflnzAneQTbqrQbtBw==}
engines: {node: '>=20'}
'@cacheable/memory@2.2.0':
@@ -296,8 +296,8 @@ packages:
'@types/json-schema@7.0.15':
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
'@types/node@26.6.5':
resolution: {integrity: sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==}
'@types/node@26.6.4':
resolution: {integrity: sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg==}
'@types/react-dom@19.3.0':
resolution: {integrity: sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==}
@@ -307,63 +307,63 @@ packages:
'@types/react@19.3.0':
resolution: {integrity: sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==}
'@typescript-eslint/eslint-plugin@8.72.0':
resolution: {integrity: sha512-aysKgysPX9XOv/dk95UkvUDe++Q3n3dJPG9CEWT3RUccxfkPJ+Qn6nhKPDhZXU6Ofo9kgwGWwKyQCnZIXTgngg==}
'@typescript-eslint/eslint-plugin@8.71.1':
resolution: {integrity: sha512-nNlBf6HuotqMgZvSkWD5hNdemiBIxQ2NmrlgfcUIeZRs+BbakjscCQRq/Hb74EFVnFiSWWdL12JruqwBy3ERDw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
'@typescript-eslint/parser': ^8.72.0
'@typescript-eslint/parser': ^8.71.1
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/parser@8.72.0':
resolution: {integrity: sha512-0O+x3ynciD6zuXb1CKSu165haQV6ey53DKhHHUnujP7U+XlltJG+/keT0Xhd1HXCze+IHf7Tvt39ovyepX/LNw==}
'@typescript-eslint/parser@8.71.1':
resolution: {integrity: sha512-oM/5sAqz/l1v/zYK1qTOPrn2+JIrBGC1V6uNYucRO5gh6eT9vWJ/RhPbGE59byvZEUQ4VP6XkLBaS5Jti5jpvw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/project-service@8.72.0':
resolution: {integrity: sha512-bzHngBbmIgzj6TsTjVUCntGx6FFLgE7mPjpO0PzHycOaZHXqS43XnrkFIHRS16LLr/xO6FHSXG3GJFo/F4bSBQ==}
'@typescript-eslint/project-service@8.71.1':
resolution: {integrity: sha512-Oijc9RUsohHjncg6iGi7gCtjnEjYt9FWv9u6ygK8uKcHK5eLjLAkqERQ9BaytbpceOFdk6kifPCS/zAZE+A99g==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/scope-manager@8.72.0':
resolution: {integrity: sha512-JewPyJOYcXBSAS7PIgufscHOwZqhTGyBRiQJhhuDln66tMchxvvt7nJ90JKKIoOelmdHA3kAQbm9cEUHc4JSEA==}
'@typescript-eslint/scope-manager@8.71.1':
resolution: {integrity: sha512-1YUDZXdTnXLlob03SFHBipdyMBsDVm7zoSz0ytTJ39dk5J1TgsTK03VlR/dLXG/RLLUrPcYbD4rp23BmHxHP0w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/tsconfig-utils@8.72.0':
resolution: {integrity: sha512-0vbxCf7xLVPSjcOdm6eQbgViH8EDJ8xnl1laLT9yoqSz2YmcSfSg5Vdl0JUvZf6rcuJ0ZivJIuMD4edTg8obaA==}
'@typescript-eslint/tsconfig-utils@8.71.1':
resolution: {integrity: sha512-oTvkml5SxXhgg+WWKhod5qWQICDXtOB+/Hi9VdPKFAANJ2b7YOgMffgvzXuqog7R6A/JtrzRf128dsxummyWhg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/type-utils@8.72.0':
resolution: {integrity: sha512-gEXxmmbSTSOVTC37IYYvremOM31v+UN2W772bJxmVYPhAOPSUxtacyb7wkm1EhkYKU6KzFJsdU44DCV4to0LWw==}
'@typescript-eslint/type-utils@8.71.1':
resolution: {integrity: sha512-kH3t3jZCYv2PZSBEWPKTariLrCaoF1CLoPitYFBJOhAGEwWnSRAtGEifrfrpBa4K9JlwWNZotgA5w3/wLSk/FQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/types@8.72.0':
resolution: {integrity: sha512-Adfoy59kxNEjT5E5fnyrp7GpHYuWs8ONbdohu4ez6IU46qDq8LltG90tLmkucZB2uhYL8mqBjtXqGd8yhfjXqQ==}
'@typescript-eslint/types@8.71.1':
resolution: {integrity: sha512-ybYnPTUwg3VQQOFEiBPLs8Jxl1ry2vXdn1kVKguomBbvxpetdu3MKTNDqFNUrlG8ylP9MpZosmXMFYlGQHk1oQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/typescript-estree@8.72.0':
resolution: {integrity: sha512-gwLfFgWcw15tN2KXDCJvxEOQjPn+P3j/n3eSqkZ5sX4VpW9Cosodr+tWwBZRvJT3TcKx6HnPRGZMCNAiP1Xhug==}
'@typescript-eslint/typescript-estree@8.71.1':
resolution: {integrity: sha512-pSKSEK1JJpHs6KiKVtABCE4iJK5d7FLFzDXQNBQ2oRY7LEd3UwOt3TZemTgu9syTIf56dJWlTn/pdmrO9oKUXQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/utils@8.72.0':
resolution: {integrity: sha512-0up3oArJZBYnzOaEXKo8DmI43QvMZyPoFEt9LWzRJcyl/RcJjfKKPebknN1VbTgXBf3M/KggUh5uUMdURLnseg==}
'@typescript-eslint/utils@8.71.1':
resolution: {integrity: sha512-CBjT6gfAz3DW2j9Q4moFnqt208Aq+506sVGXfpRcyAeqn0EpayL0mjdWoCO2t3RC7GewNrFxdeehuEaPg6DMzQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
typescript: '>=4.8.4 <6.1.0'
'@typescript-eslint/visitor-keys@8.72.0':
resolution: {integrity: sha512-E2mroviasaWecDzTGiGMtuEguuLVOeRggnrIn93CJuxYJzQBHbyymlT08aVQydbBal5538o+JkBKXh2sRuCyIA==}
'@typescript-eslint/visitor-keys@8.71.1':
resolution: {integrity: sha512-0GxiUGqMU0qXJt58cBsiG3DP8lUmBaFo2vChtUX+CT7PnR3v/VGLLrzVP4K9r1lNiZXjHYefMBbPunplr09v6w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
acorn-jsx@5.3.2:
@@ -430,8 +430,8 @@ packages:
resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==}
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
eslint@10.13.0:
resolution: {integrity: sha512-UohDjD4zSzEwhf58M3O7vc/ycc8O1I7dNlhtD0WxE8Px8EHNJKtUwzBqrzeGhisRuv2ag4sAYswszCJRgKXYUg==}
eslint@10.12.0:
resolution: {integrity: sha512-npHjrHb2o4ehH3mE+YuxABR+0gyb0aVWCIolgJDArwCiHEIsonBm3ZKjel5b0U5+a+MbEvIyRCGCzD3eKKK2NA==}
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
hasBin: true
peerDependencies:
@@ -583,13 +583,13 @@ packages:
resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==}
engines: {node: '>=12'}
playwright-core@1.64.1:
resolution: {integrity: sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==}
playwright-core@1.63.0:
resolution: {integrity: sha512-rYCsBF/M5HjUch52bbtVONEFjv6Xu8sm8h72dNlR5bzIE1fvC/bxgspzkjSfU+MweEMmPM8KJebG6nnyxo5mCg==}
engines: {node: '>=20'}
hasBin: true
playwright@1.64.1:
resolution: {integrity: sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA==}
playwright@1.63.0:
resolution: {integrity: sha512-+7ziBLidS4NaNCdt57SUDT+wYmmd5fmiQejUic/kb+YsYSCPyOOE9sebzMjNmQrsnNpDJqd4WHvV/8lfKfUDUg==}
engines: {node: '>=20'}
hasBin: true
@@ -597,8 +597,8 @@ packages:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
prettier@3.9.10:
resolution: {integrity: sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==}
prettier@3.9.9:
resolution: {integrity: sha512-Z/CJHIkdujO/OtN7nXUii0Rf3VT5SRuhjBA82Xvu2XhBUgX3nhP67T0LHceBdQLex7OOFGTox+Q5Yg8Jk2Qivg==}
engines: {node: '>=14'}
hasBin: true
@@ -610,13 +610,13 @@ packages:
resolution: {integrity: sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==}
engines: {node: '>=20'}
react-dom@19.3.1:
resolution: {integrity: sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==}
react-dom@19.3.0:
resolution: {integrity: sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==}
peerDependencies:
react: ^19.3.1
react: ^19.3.0
react@19.3.1:
resolution: {integrity: sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==}
react@19.3.0:
resolution: {integrity: sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==}
engines: {node: '>=0.10.0'}
scheduler@0.28.0:
@@ -649,8 +649,8 @@ packages:
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
engines: {node: '>= 0.8.0'}
typescript-eslint@8.72.0:
resolution: {integrity: sha512-r26Fkc8As+mZvqp7SLsMmNFyYUup/6CjK7/eHBHmhOw6GH6n6YFxHVFrG0jN1c5CMpDzelLPxvgeCOzx7BjN+A==}
typescript-eslint@8.71.1:
resolution: {integrity: sha512-oiNVPC3/NbV1FpaHU07l8O6ynqG9v4PAiW2WvTrAmZdR0f2HI/gE668ElMLCK7Xbsu5k2fK5C4fXNiq05j7/nQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
@@ -682,7 +682,7 @@ packages:
snapshots:
'@bitbaum/design-tokens@1.2.0': {}
'@bitbaum/design-tokens@1.1.0': {}
'@cacheable/memory@2.2.0':
dependencies:
@@ -774,9 +774,9 @@ snapshots:
'@esbuild/win32-x64@0.28.2':
optional: true
'@eslint-community/eslint-utils@4.10.1(eslint@10.13.0)':
'@eslint-community/eslint-utils@4.10.1(eslint@10.12.0)':
dependencies:
eslint: 10.13.0
eslint: 10.12.0
eslint-visitor-keys: 3.4.3
'@eslint-community/regexpp@4.12.2': {}
@@ -797,9 +797,9 @@ snapshots:
dependencies:
'@types/json-schema': 7.0.15
'@eslint/js@10.0.1(eslint@10.13.0)':
'@eslint/js@10.0.1(eslint@10.12.0)':
optionalDependencies:
eslint: 10.13.0
eslint: 10.12.0
'@eslint/object-schema@3.0.5': {}
@@ -838,7 +838,7 @@ snapshots:
'@types/json-schema@7.0.15': {}
'@types/node@26.6.5':
'@types/node@26.6.4':
dependencies:
undici-types: 8.9.0
@@ -850,15 +850,15 @@ snapshots:
dependencies:
csstype: 3.2.3
'@typescript-eslint/eslint-plugin@8.72.0(@typescript-eslint/parser@8.72.0(eslint@10.13.0)(typescript@6.0.3))(eslint@10.13.0)(typescript@6.0.3)':
'@typescript-eslint/eslint-plugin@8.71.1(@typescript-eslint/parser@8.71.1(eslint@10.12.0)(typescript@6.0.3))(eslint@10.12.0)(typescript@6.0.3)':
dependencies:
'@eslint-community/regexpp': 4.12.2
'@typescript-eslint/parser': 8.72.0(eslint@10.13.0)(typescript@6.0.3)
'@typescript-eslint/scope-manager': 8.72.0
'@typescript-eslint/type-utils': 8.72.0(eslint@10.13.0)(typescript@6.0.3)
'@typescript-eslint/utils': 8.72.0(eslint@10.13.0)(typescript@6.0.3)
'@typescript-eslint/visitor-keys': 8.72.0
eslint: 10.13.0
'@typescript-eslint/parser': 8.71.1(eslint@10.12.0)(typescript@6.0.3)
'@typescript-eslint/scope-manager': 8.71.1
'@typescript-eslint/type-utils': 8.71.1(eslint@10.12.0)(typescript@6.0.3)
'@typescript-eslint/utils': 8.71.1(eslint@10.12.0)(typescript@6.0.3)
'@typescript-eslint/visitor-keys': 8.71.1
eslint: 10.12.0
ignore: 7.0.12
natural-compare: 1.4.0
ts-api-utils: 2.5.0(typescript@6.0.3)
@@ -866,56 +866,56 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@8.72.0(eslint@10.13.0)(typescript@6.0.3)':
'@typescript-eslint/parser@8.71.1(eslint@10.12.0)(typescript@6.0.3)':
dependencies:
'@typescript-eslint/scope-manager': 8.72.0
'@typescript-eslint/types': 8.72.0
'@typescript-eslint/typescript-estree': 8.72.0(typescript@6.0.3)
'@typescript-eslint/visitor-keys': 8.72.0
'@typescript-eslint/scope-manager': 8.71.1
'@typescript-eslint/types': 8.71.1
'@typescript-eslint/typescript-estree': 8.71.1(typescript@6.0.3)
'@typescript-eslint/visitor-keys': 8.71.1
debug: 4.4.3
eslint: 10.13.0
eslint: 10.12.0
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/project-service@8.72.0(typescript@6.0.3)':
'@typescript-eslint/project-service@8.71.1(typescript@6.0.3)':
dependencies:
'@typescript-eslint/tsconfig-utils': 8.72.0(typescript@6.0.3)
'@typescript-eslint/types': 8.72.0
'@typescript-eslint/tsconfig-utils': 8.71.1(typescript@6.0.3)
'@typescript-eslint/types': 8.71.1
debug: 4.4.3
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/scope-manager@8.72.0':
'@typescript-eslint/scope-manager@8.71.1':
dependencies:
'@typescript-eslint/types': 8.72.0
'@typescript-eslint/visitor-keys': 8.72.0
'@typescript-eslint/types': 8.71.1
'@typescript-eslint/visitor-keys': 8.71.1
'@typescript-eslint/tsconfig-utils@8.72.0(typescript@6.0.3)':
'@typescript-eslint/tsconfig-utils@8.71.1(typescript@6.0.3)':
dependencies:
typescript: 6.0.3
'@typescript-eslint/type-utils@8.72.0(eslint@10.13.0)(typescript@6.0.3)':
'@typescript-eslint/type-utils@8.71.1(eslint@10.12.0)(typescript@6.0.3)':
dependencies:
'@typescript-eslint/types': 8.72.0
'@typescript-eslint/typescript-estree': 8.72.0(typescript@6.0.3)
'@typescript-eslint/utils': 8.72.0(eslint@10.13.0)(typescript@6.0.3)
'@typescript-eslint/types': 8.71.1
'@typescript-eslint/typescript-estree': 8.71.1(typescript@6.0.3)
'@typescript-eslint/utils': 8.71.1(eslint@10.12.0)(typescript@6.0.3)
debug: 4.4.3
eslint: 10.13.0
eslint: 10.12.0
ts-api-utils: 2.5.0(typescript@6.0.3)
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/types@8.72.0': {}
'@typescript-eslint/types@8.71.1': {}
'@typescript-eslint/typescript-estree@8.72.0(typescript@6.0.3)':
'@typescript-eslint/typescript-estree@8.71.1(typescript@6.0.3)':
dependencies:
'@typescript-eslint/project-service': 8.72.0(typescript@6.0.3)
'@typescript-eslint/tsconfig-utils': 8.72.0(typescript@6.0.3)
'@typescript-eslint/types': 8.72.0
'@typescript-eslint/visitor-keys': 8.72.0
'@typescript-eslint/project-service': 8.71.1(typescript@6.0.3)
'@typescript-eslint/tsconfig-utils': 8.71.1(typescript@6.0.3)
'@typescript-eslint/types': 8.71.1
'@typescript-eslint/visitor-keys': 8.71.1
debug: 4.4.3
minimatch: 10.2.6
semver: 7.8.5
@@ -925,20 +925,20 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@8.72.0(eslint@10.13.0)(typescript@6.0.3)':
'@typescript-eslint/utils@8.71.1(eslint@10.12.0)(typescript@6.0.3)':
dependencies:
'@eslint-community/eslint-utils': 4.10.1(eslint@10.13.0)
'@typescript-eslint/scope-manager': 8.72.0
'@typescript-eslint/types': 8.72.0
'@typescript-eslint/typescript-estree': 8.72.0(typescript@6.0.3)
eslint: 10.13.0
'@eslint-community/eslint-utils': 4.10.1(eslint@10.12.0)
'@typescript-eslint/scope-manager': 8.71.1
'@typescript-eslint/types': 8.71.1
'@typescript-eslint/typescript-estree': 8.71.1(typescript@6.0.3)
eslint: 10.12.0
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/visitor-keys@8.72.0':
'@typescript-eslint/visitor-keys@8.71.1':
dependencies:
'@typescript-eslint/types': 8.72.0
'@typescript-eslint/types': 8.71.1
eslint-visitor-keys: 5.0.1
acorn-jsx@5.3.2(acorn@8.19.0):
@@ -1024,9 +1024,9 @@ snapshots:
eslint-visitor-keys@5.0.1: {}
eslint@10.13.0:
eslint@10.12.0:
dependencies:
'@eslint-community/eslint-utils': 4.10.1(eslint@10.13.0)
'@eslint-community/eslint-utils': 4.10.1(eslint@10.12.0)
'@eslint-community/regexpp': 4.12.2
'@eslint/config-array': 0.23.5
'@eslint/config-helpers': 0.7.0
@@ -1180,15 +1180,15 @@ snapshots:
picomatch@4.0.7: {}
playwright-core@1.64.1: {}
playwright-core@1.63.0: {}
playwright@1.64.1:
playwright@1.63.0:
dependencies:
playwright-core: 1.64.1
playwright-core: 1.63.0
prelude-ls@1.2.1: {}
prettier@3.9.10: {}
prettier@3.9.9: {}
punycode@2.3.1: {}
@@ -1196,12 +1196,12 @@ snapshots:
dependencies:
hookified: 2.2.0
react-dom@19.3.1(react@19.3.1):
react-dom@19.3.0(react@19.3.0):
dependencies:
react: 19.3.1
react: 19.3.0
scheduler: 0.28.0
react@19.3.1: {}
react@19.3.0: {}
scheduler@0.28.0: {}
@@ -1226,13 +1226,13 @@ snapshots:
dependencies:
prelude-ls: 1.2.1
typescript-eslint@8.72.0(eslint@10.13.0)(typescript@6.0.3):
typescript-eslint@8.71.1(eslint@10.12.0)(typescript@6.0.3):
dependencies:
'@typescript-eslint/eslint-plugin': 8.72.0(@typescript-eslint/parser@8.72.0(eslint@10.13.0)(typescript@6.0.3))(eslint@10.13.0)(typescript@6.0.3)
'@typescript-eslint/parser': 8.72.0(eslint@10.13.0)(typescript@6.0.3)
'@typescript-eslint/typescript-estree': 8.72.0(typescript@6.0.3)
'@typescript-eslint/utils': 8.72.0(eslint@10.13.0)(typescript@6.0.3)
eslint: 10.13.0
'@typescript-eslint/eslint-plugin': 8.71.1(@typescript-eslint/parser@8.71.1(eslint@10.12.0)(typescript@6.0.3))(eslint@10.12.0)(typescript@6.0.3)
'@typescript-eslint/parser': 8.71.1(eslint@10.12.0)(typescript@6.0.3)
'@typescript-eslint/typescript-estree': 8.71.1(typescript@6.0.3)
'@typescript-eslint/utils': 8.71.1(eslint@10.12.0)(typescript@6.0.3)
eslint: 10.12.0
typescript: 6.0.3
transitivePeerDependencies:
- supports-color
+1 -3
View File
@@ -116,9 +116,7 @@ for (const file of walk(root)) {
last = m.index + m[0].length;
count++;
const line = src.slice(0, m.index).split("\n").length;
// A JSX prop spread is `{...x}` at attribute level; `({ ...form, a })` inside
// an onChange arrow is an object literal and is not worth a human's time.
if (/(^|[\s"'}/])\{\s*\.\.\.[A-Za-z_$]/.test(attrs.replace(/=\{[^}]*\}/g, "=")))
if (/\{\s*\.\.\./.test(attrs))
review.push(`${relative(root, file)}:${line} spreads props — check they are input props`);
} else if (TYPE_ANY.test(attrs) && /date/i.test(src.slice(m.index, m.index + 400))) {
const line = src.slice(0, m.index).split("\n").length;
+6 -11
View File
@@ -225,9 +225,7 @@
looks like the app's other inputs, not like ours. (Unlayered defaults would
have beaten Tailwind's layered utilities.) No min-height: a compact input
stays compact; the picker sets its own 44px where it needs it. */
/* span.wk-input, not .wk-input: structure must hold even when an app's own
unlayered input class sets display:block on this same element. */
span.wk-input {
.wk-input {
position: relative;
display: flex;
align-items: center;
@@ -246,9 +244,7 @@ span.wk-input {
color: inherit;
font: inherit;
font-size: var(--wk-text);
/* The font's own line height, exactly like a native input — a fixed 1.3
made the date box a different height from its neighbours. */
line-height: normal;
line-height: 1.3;
}
}
@@ -285,11 +281,10 @@ span.wk-input {
}
.wk-input-icon {
/* em, not rem, and no taller than a normal line: the icon scales with the
field's own text, so neither a dense 12px input nor a serif-font one is made
taller than its neighbours by it. */
width: 1.1em;
height: 1.1em;
/* em, not rem: the icon scales with the field's own text, so a dense 12px
input is not made taller than its neighbours by a fixed 20px icon. */
width: 1.25em;
height: 1.25em;
flex: 0 0 auto;
opacity: 0.7;
}
-17
View File
@@ -128,23 +128,6 @@ try {
`${name}: a 12px compact date input stays compact (${Math.round(compactHeight)}px)`,
);
// The date box is the same height as a native input given the same class —
// so a form row does not step when one field is a date.
const heights = await page.evaluate(() => ({
native: document.getElementById("match-native").getBoundingClientRect().height,
date: document.querySelector("#match-date .wk-input").getBoundingClientRect().height,
}));
check(
Math.abs(heights.native - heights.date) <= 1,
`${name}: date box matches a native input's height (${heights.date} vs ${heights.native})`,
);
// An app class with display:block on the same element must not break the layout.
const stacked = await page.evaluate(() => {
const box = document.querySelector("#block-class .wk-input");
return getComputedStyle(box).display;
});
check(stacked === "flex", `${name}: an app's display:block cannot break the box (${stacked})`);
const small = await page.evaluate(
() =>
[
-10
View File
@@ -160,13 +160,3 @@ test("a URL in a string does not hide the rest of the line", () => {
run(dir, ["--write"]);
assert.match(read(dir, "a.tsx"), /<DateInput type="date" \/>; \/\/ after/);
});
test("an object spread inside onChange is not flagged; a JSX prop spread still is", () => {
const dir = project({
"a.tsx": `import x from "x";\nexport const A = () => <input type="date" onChange={(e) => set({ ...form, date: e.target.value })} />;\n`,
"b.tsx": `import x from "x";\nexport const B = () => <input type="date" {...register("when")} />;\n`,
});
const out = run(dir);
assert.doesNotMatch(out, /a\.tsx:\d+ spreads props/);
assert.match(out, /b\.tsx:\d+ spreads props/);
});