Skip to content

chore(router-avoid, layout-msagl): correct order of import/types exports - #3470

Merged
kumilingus merged 2 commits into
clientIO:masterfrom
zbynekstara:package-exports-ordering
Aug 20, 2026
Merged

chore(router-avoid, layout-msagl): correct order of import/types exports#3470
kumilingus merged 2 commits into
clientIO:masterfrom
zbynekstara:package-exports-ordering

Conversation

@zbynekstara

Copy link
Copy Markdown
Contributor

Description

Corrects the ordering of exports['.'] in package.json of joint-router-avoid and joint-layout-msagl.

Motivation and Context

When imports are provided first, TS resolution short-circuits and never consults types. This would lead to unexpected behavior if the names of the .mjs files didn't map exactly to the names of the .d.mts files in question.

Copilot AI left a comment

Copy link
Copy Markdown

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 adjusts the conditional export ordering for the @joint/router-avoid and @joint/layout-msagl packages so TypeScript resolves the types condition before import, aligning with the intended TS resolution behavior and the established pattern used in other workspace packages (e.g., @joint/core, @joint/react).

Changes:

  • Reordered exports["."] conditions in packages/joint-router-avoid/package.json to put "types" before "import".
  • Reordered exports["."] conditions in packages/joint-layout-msagl/package.json to put "types" before "import".

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/joint-router-avoid/package.json Reorders conditional exports so types is resolved before import for the package entrypoint.
packages/joint-layout-msagl/package.json Reorders conditional exports so types is resolved before import for the package entrypoint.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@kumilingus
kumilingus merged commit 0319d7a into clientIO:master Aug 20, 2026
3 checks passed
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.

3 participants