project-specs.md: - Replace Prettier/ESLint/Vite/Vitest references with oxfmt/oxlint/oxc and TypeScript 7 / node --test - Drop @tsconfig/strictest note; rules are inlined in tsconfig.json, enumerated explicitly - Document oxlint rule disables (no-undefined, sort-keys, id-length, no-named-export) and test-file overrides (no-unused-expressions, no-empty-file, no-nodejs-modules, no-magic-numbers) - Document Node 26 / .node-version / engines.node / CI follow - Document allowImportingTsExtensions + rewriteRelativeImportExtensions for the node --strip-types quirk - Replace Vite/vitest coverage example with c8 + node --test - Sync scripts section: drop check:eslint, check:prettier and their fix:* counterparts; add check:oxlint/check:oxfmt/fix:oxlint/fix:oxfmt - Add current source layout (index.ts, match.ts, pattern.ts, index.test.ts) - Update VSCode integration section with actual settings.json and extensions.json contents - Document the actual commit history with gitmoji prefixes - Fix 'initilizing' typo - Drop 'changesets is a devDep' claims (changesets is not installed) package.json: - Move @oxfmt/binding-* and @oxlint/binding-* from devDependencies to optionalDependencies so the right binding is selected per platform (CI on Ubuntu gnu gets the gnu binding automatically, not the local musl one) - Extend check:outdated to ignore the platform-specific bindings (they show as 'not installed' on the current platform, which is correct - Add cspell words: gitmoji, dbaeumer, msvc (the latter for the Windows binding variant). Drop the unused 'nocheck' word README.md: - Drop the 'changesets is available as a devDep' line; changesets isn't installed
1.4 KiB
1.4 KiB
tiny-pattern-ts
Pattern matching for TypeScript/ESM environments (F#-style, not regex).
Development
- Build:
npm run build - Test:
npm run test,npm run test:ci - Checks:
npm run check,npm run fix - Format/Fix:
npm run fix:oxfmt,npm run fix:oxlint
Tooling
- TypeScript 7 — type checker and build (
tsc). - node --test +
--experimental-strip-types— test runner (Node 22.6+, flag dropped on Node 24). - c8 — code coverage for
test:ci. - oxlint — Rust-based linter.
- oxfmt — Rust-based formatter (Prettier-compatible).
- cspell — spell checking.
- sort-package-json — keep
package.jsonkeys alphabetized. - lefthook — git pre-commit hooks.
Requirements
- Node.js >= 22.6 (>= 24 recommended;
--experimental-strip-typesis unflagged on 24).
VSCode integration
- Recommended extensions: see
.vscode/extensions.json(oxc, cspell). - TypeScript 7 is used via
typescript.tsdkpointing atnode_modules/typescript/lib. - oxc extension provides oxlint squiggles and oxfmt format-on-save.
Workflows
- Version updates via
npm version. - Publishing via GitHub Actions on tagged commits (see
.github/workflows/ci.yml).
Contribution guidelines
- Commit signing (GPG).
- Set up commit message template:
npm run use:git-commit-message. - See
commit-message-template. - Type-only tests use
expect-type'sexpectTypeOf(...)insidenode --testcases.