Skip to content

"version" field on node.config.json #57781

@marco-ippolito

Description

@marco-ippolito

What is the problem this feature will solve?

I think it would be beneficial to have a new field in the node.config.json to specifiy the node version with which the application should run. In case it is not satisfied the application will throw an error.

Whats the use case?

  • Fix a node config strictly
  • Allow security scanners to infer the Node.js version used in the application (right now if you dont have a dockerfile its not possible)
  • Prevent mismatch between environment and user assumption

Why not package.json#engines

Package.json engines are for the consumer not the producer.
Also applications that are not going to be published dont need the engines field.

What is the feature you are proposing to solve the problem?

Add a "version" field to the node.config.json. It would require to parse semver etc...

What alternatives have you considered?

none

Metadata

Metadata

Assignees

No one assigned

    Labels

    configIssues or PRs related to the config subsystemfeature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions