Skip to content

fix(core): keep the caret in place when backspace has nothing to delete #276

fix(core): keep the caret in place when backspace has nothing to delete

fix(core): keep the caret in place when backspace has nothing to delete #276

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
# Build first so consumers (examples/core/bundle-size) typecheck against the built @telixon/core package.
- run: pnpm build
- run: pnpm typecheck
- run: pnpm lint
- run: pnpm format:check
- run: pnpm test
# Validate published type entry points resolve correctly across modern
# moduleResolution modes (node16, bundler). cjs-resolves-to-esm ignored:
# ESM-only package, CJS callers must use dynamic import. no-resolution
# ignored: node10 resolver (pre-2019) does not read `exports` map, so
# subpaths like @telixon/core/engine cannot resolve in that mode by
# design; this lib targets node16+/bundler resolution.
- run: pnpm dlx @arethetypeswrong/cli@0.18.5 --pack packages/core --ignore-rules cjs-resolves-to-esm no-resolution
- run: pnpm dlx @arethetypeswrong/cli@0.18.5 --pack packages/web-sdk --ignore-rules cjs-resolves-to-esm no-resolution
- run: pnpm size
conformance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
# Google's source is fetched once per engine commit, then cached. Oracle is the single source
# of truth for both conformance and bench, so both jobs share this cache key.
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: packages/core/oracle/.cache
key: lpn-source-${{ hashFiles('packages/core/src/engine/PROVENANCE.json') }}
- run: pnpm typecheck:conformance
# Corpus parity plus the case-coverage gate: one number from every distinct case the library can
# produce, checked against Google (case-coverage.test.ts, runs in about a second).
- run: pnpm conformance
# Parity artifacts produced by the conformance run (parity.json, parity-badge.json, parity.html).
# Picked up by the pages job for deployment.
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: parity-artifacts
path: packages/core/conformance/dist
if-no-files-found: error
# Broad per-push parity sample on top of the corpus and the case-coverage gate: one million distinct
# numbers checked against Google. Runs after the artifact upload so its output stays off the
# dashboard. The full airtight proof (1,838,775,900 inputs) runs weekly in fuzz.yml.
- run: pnpm fuzz
env:
FUZZ_N: '1000000'
codspeed:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
# Benchmarks import the built package (#dist); build outside the instrumented step.
- run: pnpm build
# Walltime-stable benchmark measurement: CodSpeed runs vitest bench under instrumentation
# and posts per-PR regression deltas. Threshold and base reference are managed in the CodSpeed
# GitHub App settings. BENCH_TELIXON_ONLY drops the competitor adapters so only telixon
# benchmarks are tracked; the competitor comparison runs wall-time via bench:report.
- uses: CodSpeedHQ/action@f99becdce5e5d51fd556489ebef684f4ecfd6286 # v4.18.5
env:
BENCH_TELIXON_ONLY: '1'
with:
# Required as of CodSpeed action v4; simulation is the CPU-instrumented mode for standard runners.
mode: simulation
run: pnpm bench
token: ${{ secrets.CODSPEED_TOKEN }}
bench:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
# Same Google source cache as conformance.
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: packages/core/oracle/.cache
key: lpn-source-${{ hashFiles('packages/core/src/engine/PROVENANCE.json') }}
# Benchmarks import the built package (#dist).
- run: pnpm build
- run: pnpm bench:report
# Bench artifacts (bench.json, bench-badge.json, benchmark.html) for the dashboard.
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: bench-artifacts
path: packages/core/bench/dist
if-no-files-found: error
bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
# The example consumes the built package exactly as a published consumer would.
- run: pnpm --filter @telixon/core build
- run: pnpm --filter @telixon/example-core-bundle-size report
# @telixon/core bundle-size proof (bundle.html, treemap.html, bundle.json, bundle-badge.json) for the dashboard.
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: bundle-artifacts
path: examples/core/bundle-size/report
if-no-files-found: error
pages:
needs: [conformance, bench, bundle]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# Merge parity + bench + bundle artifacts at one root. Each publishes flat files (parity.html,
# benchmark.html, bundle.html, *-badge.json); the dashboard URLs are /parity.html, /benchmark.html, /bundle.html.
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: parity-artifacts
path: site
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: bench-artifacts
path: site
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: bundle-artifacts
path: site
# bench-raw.json is the intermediate vitest dump; not part of the public surface.
- run: rm -f site/bench-raw.json
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site
- id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
# Runtime coverage: keep this job set in sync with the README runtime list and the engines
# field. The smoke scripts are dependency-free so old Node lines run without the dev toolchain.
runtime-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: core-dist
path: packages/core/dist
if-no-files-found: error
# The unit suite on every Node line the toolchain supports; the verify job covers .nvmrc.
test-matrix:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20, 24]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test
# The built Node entry on every version the engines field admits.
runtime-node:
needs: runtime-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 22, 24]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: core-dist
path: packages/core/dist
- run: node scripts/runtime-smoke.mjs
# The built Node entry under the current Deno and Bun releases.
runtime-alt:
needs: runtime-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: core-dist
path: packages/core/dist
- uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5
with:
deno-version: v2.x
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- run: deno run --allow-read --allow-env scripts/runtime-smoke.mjs
- run: bun scripts/runtime-smoke.mjs
# The browser entry in headless Chromium and the edge entry under workerd.
runtime-web:
needs: runtime-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: core-dist
path: packages/core/dist
- run: pnpm exec playwright install --with-deps chromium
- run: node scripts/runtime-smoke-browser.mjs
- run: node scripts/runtime-smoke-edge.mjs