Skip to content

Skip node_modules directory in manifest generation#1504

Merged
mckn merged 4 commits intomainfrom
mckn/manifest-skip-nodemod
Mar 11, 2026
Merged

Skip node_modules directory in manifest generation#1504
mckn merged 4 commits intomainfrom
mckn/manifest-skip-nodemod

Conversation

@mckn
Copy link
Contributor

@mckn mckn commented Mar 10, 2026

What this PR does / why we need it

Excludes Go files located in the node_modules directory from the plugin manifest file generated during the build process. This prevents frontend dependencies from being included in the backend plugin manifest, which is important for plugins that have both frontend and backend components.

This fix validation errors produced when plugin has a frontend dependency on a package containing .go files.

❌ go-manifest-issue

Invalid Go manifest file: node_modules/flatted/golang/pkg/flatted/flatted.go

Details: node_modules/flatted/golang/pkg/flatted/flatted.go is in the manifest but not in source code

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

All existing tests continue to pass and new tests verify the node_modules directory is properly excluded from the manifest.

Exclude Go files located in the node_modules directory from the plugin manifest file generated during the build process. This prevents frontend dependencies from being included in the backend plugin manifest.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@cla-assistant
Copy link

cla-assistant bot commented Mar 10, 2026

CLA assistant check
All committers have signed the CLA.

Restrict the node_modules exclusion to the root directory only so that
Go files in nested node_modules directories are still included.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mckn mckn requested a review from academo March 10, 2026 21:23
@mckn mckn moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team Mar 10, 2026
@mckn mckn self-assigned this Mar 10, 2026
mckn and others added 2 commits March 10, 2026 22:25
Add writeFile and mkdirAll test helpers that check error return values,
and handle the os.Chdir error in the cleanup function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use 0600 for file permissions and 0750 for directory permissions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

Requested to re-enable the CLA assistant here.

Edit: You need to sign the CLA yourself

@mckn
Copy link
Contributor Author

mckn commented Mar 11, 2026

Requested to re-enable the CLA assistant here.

Edit: You need to sign the CLA yourself

Thanks for the ping 🙏🏻

I have sign this before for this repo but seems like I needed to sign it again.

@mckn mckn merged commit 9223a07 into main Mar 11, 2026
9 checks passed
@mckn mckn deleted the mckn/manifest-skip-nodemod branch March 11, 2026 09:51
@github-project-automation github-project-automation bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

3 participants