-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upgraded to node v18, added .nvmrc and updated workflows #1729
Conversation
…to bilalqamar95/node-v18-upgrade
…to bilalqamar95/node-v18-upgrade
- name: setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof, blast from the past all the way to node 12 haha
@BilalQamar95 @abdullahwaheed These changes look good to me. I also pushed up a We unfortunately don't have capacity right now to merge / release / verify in edx-platform, but feel free to take this on if you'd like. Otherwise, we'll come back to this PR at a later date. |
…enedx/edx-enterprise into bilalqamar95/node-v18-upgrade
…to bilalqamar95/node-v18-upgrade
…to bilalqamar95/node-v18-upgrade
Hi @adamstankiewicz, based on |
…to bilalqamar95/node-v18-upgrade
…to bilalqamar95/node-v18-upgrade
…to bilalqamar95/node-v18-upgrade
@BilalQamar95 I treated these changes as a new major version because, in the past, I've seen dropping Node.js support as causing breaking changes for some consumers when not released as a new major version. That said, we don't typically define an 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": {
"node": "^18",
"npm": "^9"
}
}
Some related tweets:
[question] Speaking of documentation, are you aware if we've documented our process for dealing with Node.js upgrades anywhere in the Open edX wiki, perhaps taking into account the above pattern with |
Yes that definitely makes sense, defining the supported Node.js version(s) in the engines field of the package.json file appears to be a good practice for maintaining repositories and libraries, especially in a multi-package, microfrontend environment like ours where it can serve to provide clear guidance to developers and users about required Node.js and npm versions for proper functionality and compatibility. Declaring the oldest active LTS version of Node.js in the engines field allows devs to use latest LTS version while ensuring compatibility with older versions, whereas updating the engines field to newest LTS version when an older LTS version reaches end-of-life could help ensure compatibility and security. I will be updating the PR and we can release this as a major version, also we have documented the process for node v18 upgrade which you can find here. |
…to bilalqamar95/node-v18-upgrade
@BilalQamar95 I filed a new issue as an epic to define & track any work related to this updated pattern, should the team decide to adopt it more broadly: openedx/wg-frontend#171 Wasn't sure if FED-BOM prefers a single issue to track across all repos/libraries or if the team prefers to have a separate issue per repo/library; just created a single epic issue for now 😄 If the team adopts the pattern more broadly, it might be worth prioritizing this pattern given its closely related to the ongoing Node 18 upgrade work. Just note that when adding the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for adding in the engines
field and releasing it as a new major version.
@BilalQamar95 Will you be planning on releasing it to PyPi after merge and upgrading to it in edx-platform
? Or is that something enterprise-titans should plan on tackling after this PR merges?
…to bilalqamar95/node-v18-upgrade
@adamstankiewicz we don't have any plans or the required domain knowledge to release it to PyPi, we intend to rely on enterprise-titans to tackle this once PR is merged. |
…to bilalqamar95/node-v18-upgrade
Ticket
Upgrade Node Js from 16 to 18
Description
Merge checklist:
requirements/*.txt
files)base.in
if needed in production but edx-platform doesn't install ittest-master.in
if edx-platform pins it, with a matching versionmake upgrade && make requirements
have been run to regenerate requirementsmake static
has been run to update webpack bundling if any static content was updated./manage.py makemigrations
has been run./manage.py lms makemigrations
in the shell.Post merge:
(so basically once your build finishes, after maybe a minute you should see the new version in PyPi automatically (on refresh))
make upgrade
in edx-platform will look for the latest version in PyPi.