Skip to content

Commit 221d3b7

Browse files
committed
refactor: run natively on node type stripping, modernize tooling
Replaces enums with erasable const modules (inlined by esbuild via minifySyntax), adds explicit .ts import extensions, and drops mocha/c8/mocha-snap/tsx in favor of node:test with built-in coverage. Updates all dependencies to latest, including eslint 10 flat config and TypeScript 6.
1 parent 83d0f84 commit 221d3b7

58 files changed

Lines changed: 2235 additions & 6599 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.c8rc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/shiny-llamas-search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"htmljs-parser": minor
3+
---
4+
5+
Replace TypeScript enums with erasable const modules so the source runs directly under node's type stripping. The public `TagType`, `ErrorCode`, and `Validity` values keep their runtime shape and values, and their types are now the equivalent literal unions. Constant values remain fully inlined in the published bundles.

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 59 deletions
This file was deleted.

.fixpackrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
os: [ubuntu-latest, windows-latest]
37-
node: [20, 22, 24]
37+
node: [22, 24, 26]
3838
steps:
3939
- name: Checkout code
4040
uses: actions/checkout@v6

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ dist
1515
*.tsbuildinfo
1616

1717
# Coverage
18-
.nyc_output
1918
coverage
19+
lcov.info

.lintstagedrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
22
"*.ts": ["eslint --fix", "prettier --write"],
3-
"*{.js,.json,.md,.yml,rc}": ["prettier --write"],
4-
"./package.json": ["fixpack"]
3+
"*{.js,.json,.md,.yml,rc}": ["prettier --write"]
54
}

.mocharc.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

.nycrc.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)