Skip to content

chore: use Node.js 16.x for building package and tests#601

Merged
ctavan merged 1 commit intomainfrom
use-node-16-to-build
Dec 2, 2021
Merged

chore: use Node.js 16.x for building package and tests#601
ctavan merged 1 commit intomainfrom
use-node-16-to-build

Conversation

@ctavan
Copy link
Member

@ctavan ctavan commented Nov 30, 2021

Previously we were requiring Node 12.x to get somewhat reproducible npm builds. This now upgrades the requirement to the latests LTS version 16.x

@ctavan ctavan requested review from LinusU, TrySound and broofa November 30, 2021 11:40
Comment on lines +42 to +44
if: matrix.node-version == '12.x' || matrix.node-version == '14.x'
if: matrix.node-version == '16.x' || matrix.node-version == '14.x'
- run: npm run test:pack
if: matrix.node-version == '14.x'
if: matrix.node-version == '16.x' || matrix.node-version == '14.x'
Copy link
Member

Choose a reason for hiding this comment

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

I think that these two tests should run on >= 12? That is, all that supports ESM

Copy link
Member Author

Choose a reason for hiding this comment

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

Early versions of 12.x didn't support ESM IIRC… That's why historically we didn't test there.

But I guess nowadays it's safe to run these tests on Node 12+, so thanks for the catch!

@LinusU
Copy link
Member

LinusU commented Nov 30, 2021

npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name ".local": name cannot start with a period

Ran into this locally when using npm 7 as well, I didn't have time to look into why there was a .local folder though. It's a little annoying as it makes all files show up twice when searching in VS Code 😅

@ctavan
Copy link
Member Author

ctavan commented Nov 30, 2021

npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name ".local": name cannot start with a period

Ran into this locally when using npm 7 as well, I didn't have time to look into why there was a .local folder though. It's a little annoying as it makes all files show up twice when searching in VS Code 😅

The .local symlink is a workaround to make local file references work in the examples folder (so you can actually test local changes)… The error you mentioned should now be fixed. Not sure about vscode. Could it be added to some ignore file for the editor?

@ctavan ctavan force-pushed the use-node-16-to-build branch from 5f9237b to 284e2bc Compare November 30, 2021 23:05
@ctavan
Copy link
Member Author

ctavan commented Nov 30, 2021

I had to upgrade @wdio v6 -> v7 in order to get it to run with Node 16 and unfortunately that was a bit of a rabbit hole but it should be good again :).

I couldn't resist upgrading all other build deps as well.

@ctavan ctavan force-pushed the use-node-16-to-build branch from 284e2bc to e26edd8 Compare November 30, 2021 23:17
@@ -0,0 +1 @@
sdfkl;
Copy link
Member

Choose a reason for hiding this comment

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

Should this be committed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, of course not…. I was Troubleshooting eslint/prettier… will remove

@ctavan ctavan force-pushed the use-node-16-to-build branch from e26edd8 to 76b6ff8 Compare December 1, 2021 10:57
@ctavan ctavan requested a review from LinusU December 1, 2021 10:59
Copy link
Member

@LinusU LinusU left a comment

Choose a reason for hiding this comment

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

Nice! 👍

@ctavan ctavan force-pushed the use-node-16-to-build branch from 76b6ff8 to 6559a01 Compare December 2, 2021 09:32
@ctavan ctavan force-pushed the use-node-16-to-build branch from 6559a01 to 4a42846 Compare December 2, 2021 09:55
Copy link
Member

@LinusU LinusU left a comment

Choose a reason for hiding this comment

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

Neat! 🙌

@ctavan ctavan mentioned this pull request Dec 2, 2021
@ctavan ctavan merged commit 477559c into main Dec 2, 2021
@ctavan ctavan deleted the use-node-16-to-build branch December 2, 2021 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants