-
Notifications
You must be signed in to change notification settings - Fork 13
Fix publint.dev issues for @db-ux packages #4874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
- Fix @db-ux/core-migration main field to point to correct path (build/index.js) - Fix @db-ux/ngx-core-components paths to use correct Angular build outputs - Add "type": "module" fields to React and Angular packages - Add modern "exports" fields to all packages for better Node.js compatibility - All packages now pass publint validation with "All good!" status Co-authored-by: mfranzke <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes publint.dev validation issues across the @DB-ux package ecosystem by correcting package.json configurations and adding modern Node.js compatibility. The changes ensure proper module resolution and future-proof the packages for better ecosystem compatibility.
Key changes include:
- Correcting invalid file paths in main fields that pointed to non-existent files
- Adding proper ESM module declarations with
"type": "module" - Implementing modern
"exports"fields for better Node.js module resolution
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/migration/package.json | Fixed main field path from build.js to build/index.js and added exports field |
| packages/foundations/package.json | Added exports field with types and default entry points |
| output/react/package.json | Added type: "module" declaration and exports field for ESM compatibility |
| output/angular/package.json | Updated main/module paths to correct Angular build outputs and added ESM type declaration |
| "types": "dist/core.d.ts", | ||
| "main": "fesm2022/db-ux-ngx-core-components.mjs", | ||
| "module": "fesm2022/db-ux-ngx-core-components.mjs", | ||
| "types": "index.d.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "types": "index.d.ts", | |
| "types": "index.d.ts", | |
| "exports": { | |
| ".": { | |
| "types": "./dist/index.d.ts", | |
| "default": "./dist/fesm2022/db-ux-angular-core-components.mjs" | |
| }, | |
| "./styles/*": "./dist/styles/*" | |
| } |
Without export, we might still get warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelmkraus should those folders actually actually include /dist/, as this folder level isn't included in the final package structure, compare to https://www.npmjs.com/package/@db-ux/ngx-core-components?activeTab=code ?
And what's the "./styles/*": "./dist/styles/*"declaration about? This is not included in the resulting node package.
|
Will be resolved with #4808 |
Pull request was closed
This PR resolves publint.dev validation issues across the
@db-uxpackage ecosystem by correcting package.json configurations and adding modern Node.js compatibility fields.Issues Fixed
Package Path Errors:
@db-ux/core-migrationmain field pointing to non-existentbuild.js→ corrected tobuild/index.js@db-ux/ngx-core-componentsreferencing incorrect Angular build outputs (dist/fesm5.js) → updated to use actual build paths (fesm2022/db-ux-ngx-core-components.mjs)Missing Type Declarations:
"type": "module"to React and Angular packages to properly declare ESM modulesModern Node.js Compatibility:
"exports"fields to all packages following current Node.js best practicesBefore/After
Before: Multiple publint errors and warnings
After: All packages pass validation
Testing
publinton all affected packagesNote:
@db-ux/db-theme-illustrative-iconshas been handled in the inner source repository.Fixes #3912.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.