Skip to content

Commit

Permalink
Merge branch 'master' of github.com:openedx/frontend-app-learner-port…
Browse files Browse the repository at this point in the history
…al-programs into Ali-Abbas/react-router-upgrade
  • Loading branch information
Syed-Ali-Abbas-Zaidi committed Oct 3, 2023
2 parents dff574d + b61a621 commit fa9dc11
Show file tree
Hide file tree
Showing 14 changed files with 27,471 additions and 35,110 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lockfileversion-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ on:

jobs:
version-check:
uses: openedx/.github/.github/workflows/lockfileversion-check.yml@master
uses: openedx/.github/.github/workflows/lockfileversion-check-v3.yml@master
15 changes: 7 additions & 8 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ on:
jobs:
tests:
runs-on: ubuntu-20.04
strategy:
matrix:
node: [16]

steps:
- name: Checkout
uses: actions/checkout@v2

uses: actions/checkout@v3
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Nodejs
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
node-version: ${{ env.NODE_VER }}

- name: Install dependencies
run: npm install
run: npm ci

- name: Pre-Tests setup
run: npm i -g gatsby
Expand Down
2 changes: 2 additions & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
18

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copied from https://github.com/BretFisher/node-docker-good-defaults/blob/master/Dockerfile

FROM node:16
FROM node:18

# Create app directory
RUN mkdir -p /edx/app
Expand Down
1 change: 1 addition & 0 deletions env.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
2 changes: 1 addition & 1 deletion enzyme.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */

import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

configure({ adapter: new Adapter() });

Expand Down
17 changes: 17 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// eg.
// $ ACTIVE_ENV=<env_name> npm run build
const activeEnv = process.env.ACTIVE_ENV || process.env.NODE_ENV || 'development';
const path = require('path');

require('dotenv').config({
path: `.env.${activeEnv}`,
Expand All @@ -19,6 +20,16 @@ if (process.env.UNBRANDED_LANDING_PAGE === 'True') {
module.exports = {
pathPrefix: `${process.env.ENABLE_PATH_PREFIX ? process.env.HOSTNAME : '/'}`,
plugins: [
{
resolve: 'gatsby-plugin-alias-imports',
options: {
alias: {
'env.config': path.join(__dirname, './env.config.js'),
},

extensions: ['.js', '.jsx'],
},
},
{
resolve: '@edx/gatsby-source-portal-designer',
options: {
Expand All @@ -33,6 +44,12 @@ module.exports = {
`${__dirname}/node_modules`,
],
},
cssLoaderOptions: {
esModule: false,
modules: {
namedExport: false,
},
},
},
},
{
Expand Down
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
const path = require('path');

const envConfigPath = path.join(__dirname, 'env.config.js');
module.exports = {
transform: {
'^.+\\.jsx?$': '<rootDir>/jest-preprocess.js',
},
moduleNameMapper: {
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/fileTransformer.js',
'env.config': envConfigPath,
},
testPathIgnorePatterns: ['node_modules', '.cache'],
transformIgnorePatterns: ['node_modules/(?!(gatsby|@edx/paragon|@edx/frontend-platform|@edx/frontend-component-footer-edx))'],
Expand Down
Loading

0 comments on commit fa9dc11

Please sign in to comment.