320 Commits
Author SHA1 Message Date
tmu 08384bbc82 ✨ Add initial pattern-matching API
Introduce the core builder and pattern constructors:

- match(value): chain .with(pattern, handler) and terminate with
  .exhaustive() (throws on no match) or .otherwise(handler).
- P.literal, P.type, P.when, P.any, P.shape for pattern construction.
- Each pattern is a Matcher<T> whose matches acts as a type guard, so
  handler parameters are narrowed to the matched type.

The MatchBuilder accumulates handlers and returns a new builder per
.with() call (immutable chaining); finalization runs the cases in order
and returns the first match's handler result.

TypeScript configuration relaxed in .oxlintrc.json:
- Disable eslint/no-undefined (we use undefined as the no-match sentinel)
- Disable eslint/sort-keys (handler order matters; alphabetical would
  be wrong)
- Disable eslint/id-length (T/R/U/V generics are standard TS convention)
- Disable import/no-named-export (false positive for library entry points)

Verified:
- tsc --noEmit passes with strict + noUncheckedIndexedAccess
- tsc -p tsconfig.build.json emits dist/*.js + .d.ts + sourcemaps
- node -e "import('./dist/index.js')" loads and exposes { match, P }
2026-09-03 10:35:34 +00:00
tmu 6c67e91e68 🔥 Remove Vite scaffold leftovers
- Delete public/vite.svg, src/typescript.svg, src/style.css
- Empty public/ directory removed
- .npmignore: drop 'public/' entry (directory no longer exists), add
  .oxlintrc.json and .oxfmtrc.json to ignore list
- cspell: add .oxfmtrc, .oxlintrc, .sortpackagerc to dictionary so
  config-file name references aren't flagged
- lefthook: drop 'outdated' from pre-commit (kept in commands block for
  explicit CI invocation); it shouldn't block commits for being behind on
  upstream patch releases
2026-09-03 10:28:08 +00:00
tmu 078a8c30fd 🔧 Replace ESLint and Prettier with oxlint and oxfmt
- Drop .eslintrc.cjs and .prettierrc, add .oxlintrc.json and .oxfmtrc.json
- oxlint covers correctness/suspicious/perf/style/restriction categories
  plus import and typescript plugins; oxfmt reads the same .prettierrc-style
  options we had before
- Update lefthook.yml pre-commit jobs to run oxlint/oxfmt instead of
  eslint/prettier
- Update .vscode/extensions.json (oxc replaces eslint/prettier/vitest) and
  settings.json (oxc becomes the default formatter for TS/JS)
- Add 'oxlint', 'oxfmt', 'oxc', 'nodenext' to cspell dictionary
- Rewrite README 'Development' section to describe the new toolchain
2026-09-03 10:25:47 +00:00
tmu 3530262261 🔧 Replace Vite/Vitest with TypeScript 7 and node --test
- Use tsc 7 for build (vite no longer needed for a Node library)
- Use node --test with --experimental-strip-types for tests (vitest dropped)
- Use c8 for coverage instead of vitest's built-in coverage
- Add tsconfig.build.json separating typecheck from emit config
- Drop DOM lib, add strict noUncheckedIndexedAccess/noImplicitOverride
- Pin engines.node to >=22.6 (required for --experimental-strip-types)
- Update CI to Node 24 LTS (unflagged strip-types)
- Add @types/node for node:test / node:assert types
2026-09-03 09:54:21 +00:00
tmu cac1349c95 🎉 Initial commit 2026-02-02 13:38:42 +01:00
Thomas Müller 15c8ef7616 🔧 Track .vscode/settings.json for workspace settings 2025-04-29 13:45:02 +02:00
Thomas Müller 0c08a2d395 ✨ Scaffolded src/index.ts entry point for library code 2025-04-29 13:43:53 +02:00
Thomas Müller 1dc94c0dd1 👷 Added GitHub Actions workflow for CI/CD 2025-04-29 13:43:47 +02:00
Thomas Müller 25353662ec 🧪 Added Vitest configuration with coverage 2025-04-29 13:43:40 +02:00
Thomas Müller f6bbcd8b2e 📝 Scaffolded README.md structure 2025-04-29 13:43:20 +02:00
Thomas Müller 45c0bb6423 🔧 Added .npmignore to exclude non-dist files from npm package 2025-04-29 13:43:15 +02:00
Thomas Müller 142989aa2b 📝 Added commit message template 2025-04-29 13:43:11 +02:00
Thomas Müller 4f65d22efe 📄 Added MIT LICENSE 2025-04-29 13:43:07 +02:00
Thomas Müller 02a33c7b44 🔧 Added sort-package-json configuration 2025-04-29 13:42:39 +02:00
Thomas Müller f31a9b1175 🔧 Configured Lefthook for pre-commit checks 2025-04-29 13:42:25 +02:00
Thomas Müller 1d2e78dde7 🔧 Added cspell configuration for spelling checks 2025-04-29 13:42:20 +02:00
Thomas Müller 80a43072e6 🔧 Added .editorconfig for consistent editor settings 2025-04-29 13:42:16 +02:00
Thomas Müller dbc576edfe 🔧 Configured ESLint (strict, type-checked, Prettier integration, import sorting) 2025-04-29 13:41:49 +02:00
Thomas Müller c9b2d778be ✨ Configured Vite (ESM-only, vanilla-ts template, removed default app files) 2025-04-29 13:20:05 +02:00
Thomas Müller 20308c5a6d 🎉 Initial commit with empty README 2025-04-29 13:13:38 +02:00