Skip to content

Commit

Permalink
Node Upgrade (openedx#30420)
Browse files Browse the repository at this point in the history
* feat: Node16 upgrade
  • Loading branch information
aht007 authored May 18, 2022
1 parent ffb9c5d commit f801dea
Show file tree
Hide file tree
Showing 7 changed files with 58,393 additions and 14,858 deletions.
37 changes: 7 additions & 30 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
{
"plugins": [
"transform-object-assign",
"transform-object-rest-spread"
],
"presets": [
[
"env",
{
"targets": {
"browsers": [
"last 2 versions",
"IE >= 11"
]
},
"modules": false
}
"plugins": [
"@babel/transform-object-assign",
"@babel/plugin-proposal-object-rest-spread",
],
"babel-preset-react"
],
"env": {
"test": {
"presets": [
[
"env",
{
"modules": "commonjs",
}
]
]
}
},
"presets": [
"@babel/react",
"@babel/preset-env"
]
}
5 changes: 4 additions & 1 deletion .github/workflows/js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
node-version: [ 12 ]
node-version: [ 12, 14, 16 ]
python-version: [ 3.8 ]

steps:
Expand All @@ -28,6 +28,9 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Setup npm
run: npm i -g [email protected]

- name: Install Firefox 61.0
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
node-version: [ 12 ]

node-version: [ 12, 14, 16 ]
steps:

- uses: actions/checkout@v2
Expand All @@ -39,6 +39,9 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Setup npm
run: npm i -g [email protected]

- name: Get pip cache dir
id: pip-cache-dir
run: |
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ RUN pip install -r requirements/edx/base-minus-local.txt
# via pip.
# The node environment is already 'activated' because its .../bin was put on $PATH.
RUN nodeenv /edx/app/edxapp/nodeenv --node=12.11.1 --prebuilt
RUN npm install -g [email protected]
COPY package.json package.json
COPY package-lock.json package-lock.json
RUN npm set progress=false && npm install
Expand Down
31 changes: 16 additions & 15 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
module.exports = {
"globals": {
"gettext": (t) => { return t; },
},
"modulePaths": [
"common/static/common/js/components",
],
"setupTestFrameworkScriptFile": "<rootDir>/setupTests.js",
"testMatch": [
"/**/*.test.jsx",
"common/static/common/js/components/**/?(*.)+(spec|test).js?(x)",
],
"transform": {
"^.+\\.jsx$": "babel-jest",
"^.+\\.js$": "babel-jest",
},
"globals": {
"gettext": (t) => { return t; },
},
"modulePaths": [
"common/static/common/js/components",
],
"setupFilesAfterEnv": ["<rootDir>/setupTests.js"],
"testMatch": [
"/**/*.test.jsx",
"common/static/common/js/components/**/?(*.)+(spec|test).js?(x)",
],
"testEnvironment": "jsdom",
"transform": {
"^.+\\.jsx$": "babel-jest",
"^.+\\.js$": "babel-jest",
},
};
Loading

0 comments on commit f801dea

Please sign in to comment.