Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Remove wildcard exports #2208

Closed
wants to merge 2 commits into from
Closed

Remove wildcard exports #2208

wants to merge 2 commits into from

Conversation

vsumner
Copy link
Collaborator

@vsumner vsumner commented Mar 9, 2022

Description

Follow up to: #2209

Update all package exports to remove "./*". From node documentation:

As a last resort, package encapsulation can be disabled entirely by creating an export for the root of the package "./": "./". This exposes every file in the package at the cost of disabling the encapsulation and potential tooling benefits this provides. As the ES Module loader in Node.js enforces the use of the full specifier path, exporting the root rather than being explicit about entry is less expressive than either of the prior examples. Not only is encapsulation lost but module consumers are unable to import feature from 'my-mod/feature' as they need to provide the full path import feature from 'my-mod/feature/index.js.

Fixes (issue #)

Type of change

Major breaking change

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above (Documentation fix and Test update does not need a changelog as we do not publish new version)

@vsumner vsumner marked this pull request as ready for review March 9, 2022 15:59
@vsumner vsumner requested a review from a team as a code owner March 9, 2022 15:59
@vsumner vsumner requested a review from frangelli March 9, 2022 15:59
@BPScott
Copy link
Member

BPScott commented Mar 10, 2022

Shall we close this as the alternative fix #2209 got merged?

@vsumner
Copy link
Collaborator Author

vsumner commented May 19, 2022

This happened in the node 12 deprecation

@vsumner vsumner closed this May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants