Skip to content

ci: run build and test on newer node version, lint only on 12 - #19

Merged
legobeat merged 1 commit into
MetaMask:mainfrom
legobeat:ci-test-recent-nodejs
Feb 19, 2024
Merged

ci: run build and test on newer node version, lint only on 12#19
legobeat merged 1 commit into
MetaMask:mainfrom
legobeat:ci-test-recent-nodejs

Conversation

@legobeat

Copy link
Copy Markdown
  • ci: build and test on newer node version, lint only on 12
    • ci: pin to npm v6 for lockfile consistency

@legobeat
legobeat marked this pull request as ready for review November 21, 2023 01:10
- ci: pin to npm v6 for lockfile consistency
@legobeat
legobeatforce-pushed the ci-test-recent-nodejs branch from ab1044d to 0236012CompareNovember 21, 2023 01:12
@legobeat
legobeat requested review from a team, Mrtenz, NEllusion, kumavis and naugturDecember 2, 2023 02:51

@NEllusionNEllusion left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Added some initial comments to get additional context. Looking good overall!

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node-version: [8.x, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we intend to still support as far back as node 8.x, or are we continuing this for now until we are certain that we do not have any projects running node 8 which may use this?

@NEllusionNEllusionFeb 14, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Adding ref here that engine is currently specified as 8 which is a factor:

"node": ">=8.17.0",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

In the ethjs family of packages, have been maintaining a conservative compatibility-stance, breaking runtime (node, browsers) and package manager (npm) compatibility only on a per-need basis to address breaking bugs and regressions but now that we have working releases out (and some time has passed), I think it's about time to start removing support for older node versions. This should also open the door to reducing or entirely remove babelification.

That being said, I think would be good to not quite yet remove support for node v10 (considering it's the latest available in distro repos for Ubuntu 20.04 LTS and Debian Buster). We'll have to drop v8 to be able to upgrade to webpack v5, though, so I guess that'll be next.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node-version: [12.x]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How come we do not want to lint on other versions?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

While we do want to test on each supported major to ensure runtime compatibility (and therefore need test and build to work across them as well), linting should only be necessary to run once. This also means we can use newer versions of eslint.

Comment on lines +79 to 80
- run: npm i -g npm@6
- run: npm i

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How did you decide that npm@6 was better to use here than the default?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I see it is the minimum version in our package.json

"npm": ">=6"

@legobeatlegobeatFeb 19, 2024

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Pinning npm version in order to ensure lockfile consistency.

v6 is the most recent that still works on Node.js v8.

@mcmiremcmire left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think I know the answer to these questions, but curious of them just in case there's something new here I haven't thought about. Will give an approval in the meantime!

Sign up for freeto 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.

3 participants

@legobeat@mcmire@NEllusion