Skip to content

feat: add catalog name completion in package.json#75

Merged
9romise merged 5 commits intonpmx-dev:mainfrom
RYGRIT:feat/catalog-completion
Mar 13, 2026
Merged

feat: add catalog name completion in package.json#75
9romise merged 5 commits intonpmx-dev:mainfrom
RYGRIT:feat/catalog-completion

Conversation

@RYGRIT
Copy link
Copy Markdown
Collaborator

@RYGRIT RYGRIT commented Mar 11, 2026

There are currently two problems.

  1. Catalog smart categorization prompts take a while to appear
  2. Setting the range will cause catalog completion to not be displayed.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bb43ebd1-bf29-4f68-9aee-1521cf6ae9df

📥 Commits

Reviewing files that changed from the base of the PR and between 728f260 and 3e8a0aa.

📒 Files selected for processing (4)
  • playground/package.json
  • playground/pnpm-workspace.yaml
  • src/core/workspace.ts
  • src/providers/completion-item/catalog.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/providers/completion-item/catalog.ts
  • src/core/workspace.ts

📝 Walkthrough

Walkthrough

Adds a public async getCatalogs(): Promise<CatalogsInfo | undefined> to WorkspaceContext and replaces this.#catalogs!.promise with this.#catalogs?.promise in loadPackageManifestInfo. Introduces CatalogCompletionItemProvider (trigger ':') that creates completion items from workspace catalogs and registers it for files matching **/<PACKAGE_JSON_BASENAME> via a new watchEffect, while retaining the existing version-based completion provider. Updates playground package metadata to reference a catalog: version and adds catalog entries in pnpm-workspace.yaml.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description accurately identifies specific problems being addressed by the changeset, which implements catalog name completion in package.json.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 289ada72-3744-4f7b-9429-fe0db80925d6

📥 Commits

Reviewing files that changed from the base of the PR and between b5cacf5 and ae8b0e5.

📒 Files selected for processing (3)
  • src/core/workspace.ts
  • src/providers/completion-item/catalog.ts
  • src/providers/completion-item/index.ts

@9romise 9romise added this pull request to the merge queue Mar 13, 2026
Merged via the queue into npmx-dev:main with commit efbbab7 Mar 13, 2026
8 checks passed
@9romise
Copy link
Copy Markdown
Member

9romise commented Mar 13, 2026

Thank you!

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.

2 participants