@openedx/frontend-build 15.0.0-alpha.23 → 15.0.0-alpha.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  const { babel } = require('../lib/presets');
2
2
 
3
3
  module.exports = {
4
- extends: '@edx/eslint-config',
4
+ extends: ['@edx/eslint-config'],
5
5
  plugins: ['@typescript-eslint'],
6
6
  parser: '@typescript-eslint/parser',
7
7
  parserOptions: {
@@ -43,5 +43,6 @@ module.exports = {
43
43
  },
44
44
  ignorePatterns: [
45
45
  'module.config.js',
46
+ 'env.config.*',
46
47
  ],
47
48
  };
@@ -0,0 +1,4 @@
1
+ export const ReactComponent = (props) => <div data-testid="IconMock" {...props} />;
2
+
3
+ const mock = 'icon/mock/path';
4
+ export default mock;
@@ -21,7 +21,7 @@ module.exports = {
21
21
  ],
22
22
  rootDir: process.cwd(),
23
23
  moduleNameMapper: {
24
- '\\.svg': path.resolve(__dirname, 'jest/svgrMock.js'),
24
+ '\\.svg': path.resolve(__dirname, 'jest/svgrMock.jsx'),
25
25
  '\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': path.resolve(__dirname, 'jest/fileMock.js'),
26
26
  '\\.(css|scss)$': 'identity-obj-proxy',
27
27
  'env.config': envConfigPath,
@@ -100,8 +100,9 @@ module.exports = merge(commonConfig, {
100
100
  path.join(process.cwd(), 'node_modules'),
101
101
  path.join(process.cwd(), 'src'),
102
102
  ],
103
- // silences compiler warnings regarding deprecation warnings
103
+ // Silences compiler deprecation warnings. They mostly come from bootstrap and/or paragon.
104
104
  quietDeps: true,
105
+ silenceDeprecations: ['abs-percent', 'color-functions', 'import', 'mixed-decls', 'global-builtin'],
105
106
  },
106
107
  },
107
108
  },
@@ -109,7 +110,7 @@ module.exports = merge(commonConfig, {
109
110
  },
110
111
  {
111
112
  test: /.svg(\?v=\d+\.\d+\.\d+)?$/,
112
- issuer: /\.jsx?$/,
113
+ issuer: /\.(jsx?|tsx?)$/,
113
114
  use: ['@svgr/webpack'],
114
115
  },
115
116
  // Webpack, by default, uses the url-loader for images and fonts that are required/included by
@@ -64,8 +64,9 @@ function getStyleUseConfig() {
64
64
  path.join(process.cwd(), 'node_modules'),
65
65
  path.join(process.cwd(), 'src'),
66
66
  ],
67
- // silences compiler warnings regarding deprecation warnings
67
+ // Silences compiler deprecation warnings. They mostly come from bootstrap and/or paragon.
68
68
  quietDeps: true,
69
+ silenceDeprecations: ['abs-percent', 'color-functions', 'import', 'mixed-decls', 'global-builtin'],
69
70
  },
70
71
  },
71
72
  },
@@ -127,7 +128,7 @@ module.exports = merge(commonConfig, {
127
128
  },
128
129
  {
129
130
  test: /.svg(\?v=\d+\.\d+\.\d+)?$/,
130
- issuer: /\.jsx?$/,
131
+ issuer: /\.(jsx?|tsx?)$/,
131
132
  use: ['@svgr/webpack'],
132
133
  },
133
134
  // Webpack, by default, uses the url-loader for images and fonts that are required/included by
@@ -131,8 +131,9 @@ module.exports = merge(commonConfig, {
131
131
  path.join(process.cwd(), 'node_modules'),
132
132
  path.join(process.cwd(), 'src'),
133
133
  ],
134
- // silences compiler warnings regarding deprecation warnings
134
+ // Silences compiler deprecation warnings. They mostly come from bootstrap and/or paragon.
135
135
  quietDeps: true,
136
+ silenceDeprecations: ['abs-percent', 'color-functions', 'import', 'mixed-decls', 'global-builtin'],
136
137
  },
137
138
  },
138
139
  },
@@ -140,7 +141,7 @@ module.exports = merge(commonConfig, {
140
141
  },
141
142
  {
142
143
  test: /.svg(\?v=\d+\.\d+\.\d+)?$/,
143
- issuer: /\.jsx?$/,
144
+ issuer: /\.(jsx?|tsx?)$/,
144
145
  use: ['@svgr/webpack'],
145
146
  },
146
147
  // Webpack, by default, uses the url-loader for images and fonts that are required/included by
@@ -18,7 +18,11 @@ describe('HtmlWebpackNewRelicPlugin', () => {
18
18
 
19
19
  afterEach(() => {
20
20
  if (fs.existsSync(OUTPUT_DIR)) {
21
- fs.rmdirSync(OUTPUT_DIR, { recursive: true, force: true });
21
+ fs.rm(OUTPUT_DIR, { recursive: true, force: true }, (err) => {
22
+ if (err) {
23
+ console.error('Error deleting folder:', err);
24
+ }
25
+ });
22
26
  }
23
27
  });
24
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openedx/frontend-build",
3
- "version": "15.0.0-alpha.23",
3
+ "version": "15.0.0-alpha.25",
4
4
  "description": "Build tools, setup and config for frontend apps",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -38,7 +38,7 @@
38
38
  "@babel/plugin-proposal-object-rest-spread": "7.20.7",
39
39
  "@babel/plugin-syntax-dynamic-import": "7.8.3",
40
40
  "@babel/preset-env": "7.24.8",
41
- "@babel/preset-react": "7.24.7",
41
+ "@babel/preset-react": "7.26.3",
42
42
  "@edx/eslint-config": "^4.3.0",
43
43
  "@edx/new-relic-source-map-webpack-plugin": "2.1.0",
44
44
  "@edx/typescript-config": "1.1.0",
@@ -50,8 +50,8 @@
50
50
  "@typescript-eslint/eslint-plugin": "^5.58.0",
51
51
  "@typescript-eslint/parser": "^5.58.0",
52
52
  "autoprefixer": "10.4.20",
53
- "babel-jest": "29.6.1",
54
- "babel-loader": "9.1.3",
53
+ "babel-jest": "29.7.0",
54
+ "babel-loader": "9.2.1",
55
55
  "babel-plugin-formatjs": "^10.4.0",
56
56
  "babel-plugin-transform-imports": "2.0.0",
57
57
  "babel-polyfill": "6.26.0",
@@ -65,17 +65,17 @@
65
65
  "eslint-config-airbnb": "19.0.4",
66
66
  "eslint-config-airbnb-typescript": "^17.0.0",
67
67
  "eslint-plugin-formatjs": "^4.12.2",
68
- "eslint-plugin-import": "2.27.5",
68
+ "eslint-plugin-import": "2.31.0",
69
69
  "eslint-plugin-jsx-a11y": "6.7.1",
70
- "eslint-plugin-react": "7.32.2",
71
- "eslint-plugin-react-hooks": "4.6.0",
70
+ "eslint-plugin-react": "7.33.2",
71
+ "eslint-plugin-react-hooks": "4.6.1",
72
72
  "express": "^4.18.2",
73
73
  "file-loader": "6.2.0",
74
74
  "html-webpack-plugin": "5.6.3",
75
75
  "identity-obj-proxy": "3.0.0",
76
76
  "image-minimizer-webpack-plugin": "3.8.3",
77
- "jest": "29.6.1",
78
- "jest-environment-jsdom": "29.6.1",
77
+ "jest": "29.7.0",
78
+ "jest-environment-jsdom": "29.7.0",
79
79
  "mini-css-extract-plugin": "1.6.2",
80
80
  "parse5": "7.1.2",
81
81
  "postcss": "8.4.49",
@@ -83,9 +83,9 @@
83
83
  "postcss-loader": "7.3.4",
84
84
  "postcss-rtlcss": "5.1.2",
85
85
  "react-dev-utils": "12.0.1",
86
- "react-refresh": "0.14.2",
86
+ "react-refresh": "0.16.0",
87
87
  "resolve-url-loader": "5.0.0",
88
- "sass": "1.69.7",
88
+ "sass": "1.85.1",
89
89
  "sass-loader": "13.3.3",
90
90
  "sharp": "0.32.6",
91
91
  "source-map-loader": "4.0.2",
@@ -93,7 +93,7 @@
93
93
  "ts-jest": "29.1.4",
94
94
  "typescript": "4.9.5",
95
95
  "url-loader": "4.1.1",
96
- "webpack": "^5.89.0",
96
+ "webpack": "^5.97.1",
97
97
  "webpack-bundle-analyzer": "^4.10.1",
98
98
  "webpack-cli": "^5.1.4",
99
99
  "webpack-dev-server": "^4.15.1",
@@ -102,10 +102,10 @@
102
102
  },
103
103
  "devDependencies": {
104
104
  "@babel/preset-typescript": "^7.18.6",
105
- "@types/react": "^17.0.0",
106
- "@types/react-dom": "^17.0.11"
105
+ "@types/react": "^18.3.18",
106
+ "@types/react-dom": "^18.3.5"
107
107
  },
108
108
  "peerDependencies": {
109
- "react": "^16.9.0 || ^17.0.0"
109
+ "react": "^16.9.0 || ^17.0.0 || ^18.0.0"
110
110
  }
111
111
  }
@@ -1,4 +0,0 @@
1
- export const ReactComponent = 'IconMock';
2
-
3
- const mock = 'icon/mock/path';
4
- export default mock;