Replies: 2 comments
-
Per discussion, there seemed to be two major questions here:
For eg a URL parsing seems like it might be doable with existing version and package name conventions if then treating unknown domains as effectively discovered registries based on the URL host name as the registry identifier. |
Beta Was this translation helpful? Give feedback.
-
As we discussed on how How should a module served from a URL communicate it's dependency requirements.
|
Beta Was this translation helpful? Give feedback.
-
As ESM libraries embrace the usage of "bare" module specifiers the very logical problem arises - how do they specify and communicate the version and/or source requirements to the library users?
For the libraries that are published to npm the
package.json
's"dependecies"
field serves that purpose. But what should be used for the other sources:package.json
spec)Two Types of Specifies
Proposed Requirements Formats
npm packages
npm packages can be referred to by using a slightly modified version of the standard npm query string that adds support for subpaths:
URLs
Individual modules served from arbitrary URLs can include a semver part at a certain position, e.g. at the end like it's implemented by Framer CDN:
Packages can use a slightly different position for version, e.g. how
deno/x/
does it:The source CDNs can communicate the available versions using a different URL that's deriveable from the module URL, e.g.:
The areas for comments:
Beta Was this translation helpful? Give feedback.
All reactions