GithubHelp home page GithubHelp logo

Comments (3)

miohtama avatar miohtama commented on August 22, 2024 1

trade-executor-frontend library depends on Node v16, as it is using one very handy v16 only function. Array.at(-1) to get the last item of the array.

So might need to upgrade sooner than later, as I need to bring the library to the main site.

from frontend.

kenkunz avatar kenkunz commented on August 22, 2024

I think it would be a good idea to enforce some consistency – both across dev team members and between dev & prod.

We could add the following to package.json

  "engines": {
    "node": "^16.14.0"
  },

and/or add an .nvmrc file.

I think my preference would be to specify engines.node but not commit .nvmrc. We already have an .npmrc file (note the p not v) with engine-strict=true (default when initializing a SvelteKit app), so setting an appropriate engines.node will cause npm install to fail if you're not running a supported version.

Developers may choose to use different node version managers (or just manually install/run a supported version), so setting .nvmrc (or .node-version) feels like a dev-specific preference. We can add .nvmrc to .gitignore and everyone can manage node versions as they see fit (as long as they pass the engines check).

OTOH, it can be beneficial to commit .nvmrc if your prod build toolchain uses this to determine the node version to run in prod (e.g., render, netlify, vercel, etc.). This is not the case for us afaik, so it feels unnecessary (and slightly prescriptive) to include it.

@miohtama, @servatj, @hieuh25, @allozaur – any opinions / thoughts on this?

from frontend.

hieuh25 avatar hieuh25 commented on August 22, 2024

For simplicity I usually do both specifying engines.node and adding ,nvmrc with same version in the repo. Yes it's a bit strict and limited but we will have consistency :D

from frontend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.