Skip to content

Commit

Permalink
revert(Deps): Resolve security alerts and update SVGR
Browse files Browse the repository at this point in the history
This is being reverted while investigating a possible performance regression in Netlify Storybook builds.
  • Loading branch information
jpveooys committed Dec 21, 2021
1 parent 425138a commit 745bfac
Show file tree
Hide file tree
Showing 7 changed files with 2,394 additions and 1,822 deletions.
21 changes: 14 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,20 @@
"prettier": "^2.0.5"
},
"resolutions": {
"**/ansi-regex": "^5.0.1",
"**/axe-core": "^3.5.3",
"**/immer": "^9.0.6",
"**/semver-regex": "^3.1.3",
"**/trim": "^0.0.3",
"**/trim-newlines": "^3.0.1",
"**/yup": "^0.31.1"
"**/**/axe-core": "^3.5.3",
"**/**/browserslist": "^4.17.0",
"**/**/css-what": "^5.0.1",
"**/**/glob-parent": "^5.1.2",
"**/**/json-schema": "^0.4.0",
"**/**/jszip": "^3.7.1",
"**/**/normalize-url": "^6.0.1",
"**/**/postcss": "^8.2.15",
"**/**/postcss-scss": "^3.0.5",
"**/**/tar": "^6.1.11",
"**/**/trim": "^0.0.3",
"**/**/url-parse": "^1.5.3",
"**/**/yup": "^0.31.1",
"**/**/ansi-regex": "^5.0.1"
},
"prettier": {
"bracketSpacing": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"lodash": "^4.17.20",
"npm-run-all": "^4.1.5",
"source-map-loader": "^3.0.0",
"style-dictionary": "^3.1.1",
"style-dictionary": "^3.0.0",
"typescript": "^4.0.3",
"webpack": "^5.52.1",
"webpack-cli": "^4.7.2",
Expand Down
35 changes: 18 additions & 17 deletions packages/icon-library/.svgrrc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
module.exports = {
typescript: true,
prettierConfig: {
...require('./prettier.config.js'),
parser: 'typescript',
},
template: (variables, { tpl }) => {
return tpl`
import React from 'react'
import { SVGUniqueID } from 'react-svg-unique-id'
import { SVGIconProps } from '../types'
${variables.interfaces}
template(
{ template },
opts,
{ imports, componentName, props, jsx, exports }
) {
const typeScriptTpl = template.smart({ plugins: ['jsx', 'typescript'] })
return typeScriptTpl.ast`
import React from 'react'
import { SVGUniqueID } from 'react-svg-unique-id';
import { SVGIconProps } from '../types'
const ${variables.componentName} = ({ size = 16, ...props }: SVGIconProps) => (
<SVGUniqueID>{${variables.jsx}}</SVGUniqueID>
);
const ${componentName} = ({ size = 16, ...props }: SVGIconProps) => (
<SVGUniqueID>{${jsx}}</SVGUniqueID>
);
${variables.exports}
`
export default ${componentName};
`
},
svgoConfig: {
plugins: [{ removeViewBox: false }],
},
}
8 changes: 4 additions & 4 deletions packages/icon-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"build": "run-s svgr-icons svgr-silhouettes exports build:es build:cjs types",
"build:es": "BABEL_ENV=es babel src --out-dir \"dist/es\" --extensions \".ts,.tsx\"",
"build:cjs": "BABEL_ENV=cjs webpack --mode production --config=webpack/prod.js",
"svgr-icons": "rm -rf src/icons; svgr -d src/icons -- src/assets/icons/**/; rm src/icons/index.tsx",
"svgr-silhouettes": "rm -rf src/silhouettes; svgr -d src/silhouettes -- src/assets/silhouettes/; rm src/silhouettes/index.tsx",
"svgr-icons": "rm -rf src/icons; svgr --ext tsx -d src/icons src/assets/icons/**/; rm src/icons/index.tsx",
"svgr-silhouettes": "rm -rf src/silhouettes; svgr --ext tsx -d src/silhouettes src/assets/silhouettes/; rm src/silhouettes/index.tsx",
"exports": "./generate-exports.sh",
"types": "tsc --emitDeclarationOnly --declarationMap --declaration --noEmit false --allowJs false --outDir dist/types",
"prepare": "yarn build"
Expand All @@ -39,8 +39,8 @@
"@babel/preset-env": "^7.8.3",
"@babel/preset-react": "^7.8.3",
"@babel/preset-typescript": "^7.8.3",
"@svgr/babel-plugin-add-jsx-attribute": "^6.0.0",
"@svgr/cli": "^6.1.2",
"@svgr/babel-plugin-add-jsx-attribute": "^5.4.0",
"@svgr/cli": "^5.1.0",
"babel-loader": "^8.0.6",
"clean-webpack-plugin": "^4.0.0",
"npm-run-all": "^4.1.5",
Expand Down
14 changes: 0 additions & 14 deletions packages/icon-library/svgo.config.js

This file was deleted.

10 changes: 10 additions & 0 deletions yarn-audit-known-issues

Large diffs are not rendered by default.

Loading

0 comments on commit 745bfac

Please sign in to comment.