Skip to content

Commit

Permalink
feat: update support for Node.js (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
Comandeer authored May 1, 2024
1 parent 17dbf76 commit 98dbf3b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
node: [ '16', '18', '20' ]
node: [ '20', '22' ]
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.os == 'windows-latest' && matrix.node == '22' }}
steps:
- name: Git checkout
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prLinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
lint:
name: Lint PR title
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
---

## [0.23.0]
### Added
* [#314]: support for Node 22.

### Changed
* [#304]: **BREAKING CHANGE**: updated dependencies:

Expand All @@ -21,6 +24,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

Removed dependencies are marked with the "☠️" emoji.

### Removed
* [#314]: **BREAKING CHANGE**: support for Node 16 & 18.

## [0.22.1] – 2023-07-28
### Fixed
* [#303]: incorrect package published on GitHub.
Expand Down Expand Up @@ -374,6 +380,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
[#303]: https://github.com/Comandeer/rollup-lib-bundler/issues/303
[#304]: https://github.com/Comandeer/rollup-lib-bundler/issues/304
[#306]: https://github.com/Comandeer/rollup-lib-bundler/issues/306
[#314]: https://github.com/Comandeer/rollup-lib-bundler/issues/314

[0.23.0]: https://github.com/Comandeer/rollup-lib-bundler/compare/v0.22.1...v0.23.0
[0.22.1]: https://github.com/Comandeer/rollup-lib-bundler/compare/v0.22.0...v0.22.1
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
},
"engines": {
"node": ">=16.0.0"
"node": ">=20.0.0"
},
"bin": {
"rlb": "./bin/rlb.mjs"
Expand Down
10 changes: 7 additions & 3 deletions tests/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ test.serial( 'CLI preserves dynamic external imports', testCLI, {
]
} );

// #255
test.serial( 'CLI transpiles bundled JS files down to code understandable by Node v16.0.0', testCLI, {
// #255, #314
test.serial( 'CLI transpiles bundled JS files down to code understandable by Node v20.0.0', testCLI, {
fixture: 'typescript/babelTranspilationTSPackage',
expectedFiles: [
'./dist/chunk.mjs',
Expand All @@ -250,7 +250,11 @@ test.serial( 'CLI transpiles bundled JS files down to code understandable by Nod
customCheckStrategies: customCheckStrategies.skipSourceMaps,
additionalCodeChecks: [
( t: ExecutionContext, path: string, code: string ): void => {
t.false( code.includes( 'static{' ) );
if ( !path.endsWith( '.mjs' ) ) {
return;
}

t.true( code.includes( 'static{' ) );
}
]
} );
Expand Down

0 comments on commit 98dbf3b

Please sign in to comment.