Skip to content

Commit

Permalink
Merge branch 'ybiquitous:main' into yarn-switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninerian authored Nov 4, 2021
2 parents e5d5033 + 0571656 commit c759c14
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [3.4.1](https://github.com/ybiquitous/npm-audit-fix-action/compare/v3.4.0...v3.4.1) (2021-10-16)

### Bug Fixes

- remove duplicate lines in commit body ([#507](https://github.com/ybiquitous/npm-audit-fix-action/issues/507)) ([242a4c2](https://github.com/ybiquitous/npm-audit-fix-action/commit/242a4c2c2bccb1f74ce197980f2149269e8a1553))

## [3.4.0](https://github.com/ybiquitous/npm-audit-fix-action/compare/v3.3.0...v3.4.0) (2021-10-16)

### Features

- **deps:** bump npm from 7 to 8 ([#506](https://github.com/ybiquitous/npm-audit-fix-action/issues/506)) ([5f38573](https://github.com/ybiquitous/npm-audit-fix-action/commit/5f3857374aae4bed1dfea86aa7b1fc6e3a0652f0))

## [3.3.0](https://github.com/ybiquitous/npm-audit-fix-action/compare/v3.2.5...v3.3.0) (2021-10-11)

### Features
Expand Down
9 changes: 7 additions & 2 deletions dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9277,6 +9277,7 @@ async function auditFix() {
* @returns {string}
*/
function buildCommitBody(report) {
/** @type {string[]} */
const lines = [];

lines.push("Summary:");
Expand All @@ -9287,11 +9288,15 @@ function buildCommitBody(report) {
lines.push("");
if (report.updated.length > 0) {
lines.push("Fixed vulnerabilities:");

/** @type {Set<string>} */
const vulnerabilities = new Set();
report.updated.forEach(({ name, severity, title, url }) => {
if (severity != null && title != null && url != null) {
lines.push(`- ${name}: "${title}" (${url})`);
vulnerabilities.add(`- ${name}: "${title}" (${url})`);
}
});
lines.push(...Array.from(vulnerabilities));
} else {
lines.push("No fixed vulnerabilities.");
}
Expand All @@ -9302,7 +9307,7 @@ function buildCommitBody(report) {
;// CONCATENATED MODULE: ./lib/constants.js
const PACKAGE_NAME = "ybiquitous/npm-audit-fix-action";
const PACKAGE_URL = "https://github.com/ybiquitous/npm-audit-fix-action";
const NPM_VERSION = "7";
const NPM_VERSION = "8";

;// CONCATENATED MODULE: ./lib/buildPullRequestBody.js

Expand Down
7 changes: 6 additions & 1 deletion lib/buildCommitBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* @returns {string}
*/
export default function buildCommitBody(report) {
/** @type {string[]} */
const lines = [];

lines.push("Summary:");
Expand All @@ -13,11 +14,15 @@ export default function buildCommitBody(report) {
lines.push("");
if (report.updated.length > 0) {
lines.push("Fixed vulnerabilities:");

/** @type {Set<string>} */
const vulnerabilities = new Set();
report.updated.forEach(({ name, severity, title, url }) => {
if (severity != null && title != null && url != null) {
lines.push(`- ${name}: "${title}" (${url})`);
vulnerabilities.add(`- ${name}: "${title}" (${url})`);
}
});
lines.push(...Array.from(vulnerabilities));
} else {
lines.push("No fixed vulnerabilities.");
}
Expand Down
2 changes: 1 addition & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const PACKAGE_NAME = "ybiquitous/npm-audit-fix-action";
export const PACKAGE_URL = "https://github.com/ybiquitous/npm-audit-fix-action";
export const NPM_VERSION = "7";
export const NPM_VERSION = "8";
4 changes: 2 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "npm-audit-fix-action",
"version": "3.3.0",
"version": "3.4.1",
"description": "A GitHub Action for `npm audit fix`",
"author": "Masafumi Koba",
"license": "MIT",
Expand All @@ -13,7 +13,7 @@
"repository": "ybiquitous/npm-audit-fix-action",
"engines": {
"node": ">=12.20.0",
"npm": ">=7 <9"
"npm": ">=8"
},
"type": "module",
"main": "lib/index.js",
Expand Down

0 comments on commit c759c14

Please sign in to comment.