Skip to content

Commit

Permalink
build: upgrade to node16 (openedx#259)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
binodpant and davidjoy authored Dec 2, 2021
1 parent 31779ff commit 950d51e
Show file tree
Hide file tree
Showing 5 changed files with 30,400 additions and 6,317 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,37 @@ on:
- master
pull_request:
branches:
- '**'
- "**"

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

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

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

- name: Lint
run: npm run lint
- name: Install dependencies
run: npm ci

- name: Test
run: npm run test
- name: Lint
run: npm run lint

- name: Build
run: npm run build
- name: Test
run: npm run test

- name: Docs
run: npm run docs
- name: Build
run: npm run build

- name: Run Coverage
uses: codecov/codecov-action@v2
- name: Docs
run: npm run docs

- name: Run Coverage
uses: codecov/codecov-action@v2
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV

- name: Setup Node.js
uses: actions/setup-node@v1
uses: dcodeIO/setup-node-nvm@v4
with:
node-version: 12
node-version: "${{ env.NODE_VER }}"

- name: Install dependencies
run: npm ci
Expand Down
2 changes: 2 additions & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
v16

22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ In addition, frontend-platform provides an extensible application initialization

## Getting started

### One-time setup if you have not ugpraded node/npm
IMPORTANT: There is now a new node/npm version being used by frontend-platform as of
https://github.com/edx/frontend-platform/pull/259

#### Install nvm
This is highly recommended in order to be able to leverage different node/npm versions.
For a period of time, different repositories may be using different versions of node/npm.

Alternatively, please install node16 and npm8 for use with this repository.

#### Switch to node/npm version for this repo
```nvm use```
if you don't have the right node/npm versions, nvm will instruct you to install those

#### Clean out old node modules and reinstall
This step is needed because node now uses a different package lock format, and it's important to reinstall
dependencies based on this new package file. Delete node_modules, and issue a `npm ci`


### Standard getting started steps

1. `npm install`
2. `npm start`
3. Open http://localhost:8080 to view the example app.
Expand Down Expand Up @@ -116,4 +137,3 @@ NOTE: As of this writing, i18n is _not_ configurable. The `initialize()` functi
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.

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

Loading

0 comments on commit 950d51e

Please sign in to comment.