Skip to content

fix(core): update package entrypoint metadata#4294

Open
Pugsin wants to merge 1 commit into
AmadeusITGroup:mainfrom
Pugsin:codex/fix-core-package-entrypoints
Open

fix(core): update package entrypoint metadata#4294
Pugsin wants to merge 1 commit into
AmadeusITGroup:mainfrom
Pugsin:codex/fix-core-package-entrypoints

Conversation

@Pugsin

@Pugsin Pugsin commented Jun 19, 2026

Copy link
Copy Markdown

Problem

@o3r/core@14.3.2 publishes top-level main and types entries that point to ./src/public_api.js and ./src/public_api.d.ts, but those files are not included in the npm tarball.

The package already exposes the generated files through exports:

  • ./fesm2022/o3r-core.mjs
  • ./types/o3r-core.d.ts

Fix

Point the source package metadata to the generated files under dist/. The existing patch-package-json-main postbuild step strips the leading dist/ before publish, producing valid package metadata in the npm tarball.

Validation

  • Verified @o3r/core@14.3.2 tarball lacks src/public_api.*
  • Verified tarball contains fesm2022/o3r-core.mjs and types/o3r-core.d.ts
  • Verified local postbuild path transform would produce ./fesm2022/o3r-core.mjs and ./types/o3r-core.d.ts
  • git diff --check

@nx-cloud

nx-cloud Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit fb2ef1b

Command Status Duration Result
nx run-many --target=test-e2e ✅ Succeeded 2m 11s View ↗
nx run-many --tui=false --target=build --projec... ✅ Succeeded 6s View ↗
nx affected --target=lint --configuration ci ✅ Succeeded 7m 18s View ↗
nx run-many --target=build,build-jar ✅ Succeeded 6m 37s View ↗
nx affected --target=test --coverage --configur... ✅ Succeeded 29s View ↗
nx run-many --target=documentation ✅ Succeeded 9s View ↗
nx affected --target=package-github-action ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-06-22 07:18:37 UTC

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.24%. Comparing base (122583e) to head (fb2ef1b).
⚠️ Report is 5 commits behind head on main.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

},
"main": "./src/public_api.js",
"types": "./src/public_api.d.ts",
"main": "./dist/fesm2022/o3r-core.mjs",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for your contribution.
You pointed out a real issue (as ./src/public_api.js and ./src/public_api.d.ts do not exist anymore in the latest ngPackagr build) but I do not think it is the correct way to fix it.
Did you try to just remove the main and types fields instead?

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.

2 participants