Skip to content

Commit

Permalink
fix: update package-lock for high severity items (#616)
Browse files Browse the repository at this point in the history
* fix codecov
* update @adobe/eslint-config-aio-config, fix lint issues
* fix npm script gen-health, fix readme
  • Loading branch information
shazron authored May 15, 2024
1 parent e973452 commit 57e9984
Show file tree
Hide file tree
Showing 6 changed files with 6,672 additions and 6,220 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
./bin/run runtime --help
- name: upload coverage
if: success()
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v4
with:
name: ${{ runner.os }} node.js ${{ matrix.node-version }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
7,823 changes: 4,120 additions & 3,703 deletions README.md

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions bin/gen-health-table.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable node/no-extraneous-require */
/* eslint-disable node/no-unpublished-require */
/*
Copyright 2020 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
Expand All @@ -10,8 +12,11 @@ governing permissions and limitations under the License.
*/

const fs = require('fs-extra')
const Readme = require('oclif/lib/commands/readme').default
const path = require('node:path')
const ReadmeGenerator = require('oclif/lib/readme-generator').default
const READMEpath = path.resolve(path.join(__dirname, '..', 'README.md'))

/** @private */
function genRow (pkName) {
return `| [@${pkName}](https://github.com/${pkName}) ` +
`| [![Version](https://img.shields.io/npm/v/@${pkName}.svg)](https://npmjs.org/package/@${pkName})` +
Expand All @@ -22,8 +27,9 @@ function genRow (pkName) {
`| [![Github Pull Requests](https://img.shields.io/github/issues-pr/${pkName}.svg)](https://github.com/${pkName}/pulls)|`
}

/** @private */
function replaceTag (readme, tag, body) {
const oclDev = new Readme()
const oclDev = new ReadmeGenerator({}, { readmePath: READMEpath })
return oclDev.replaceTag(readme, tag, body)

// this is the code that oclif/dev-cli/readme runs:
Expand Down Expand Up @@ -58,5 +64,5 @@ const tableData = ['| Module | Version | Downloads | Build Status | Coverage |
adobeDeps.forEach(item => { tableData.push(genRow(item)) })

// replace the text in README
const readme = fs.readFileSync('README.md', 'utf8')
fs.writeFileSync('README.md', replaceTag(readme, 'health', tableData.join('\n')))
const readme = fs.readFileSync(READMEpath, 'utf8')
fs.writeFileSync(READMEpath, replaceTag(readme, 'health', tableData.join('\n')))
Loading

0 comments on commit 57e9984

Please sign in to comment.