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

Wrong notation in package.json #8646

Merged
merged 2 commits into from Jan 10, 2022
Merged

Wrong notation in package.json #8646

merged 2 commits into from Jan 10, 2022

Conversation

Crashillo
Copy link
Member

@Crashillo Crashillo commented Dec 22, 2021

🎩 What? Why?

According to https://docs.npmjs.com/cli/v8/configuring-npm/package-json#engines the wrong notation creates output warnings

πŸ“Œ Related Issues

#8343

Testing

Just run the app

πŸ“‹ Checklist

🚨 Please review the guidelines for contributing to this repository.

  • ❓ CONSIDER adding a unit test if your PR resolves an issue.
  • βœ”οΈ DO check open PR's to avoid duplicates.
  • βœ”οΈ DO keep pull requests small so they can be easily reviewed.
  • βœ”οΈ DO build locally before pushing.
  • βœ”οΈ DO make sure tests pass.
  • βœ”οΈ DO make sure any new changes are documented in docs/.
  • βœ”οΈ DO add and modify seeds if necessary.
  • βœ”οΈ DO add CHANGELOG upgrade notes if required.
  • βœ”οΈ DO add to GraphQL API if there are new public fields.
  • βœ”οΈ DO add link to MetaDecidim if it's a new feature.
  • ❌AVOID breaking the continuous integration build.
  • ❌AVOID making significant changes to the overall architecture.

πŸ“· Screenshots

None

β™₯️ Thank you!

@andreslucena
Copy link
Member

@Crashillo @leio10 isn't working with Decidim anymore

According to docs.npmjs.com/cli/v8/configuring-npm/package-json#engines the wrong notation creates output warnings

Do you mean this section?

Unless the user has set the engine-strict config flag, this field is advisory only and will only produce warnings when your package is installed as a dependency.

What do you mean with output warnings? Have you seen one of those in Decidim (we probably have, but just to document better exactly what we're trying to solve).

Please check the failing specs, you need to change the others package.json too.

@Crashillo
Copy link
Member Author

What do you mean with output warnings?

Running for instance, bin/rails decidim:webpacker:install

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@decidim/all@0.25.0-dev',
npm WARN EBADENGINE   required: { node: '^15.14.0', npm: '^7.7.2' },
npm WARN EBADENGINE   current: { node: 'v16.13.0', npm: '8.1.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@decidim/core@0.26.0-dev',
npm WARN EBADENGINE   required: { node: '^16.9.1', npm: '^7.21.1' },
npm WARN EBADENGINE   current: { node: 'v16.13.0', npm: '8.1.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@decidim/all@0.25.0-dev',
npm WARN EBADENGINE   required: { node: '^15.14.0', npm: '^7.7.2' },
npm WARN EBADENGINE   current: { node: 'v16.13.0', npm: '8.1.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@decidim/core@0.26.0-dev',
npm WARN EBADENGINE   required: { node: '^16.9.1', npm: '^7.21.1' },
npm WARN EBADENGINE   current: { node: 'v16.13.0', npm: '8.1.0' }
npm WARN EBADENGINE }

Decidim is able to run with any node v16 upward, hence the engine property should be specified with >= symbols, better than ^. IMO, tt creates unnecessary noise.

Please check the failing specs, you need to change the others package.json too.

Yupp, I missed packages/core/package.json. I'm wondering if it's actually neccessary to have the engines property there, since the top-level package.json is already flagged like that. Is it there for any reason? Wouldn't be better to get rid of the inner condition?

add to design app
@andreslucena
Copy link
Member

Is it there for any reason? Wouldn't be better to get rid of the inner condition?

Skimming through the last PR that changes those lines (#8343), it seems like this is the only package.json from packages/ that has the engines key. As I'm preparing the release of v0.26, I'll merge this one after I have the new branch, so we can test locally at least in develop (for v0.27.0)

@andreslucena andreslucena added type: internal PRs that aren't necessary to add to the CHANGELOG for implementers and removed target: developer-experience labels Jan 10, 2022
@andreslucena andreslucena merged commit 5c362e5 into develop Jan 10, 2022
@andreslucena andreslucena deleted the fix/package-json branch January 10, 2022 17:28
@andreslucena andreslucena changed the title Wrong notation in package.json Fix notation in package.json Jan 10, 2022
@andreslucena andreslucena changed the title Fix notation in package.json Wrong notation in package.json Jan 11, 2022
andreslucena pushed a commit that referenced this pull request Jan 25, 2022
@alecslupu alecslupu added this to the 0.27.0 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: internal PRs that aren't necessary to add to the CHANGELOG for implementers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants