Skip to content

Commit

Permalink
Merge pull request #48532 from callstack-internal/hur/chore/fix-secur…
Browse files Browse the repository at this point in the history
…ity-vulnerabilities

chore: fix security vulnerabilities
  • Loading branch information
grgia authored Sep 17, 2024
2 parents 2190f62 + aa5ddab commit 266ad46
Show file tree
Hide file tree
Showing 10 changed files with 1,673 additions and 4,558 deletions.
1,786 changes: 1,010 additions & 776 deletions .github/actions/javascript/authorChecklist/index.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .storybook/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ const webpackConfig = ({config}: {config: Configuration}) => {
loader: require.resolve('@svgr/webpack'),
});

config.module.rules?.push({
test: /pdf\.worker\.mjs$/,
type: 'asset/source',
});

config.plugins.push(
new DefinePlugin({
__DEV__: process.env.NODE_ENV === 'development',
Expand Down
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const defaultPlugins = [
'@babel/transform-runtime',
'@babel/plugin-proposal-class-properties',

// We use `transform-class-properties` for transforming ReactNative libraries and do not use it for our own
// We use `@babel/plugin-transform-class-properties` for transforming ReactNative libraries and do not use it for our own
// source code transformation as we do not use class property assignment.
'transform-class-properties',
'@babel/plugin-transform-class-properties',

// Keep it last
'react-native-reanimated/plugin',
Expand Down
4 changes: 2 additions & 2 deletions config/webpack/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
{from: 'node_modules/pdfjs-dist/cmaps/', to: 'cmaps/'},
],
}),
new EnvironmentPlugin({JEST_WORKER_ID: null}),
new EnvironmentPlugin({JEST_WORKER_ID: ''}),
new IgnorePlugin({
resourceRegExp: /^\.\/locale$/,
contextRegExp: /moment$/,
Expand Down Expand Up @@ -165,7 +165,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
// We are importing this worker as a string by using asset/source otherwise it will default to loading via an HTTPS request later.
// This causes issues if we have gone offline before the pdfjs web worker is set up as we won't be able to load it from the server.
{
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.js'),
test: new RegExp('node_modules/pdfjs-dist/legacy/build/pdf.worker.mjs'),
type: 'asset/source',
},

Expand Down
Loading

0 comments on commit 266ad46

Please sign in to comment.