Skip to content

Commit

Permalink
Replace yarn audit with configurable one
Browse files Browse the repository at this point in the history
Most of the errors we see coming from yarn audit are for dev dependencies
which have no impact in production. See:

rails/webpacker#2969 (comment)
and
rails/webpacker#3017 (comment)

We need to be able to suppress warnings which do not apply.
  • Loading branch information
tsmartt committed Jan 20, 2022
1 parent a490235 commit e82f42d
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 50 deletions.
4 changes: 4 additions & 0 deletions .audit-ci.json
@@ -0,0 +1,4 @@
{
"high": true,
"allowlist": ["1006846", "1005154", "1006865"]
}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Brakeman
run: bundle exec brakeman
- name: Yarn audit
run: yarn audit && yarn --cwd public/creators-landing audit
run: npx audit-ci --config .audit-ci.json && (cd public/creators-landing && npx audit-ci --config ../../.audit-ci.json)
- name: Bundler Audit
run: bundle exec bundle-audit check --update
- name: Sorbet Linter
Expand Down
27 changes: 1 addition & 26 deletions Gemfile.lock
Expand Up @@ -416,11 +416,6 @@ GEM
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbi (0.0.9)
ast
parser
sorbet-runtime (>= 0.5.9204)
unparser
recaptcha (3.4.0)
json
redis (4.2.5)
Expand Down Expand Up @@ -529,8 +524,6 @@ GEM
thor (~> 1.0)
tilt (~> 2.0)
yard (~> 0.9, >= 0.9.24)
sorbet (0.5.9318)
sorbet-static (= 0.5.9318)
sorbet-coerce (0.5.0)
polyfill (~> 1.8)
safe_type (~> 1.1, >= 1.1.1)
Expand All @@ -542,11 +535,6 @@ GEM
sorbet-coerce (>= 0.2.6)
sorbet-runtime (>= 0.5)
sorbet-runtime (0.5.9318)
sorbet-static (0.5.9318-x86_64-linux)
spoom (1.1.7)
sorbet (>= 0.5.9204)
sorbet-runtime (>= 0.5.9204)
thor (>= 0.19.2)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
Expand All @@ -559,15 +547,6 @@ GEM
rubocop (= 1.24.1)
rubocop-performance (= 1.13.1)
stripe (5.42.0)
tapioca (0.5.4)
bundler (>= 1.17.3)
pry (>= 0.12.2)
rbi
sorbet-runtime
sorbet-static (>= 0.5.6200)
spoom
thor (>= 0.19.2)
yard-sorbet
temping (3.10.0)
activerecord (>= 4.2)
activesupport (>= 4.2)
Expand Down Expand Up @@ -616,9 +595,6 @@ GEM
nokogiri (~> 1.8)
yard (0.9.27)
webrick (~> 1.7.0)
yard-sorbet (0.6.1)
sorbet-runtime (>= 0.5)
yard (>= 0.9)
yt (0.33.4)
activesupport
zeitwerk (2.3.1)
Expand All @@ -630,6 +606,7 @@ GEM
multipart-post (~> 2.0)

PLATFORMS
x86_64-darwin-20
x86_64-linux

DEPENDENCIES
Expand Down Expand Up @@ -710,13 +687,11 @@ DEPENDENCIES
simplecov
slim-rails (~> 3.1)
solargraph
sorbet (= 0.5.9318)
sorbet-rails (= 0.7.5)
sorbet-runtime (= 0.5.9318)
ssrf_filter
standard
stripe (~> 5.1, >= 5.1.1)
tapioca (= 0.5.4)
temping
tzinfo-data
u2f (~> 1.0)
Expand Down
39 changes: 20 additions & 19 deletions package.json
Expand Up @@ -55,22 +55,9 @@
"preset": "ts-jest/presets/js-with-babel"
},
"dependencies": {
"@babel/core": "^7.8.7",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0",
"@rails/activestorage": "^6.0.3-1",
"@rails/ujs": "^6.0.3-1",
"@rails/webpacker": "^5.4.2",
"@types/react": "^16.4.7",
"@types/react-dom": "^16.0.6",
"axios": "^0.21.2",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "^8.1.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"babel-polyfill": "^6.26.0",
"babel-preset-react": "^6.24.1",
"brave-ui": "^0.38.0",
"chart.js": "^2.7.2",
"clipboard": "^2.0.1",
Expand All @@ -79,7 +66,6 @@
"js-yaml": "3.13.1",
"kind-of": "^6.0.3",
"moment": "^2.25.0",
"node-sass": "^6.0.1",
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-avatar-editor": "^11.0.4",
Expand All @@ -88,10 +74,7 @@
"react-select": "^3.0.8",
"react-tooltip": "^4.2.3",
"styled-components": "5.1.0",
"tributejs": "^3.7.1",
"ts-loader": "^5.3.0",
"typescript": "^4.3.5",
"webpack-cli": "^3.3.11"
"tributejs": "^3.7.1"
},
"devDependencies": {
"@types/jest": "^24.0.6",
Expand All @@ -118,7 +101,25 @@
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^8.0.1",
"tslint-react": "^3.6.0",
"webpack-dev-server": "^4.2.0"
"webpack-dev-server": "^4.2.0",
"audit-ci": "4.x",
"typescript": "^4.3.5",
"ts-loader": "^5.3.0",
"@types/react": "^16.4.7",
"@types/react-dom": "^16.0.6",
"webpack-cli": "^3.3.11",
"node-sass": "^6.0.1",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "^8.1.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"babel-polyfill": "^6.26.0",
"babel-preset-react": "^6.24.1",
"@rails/webpacker": "^5.4.3",
"@babel/core": "^7.8.7",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0"
},
"resolutions": {
"node-fetch": "2.6.1",
Expand Down

0 comments on commit e82f42d

Please sign in to comment.