question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatic discovery of version matching package.json engines

See original GitHub issue

Description:

In my organization we pin specific version of Node in package.json via engines.node.

https://docs.npmjs.com/cli/v7/configuring-npm/package-json#engines

It therefore seems redundant to include such information in the CI.

I would prefer the action to allow - if the appropriate package.json is detected - to look in engines.node in package.json and select the latest NodeJS version that meets the specified version range. This would be complementary to the current versioning mechanism and only have an effect if the version is not specified as an action parameter.

Justification:

DRY

Are you willing to submit a PR?

I would like discuss it first.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:11
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dmitry-shibanovcommented, Oct 3, 2022

Hello everyone. We released a new version with support for engines.node. You can try to specify package.json for node-version-file input to grad version from engines.node.

0reactions
xrlcommented, Dec 7, 2022

@dmitry-shibanov it worked for me! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

package.json - npm Docs
json are the name and version fields as they will be required. The name and version together form an identifier that is assumed...
Read more >
The engine "node" is incompatible with this module
In my case, I am using yarn workspaces and some of the modules in the package.json files in the workspaces might require foo...
Read more >
Specifying dependencies | Google App Engine standard ...
You specify the dependencies for your Node.js app by declaring them in the package.json file. For example, if you want to specify Lodash...
Read more >
Semver explained - why is there a caret (^) in my package.json?
There is a dedicated command npm update for checking and installing newer versions satisfying semver pattern in package.json . npm update. Or, if...
Read more >
Manage functions | Cloud Functions for Firebase - Google
Delete all functions that match the specified name in all regions. firebase ... Set the version in the engines field in the package.json...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found