Skip to content

fix: point subpath exports at built files#1017

Open
pesoszpesosz wants to merge 1 commit into
nextcloud-libraries:mainfrom
pesoszpesosz:codex/fix-subpath-exports
Open

fix: point subpath exports at built files#1017
pesoszpesosz wants to merge 1 commit into
nextcloud-libraries:mainfrom
pesoszpesosz:codex/fix-subpath-exports

Conversation

@pesoszpesosz

Copy link
Copy Markdown

Summary

Fixes the ./commands and ./selectors package subpath exports so runtime imports point at the bundled files Vite actually emits.

The published package currently points both subpaths at nested dist/*/index.cjs files that are not included in the tarball, while the build emits top-level dist/commands.cjs, dist/commands.mjs, dist/selectors.cjs, and dist/selectors.mjs.

Validation

  • Confirmed @nextcloud/e2e-test-server@0.4.0 currently exports ./commands and ./selectors to missing nested CJS files.
  • Ran a local package export-map assertion for the changed subpaths.
  • Ran npm --force run build.
  • Ran npm pack --dry-run --json --force and confirmed the tarball contains:
    • dist/commands.cjs
    • dist/commands.mjs
    • dist/commands/index.d.ts
    • dist/selectors.cjs
    • dist/selectors.mjs
    • dist/selectors/index.d.ts
  • Installed the packed tarball into a clean temporary project and confirmed:
    • require('@nextcloud/e2e-test-server/commands')
    • require('@nextcloud/e2e-test-server/selectors')
    • await import('@nextcloud/e2e-test-server/commands')
    • await import('@nextcloud/e2e-test-server/selectors')
  • Ran git diff --check.

Environment note: this machine has Node v24.12.0 and npm 11.6.2, while devEngines requests Node ^22.0.0 and npm ^10.5.0, so local npm commands were run with --force. The build completed and produced the expected artifacts; it also emitted the existing lib/docker.ts declaration warning about NetworkSettings.IPAddress.

Signed-off-by: Petyo Lazarov <122088067+pesoszpesosz@users.noreply.github.com>
@pesoszpesosz pesoszpesosz force-pushed the codex/fix-subpath-exports branch from 4bcdd5c to 2e07fd8 Compare June 19, 2026 08:31
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.79%. Comparing base (0446ff5) to head (2e07fd8).
⚠️ Report is 977 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (0446ff5) and HEAD (2e07fd8). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (0446ff5) HEAD (2e07fd8)
3 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1017       +/-   ##
===========================================
- Coverage   96.47%   24.79%   -71.68%     
===========================================
  Files           5        9        +4     
  Lines          85      121       +36     
  Branches        4        7        +3     
===========================================
- Hits           82       30       -52     
- Misses          3       91       +88     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@susnux

susnux commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@pesoszpesosz thank you for your contribution!
Please use conventional commits:
https://www.conventionalcommits.org/en/v1.0.0/

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