Skip to content

fix(presets/monorepo): group ckeditor5-premium-features with ckeditor5#44725

Open
aqeelat wants to merge 2 commits into
renovatebot:mainfrom
aqeelat:fix/ckeditor-monorepo-pattern
Open

fix(presets/monorepo): group ckeditor5-premium-features with ckeditor5#44725
aqeelat wants to merge 2 commits into
renovatebot:mainfrom
aqeelat:fix/ckeditor-monorepo-pattern

Conversation

@aqeelat

@aqeelat aqeelat commented Jul 20, 2026

Copy link
Copy Markdown

Changes

Replace the broken repoGroups.ckeditor URL entry with a hand-crafted preset in lib/config/presets/internal/monorepos.preset.ts that uses two OR'd packageRules:

  1. matchSourceUrls: ['https://github.com/ckeditor/ckeditor5'] — covers scoped @ckeditor/ckeditor5-* packages whose sourceUrl is normalized to this canonical form by addMetaData.
  2. matchPackageNames: ['ckeditor5-premium-features'] — covers the premium package by name, since it ships no repository field.

Each sub-rule carries a description so it survives massageConfig (which strips match-only rules) and satisfies the validator's non-match-field requirement. Follows the precedent in replacements.preset.ts of layering hand-crafted presets on top of the data-driven ones.

Context

  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

The URL entry added in #39194 has never matched. The ckeditor5-premium-features npm package has never shipped a repository field in its package.json (verified across 0.0.1, 41.4.0, and 48.3.1), so the npm datasource cannot derive a sourceUrl for it.

A name-pattern fix (/^@ckeditor/ckeditor5-/) was considered and rejected: wrapper packages such as @ckeditor/ckeditor5-angular (v11.2.0) and @ckeditor/ckeditor5-react (v11.2.0) carry the prefix but live in separate repos with independent versioning and must not be grouped with the main release train (currently v48.3.1).

AI assistance disclosure

  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).

Authored with the assistance of opencode (glm-5.2). Investigation, edit, and PR body generated by the AI agent under user direction.

Documentation

  • No documentation update is required

How I've tested my work

  • Code inspection only

Two-rule OR semantics work via the existing migration flattening at lib/config/migration.ts:163-185. pnpm vitest run lib/config/presets/internal/index.spec.ts lib/data/index.spec.ts lib/config/presets/internal/monorepos.spec.ts lib/config/presets/internal/group.spec.ts — 1869/1869 pass.

@github-actions
github-actions Bot requested a review from viceice July 20, 2026 07:04
The `ckeditor5-premium-features` npm package has never shipped a
`repository` field in its package.json (verified across every published
version from `0.0.1` through `48.3.1`), so Renovate cannot derive a
`sourceUrl` for it. The URL entry added in renovatebot#39194 has never matched.

The broader `@ckeditor/ckeditor5-*` pattern is unsafe for grouping by
name: wrapper packages such as `@ckeditor/ckeditor5-angular` (v11.x) and
`@ckeditor/ckeditor5-react` (v11.x) carry the prefix but live in separate
repos with independent versioning and must not be grouped with the main
release train (currently v48.x).

Hand-craft the `ckeditor` preset with two OR'd packageRules (flattened
during config migration):
  1. matchSourceUrls for `https://github.com/ckeditor/ckeditor5` -- covers
     scoped packages whose sourceUrl is normalized to this form by
     `addMetaData`.
  2. matchPackageNames for `ckeditor5-premium-features` -- covers the
     premium package by name since it has no sourceUrl.

Follows the precedent in `replacements.preset.ts` of layering hand-crafted
presets on top of the data-driven ones when the data schema cannot express
the required shape.
@aqeelat
aqeelat force-pushed the fix/ckeditor-monorepo-pattern branch from 344f40c to 45710f1 Compare July 20, 2026 07:08
massageConfig strips packageRules whose keys are all match*/exclude*
(lib/config/massage.ts:83-93), and fetchPreset runs massage on every
preset it returns (lib/config/presets/index.ts:188). Without a non-match
field, the two ckeditor sub-rules were dropped during preset resolution,
which collapsed the consumer rule's nested packageRules to [] and caused
migrateConfig to discard the rule entirely.

validation.ts:503 likewise requires each rule to have at least one
non-match field.

Adding a description to each sub-rule satisfies both invariants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant