Skip to content

fix: exclude generated TypeScript sources from package - #473

Open
Kobe-Kwanten wants to merge 2 commits into
Permify:mainfrom
Kobe-Kwanten:fix-package-contents
Open

fix: exclude generated TypeScript sources from package#473
Kobe-Kwanten wants to merge 2 commits into
Permify:mainfrom
Kobe-Kwanten:fix-package-contents

Conversation

@Kobe-Kwanten

@Kobe-Kwanten Kobe-Kwanten commented Sep 2, 2026

Copy link
Copy Markdown

Why

Fixes NodeNext + verbatimModuleSyntax consumer errors by preventing generated .ts sources from being published alongside the compiled CommonJS output.

If there's any reason why the .ts files were included on purpose, I'm happy to close this PR and rely on local patches instead.

Summary

  • remove the generated-source copy from the build so dist only contains TypeScript compiler output
  • release as 1.7.4 and run the packaging check in the publish workflow

Summary by CodeRabbit

  • Chores
    • Updated the package version to 1.7.4.
    • Improved package publishing checks to verify package contents before release.
    • Prevented generated TypeScript source files from being included in published packages.
    • Confirmed published declaration files have corresponding compiled JavaScript files.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 09522a34-ff79-4cc3-b2b7-b70e2a740875

📥 Commits

Reviewing files that changed from the base of the PR and between a5824d1 and c918cd0.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .github/workflows/publish.yml
  • package.json
  • test/package-contents.test.js

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The package version is now 1.7.4. The build excludes generated TypeScript sources from dist. A package-content test validates packed files, and the publish workflow runs this test after building.

Changes

Package verification

Layer / File(s) Summary
Package build and archive validation
package.json, test/package-contents.test.js
The build no longer copies generated TypeScript sources. The new test checks packed declarations and matching compiled JavaScript files.
Publish workflow integration
package.json, .github/workflows/publish.yml
The package version changes to 1.7.4. Publishing runs yarn test:package after the build step.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c918c

The PR tightens npm package contents and adds release-time validation without introducing a concrete runtime, security, or deployment risk. No actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: excluding generated TypeScript sources from the published package.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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