Skip to content

Commit 950d51e

Browse files
binodpantdavidjoy
andauthored
build: upgrade to node16 (#259)
* fix: upgrade to node16 * fix: GH actions fix * docs: update readme for node upgrade * feat: update package lock for new npm * fix: reconciling package-lock.json Co-authored-by: David Joy <[email protected]>
1 parent 31779ff commit 950d51e

File tree

5 files changed

+30400
-6317
lines changed

5 files changed

+30400
-6317
lines changed

.github/workflows/ci.yml

+22-19
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,37 @@ on:
66
- master
77
pull_request:
88
branches:
9-
- '**'
9+
- "**"
1010

1111
jobs:
1212
build:
1313
runs-on: ubuntu-20.04
1414
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v2
15+
- name: Checkout
16+
uses: actions/checkout@v2
1717

18-
- name: Setup Nodejs
19-
uses: actions/setup-node@v1
20-
with:
21-
node-version: 12
18+
- name: Setup Nodejs Env
19+
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
2220

23-
- name: Install dependencies
24-
run: npm ci
21+
- name: Setup Nodejs
22+
uses: dcodeIO/setup-node-nvm@v4
23+
with:
24+
node-version: "${{ env.NODE_VER }}"
2525

26-
- name: Lint
27-
run: npm run lint
26+
- name: Install dependencies
27+
run: npm ci
2828

29-
- name: Test
30-
run: npm run test
29+
- name: Lint
30+
run: npm run lint
3131

32-
- name: Build
33-
run: npm run build
32+
- name: Test
33+
run: npm run test
3434

35-
- name: Docs
36-
run: npm run docs
35+
- name: Build
36+
run: npm run build
3737

38-
- name: Run Coverage
39-
uses: codecov/codecov-action@v2
38+
- name: Docs
39+
run: npm run docs
40+
41+
- name: Run Coverage
42+
uses: codecov/codecov-action@v2

.github/workflows/release.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ jobs:
1414
with:
1515
fetch-depth: 0
1616

17+
- name: Setup Node.js Env
18+
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
19+
1720
- name: Setup Node.js
18-
uses: actions/setup-node@v1
21+
uses: dcodeIO/setup-node-nvm@v4
1922
with:
20-
node-version: 12
23+
node-version: "${{ env.NODE_VER }}"
2124

2225
- name: Install dependencies
2326
run: npm ci

.nvmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
v16
2+

README.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,27 @@ In addition, frontend-platform provides an extensible application initialization
2525

2626
## Getting started
2727

28+
### One-time setup if you have not ugpraded node/npm
29+
IMPORTANT: There is now a new node/npm version being used by frontend-platform as of
30+
https://github.com/edx/frontend-platform/pull/259
31+
32+
#### Install nvm
33+
This is highly recommended in order to be able to leverage different node/npm versions.
34+
For a period of time, different repositories may be using different versions of node/npm.
35+
36+
Alternatively, please install node16 and npm8 for use with this repository.
37+
38+
#### Switch to node/npm version for this repo
39+
```nvm use```
40+
if you don't have the right node/npm versions, nvm will instruct you to install those
41+
42+
#### Clean out old node modules and reinstall
43+
This step is needed because node now uses a different package lock format, and it's important to reinstall
44+
dependencies based on this new package file. Delete node_modules, and issue a `npm ci`
45+
46+
47+
### Standard getting started steps
48+
2849
1. `npm install`
2950
2. `npm start`
3051
3. Open http://localhost:8080 to view the example app.
@@ -116,4 +137,3 @@ NOTE: As of this writing, i18n is _not_ configurable. The `initialize()` functi
116137
When making changes to frontend-platform, be sure to manually run the included example app located in `./example`. The example app includes 2 routes to test for both unauthenticated and authenticated users. To start the example app, run `npm start` from the root directory.
117138

118139
If you want to test changes to frontend-platform against a micro-frontend locally, follow the directions here: https://github.com/edx/frontend-build#local-module-configuration-for-webpack
119-

0 commit comments

Comments
 (0)