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

let's add a custom key to the package.json to log that it's a wasm-pack project #406

Open
ashleygwilliams opened this issue Oct 9, 2018 · 7 comments

Comments

@ashleygwilliams
Copy link
Member

thinking something like this:

{
   "name": "x",
...
    "toolchain": { "wasm-pack" : "0.5.1" }
}

cc @tschneidereit

@ashleygwilliams ashleygwilliams added enhancement New feature or request question Further information is requested feature request labels Oct 9, 2018
@tschneidereit
Copy link

@ashleygwilliams I assume this is something that could be searched for using the CLI or something else? Ideally both for the key—"wasm-pack", and the value—the version? If so, that looks excellent. If only the key, that'd probably be good enough, too.

@Pauan
Copy link
Contributor

Pauan commented Oct 10, 2018

@tschneidereit Yeah, npm view <PACKAGE> toolchain.wasm-pack should work.

@tschneidereit
Copy link

@Pauan that covers part of it, thanks. Can I also do searches across the package repository? I.e. does something like npm search toolchain.wasm-pack work? Perhaps even with a regexp for the value of wasm-pack?

@Pauan
Copy link
Contributor

Pauan commented Oct 10, 2018

@tschneidereit I don't know, but I don't think so. I did some basic testing, npm search seems to only look at the name, description, author, and keywords.

So if wasm-pack was added to the keywords it should be possible to search for the existence of wasm-pack-compiled packages (but that still won't tell you the version, you'd need to use npm view for that).

@ashleygwilliams
Copy link
Member Author

@tschneidereit keywords would be best for the search UI exposed on the npm webpage (and the CLI) but my intention is to have a follower that collects these and displays them on a website. i figured this was good enough for analytics- do we supposed folks would want to search for wasm-pack in the UI itself? for team analytics (which i consider a different use case) i dont think using npm's UI is necessary, but i'm open to suggestions

@tschneidereit
Copy link

@ashleygwilliams ah, ok. I agree that as long as we have a way to get this information, we don't need to do it via npm's tools. And I don't think there's a strong reason we'd need to make it very easy for people to find these on npmjs.com: for most people this should ideally just be an implementation detail :)

@ashleygwilliams
Copy link
Member Author

in case you're curious- i'm functionally using this (based on a tutorial i wrote for npm years ago lol): https://github.com/npm/registry-follower-tutorial

@ashleygwilliams ashleygwilliams added needs design and removed enhancement New feature or request feature request question Further information is requested labels Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants