Skip to content
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

BC-6753 - Bump sanitize-html from 2.6.1 to 2.12.1 #3419

Merged
merged 9 commits into from
Jun 19, 2024
180 changes: 137 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"react-sortable-hoc": "^1.11.0",
"request": "^2.79.0",
"request-promise": "^4.2.6",
"sanitize-html": "^2.6.1",
"sanitize-html": "^2.12.1",
"sass": "^1.43.2",
"serve-favicon": "^2.5.0",
"shortid": "^2.2.16",
Expand All @@ -138,6 +138,7 @@
},
"devDependencies": {
"@babel/core": "^7.20.2",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-transform-react-jsx": "^7.14.9",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/preset-env": "^7.14.9",
Expand Down
12 changes: 10 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,24 @@ module.exports = {
mode: 'production',
module: {
rules: [
// All files that end on .js or .jsx are transpilled by babel
// All files that end on .js or .jsx are transpilled by babel.
// Also the htmlparser2 module (as dependency of sanitize-html)
// needs to be included in transpilling, because of the module
// being otherwise not compatible with webpack 4.x (see
// https://github.com/apostrophecms/sanitize-html/issues/592 ).
// In addition the @babel/plugin-proposal-export-namespace-from
// was also added for that reason as well and can be removed
// once the update to webpack 5.x is done.
{
test: /\.(js|jsx)$/,
exclude: /(node_modules)/,
exclude: /(node_modules)[/\\](?!(htmlparser2)[/\\])/,
loader: 'babel-loader',
query: {
presets: [['@babel/preset-env']],
plugins: [
'@babel/plugin-transform-react-jsx',
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-export-namespace-from',
],
},
},
Expand Down
Loading