Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Update nodejs 20 since replacing ts-node-test with tsx (#1029)
Browse files Browse the repository at this point in the history
* `npm uninstall @types/node && npm install --save-dev @types/node@20.4.4`

* Bump nodejs to 20.x

* `pm uninstall @tsconfig/node18 && npm install --save-dev @tsconfig/node20`

* Update tsconfig

* Update renovate config too

* Need to specify module type since nodejs 20?

* Enable allowImportingTsExtensions to suppress tsc error
  • Loading branch information
kachick authored Jul 23, 2023
1 parent fae617f commit f505dd4
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16.1
20.4.0
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Actual behavior checking requires <https://github.com/uhop/node-re2> that includ
```console
$ npm install
$ npx tsx
Welcome to Node.js v18.16.1.
Welcome to Node.js v20.4.0.
Type ".help" for more information.
```

Expand Down
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pkgs.mkShell {
buildInputs = [
pkgs.nodejs-18_x
pkgs.nodejs_20
pkgs.dprint
pkgs.nil
pkgs.nixpkgs-fmt
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"type": "module",
"scripts": {
"test": "glob -c \"node --loader tsx --no-warnings --test\" \"./test/**/*_test.ts\""
},
"devDependencies": {
"@tsconfig/node18": "^18.2.0",
"@tsconfig/node20": "^20.1.0",
"@tsconfig/strictest": "^2.0.1",
"@types/node": "^18.17.0",
"@types/node": "^20.4.4",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"eslint": "^8.45.0",
Expand Down
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
{
"matchPackageNames": ["nodejs/node"],
"allowedVersions": "/^v?18\\./"
"allowedVersions": "/^v?20\\./"
},
{
"extends": ["schedule:weekly"],
Expand Down
2 changes: 1 addition & 1 deletion test/regex_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import path from 'path';
import RE2 from 're2';
import JSON5 from 'json5';

import { examples } from './examples';
import { examples } from './examples.ts';

// Copied from https://github.com/renovatebot/renovate/blob/0296e58e19844b6eb3583ee3197bcae42e25d9f7/lib/config/types.ts#L169-L185
// Because they does not expose these types via npm, AFAIK
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": ["@tsconfig/strictest/tsconfig", "@tsconfig/node18/tsconfig"],
"extends": ["@tsconfig/strictest/tsconfig", "@tsconfig/node20/tsconfig"],
"compilerOptions": {
"noEmit": true
"noEmit": true,
"allowImportingTsExtensions": true
},
"include": ["**/*.ts"]
}

0 comments on commit f505dd4

Please sign in to comment.