Skip to content

build: simplify tooling and contributor workflow - #110

Merged
voischev merged 1 commit into
masterfrom
build/simplify-tooling
Oct 28, 2026
Merged

voischev merged 1 commit into
masterfrom
build/simplify-tooling

Conversation

@voischev

Copy link
Copy Markdown
Member

Summary

  • Replace Vitest/Vite with the built-in Node.js test runner and strict assertions, keeping all 39 passing tests, two existing skipped tests and all 43 assertions.
  • Compile JavaScript, declarations and source maps directly with TypeScript; use c8 for source coverage and ESLint 10 flat config for linting.
  • Remove tsup, lint-staged, Husky, commitlint and automatic changelog generation. Keep seven direct development dependencies; the local audited installation shrinks from 509 to 163 packages.
  • Build and check once on Node.js 24, then install the same npm tarball with production dependencies only and run the full suite on Node.js 20.19.0, 22.12.0, 22, 24 and 26.
  • Store LCOV/HTML coverage in GitHub Actions artifacts instead of Coveralls.
  • Simplify the README, remove badges, update the maintainer address to voischev.ivan@ya.ru, and add contributing/release instructions and a PR template in .github.
  • Keep manually written release notes and run the full check through prepublishOnly before publication.

Verification

  • Fresh npm ci and npm run check: build, lint, current/minimum TypeScript checks, tests with coverage and CommonJS/native ESM loading all pass.
  • 39 parser tests pass against the installed tarball on Node.js 20.19.0, 22.12.0, 22.23.4, 24.22.1 and 26.12.1, without development dependencies installed in the consumer fixtures.
  • Consumer types pass with TypeScript 5.3.3 and 6.0.3.
  • Coverage is preserved: 99.37% statements/lines, 98.55% branches and 100% functions.
  • Cleanup differential corpus: 176/176 cases unchanged against the pre-cleanup htmlparser2 12 build.
  • PostHTML integration: 58 tests pass, with one existing skipped test.
  • npm pack includes the expected JavaScript, declarations, source maps, metadata, README and license.
  • Full npm audit: 0 vulnerabilities.
  • Workflow validation with actionlint and git diff --check pass.

Compatibility

The runtime contract from #109 is preserved: Node.js ^20.19.0 || >=22.12.0, TypeScript 5.3+ consumer declarations, and the synchronous CommonJS/native ESM parser API. Development tools use Node.js 24. The runtime dependency remains htmlparser2 ^12.0.0; production source files are unchanged.

Commit prefixes are documented as optional guidance. CI and pre-publication checks provide automated validation instead of local Git hooks. Release notes are maintained manually, and the documented next parser release is 0.13.0; this PR does not publish a release.

@voischev
voischev merged commit c39b9d1 into master Oct 28, 2026
6 checks passed
@voischev
voischev deleted the build/simplify-tooling branch October 28, 2026 10:16
@voischev voischev mentioned this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant