-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): bump frontend dependencies #8353
Changes from 21 commits
81b15f0
d602180
6ce9120
18ba02b
2d58bd4
585026b
32bf172
a97c274
4ca0d11
c2ff029
f05ff28
7fbdd13
c77e35b
6c67882
7aedd5c
51eabf5
d56df0e
567ab19
6b816eb
c596644
31a6532
cb65275
87a7b79
ac39112
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ node { | |
} | ||
|
||
// Version of node to use. | ||
version = '16.8.0' | ||
version = '16.20.1' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you so much for this! |
||
|
||
// Version of Yarn to use. | ||
yarnVersion = '1.22.0' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, this kinda stuff for webpack upgrades is really tricky to figure out 🙏 |
||
require('dotenv').config(); | ||
const { whenProd } = require('@craco/craco'); | ||
const CracoAntDesignPlugin = require('craco-antd'); | ||
const path = require('path'); | ||
const CopyWebpackPlugin = require('copy-webpack-plugin'); | ||
|
||
// eslint-disable-next-line import/no-dynamic-require | ||
const themeConfig = require(`./src/conf/theme/${process.env.REACT_APP_THEME_CONFIG}`); | ||
|
||
function addLessPrefixToKeys(styles) { | ||
|
@@ -15,6 +18,23 @@ function addLessPrefixToKeys(styles) { | |
|
||
module.exports = { | ||
webpack: { | ||
configure: { | ||
optimization: whenProd(() => ({ | ||
splitChunks: { | ||
cacheGroups: { | ||
vendor: { | ||
test: /[\\/]node_modules[\\/]/, | ||
name: 'vendors', | ||
chunks: 'all', | ||
}, | ||
}, | ||
}, | ||
})), | ||
// Webpack 5 no longer automatically pollyfill core Node.js modules | ||
resolve: { fallback: { fs: false } }, | ||
// Ignore Webpack 5's missing source map warnings from node_modules | ||
ignoreWarnings: [{ module: /node_modules/, message: /source-map-loader/ }], | ||
}, | ||
Comment on lines
+21
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice I'm excited about this! hopefully reduces our build size a bit |
||
plugins: { | ||
add: [ | ||
// Self host images by copying them to the build directory | ||
|
@@ -24,8 +44,8 @@ module.exports = { | |
// Copy monaco-editor files to the build directory | ||
new CopyWebpackPlugin({ | ||
patterns: [ | ||
{ from: "node_modules/monaco-editor/min/vs/", to: "monaco-editor/vs" }, | ||
{ from: "node_modules/monaco-editor/min-maps/vs/", to: "monaco-editor/min-maps/vs" }, | ||
{ from: 'node_modules/monaco-editor/min/vs/', to: 'monaco-editor/vs' }, | ||
{ from: 'node_modules/monaco-editor/min-maps/vs/', to: 'monaco-editor/min-maps/vs' }, | ||
], | ||
}), | ||
], | ||
|
@@ -41,13 +61,15 @@ module.exports = { | |
}, | ||
], | ||
jest: { | ||
configure: (jestConfig) => { | ||
jestConfig.transformIgnorePatterns = [ | ||
// Ensures that lib0 and y-protocol libraries are transformed through babel as well | ||
'node_modules/(?!(lib0|y-protocols)).+\\.(js|jsx|mjs|cjs|ts|tsx)$', | ||
'^.+\\.module\\.(css|sass|scss)$', | ||
]; | ||
return jestConfig; | ||
configure: { | ||
// Use dist files instead of source files | ||
moduleNameMapper: { | ||
'^d3-interpolate-path': `d3-interpolate-path/build/d3-interpolate-path`, | ||
'^d3-(.*)$': `d3-$1/dist/d3-$1`, | ||
'^lib0/((?!dist).*)$': 'lib0/dist/$1.cjs', | ||
'^y-protocols/(.*)$': 'y-protocols/dist/$1.cjs', | ||
'\\.(css|less)$': '<rootDir>/src/__mocks__/styleMock.js', | ||
}, | ||
}, | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so these lint changes were necessary as we bumped dependencies we had new linting rules being applied that we didn't want applied?
nothing I'm seeing is concerning to me just wanted to call it out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap! That's right 😃