Skip to content

Add NPM package validation to CI/CD#206

Merged
wallstop merged 4 commits intomainfrom
copilot/validate-npm-packaging-ci-cd
Feb 15, 2026
Merged

Add NPM package validation to CI/CD#206
wallstop merged 4 commits intomainfrom
copilot/validate-npm-packaging-ci-cd

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 15, 2026

Description

Validates npm package integrity before publication. Prevents breaking packages where Unity .meta files are missing or orphaned, or where Runtime/Editor content diverges from repository.

Changes:

  • scripts/validate-npm-package.ps1: Extracts npm pack tarball, validates:

    • All Unity files (Runtime, Editor) have corresponding .meta files
    • All .meta files reference existing files/folders (no orphans)
    • Package content matches git repository (excludes build artifacts: .dll, .pdb, .tmp, .log, .rsp)
  • scripts/validate-npm-package.ps1.meta: Unity meta file for the validation script

  • package.json: Added validate:npm-package script for local validation

  • .github/workflows/validate-npm-package.yml: Runs validation on PR/push affecting Unity folders, package.json, or .npmignore

Usage:

npm run validate:npm-package

CI blocks PRs with meta file issues or package/repo mismatches.

Type of Change

  • New feature (non-breaking change that adds functionality)

Checklist

  • I have added tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have updated the CHANGELOG
  • My changes do not introduce breaking changes, or breaking changes are documented
Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature]: NPM Package Validation in CI/CD</issue_title>
<issue_description>### Feature Description

It would be nice to validate our NPM packaging solution in CI/CD to ensure things don't break (every file has a .meta file, etc)

Use Case / Motivation

Sometimes I publish breaking npm packages

Proposed Solution

Do it

Alternatives Considered

No response</issue_description>

<agent_instructions>Can you ensure that npm package results in essentially the same thing as the git repo? All unity files (in Runtime, Editor, Tests) should have meta files (including those folders), and all meta files should refer to files/folders.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 15, 2026 03:03
Co-authored-by: wallstop <1045249+wallstop@users.noreply.github.com>
Co-authored-by: wallstop <1045249+wallstop@users.noreply.github.com>
Copilot AI changed the title [WIP] Add validation for NPM package in CI/CD Add NPM package validation to CI/CD Feb 15, 2026
Copilot AI requested a review from wallstop February 15, 2026 03:07
@wallstop
Copy link
Copy Markdown
Owner

Co-authored-by: wallstop <1045249+wallstop@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 15, 2026

@copilot Can you take a look at what's failing the CI? https://github.com/wallstop/unity-helpers/actions/runs/22028688664/job/63649834247?pr=206

Fixed in commit eb0f495. The CI was failing because the new script scripts/validate-npm-package.ps1 was missing its .meta file. Generated the meta file using ./scripts/generate-meta.sh and the Unity Meta File Lint workflow should now pass.

@wallstop wallstop marked this pull request as ready for review February 15, 2026 03:23
@wallstop wallstop merged commit e4dd183 into main Feb 15, 2026
14 checks passed
@wallstop wallstop deleted the copilot/validate-npm-packaging-ci-cd branch February 15, 2026 03:24
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.

[Feature]: NPM Package Validation in CI/CD

2 participants