Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The CLI should have a way to list the actual versions behind current import maps #559

Open
wkillerud opened this issue Jul 29, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@wkillerud
Copy link
Contributor

It would be useful to have a command to list the actual versions an import map resolves to (behind the alias).

I imagine the command would print an output similar to npm outdated, with the Alias to the left, it's Mapped to version next to it, and the Installed version from package.json to the right.

It should warn if Eik resolves to a lower version than package.json. This validation should give a non-zero exit code so it can be run on CI and cause a build to fail.

@wkillerud wkillerud added the enhancement New feature or request label Jul 30, 2024
@digitalsadhu
Copy link
Member

digitalsadhu commented Aug 5, 2024

I'm thinking something like this:

$ eik outdated
::  PACKAGE  > my-cool-app | org: finn | url: https://assets.finn.no/pkg/my-cool-app

Package      Alias Version Latest Package.json
lit          v2    2.0.1   2.0.2  3.0.1
lit-element  v4    4.0.5   4.0.5  4.0.5
lit-html     v3    3.0.1   3.0.2  3.0.1
..etc..
$ eik outdated custom-elements --type=map
::  MAP  > custom-elements | org: finn | url: https://assets.finn.no/map/custom-elements

Package      Alias Version Latest
lit          v2    2.0.1   2.0.2
lit-element  v4    4.0.5   4.0.5
lit-html     v3    3.0.1   3.0.2
..etc..
$ eik outdated lit --type=npm 
::  NPM  > lit | org: finn | url: https://assets.finn.no/npm/lit

Alias Version Latest
v1    1.0.1   1.0.2
v2    2.0.5   2.0.5
v3    3.0.1   3.0.2
..etc..
$ eik outdated @warp-ds/css --type=package 
::  PACKAGE  > @warp-ds/css | org: finn | url: https://assets.finn.no/pkg/@warp-ds/css

Alias Version        Latest
v1    1.10.1         1.10.1
v2    2.0.0-next.5   2.0.0-next.5
..etc..

@wkillerud
Copy link
Contributor Author

What is Latest in this case? Newest version on Eik? That would be helpful for import map and alias maintainers for sure 👍

I'm looking for a way to give app developers a tool to see if their runtime/client-side dependency will be different from their local/server-side version.

@digitalsadhu
Copy link
Member

Ok cool. I've added another example to cover that use case then. eik outdated without args would read eik.json/package.json for necessary values, scan import maps being used as well as package.json deps and then lists the table as shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants