Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: build

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize]
types: [opened, synchronize, reopened]
branches:
- master
workflow_dispatch:
env:
CI: true

Expand All @@ -16,25 +20,38 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
node: [20.19.0, 22.12.0, 22, 24, 26]
os: [ubuntu-latest]

steps:
- name: Clone repository
uses: actions/checkout@v4
uses: actions/checkout@v7.0.1

- name: Set Node.js version
uses: actions/setup-node@v4
uses: actions/setup-node@v7.1.0
with:
node-version: ${{ matrix.node }}
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Run lint
run: npm run lint

- name: Check types
run: npm run typecheck

- name: Run tests
run: npm run test

- name: Check package loading
run: npm run test:package

- name: Run Coveralls
uses: coverallsapp/github-action@master
if: matrix.node == 24
uses: coverallsapp/github-action@v2.3.8
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
file: coverage/lcov.info
format: lcov
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
20 changes: 18 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## Unreleased

### Breaking Changes

* Upgrade `htmlparser2` from version 9 to version 12.
* Require Node.js `^20.19.0 || >=22.12.0` for synchronous loading of the ESM-only backend.
* Require TypeScript 5.3 or later for the published type declarations.

### Compatibility

* Preserve HTML directives and custom declarations, including PHP instructions, with the updated parser callbacks.
* Preserve XML processing-instruction delimiters and verify native CommonJS/ESM loading and consumer types.
* Preserve source locations immediately after XML instructions and the `lowerCaseTags` option for SVG elements.

### Changed

* With `decodeEntities: true`, entities in `textarea` content are now decoded, consistent with other text content. Previously `htmlparser2` left them encoded in this case.

## <small>0.12.1 (2024-09-19)</small>

* build(deps-dev): bump braces from 3.0.2 to 3.0.3 ([5faad33](https://github.com/posthtml/posthtml-parser/commit/5faad33))
Expand Down Expand Up @@ -373,5 +391,3 @@
* basic ([2e38720](https://github.com/posthtml/posthtml-parser/commit/2e38720))
* Initial commit ([285d87f](https://github.com/posthtml/posthtml-parser/commit/285d87f))



Loading
Loading