openedx / wg-frontend

Open edX Frontend Working Group
4 stars 0 forks source link

Specify supported Node/NPM versions in `engines` property within `package.json` #171

Open adamstankiewicz opened 1 year ago

adamstankiewicz commented 1 year ago

Based on the discussion in this PR, we would like to consider adopting the following approach for managing Node.js version compatibility across micro-frontends.


Based on the guidance in this article, I believe what the author proposes for maintainers makes sense. We probably should be explicitly defining the supported Node.js version(s) in our repos/libraries with the engines property. I'd be curious to hear your thoughts, not just for this repository, but as a pattern more broadly.

{
  "engines": {
    "node": "^18",
    "npm": "^9"
  }
}

### Tasks
- [ ] Create an `engines` property in all repos/libraries that rely on Node.js/NPM. Include the current oldest active LTS of Node.js and NPM.
- [ ] Create a new (Open edX) wiki page documenting this high-level approach to Node.js version upgrades, irrespective of which Node.js version it is. The page might be titled something like "Node.js Upgrade Lifecycle" and include the above outlined steps.
- [ ] Consider whether it's possible and/or makes sense to throw an exception if the repo/library is used on an unsupported Node.js version.
- [ ] Consider whether READMEs should be updated to include a version support policy similar to the example provided above,.