Skip to content

chore: upgrade tasks to node 20 #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
13 changes: 12 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"guard-for-in": 2,
"import/no-unresolved": ["error"],
"import/no-duplicates": ["error"],
"import/first": "off",
"import/prefer-default-export": 0,
"max-nested-callbacks": [1, 4],
"max-classes-per-file": [0],
Expand All @@ -86,7 +87,17 @@
"prefer-template": 2,
"radix": 2,
"no-trailing-spaces": "error",
"@typescript-eslint/prefer-regexp-exec": 0
"@typescript-eslint/prefer-regexp-exec": 0,
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
"overrides": [
{
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '16', '14', '10' ]
node: [ '20', '16' ]
name: Node ${{ matrix.node }}

steps:
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '10.x'
node-version: '20.x'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excuse my ignorance, I'm not really familiar with this repo and Github workflows.
But why the version is hard coded in here instead of "node-version: ${{ matrix.node }}" like on line 28?
If my question doesn't make sense, please feel free to ignore me :)

Copy link
Contributor Author

@lstocchi lstocchi Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no strong opinion to why a hard coded version is better than a matrix in this case and it could be changed. Obviously, in general cases, running many matrix tests is more expensive. In this case, the tests are minimal .... it just runs matrix on linux to identify some potential errors with a specific version of node (to see if some func has been deprecated/removed and the code break), and on win/Mac just targets the version which should be used at runtime.
I'm not working with azure devops anymore (I left this field 3+ years ago) so I'm not really updated about it but it seems they recommend node 20. This is why I changed it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah makes sense, much appreciated!

- run: npm run setup
- run: npm install
- run: npm run build
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '10.x'
node-version: '20.x'
- run: npm run setup
- run: npm install
- run: npm run build
Expand Down
Loading