webcomponents / webcomponents/custom-elements-manifest

Clarify paths with respect to package.json exports

Open
#133 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
502
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Paths in manifests are meant to be fully resolvable by tools. Without package exports tools can just look up files relative to the package root. But with package exports there are two complications:

1. Paths should be resolved via the package exports, as opposed to the filesystem.
2. Types stop having their own paths with TypeScript's export support. Instead they have a "types" export condition on the .js path they're associated with. This means a reference to a type needs to use the .js path and either needs to include the "types" condition, or tool needs assume it.

See also https://github.com/webcomponents/custom-elements-manifest/issues/59 and https://github.com/webcomponents/custom-elements-manifest/issues/96

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the path-resolution concerns in this issue and the linked issues #59 and #96. Determine the intended rules for package exports and TypeScript's "types" condition, including how file and type references should be represented. Done means the behavior and expected manifest format are clearly agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.