esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

Packages should import latest semver-compatible version of dependencies

Open ysulyma opened this issue 2 years ago • 3 comments

I am importing https://esm.sh/liqvid and https://cdn.esm.sh/v68/@liqvid/katex. The first correctly imports the latest version [email protected]. However, the second is importing [email protected] as a dependency, which causes code to break since it's accessing the wrong Liqvid context. The @liqvid/katex package declares "liqvid": "^2.1.1" as a dependency; since 2.1.2 matches ^2.1.1 and is newer than 2.1.1, it should be imported.

ysulyma avatar Mar 13 '22 22:03 ysulyma

try to add [email protected] to change the liqvid version

ije avatar Mar 14 '22 02:03 ije

That's what I resorted to, and it worked, but it should happen automatically

ysulyma avatar Mar 14 '22 06:03 ysulyma

How does esm determine the dependency version? Is this just a bug, where the package.json semver isn't being honoured correctly, or is it something else?

matt-way avatar Aug 31 '22 13:08 matt-way