Skip to content

fix(pkg): give passwordRules a deep import path - #291

Closed
pathscale wants to merge 1 commit into
masterfrom
fix/export-password-rules
Closed

fix(pkg): give passwordRules a deep import path#291
pathscale wants to merge 1 commit into
masterfrom
fix/export-password-rules

Conversation

@pathscale

Copy link
Copy Markdown
Owner

The package root re-exports evaluatePasswordRules, matchPasswordConfirmation and the password rule types from ./passwordRules, but dist/passwordRules.js has no entry in the exports map. With an exports map present, an unlisted subpath is blocked, so @pathscale/ui/passwordRules does not resolve.

That leaves consumers which forbid barrel imports with no way to use it at all:

  • import { evaluatePasswordRules } from "@pathscale/ui/passwordRules" fails to resolve.
  • import { evaluatePasswordRules } from "@pathscale/ui" fails their lint.

nofilter.io hit exactly this while removing its 69 barrel imports. It was the only symbol of the 69 with no deep path.

Every other module the root re-exports from already has a mapping: components/*, primitives/*, hooks/*, motion, styles/*. passwordRules was the single gap; I checked the full set of subpaths dist/index.d.ts re-exports from.

No source change, and dist/passwordRules.js and .d.ts are already emitted and published, so this only makes a shipped file addressable.

`evaluatePasswordRules` and friends are re-exported from the package root
but `dist/passwordRules.js` had no entry in the `exports` map, so
`@pathscale/ui/passwordRules` did not resolve at all. Consumers that
forbid barrel imports could not reach this module by any path: the deep
import failed to resolve and the root import failed their lint.

Every other module the root re-exports from (components, primitives,
hooks, motion, styles) already has a mapping. This was the only gap.
@pathscale

Copy link
Copy Markdown
Owner Author

Rolled into #289 so the four fixes ship as one release. The commit is unchanged.

@pathscale pathscale closed this Sep 8, 2026
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