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

Updating eslint-plugin-jsdoc for Node 18 support #45697

Closed
wants to merge 4 commits into from
Closed

Updating eslint-plugin-jsdoc for Node 18 support #45697

wants to merge 4 commits into from

Conversation

Antonio-Laguna
Copy link

What?

This updates eslint-plugin-jsdoc which is part of eslint-plugin to a version that allows Node 18.

Why?

Right now installing these packages on Node 18 results in errors due to that plugin requiring a previous version of Node.

How?

The package has been updated.

Supersedes #42656
Fixes #45696

@codesandbox
Copy link

codesandbox bot commented Nov 10, 2022

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Nov 10, 2022
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @Antonio-Laguna! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@Antonio-Laguna
Copy link
Author

I'm unsure how to fix this issue. First, the npm version that's set by nvmrc is 6.14.15 which should not have workspaces support as far as I know.

Also, the issue is actually that eslint-plugin-jsdoc gets installed at the package level and not at the root level. This is not something we can control as far as I know

@ntwb
Copy link
Member

ntwb commented Nov 11, 2022

Also, the issue is actually that eslint-plugin-jsdoc gets installed at the package level and not at the root level. This is not something we can control as far as I know

This is primarily I think because of this, package updates need to be updated using Lerna and the process outlined here:

Changelog also needs to be updated

@Antonio-Laguna
Copy link
Author

Antonio-Laguna commented Nov 11, 2022

@ntwb I did use lerna as was hinted on that doc but I tuned the version down manually and rerun npm i. I've redone this to just use what lerna gives and no manual version touching. In my local testing, the effect is the same, I still got the package in the local node_modules but let's see what the runner does.

EDIT: The runner seems to find the same issue 😞

Bash output

The npm i is after deleting the package so it gets removed from package-lock.json.

➜  gutenberg git:(feature/update-eslint-jsdoc-node-18) ✗ npm i

> [email protected] postinstall /Users/alaguna/Projects/gutenberg
> patch-package && node ./patches/patch-xcode.js

patch-package 6.2.2
Applying patches...
@react-navigation/[email protected][email protected][email protected][email protected]> [email protected] prepare /Users/alaguna/Projects/gutenberg
> husky install

husky - Git hooks installed
npm WARN @axe-core/[email protected] requires a peer of puppeteer@^1.10.0 || ^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @octokit/[email protected] requires a peer of @octokit/core@>=4 but none is installed. You must install peer dependencies yourself.
npm WARN @reach/[email protected] requires a peer of [email protected] || 16.x || 16.4.0-alpha.0911da3 but none is installed. You must install peer dependencies yourself.
npm WARN @reach/[email protected] requires a peer of [email protected] || 16.x || 16.4.0-alpha.0911da3 but none is installed. You must install peer dependencies yourself.
npm WARN @react-navigation/[email protected] requires a peer of @react-native-community/masked-view@>= 0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN @react-navigation/[email protected] requires a peer of react-native-gesture-handler@>= 1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of acorn@^8 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of puppeteer@* but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-sass@>=4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-native@>=0.60 <=0.64 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.

up to date in 24.845s

426 packages are looking for funding
  run `npm fund` for details

➜  gutenberg git:(feature/update-eslint-jsdoc-node-18) ✗ npx lerna add eslint-plugin-jsdoc packages/eslint-plugin
lerna notice cli v5.5.2
lerna info versioning independent
lerna info Adding eslint-plugin-jsdoc in 1 package
lerna info bootstrap root only

> [email protected] postinstall /Users/alaguna/Projects/gutenberg
> patch-package && node ./patches/patch-xcode.js

patch-package 6.2.2
Applying patches...
@react-navigation/[email protected][email protected][email protected][email protected]> [email protected] prepare /Users/alaguna/Projects/gutenberg
> husky install

husky - Git hooks installed
npm WARN @axe-core/[email protected] requires a peer of puppeteer@^1.10.0 || ^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @octokit/[email protected] requires a peer of @octokit/core@>=4 but none is installed. You must install peer dependencies yourself.
npm WARN @reach/[email protected] requires a peer of [email protected] || 16.x || 16.4.0-alpha.0911da3 but none is installed. You must install peer dependencies yourself.
npm WARN @reach/[email protected] requires a peer of [email protected] || 16.x || 16.4.0-alpha.0911da3 but none is installed. You must install peer dependencies yourself.
npm WARN @react-navigation/[email protected] requires a peer of @react-native-community/masked-view@>= 0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN @react-navigation/[email protected] requires a peer of react-native-gesture-handler@>= 1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of acorn@^8 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of puppeteer@* but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-sass@>=4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-native@>=0.60 <=0.64 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.

up to date in 21.585s

426 packages are looking for funding
  run `npm fund` for details

# Conflicts:
#	packages/eslint-plugin/CHANGELOG.md
@herndlm
Copy link

herndlm commented Nov 28, 2022

it looks like it worked fine for me following the docs you linked regarding lerna. at least the root lockfile looks better. I'd open another MR if you don't mind, ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Tool] ESLint plugin /packages/eslint-plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@wordpress/eslint-plugin package does not support node.js 18
4 participants