Skip to content

feat: provide definition for catalogs#78

Merged
9romise merged 3 commits intomainfrom
feat/definition
Mar 13, 2026
Merged

feat: provide definition for catalogs#78
9romise merged 3 commits intomainfrom
feat/definition

Conversation

@9romise
Copy link
Member

@9romise 9romise commented Mar 13, 2026

No description provided.

@9romise 9romise marked this pull request as ready for review March 13, 2026 16:53
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

📝 Walkthrough

Walkthrough

This pull request adds a definition provider feature for VSCode that resolves catalog-related definitions. It introduces a CatalogDefinitionProvider class that locates dependency definitions within workspace catalog files. The changes refactor workspace file handling by adding an optional workspaceFileUri property to WorkspaceContext, export the normalizeCatalogName utility function for consistent catalogue category name normalisation, and register the new definition provider during extension activation. A dependency version update in the playground package is also included.

Possibly related PRs

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is empty, providing no information about the changes or their purpose. Add a meaningful pull request description that explains the purpose and scope of the changes, particularly the new definition provider for catalogs.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/definition
📝 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 use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.

OpenGrep is compatible with Semgrep configurations. Add an opengrep.yml or semgrep.yml configuration file to your project to enable OpenGrep analysis.

Copy link
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.

🧹 Nitpick comments (1)
src/core/extractors/yaml.ts (1)

96-98: Non-null assertion on potentially undefined categoryName.

dependency.categoryName is typed as optional (categoryName?: string) in DependencyInfo. The non-null assertion (!) could cause issues if categoryName is undefined, although given the current flow (line 52 sets '' for catalog, and line 58 should always produce a string for catalogs entries), it may be safe in practice.

Consider using the nullish coalescing operator for defensive clarity:

♻️ Suggested improvement
-      const categoryName = normalizeCatalogName(dependency.categoryName!)
+      const categoryName = normalizeCatalogName(dependency.categoryName ?? '')

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 857f8c69-693f-4f7a-b598-e51abc63c1c9

📥 Commits

Reviewing files that changed from the base of the PR and between 6b4b794 and 4f76493.

📒 Files selected for processing (7)
  • playground/package.json
  • src/core/extractors/yaml.ts
  • src/core/workspace.ts
  • src/index.ts
  • src/providers/definition/catalog.ts
  • src/providers/definition/index.ts
  • src/utils/dependency.ts

@9romise 9romise added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit f11a40d Mar 13, 2026
11 checks passed
@9romise 9romise deleted the feat/definition branch March 13, 2026 16:59
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