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

Add a packages command to get package info #178

Merged
merged 1 commit into from Apr 28, 2023

Conversation

dkniffin
Copy link
Contributor

While setting up my app, I've found a few times where I want to know what packages I have in my importmap, as well as their pinned version. I could use a regex to get that myself, but this feels like something that should really be built into importmap-rails.

@dkniffin
Copy link
Contributor Author

I set up a repo explaining how I'm using this new command: https://github.com/dkniffin/importmap-rails-package-checker

I would love to see something like that functionality integrated into importmap-rails. In general, the dev tooling for importmap-rails is still lacking. It's unclear how to manage dependencies and subdependencies or how semver and upgrading is supposed to work or how JS unit tests should work, or security checking.

@dhh
Copy link
Member

dhh commented Apr 23, 2023

I'm not sure what this offers over just looking at the import map file itself?

@dkniffin
Copy link
Contributor Author

dkniffin commented Apr 26, 2023

@dhh It adds a programatic way to get the version numbers, for any number of purposes.

My main use-case is to keep importmap versions in sync with package.json, because I still need that to stay around for JS unit testing (since Node doesn't currently support importmap). But I'm sure there are many other reasons to need the current JS packages listed in the CLI.

@dhh dhh merged commit c7b9e13 into rails:main Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants