diff --git a/package-lock.json b/package-lock.json index 6d4a9bb..1d0dd5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,6 @@ "glob": "10.3.12", "husky": "9.0.11", "jest": "^28.0.0", - "patch-package": "^8.0.0", "resize-observer-polyfill": "^1.5.1", "rosie": "2.1.1" } @@ -8335,12 +8334,6 @@ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, - "node_modules/@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -13405,15 +13398,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-yarn-workspace-root": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", - "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", - "dev": true, - "dependencies": { - "micromatch": "^4.0.2" - } - }, "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", @@ -18686,15 +18670,6 @@ "node": ">=0.10.0" } }, - "node_modules/klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11" - } - }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -19717,22 +19692,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", @@ -19929,69 +19888,6 @@ "node": ">=0.10.0" } }, - "node_modules/patch-package": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", - "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", - "dev": true, - "dependencies": { - "@yarnpkg/lockfile": "^1.1.0", - "chalk": "^4.1.2", - "ci-info": "^3.7.0", - "cross-spawn": "^7.0.3", - "find-yarn-workspace-root": "^2.0.0", - "fs-extra": "^9.0.0", - "json-stable-stringify": "^1.0.2", - "klaw-sync": "^6.0.0", - "minimist": "^1.2.6", - "open": "^7.4.2", - "rimraf": "^2.6.3", - "semver": "^7.5.3", - "slash": "^2.0.0", - "tmp": "^0.0.33", - "yaml": "^2.2.2" - }, - "bin": { - "patch-package": "index.js" - }, - "engines": { - "node": ">=14", - "npm": ">5" - } - }, - "node_modules/patch-package/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/patch-package/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/patch-package/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -25761,18 +25657,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, - "node_modules/yaml": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", - "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", - "dev": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index c7a4092..e6e5ef1 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,6 @@ "glob": "10.3.12", "husky": "9.0.11", "jest": "^28.0.0", - "patch-package": "^8.0.0", "resize-observer-polyfill": "^1.5.1", "rosie": "2.1.1" } diff --git a/patches/@openedx+frontend-build+13.0.28.patch b/patches/@openedx+frontend-build+13.0.28.patch deleted file mode 100644 index 7982c67..0000000 --- a/patches/@openedx+frontend-build+13.0.28.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/node_modules/@openedx/frontend-build/config/jest.config.js b/node_modules/@openedx/frontend-build/config/jest.config.js -index ac5f730..ddce396 100644 ---- a/node_modules/@openedx/frontend-build/config/jest.config.js -+++ b/node_modules/@openedx/frontend-build/config/jest.config.js -@@ -3,11 +3,16 @@ const fs = require('fs'); - - const presets = require('../lib/presets'); - -+// This assigns the envConfigPath filepath based on whether env.config exists, otherwise it uses the fallback filepath. -+ - let envConfigPath = path.resolve(__dirname, './jest/fallback.env.config.js'); --const appEnvConfigPath = path.resolve(process.cwd(), './env.config.js'); -+const appEnvConfigPathJs = path.resolve(process.cwd(), './env.config.js'); -+const appEnvConfigPathJsx = path.resolve(process.cwd(), './env.config.jsx'); - --if (fs.existsSync(appEnvConfigPath)) { -- envConfigPath = appEnvConfigPath; -+if (fs.existsSync(appEnvConfigPathJs)) { -+ envConfigPath = appEnvConfigPathJs; -+} else if (fs.existsSync(appEnvConfigPathJsx)) { -+ envConfigPath = appEnvConfigPathJsx; - } - - module.exports = { -diff --git a/node_modules/@openedx/frontend-build/config/webpack.prod.config.js b/node_modules/@openedx/frontend-build/config/webpack.prod.config.js -index 2879dd9..4783e17 100644 ---- a/node_modules/@openedx/frontend-build/config/webpack.prod.config.js -+++ b/node_modules/@openedx/frontend-build/config/webpack.prod.config.js -@@ -11,6 +11,7 @@ const dotenv = require('dotenv'); - const NewRelicSourceMapPlugin = require('@edx/new-relic-source-map-webpack-plugin'); - const HtmlWebpackPlugin = require('html-webpack-plugin'); - const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -+const fs = require('fs'); - const path = require('path'); - const PostCssAutoprefixerPlugin = require('autoprefixer'); - const PostCssRTLCSS = require('postcss-rtlcss'); -@@ -23,6 +24,22 @@ const HtmlWebpackNewRelicPlugin = require('../lib/plugins/html-webpack-new-relic - const commonConfig = require('./webpack.common.config'); - const presets = require('../lib/presets'); - -+/** This condition confirms whether the configuration for the MFE has switched to a JS-based configuration -+ * as previously implemented in frontend-build and frontend-platform. If the environment variable exists, then -+ * an env.config.js file will be created at the root directory and its env variables can be accessed with getConfig(). -+ * -+ * https://github.com/openedx/frontend-build/blob/master/docs/0002-js-environment-config.md -+ * https://github.com/openedx/frontend-platform/blob/master/docs/decisions/0007-javascript-file-configuration.rst -+ */ -+ -+const envConfigPath = process.env.JS_CONFIG_FILEPATH; -+let envConfig = {}; -+ -+if (envConfigPath) { -+ const envConfigFilename = envConfigPath.slice(envConfigPath.indexOf('env.config')); -+ fs.copyFileSync(envConfigPath, envConfigFilename); -+} -+ - // Add process env vars. Currently used only for setting the PUBLIC_PATH. - dotenv.config({ - path: path.resolve(process.cwd(), '.env'),