Repository navigation
feat(resolve-extends): resolve pure-ESM presets (conventional-changelog v7/v9/v10) - #4859
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
4bee721 to
40ac266
Compare
Confidence Score: 5/5Safe to merge; the new ESM resolver is a strict fallback that only activates after both CJS paths fail, leaving normal resolution behaviour unchanged. The ESM fallback in resolveFrom is guarded by a try/catch and only fires when CommonJS resolution has already given up, so there is no regression risk for packages that CJS can already resolve. Root-entry resolution of pure-ESM packages is correct and covered by new unit tests. The one open gap — the subpath branch ignores the exports map for subpath entries — does not affect the declared targets. @commitlint/resolve-extends/src/index.ts lines 86-93 (subpath resolution) if support for exports-mapped subpaths is ever needed. Important Files Changed
Reviews (3): Last reviewed commit: "fix: update dependency conventional-chan..." | Re-trigger Greptile |
40ac266 to
91b2556
Compare
Parser presets published as pure ESM expose an exports map with only the import condition (no require/default/main). The CommonJS preset resolver could not read these and threw "No exports main defined". Add an ESM-aware node_modules fallback that runs only after CommonJS resolution fails, plus the same fallback in the test bootstrap. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
v9 ships its own typings: createPreset() is typed as {} and the named parser export was
dropped (still present at runtime). Read the parser options via createPreset().parser and
drop the now-unused @ts-expect-error directives.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
91b2556 to
edb6005
Compare
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@commitlint/cli](https://commitlint.js.org/) ([source](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli)) | [`21.1.0` → `21.2.0`](https://renovatebot.com/diffs/npm/@commitlint%2fcli/21.1.0/21.2.0) |  |  | | [@commitlint/config-conventional](https://commitlint.js.org/) ([source](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-conventional)) | [`21.1.0` → `21.2.0`](https://renovatebot.com/diffs/npm/@commitlint%2fconfig-conventional/21.1.0/21.2.0) |  |  | --- ### Release Notes <details> <summary>conventional-changelog/commitlint (@​commitlint/cli)</summary> ### [`v21.2.0`](https://github.com/conventional-changelog/commitlint/blob/HEAD/@​commitlint/cli/CHANGELOG.md#2120-2026-06-30) [Compare Source](conventional-changelog/commitlint@v21.1.0...v21.2.0) ##### Features - **resolve-extends:** resolve pure-ESM presets (conventional-changelog v7/v9/v10) ([#​4859](conventional-changelog/commitlint#4859)) ([fdb566f](conventional-changelog/commitlint@fdb566f)) </details> <details> <summary>conventional-changelog/commitlint (@​commitlint/config-conventional)</summary> ### [`v21.2.0`](https://github.com/conventional-changelog/commitlint/blob/HEAD/@​commitlint/config-conventional/CHANGELOG.md#2120-2026-06-30) [Compare Source](conventional-changelog/commitlint@v21.1.0...v21.2.0) ##### Features - **resolve-extends:** resolve pure-ESM presets (conventional-changelog v7/v9/v10) ([#​4859](conventional-changelog/commitlint#4859)) ([fdb566f](conventional-changelog/commitlint@fdb566f)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44MS4zIiwidXBkYXRlZEluVmVyIjoiNDIuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://git.3caravelle.net/3Caravelle/renovate/pulls/43 Co-authored-by: Renovate Bot <renovate-bot@3caravelle.com> Co-committed-by: Renovate Bot <renovate-bot@3caravelle.com>
…ocker tag to v21.2.1 (#95) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [cr.codefloe.com/docker.io/commitlint/commitlint](https://github.com/conventional-changelog/commitlint) | minor | `21.0.1` → `21.2.1` | --- ### Release Notes <details> <summary>conventional-changelog/commitlint (cr.codefloe.com/docker.io/commitlint/commitlint)</summary> ### [`v21.2.1`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2121-2026-07-08) [Compare Source](conventional-changelog/commitlint@v21.2.0...v21.2.1) **Note:** Version bump only for package [@​commitlint/root](https://github.com/commitlint/root) ### [`v21.2.0`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2120-2026-06-30) [Compare Source](conventional-changelog/commitlint@v21.1.0...v21.2.0) ##### Features - **resolve-extends:** resolve pure-ESM presets (conventional-changelog v7/v9/v10) ([#​4859](conventional-changelog/commitlint#4859)) ([fdb566f](conventional-changelog/commitlint@fdb566f)) ### [`v21.1.0`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2110-2026-06-23) [Compare Source](conventional-changelog/commitlint@v21.0.2...v21.1.0) ##### Bug Fixes - remove duplicate es-toolkit\@​1.47.1 keys from lockfile ([#​4833](conventional-changelog/commitlint#4833)) ([b3323f5](conventional-changelog/commitlint@b3323f5)), closes [#​4831](conventional-changelog/commitlint#4831) ##### Features - **cli:** add --default-config flag to lint without a config file ([#​4805](conventional-changelog/commitlint#4805)) ([7af27ba](conventional-changelog/commitlint@7af27ba)), closes [#​3662](conventional-changelog/commitlint#3662) - **lint:** allow for custom commit parser function ([#​4829](conventional-changelog/commitlint#4829)) ([e820753](conventional-changelog/commitlint@e820753)), closes [#​4816](conventional-changelog/commitlint#4816) [#​4816](conventional-changelog/commitlint#4816) #### [21.0.2](conventional-changelog/commitlint@v21.0.1...v21.0.2) (2026-05-29) ##### Bug Fixes - apply oxfmt formatting to get-edit-commit.ts ([#​4768](conventional-changelog/commitlint#4768)) ([1af3138](conventional-changelog/commitlint@1af3138)), closes [#​4755](conventional-changelog/commitlint#4755) - **config-pnpm-scopes:** adapt to read-yaml-file v3 named export ([#​4701](conventional-changelog/commitlint#4701)) ([8b55772](conventional-changelog/commitlint@8b55772)) - disallow same commit hash for --from and --to ([#​4773](conventional-changelog/commitlint#4773)) ([121005e](conventional-changelog/commitlint@121005e)) - emit actionable error when --edit cannot find COMMIT\_EDITMSG ([#​589](conventional-changelog/commitlint#589)) ([#​4755](conventional-changelog/commitlint#4755)) ([bb10907](conventional-changelog/commitlint@bb10907)) - **read:** fail when --from and --to share no merge-base [#​4555](conventional-changelog/commitlint#4555) ([#​4754](conventional-changelog/commitlint#4754)) ([e4595eb](conventional-changelog/commitlint@e4595eb)) - update dependency [@​pnpm/read-project-manifest](https://github.com/pnpm/read-project-manifest) to v6 ([#​4617](conventional-changelog/commitlint#4617)) ([ca16ec1](conventional-changelog/commitlint@ca16ec1)) - update vitest monorepo to \~4.1.0 ([#​4654](conventional-changelog/commitlint#4654)) ([f1f25d5](conventional-changelog/commitlint@f1f25d5)) #### [21.0.1](conventional-changelog/commitlint@v21.0.0...v21.0.1) (2026-05-12) ##### Bug Fixes - **load:** only resolve relative formatter paths ([#​4761](conventional-changelog/commitlint#4761)) ([f8be069](conventional-changelog/commitlint@f8be069)) - **types:** add presetConfig to ParserPreset interface ([#​4749](conventional-changelog/commitlint#4749)) ([e402cd4](conventional-changelog/commitlint@e402cd4)), closes [#​4748](conventional-changelog/commitlint#4748) ### [`v21.0.2`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2102-2026-05-29) [Compare Source](conventional-changelog/commitlint@v21.0.1...v21.0.2) ##### Bug Fixes - apply oxfmt formatting to get-edit-commit.ts ([#​4768](conventional-changelog/commitlint#4768)) ([1af3138](conventional-changelog/commitlint@1af3138)), closes [#​4755](conventional-changelog/commitlint#4755) - **config-pnpm-scopes:** adapt to read-yaml-file v3 named export ([#​4701](conventional-changelog/commitlint#4701)) ([8b55772](conventional-changelog/commitlint@8b55772)) - disallow same commit hash for --from and --to ([#​4773](conventional-changelog/commitlint#4773)) ([121005e](conventional-changelog/commitlint@121005e)) - emit actionable error when --edit cannot find COMMIT\_EDITMSG ([#​589](conventional-changelog/commitlint#589)) ([#​4755](conventional-changelog/commitlint#4755)) ([bb10907](conventional-changelog/commitlint@bb10907)) - **read:** fail when --from and --to share no merge-base [#​4555](conventional-changelog/commitlint#4555) ([#​4754](conventional-changelog/commitlint#4754)) ([e4595eb](conventional-changelog/commitlint@e4595eb)) - update dependency [@​pnpm/read-project-manifest](https://github.com/pnpm/read-project-manifest) to v6 ([#​4617](conventional-changelog/commitlint#4617)) ([ca16ec1](conventional-changelog/commitlint@ca16ec1)) - update vitest monorepo to \~4.1.0 ([#​4654](conventional-changelog/commitlint#4654)) ([f1f25d5](conventional-changelog/commitlint@f1f25d5)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4zMS4wIiwidXBkYXRlZEluVmVyIjoiNDMuMzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: devxy-bot <no-reply@devxy.io> Reviewed-on: https://codefloe.com/devxy/ansible-data-science-core/pulls/95
Adopts the conventional-changelog family majors released 2026-06-26. Supersedes the three Renovate PRs (#4858, #4857, #4856).
Structured as four commits — the shared ESM resolver as a
feat, then onefixper dependency bump:feat(resolve-extends): resolve pure-ESM parser presetsfix: update dependency conventional-commits-parser to v7(fix: update dependency conventional-commits-parser to v7 - autoclosed #4858)fix: update dependency conventional-changelog-conventionalcommits to v10(fix: update dependency conventional-changelog-conventionalcommits to v10 - autoclosed #4857)fix: update dependency conventional-changelog-angular to v9(fix: update dependency conventional-changelog-angular to v9 - autoclosed #4856)Why the feat
conventional-changelog-angular@9andconventional-changelog-conventionalcommits@10are now pure ESM whoseexportsmap declares only theimportcondition (norequire/default/main). commitlint's CommonJS resolvers (require.resolve,resolve-from,resolve-pkg) fail withNo "exports" main definedwhen resolving a string parser preset.@commitlint/resolve-extendsnow falls back to an ESM-awarenode_moduleswalk only after CommonJS resolution fails — so resolution of normal packages is unchanged — with the equivalent fallback in the test bootstrap. Covered by new unit tests on syntheticexports-only manifests.angular@9 typings
v9 ships its own types:
createPreset()is typed{}and the namedparserexport was dropped (still present at runtime). The affected source/tests now read the options viacreatePreset().parserand drop the now-unused@ts-expect-errordirectives. The runtime in@commitlint/parsewas already callingcreatePreset().parser, so only the cast/types changed.User impact
Suitable for a minor release. commitlint only consumes these packages'
parserOpts, never their writer/template side, and Node 22 was already required. The new capability is resolving pure-ESM parser presets; the one behavior change is the parser footer fix (conventional-changelog#1485) whereBREAKING CHANGEnotes no longer absorb trailing footer trailers.Verification
pnpm build(tsc -b --force, clean) ✅oxlint✅ ·oxfmt --check✅@commitlint/config-conventional(valid / invalid /BREAKING CHANGE) ✅🤖 Generated with Claude Code