Skip to content
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

chore: ensuring engine compatibility #1338

Merged
merged 12 commits into from
Oct 17, 2023

Conversation

arboleya
Copy link
Member

@arboleya arboleya commented Oct 12, 2023

This PR aims at reducing problems with (node) engine version mismatch.

  • Sets engines and packageManager field for all packages (package.json)
  • Disallow using unsupported engines (.npmrc)
  • Upgrade eslint-plugin-jsdoc for newer engine support

This should give users warnings when trying to install fuels while using unsupported engines.

$ npm install

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'fuels',
npm WARN EBADENGINE   required: { node: '^18.14.1', pnpm: '^8.9.0' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }

And disallow running pnpm install inside the monorepo:

$ pnpm install

ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

Your Node version is incompatible with "/Users/anderson/Code/fuel/fuels-ts".

Expected version: ^18.14.1
Got: v16.20.2

This is happening because the package's manifest has an engines.node field specified.
To fix this issue, install the required Node version.

@arboleya arboleya self-assigned this Oct 12, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 12, 2023

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 84.86% 5274/6215
🟡 Branches 66.78% 772/1156
🟡 Functions 74.25% 868/1169
🟢 Lines 84.91% 5041/5937

Test suite run success

1270 tests passing in 223 suites.

Report generated by 🧪jest coverage report action from 128d7f7

@github-actions
Copy link
Contributor

github-actions bot commented Oct 12, 2023

This PR is published in NPM with version 0.0.0-pr-1338-20231012125323

@arboleya arboleya marked this pull request as ready for review October 12, 2023 13:11
Copy link
Contributor

@camsjams camsjams left a comment

Choose a reason for hiding this comment

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

:shipit: 🚒

@arboleya arboleya enabled auto-merge (squash) October 17, 2023 00:40
@arboleya arboleya merged commit 17da654 into master Oct 17, 2023
10 of 12 checks passed
@arboleya arboleya deleted the aa/chore/ensuring-engine-compatibility branch October 17, 2023 00:54
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.

None yet

4 participants