Skip to content

Commit

Permalink
Merge pull request #59 from conventional-changelog/master
Browse files Browse the repository at this point in the history
[pull] master from conventional-changelog:master
  • Loading branch information
ammar-ahmed-butt authored Aug 17, 2024
2 parents cdbcaf0 + daec60f commit e481976
Show file tree
Hide file tree
Showing 31 changed files with 1,067 additions and 848 deletions.
8 changes: 8 additions & 0 deletions @alias/commitlint/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [19.4.0](https://github.com/conventional-changelog/commitlint/compare/v19.3.1...v19.4.0) (2024-08-07)

**Note:** Version bump only for package commitlint





# [19.3.0](https://github.com/conventional-changelog/commitlint/compare/v19.2.2...v19.3.0) (2024-04-23)

**Note:** Version bump only for package commitlint
Expand Down
4 changes: 2 additions & 2 deletions @alias/commitlint/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "commitlint",
"type": "module",
"version": "19.3.0",
"version": "19.4.0",
"description": "Lint your commit messages",
"files": [
"cli.js"
Expand Down Expand Up @@ -36,7 +36,7 @@
},
"license": "MIT",
"dependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/cli": "^19.4.0",
"@commitlint/types": "^19.0.3"
},
"devDependencies": {
Expand Down
12 changes: 12 additions & 0 deletions @commitlint/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [19.4.0](https://github.com/conventional-changelog/commitlint/compare/v19.3.1...v19.4.0) (2024-08-07)


### Features

* support command line options from a file ([#4109](https://github.com/conventional-changelog/commitlint/issues/4109)) ([a20e890](https://github.com/conventional-changelog/commitlint/commit/a20e890f6b6c8bacdc511d40cb41f29415bdd044))
* support linting from the last tag ([#4110](https://github.com/conventional-changelog/commitlint/issues/4110)) ([4b204ec](https://github.com/conventional-changelog/commitlint/commit/4b204ecfb43dd6a00e24b51111aadbd78f9d58e1))





# [19.3.0](https://github.com/conventional-changelog/commitlint/compare/v19.2.2...v19.3.0) (2024-04-23)

**Note:** Version bump only for package @commitlint/cli
Expand Down
6 changes: 3 additions & 3 deletions @commitlint/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@commitlint/cli",
"type": "module",
"version": "19.3.0",
"version": "19.4.0",
"description": "Lint your commit messages",
"files": [
"index.cjs",
Expand Down Expand Up @@ -50,8 +50,8 @@
"dependencies": {
"@commitlint/format": "^19.3.0",
"@commitlint/lint": "^19.2.2",
"@commitlint/load": "^19.2.0",
"@commitlint/read": "^19.2.1",
"@commitlint/load": "^19.4.0",
"@commitlint/read": "^19.4.0",
"@commitlint/types": "^19.0.3",
"execa": "^8.0.1",
"yargs": "^17.0.0"
Expand Down
2 changes: 2 additions & 0 deletions @commitlint/cli/src/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ test('should print help', async () => {
-x, --extends array of shareable configurations to extend [array]
-H, --help-url help url in error message [string]
-f, --from lower end of the commit range to lint; applies if edit=false [string]
--from-last-tag uses the last tag as the lower end of the commit range to lint; applies if edit=false and from is not set [boolean]
--git-log-args additional git log arguments as space separated string, example '--first-parent --cherry-pick' [string]
-l, --last just analyze the last commit; applies if edit=false [boolean]
-o, --format output format of the results [string]
Expand All @@ -556,6 +557,7 @@ test('should print help', async () => {
-t, --to upper end of the commit range to lint; applies if edit=false [string]
-V, --verbose enable verbose output for reports without problems [boolean]
-s, --strict enable strict mode; result code 2 for warnings, 3 for errors [boolean]
--options path to a JSON file or Common.js module containing CLI options
-v, --version display version information [boolean]
-h, --help Show help [boolean]"
`);
Expand Down
12 changes: 12 additions & 0 deletions @commitlint/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ const cli = yargs(process.argv.slice(2))
'lower end of the commit range to lint; applies if edit=false',
type: 'string',
},
'from-last-tag': {
description:
'uses the last tag as the lower end of the commit range to lint; applies if edit=false and from is not set',
type: 'boolean',
},
'git-log-args': {
description:
"additional git log arguments as space separated string, example '--first-parent --cherry-pick'",
Expand Down Expand Up @@ -143,6 +148,11 @@ const cli = yargs(process.argv.slice(2))
.alias('v', 'version')
.help('help')
.alias('h', 'help')
.config(
'options',
'path to a JSON file or Common.js module containing CLI options',
require
)
.usage(`${pkg.name}@${pkg.version} - ${pkg.description}\n`)
.usage(
`[input] reads from stdin if --edit, --env, --from and --to are omitted`
Expand Down Expand Up @@ -237,6 +247,7 @@ async function main(args: MainArgs): Promise<void> {
: read({
to: flags.to,
from: flags.from,
fromLastTag: flags['from-last-tag'],
last: flags.last,
edit: flags.edit,
cwd: flags.cwd,
Expand Down Expand Up @@ -395,6 +406,7 @@ function checkFromEdit(flags: CliFlags): boolean {
function checkFromHistory(flags: CliFlags): boolean {
return (
typeof flags.from === 'string' ||
typeof flags['from-last-tag'] === 'boolean' ||
typeof flags.to === 'string' ||
typeof flags.last === 'boolean'
);
Expand Down
1 change: 1 addition & 0 deletions @commitlint/cli/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface CliFlags {
help?: boolean;
'help-url'?: string;
from?: string;
'from-last-tag'?: boolean;
'git-log-args'?: string;
last?: boolean;
format?: string;
Expand Down
8 changes: 8 additions & 0 deletions @commitlint/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [19.4.0](https://github.com/conventional-changelog/commitlint/compare/v19.3.1...v19.4.0) (2024-08-07)

**Note:** Version bump only for package @commitlint/core





# [19.3.0](https://github.com/conventional-changelog/commitlint/compare/v19.2.2...v19.3.0) (2024-04-23)

**Note:** Version bump only for package @commitlint/core
Expand Down
6 changes: 3 additions & 3 deletions @commitlint/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@commitlint/core",
"type": "module",
"version": "19.3.0",
"version": "19.4.0",
"description": "Lint your commit messages",
"main": "lib/core.js",
"types": "lib/core.d.ts",
Expand Down Expand Up @@ -38,8 +38,8 @@
"dependencies": {
"@commitlint/format": "^19.3.0",
"@commitlint/lint": "^19.2.2",
"@commitlint/load": "^19.2.0",
"@commitlint/read": "^19.2.1"
"@commitlint/load": "^19.4.0",
"@commitlint/read": "^19.4.0"
},
"devDependencies": {
"@commitlint/utils": "^19.0.0"
Expand Down
8 changes: 8 additions & 0 deletions @commitlint/cz-commitlint/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [19.4.0](https://github.com/conventional-changelog/commitlint/compare/v19.3.1...v19.4.0) (2024-08-07)

**Note:** Version bump only for package @commitlint/cz-commitlint





# [19.2.0](https://github.com/conventional-changelog/commitlint/compare/v19.1.0...v19.2.0) (2024-03-15)

**Note:** Version bump only for package @commitlint/cz-commitlint
Expand Down
4 changes: 2 additions & 2 deletions @commitlint/cz-commitlint/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@commitlint/cz-commitlint",
"type": "module",
"version": "19.2.0",
"version": "19.4.0",
"description": "Commitizen adapter using the commitlint.config.js",
"main": "./lib/index.js",
"exports": {
Expand Down Expand Up @@ -44,7 +44,7 @@
},
"dependencies": {
"@commitlint/ensure": "^19.0.3",
"@commitlint/load": "^19.2.0",
"@commitlint/load": "^19.4.0",
"@commitlint/types": "^19.0.3",
"chalk": "^5.3.0",
"lodash.isplainobject": "^4.0.6",
Expand Down
8 changes: 8 additions & 0 deletions @commitlint/load/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [19.4.0](https://github.com/conventional-changelog/commitlint/compare/v19.3.1...v19.4.0) (2024-08-07)

**Note:** Version bump only for package @commitlint/load





# [19.2.0](https://github.com/conventional-changelog/commitlint/compare/v19.1.0...v19.2.0) (2024-03-15)


Expand Down
2 changes: 1 addition & 1 deletion @commitlint/load/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@commitlint/load",
"type": "module",
"version": "19.2.0",
"version": "19.4.0",
"description": "Load shared commitlint configuration",
"main": "lib/load.js",
"types": "lib/load.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions @commitlint/load/src/utils/plugin-naming.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path';

// largely adapted from eslint's plugin system
const NAMESPACE_REGEX = /^@.*\//iu;
const NAMESPACE_REGEX = /^@.*\//u;
// In eslint this is a parameter - we don't need to support the extra options
const prefix = 'commitlint-plugin';

Expand Down Expand Up @@ -40,7 +40,7 @@ export function normalizePackageName(name: string) {
`^(@[^/]+)(?:/(?:${prefix})?)?$`,
'u'
),
scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, 'u');
scopedPackageNameRegex = new RegExp(`^${prefix}(?:-|$)`, 'u');

if (scopedPackageShortcutRegex.test(normalizedName)) {
normalizedName = normalizedName.replace(
Expand Down Expand Up @@ -94,7 +94,7 @@ export function getShorthandName(fullname: string) {
* @returns {string} The namepace of the term if it has one.
*/
export function getNamespaceFromTerm(term: string) {
const match = term.match(NAMESPACE_REGEX);
const match = NAMESPACE_REGEX.exec(term);

return match ? match[0] : '';
}
8 changes: 8 additions & 0 deletions @commitlint/prompt-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [19.4.0](https://github.com/conventional-changelog/commitlint/compare/v19.3.1...v19.4.0) (2024-08-07)

**Note:** Version bump only for package @commitlint/prompt-cli





## [19.3.1](https://github.com/conventional-changelog/commitlint/compare/v19.3.0...v19.3.1) (2024-05-13)

**Note:** Version bump only for package @commitlint/prompt-cli
Expand Down
4 changes: 2 additions & 2 deletions @commitlint/prompt-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@commitlint/prompt-cli",
"type": "module",
"version": "19.3.1",
"version": "19.4.0",
"description": "commit prompt using commitlint.config.js",
"main": "cli.js",
"files": [
Expand Down Expand Up @@ -38,7 +38,7 @@
"@commitlint/utils": "^19.0.0"
},
"dependencies": {
"@commitlint/prompt": "^19.3.1",
"@commitlint/prompt": "^19.4.0",
"execa": "^8.0.1",
"inquirer": "^9.2.15"
},
Expand Down
8 changes: 8 additions & 0 deletions @commitlint/prompt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [19.4.0](https://github.com/conventional-changelog/commitlint/compare/v19.3.1...v19.4.0) (2024-08-07)

**Note:** Version bump only for package @commitlint/prompt





## [19.3.1](https://github.com/conventional-changelog/commitlint/compare/v19.3.0...v19.3.1) (2024-05-13)


Expand Down
4 changes: 2 additions & 2 deletions @commitlint/prompt/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@commitlint/prompt",
"type": "module",
"version": "19.3.1",
"version": "19.4.0",
"description": "commitizen prompt using commitlint.config.js",
"main": "./lib/index.js",
"files": [
Expand Down Expand Up @@ -46,7 +46,7 @@
},
"dependencies": {
"@commitlint/ensure": "^19.0.3",
"@commitlint/load": "^19.2.0",
"@commitlint/load": "^19.4.0",
"@commitlint/types": "^19.0.3",
"chalk": "^5.3.0",
"inquirer": "^9.2.15"
Expand Down
11 changes: 11 additions & 0 deletions @commitlint/read/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [19.4.0](https://github.com/conventional-changelog/commitlint/compare/v19.3.1...v19.4.0) (2024-08-07)


### Features

* support linting from the last tag ([#4110](https://github.com/conventional-changelog/commitlint/issues/4110)) ([4b204ec](https://github.com/conventional-changelog/commitlint/commit/4b204ecfb43dd6a00e24b51111aadbd78f9d58e1))





## [19.2.1](https://github.com/conventional-changelog/commitlint/compare/v19.2.0...v19.2.1) (2024-03-19)

**Note:** Version bump only for package @commitlint/read
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/read/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@commitlint/read",
"type": "module",
"version": "19.2.1",
"version": "19.4.0",
"description": "Read commit messages from a specified range or last edit",
"main": "lib/read.js",
"types": "lib/read.d.ts",
Expand Down
Loading

0 comments on commit e481976

Please sign in to comment.