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.

Add `package.json` `engines` field

See original GitHub issue

It is best practice for packages to contain a package.json engines field. What versions of Node.js does this package support?

See https://github.com/apollographql/eslint-plugin-graphql/issues/105#issuecomment-359326335.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jnwngcommented, Jan 22, 2018

Node 6 which is still in active LTS is what we should aim for here.

Unfortunately, TypeScript does not add polyfills for certain environments, so even though the output is ES5, it still won’t actually be compatible with the Node environment. I think the course of action here is to add a Babel step using babel-preset-env following the TypeScript step so we can continue using new constructs without having to special case each one.

Additionally it’s worth adding environment checks in CI to confirm that these work. See https://github.com/jnwng/graphql-import/pull/1

What do you all think?

1reaction
voxpellicommented, Jan 22, 2018

As all versions older than Node.js 4.x are no longer supported there is probably no point in looking further away than that version for support in older Node.js versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

package.json
The main field is a module ID that is the primary entry point to your program. That is, if your package is named...
Read more >
Node engine 8.x or 10.x in package.json
json to accept both 8 and 10 version. I tried to type this: "engines": { "node": "8.x|10.
Read more >
package.json: engines & engineStrict - and how to use them
Yes, remember that npm stands for Node Package Manager. The engines-field is also in the package.json file. I first thought and hoped that...
Read more >
Node Engines: Helping Developers Everywhere Avoid ...
Node engines are a little discussed (but in my opinion pretty critical) configuration that can be specified in your package.json file that tells ......
Read more >
package.json
The main field is a module ID that is the primary entry point to your program. That is, if your package is named...
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