Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: conventional-changelog/commitlint
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v20.4.2
Choose a base ref
...
head repository: conventional-changelog/commitlint
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v20.4.3
Choose a head ref
  • 7 commits
  • 83 files changed
  • 6 contributors

Commits on Mar 1, 2026

  1. chore: bump rollup from 4.53.2 to 4.59.0 (#4631)

    Bumps [rollup](https://github.com/rollup/rollup) from 4.53.2 to 4.59.0.
    - [Release notes](https://github.com/rollup/rollup/releases)
    - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
    - [Commits](rollup/rollup@v4.53.2...v4.59.0)
    
    ---
    updated-dependencies:
    - dependency-name: rollup
      dependency-version: 4.59.0
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 1, 2026
    Configuration menu
    Copy the full SHA
    7b71b70 View commit details
    Browse the repository at this point in the history
  2. ci: enhance format check with error message (#4632)

    Add error message for formatting check failure.
    knocte authored Mar 1, 2026
    Configuration menu
    Copy the full SHA
    b2d06ae View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2026

  1. fix: npx usage #613 (#4630)

    * fix(resolve-extends): add npx cache detection for package resolution
    
    When running commitlint via npx or npm exec, packages are downloaded
    to a temporary npx cache directory (e.g., ~/.npm/_npx) instead of
    traditional global node_modules. This commit adds detection and
    resolution from the npx cache directory to support running
    commitlint via npx.
    
    This helps with issue #613 - enabling usage like:
      npx @commitlint/cli --extends @commitlint/config-conventional
    
    Part of fixing #613
    
    * fix(load): add npx cache and search paths support for plugin resolution
    
    - Add npx cache detection to load-plugin.ts (similar to resolve-extends)
    - Add LoadPluginOptions interface with searchPaths support
    - This enables plugins to be resolved from npx cache when running
      via npx/npm exec, and from extended config paths when provided
    
    This helps with issue #613 - enabling plugin resolution when using:
      npx @commitlint/cli --extends @commitlint/config-conventional
    
    Part of fixing #613
    
    * fix: address PR feedback for npx cache resolution
    
    - Extract resolveFromNpxCache utility in resolve-extends (Issue #3)
    - Use require.resolve with paths option for proper module resolution (Issue #1)
    - Iterate ALL npx cache dirs instead of most recent by mtime (Issue #2)
    - Add debug logging in catch blocks in load-plugin (Issue #4)
    - Tighten control flow for plugin assignment (Issue #5)
    - Change string | void to string | undefined return types (Issue #7)
    - Add tests for npx cache resolution in load-plugin (Issue #6)
    
    * fix(load): address review feedback from PR #4630
    
    - Add type safety check when assigning plugin to PluginRecords
    - Preserve original error when resolution succeeds but import fails
    - Only show resolvedPath in debug output when it's defined
    - Add mock for resolveFromNpxCache in tests
    
    * fix(load): use resolvedPath for version lookup in debug mode
    
    Previously the version was resolved using the package name which could
    incorrectly resolve from commitlint's own node_modules instead of the
    actual plugin location (npx cache or searchPath).
    
    This ensures the package.json is loaded from the same path where the
    plugin was actually loaded from.
    
    * fix(resolve-extends): add debug logging to silent catch blocks
    
    Add debug logging when errors occur during npx cache reading and
    module resolution. This improves diagnosability when DEBUG=true
    by providing information about what failed instead of silently
    ignoring the errors.
    
    * fix(load): sanitize error messages to avoid exposing internal paths
    
    Add sanitizeErrorMessage function to remove node_modules paths from
    error messages. This prevents exposing internal filesystem paths
    like /home/user/.npm/_npx/abc123/node_modules in error output.
    
    * fix(load): validate searchPaths to ensure they are safe absolute paths
    
    Add validation to ensure searchPaths are:
    1. Strings
    2. Absolute paths
    3. Existing directories
    
    This prevents potential security issues when untrusted configuration
    is used to provide search paths.
    
    * fix(load): maintain backward compatibility for loadPlugin signature
    
    Accept both boolean and options object as third parameter to maintain
    backward compatibility with existing callers that pass a boolean
    (e.g., loadPlugin(plugins, name, true)).
    
    * fix(load): walk up directory tree to find package.json
    
    The debug version lookup now uses findPackageJson() which walks up
    the directory tree from resolvedPath to find the package root,
    instead of assuming package.json is adjacent to the resolved file.
    
    This fixes 'version unknown' when resolvedPath points to a nested
    file like dist/index.js.
    
    * fix(load): validate searchPaths is a directory
    
    Add check that searchPaths are directories, not just existing paths.
    A file path would previously pass validation but cause confusing
    behavior when used in require.resolve({ paths: [...] }).
    
    * test(load): add tests for npx cache resolution and searchPaths validation
    
    - Add tests for loading plugins from npx cache
    - Add tests for searchPaths validation (non-string, relative, nonexistent, file)
    - Add test for backward compatibility with boolean parameter
    
    * test(resolve-extends): add test for resolveFromNpxCache behavior
    
    Add test to verify resolveFromNpxCache returns undefined when
    package cannot be resolved from npx cache.
    
    * fix: remove duplicate test names causing lint errors
    
    * test(resolve-extends): remove ineffective test
    
    The test 'resolveFromNpxCache returns undefined when npx cache
    does not exist' was not actually testing what it claimed - the
    vi.spyOn(require, 'resolve') doesn't affect the internal require
    inside resolveFromNpxCache(). Removed to avoid false sense of coverage.
    escapedcat authored Mar 2, 2026
    Configuration menu
    Copy the full SHA
    1644f1e View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2026

  1. fix(types): incorrect types for rule options (#4633)

    * test(types): add type-check regression tests for "as const" compatibility
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
    
    * fix(types): use readonly arrays for "as const" compatibility
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
    
    * Revert "fix(types): use readonly arrays for "as const" compatibility"
    
    This reverts commit fdcf183.
    
    * Reapply "fix(types): use readonly arrays for "as const" compatibility"
    
    This reverts commit 38d91ac.
    
    * chore: remove comments
    
    * Update @commitlint/types/src/rules.test-d.ts
    
    Co-authored-by: Copilot <[email protected]>
    
    * Update @commitlint/types/src/rules.test-d.ts
    
    Co-authored-by: Copilot <[email protected]>
    
    * chore: squash 2 commits
    
    * Revert "chore: squash 2 commits"
    
    This reverts commit 9b86ef2.
    
    * fix: comment
    
    ---------
    
    Co-authored-by: Claude Sonnet 4.6 <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    3 people authored Mar 3, 2026
    Configuration menu
    Copy the full SHA
    77b85f2 View commit details
    Browse the repository at this point in the history
  2. fix: footer parser does not escape special chars for regex #4560 (#4634)

    * test(parse): add regression test for noteKeywords with regex-special chars (fixes #4560)
    
    * fix: add @types/conventional-commits-parser to resolve TS7016
    escapedcat authored Mar 3, 2026
    Configuration menu
    Copy the full SHA
    8ff7c7f View commit details
    Browse the repository at this point in the history
  3. chore: deps (#4635)

    escapedcat authored Mar 3, 2026
    Configuration menu
    Copy the full SHA
    18bd371 View commit details
    Browse the repository at this point in the history
  4. v20.4.3

    escapedcat committed Mar 3, 2026
    Configuration menu
    Copy the full SHA
    a746981 View commit details
    Browse the repository at this point in the history
Loading