chore: bump conventional-changelog-angular version
Some checks failed
/ test (push) Failing after 15s
Some checks failed
/ test (push) Failing after 15s
This commit is contained in:
parent
b013d20808
commit
f24bc45b25
193
dist/index.js
vendored
193
dist/index.js
vendored
@ -1,7 +1,7 @@
|
|||||||
import require$$0 from 'os';
|
import require$$0 from 'os';
|
||||||
import require$$0$1 from 'crypto';
|
import require$$0$1 from 'crypto';
|
||||||
import require$$1 from 'fs';
|
import require$$1 from 'fs';
|
||||||
import require$$1$4 from 'path';
|
import require$$1$4, { resolve } from 'path';
|
||||||
import require$$2$1 from 'http';
|
import require$$2$1 from 'http';
|
||||||
import require$$3$1 from 'https';
|
import require$$3$1 from 'https';
|
||||||
import require$$0$4 from 'net';
|
import require$$0$4 from 'net';
|
||||||
@ -21,12 +21,13 @@ import require$$2$2 from 'perf_hooks';
|
|||||||
import require$$5 from 'util/types';
|
import require$$5 from 'util/types';
|
||||||
import require$$4$2 from 'async_hooks';
|
import require$$4$2 from 'async_hooks';
|
||||||
import require$$1$2 from 'console';
|
import require$$1$2 from 'console';
|
||||||
import require$$1$3 from 'url';
|
import require$$1$3, { fileURLToPath } from 'url';
|
||||||
import require$$3$2 from 'zlib';
|
import require$$3$2 from 'zlib';
|
||||||
import require$$6 from 'string_decoder';
|
import require$$6 from 'string_decoder';
|
||||||
import require$$0$9 from 'diagnostics_channel';
|
import require$$0$9 from 'diagnostics_channel';
|
||||||
import require$$2$3 from 'child_process';
|
import require$$2$3 from 'child_process';
|
||||||
import require$$6$1 from 'timers';
|
import require$$6$1 from 'timers';
|
||||||
|
import { readFile } from 'fs/promises';
|
||||||
import { spawnSync } from 'node:child_process';
|
import { spawnSync } from 'node:child_process';
|
||||||
|
|
||||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||||
@ -34479,15 +34480,7 @@ function requireConventionalCommitsParser () {
|
|||||||
|
|
||||||
var conventionalCommitsParserExports = requireConventionalCommitsParser();
|
var conventionalCommitsParserExports = requireConventionalCommitsParser();
|
||||||
|
|
||||||
var parserOpts = {};
|
function createParserOpts () {
|
||||||
|
|
||||||
var hasRequiredParserOpts;
|
|
||||||
|
|
||||||
function requireParserOpts () {
|
|
||||||
if (hasRequiredParserOpts) return parserOpts;
|
|
||||||
hasRequiredParserOpts = 1;
|
|
||||||
|
|
||||||
function createParserOpts () {
|
|
||||||
return {
|
return {
|
||||||
headerPattern: /^(\w*)(?:\((.*)\))?: (.*)$/,
|
headerPattern: /^(\w*)(?:\((.*)\))?: (.*)$/,
|
||||||
headerCorrespondence: [
|
headerCorrespondence: [
|
||||||
@ -34496,17 +34489,11 @@ function requireParserOpts () {
|
|||||||
'subject'
|
'subject'
|
||||||
],
|
],
|
||||||
noteKeywords: ['BREAKING CHANGE'],
|
noteKeywords: ['BREAKING CHANGE'],
|
||||||
revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
|
revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w{7,40})\b/i,
|
||||||
revertCorrespondence: ['header', 'hash']
|
revertCorrespondence: ['header', 'hash']
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
parserOpts.createParserOpts = createParserOpts;
|
|
||||||
return parserOpts;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var writerOpts = {};
|
|
||||||
|
|
||||||
var arrayIfy;
|
var arrayIfy;
|
||||||
var hasRequiredArrayIfy;
|
var hasRequiredArrayIfy;
|
||||||
|
|
||||||
@ -34733,22 +34720,17 @@ function requireCompareFunc () {
|
|||||||
return compareFunc_1;
|
return compareFunc_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
var hasRequiredWriterOpts;
|
var compareFuncExports = requireCompareFunc();
|
||||||
|
var compareFunc = /*@__PURE__*/getDefaultExportFromCjs(compareFuncExports);
|
||||||
|
|
||||||
function requireWriterOpts () {
|
const dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||||
if (hasRequiredWriterOpts) return writerOpts;
|
|
||||||
hasRequiredWriterOpts = 1;
|
|
||||||
|
|
||||||
const compareFunc = requireCompareFunc();
|
async function createWriterOpts () {
|
||||||
const { readFile } = require$$1.promises;
|
|
||||||
const { resolve } = require$$1$4;
|
|
||||||
|
|
||||||
async function createWriterOpts () {
|
|
||||||
const [template, header, commit, footer] = await Promise.all([
|
const [template, header, commit, footer] = await Promise.all([
|
||||||
readFile(resolve(__dirname, './templates/template.hbs'), 'utf-8'),
|
readFile(resolve(dirname, './templates/template.hbs'), 'utf-8'),
|
||||||
readFile(resolve(__dirname, './templates/header.hbs'), 'utf-8'),
|
readFile(resolve(dirname, './templates/header.hbs'), 'utf-8'),
|
||||||
readFile(resolve(__dirname, './templates/commit.hbs'), 'utf-8'),
|
readFile(resolve(dirname, './templates/commit.hbs'), 'utf-8'),
|
||||||
readFile(resolve(__dirname, './templates/footer.hbs'), 'utf-8')
|
readFile(resolve(dirname, './templates/footer.hbs'), 'utf-8')
|
||||||
]);
|
]);
|
||||||
const writerOpts = getWriterOpts();
|
const writerOpts = getWriterOpts();
|
||||||
|
|
||||||
@ -34758,68 +34740,70 @@ function requireWriterOpts () {
|
|||||||
writerOpts.footerPartial = footer;
|
writerOpts.footerPartial = footer;
|
||||||
|
|
||||||
return writerOpts
|
return writerOpts
|
||||||
}
|
}
|
||||||
|
|
||||||
writerOpts.createWriterOpts = createWriterOpts;
|
function getWriterOpts () {
|
||||||
|
|
||||||
function getWriterOpts () {
|
|
||||||
return {
|
return {
|
||||||
transform: (commit, context) => {
|
transform: (commit, context) => {
|
||||||
let discard = true;
|
let discard = true;
|
||||||
const issues = [];
|
const notes = commit.notes.map(note => {
|
||||||
|
|
||||||
commit.notes.forEach(note => {
|
|
||||||
note.title = 'BREAKING CHANGES';
|
|
||||||
discard = false;
|
discard = false;
|
||||||
|
|
||||||
|
return {
|
||||||
|
...note,
|
||||||
|
title: 'BREAKING CHANGES'
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let type = commit.type;
|
||||||
|
|
||||||
if (commit.type === 'feat') {
|
if (commit.type === 'feat') {
|
||||||
commit.type = 'Features';
|
type = 'Features';
|
||||||
} else if (commit.type === 'fix') {
|
} else if (commit.type === 'fix') {
|
||||||
commit.type = 'Bug Fixes';
|
type = 'Bug Fixes';
|
||||||
} else if (commit.type === 'perf') {
|
} else if (commit.type === 'perf') {
|
||||||
commit.type = 'Performance Improvements';
|
type = 'Performance Improvements';
|
||||||
} else if (commit.type === 'revert' || commit.revert) {
|
} else if (commit.type === 'revert' || commit.revert) {
|
||||||
commit.type = 'Reverts';
|
type = 'Reverts';
|
||||||
} else if (discard) {
|
} else if (discard) {
|
||||||
return
|
return
|
||||||
} else if (commit.type === 'docs') {
|
} else if (commit.type === 'docs') {
|
||||||
commit.type = 'Documentation';
|
type = 'Documentation';
|
||||||
} else if (commit.type === 'style') {
|
} else if (commit.type === 'style') {
|
||||||
commit.type = 'Styles';
|
type = 'Styles';
|
||||||
} else if (commit.type === 'refactor') {
|
} else if (commit.type === 'refactor') {
|
||||||
commit.type = 'Code Refactoring';
|
type = 'Code Refactoring';
|
||||||
} else if (commit.type === 'test') {
|
} else if (commit.type === 'test') {
|
||||||
commit.type = 'Tests';
|
type = 'Tests';
|
||||||
} else if (commit.type === 'build') {
|
} else if (commit.type === 'build') {
|
||||||
commit.type = 'Build System';
|
type = 'Build System';
|
||||||
} else if (commit.type === 'ci') {
|
} else if (commit.type === 'ci') {
|
||||||
commit.type = 'Continuous Integration';
|
type = 'Continuous Integration';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commit.scope === '*') {
|
const scope = commit.scope === '*' ? '' : commit.scope;
|
||||||
commit.scope = '';
|
const shortHash = typeof commit.hash === 'string'
|
||||||
}
|
? commit.hash.substring(0, 7)
|
||||||
|
: commit.shortHash;
|
||||||
|
|
||||||
if (typeof commit.hash === 'string') {
|
const issues = [];
|
||||||
commit.shortHash = commit.hash.substring(0, 7);
|
let subject = commit.subject;
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof commit.subject === 'string') {
|
if (typeof subject === 'string') {
|
||||||
let url = context.repository
|
let url = context.repository
|
||||||
? `${context.host}/${context.owner}/${context.repository}`
|
? `${context.host}/${context.owner}/${context.repository}`
|
||||||
: context.repoUrl;
|
: context.repoUrl;
|
||||||
if (url) {
|
if (url) {
|
||||||
url = `${url}/issues/`;
|
url = `${url}/issues/`;
|
||||||
// Issue URLs.
|
// Issue URLs.
|
||||||
commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => {
|
subject = subject.replace(/#([0-9]+)/g, (_, issue) => {
|
||||||
issues.push(issue);
|
issues.push(issue);
|
||||||
return `[#${issue}](${url}${issue})`
|
return `[#${issue}](${url}${issue})`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (context.host) {
|
if (context.host) {
|
||||||
// User URLs.
|
// User URLs.
|
||||||
commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
|
subject = subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
|
||||||
if (username.includes('/')) {
|
if (username.includes('/')) {
|
||||||
return `@${username}`
|
return `@${username}`
|
||||||
}
|
}
|
||||||
@ -34830,15 +34814,16 @@ function requireWriterOpts () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove references that already appear in the subject
|
// remove references that already appear in the subject
|
||||||
commit.references = commit.references.filter(reference => {
|
const references = commit.references.filter(reference => !issues.includes(reference.issue));
|
||||||
if (issues.indexOf(reference.issue) === -1) {
|
|
||||||
return true
|
return {
|
||||||
|
notes,
|
||||||
|
type,
|
||||||
|
scope,
|
||||||
|
shortHash,
|
||||||
|
subject,
|
||||||
|
references
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
|
||||||
});
|
|
||||||
|
|
||||||
return commit
|
|
||||||
},
|
},
|
||||||
groupBy: 'type',
|
groupBy: 'type',
|
||||||
commitGroupsSort: 'title',
|
commitGroupsSort: 'title',
|
||||||
@ -34846,42 +34831,9 @@ function requireWriterOpts () {
|
|||||||
noteGroupsSort: 'title',
|
noteGroupsSort: 'title',
|
||||||
notesSort: compareFunc
|
notesSort: compareFunc
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return writerOpts;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var conventionalChangelog = {};
|
function whatBump (commits) {
|
||||||
|
|
||||||
var hasRequiredConventionalChangelog;
|
|
||||||
|
|
||||||
function requireConventionalChangelog () {
|
|
||||||
if (hasRequiredConventionalChangelog) return conventionalChangelog;
|
|
||||||
hasRequiredConventionalChangelog = 1;
|
|
||||||
|
|
||||||
function createConventionalChangelogOpts (parserOpts, writerOpts) {
|
|
||||||
return {
|
|
||||||
parserOpts,
|
|
||||||
writerOpts
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
conventionalChangelog.createConventionalChangelogOpts = createConventionalChangelogOpts;
|
|
||||||
return conventionalChangelog;
|
|
||||||
}
|
|
||||||
|
|
||||||
var conventionalRecommendedBump = {};
|
|
||||||
|
|
||||||
var hasRequiredConventionalRecommendedBump;
|
|
||||||
|
|
||||||
function requireConventionalRecommendedBump () {
|
|
||||||
if (hasRequiredConventionalRecommendedBump) return conventionalRecommendedBump;
|
|
||||||
hasRequiredConventionalRecommendedBump = 1;
|
|
||||||
|
|
||||||
function createConventionalRecommendedBumpOpts (parserOpts) {
|
|
||||||
return {
|
|
||||||
parserOpts,
|
|
||||||
|
|
||||||
whatBump (commits) {
|
|
||||||
let level = 2;
|
let level = 2;
|
||||||
let breakings = 0;
|
let breakings = 0;
|
||||||
let features = 0;
|
let features = 0;
|
||||||
@ -34904,49 +34856,18 @@ function requireConventionalRecommendedBump () {
|
|||||||
? `There is ${breakings} BREAKING CHANGE and ${features} features`
|
? `There is ${breakings} BREAKING CHANGE and ${features} features`
|
||||||
: `There are ${breakings} BREAKING CHANGES and ${features} features`
|
: `There are ${breakings} BREAKING CHANGES and ${features} features`
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
conventionalRecommendedBump.createConventionalRecommendedBumpOpts = createConventionalRecommendedBumpOpts;
|
|
||||||
return conventionalRecommendedBump;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var conventionalChangelogAngular;
|
async function createPreset () {
|
||||||
var hasRequiredConventionalChangelogAngular;
|
|
||||||
|
|
||||||
function requireConventionalChangelogAngular () {
|
|
||||||
if (hasRequiredConventionalChangelogAngular) return conventionalChangelogAngular;
|
|
||||||
hasRequiredConventionalChangelogAngular = 1;
|
|
||||||
|
|
||||||
const { createParserOpts } = requireParserOpts();
|
|
||||||
const { createWriterOpts } = requireWriterOpts();
|
|
||||||
const { createConventionalChangelogOpts } = requireConventionalChangelog();
|
|
||||||
const { createConventionalRecommendedBumpOpts } = requireConventionalRecommendedBump();
|
|
||||||
|
|
||||||
async function createPreset () {
|
|
||||||
const parserOpts = createParserOpts();
|
|
||||||
const writerOpts = await createWriterOpts();
|
|
||||||
const recommendedBumpOpts = createConventionalRecommendedBumpOpts(parserOpts);
|
|
||||||
const conventionalChangelog = createConventionalChangelogOpts(parserOpts, writerOpts);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
parserOpts,
|
parser: createParserOpts(),
|
||||||
writerOpts,
|
writer: await createWriterOpts(),
|
||||||
recommendedBumpOpts,
|
whatBump
|
||||||
conventionalChangelog
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
conventionalChangelogAngular = createPreset;
|
|
||||||
return conventionalChangelogAngular;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var conventionalChangelogAngularExports = requireConventionalChangelogAngular();
|
|
||||||
var defaultChangelogOpts = /*@__PURE__*/getDefaultExportFromCjs(conventionalChangelogAngularExports);
|
|
||||||
|
|
||||||
async function parse(message, parser = conventionalCommitsParserExports.sync, parserOpts) {
|
async function parse(message, parser = conventionalCommitsParserExports.sync, parserOpts) {
|
||||||
const preset = await defaultChangelogOpts();
|
const preset = await createPreset();
|
||||||
const defaultOpts = preset.parserOpts;
|
const defaultOpts = preset.parserOpts;
|
||||||
const opts = {
|
const opts = {
|
||||||
...defaultOpts,
|
...defaultOpts,
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
10
package-lock.json
generated
10
package-lock.json
generated
@ -130,7 +130,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@commitlint/types": "^19.8.1",
|
"@commitlint/types": "^19.8.1",
|
||||||
"conventional-changelog-angular": "^7.0.0",
|
"conventional-changelog-angular": "^8.0.0",
|
||||||
"conventional-commits-parser": "^5.0.0"
|
"conventional-commits-parser": "^5.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -777,15 +777,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/conventional-changelog-angular": {
|
"node_modules/conventional-changelog-angular": {
|
||||||
"version": "7.0.0",
|
"version": "8.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-8.0.0.tgz",
|
||||||
"integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==",
|
"integrity": "sha512-CLf+zr6St0wIxos4bmaKHRXWAcsCXrJU6F4VdNDrGRK3B8LDLKoX3zuMV5GhtbGkVR/LohZ6MT6im43vZLSjmA==",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"compare-func": "^2.0.0"
|
"compare-func": "^2.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/conventional-commits-parser": {
|
"node_modules/conventional-commits-parser": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user