-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
pkg.pr.new support #114
Comments
That sounds doable. Currently the code is fetching a tarball from npm and linting it, so it should be a matter of having a custom UI to pass a different tarball URL to be linted. publint/site/src/utils/worker.js Lines 17 to 19 in 5ae869f
publint/site/src/utils/worker.js Lines 38 to 61 in 5ae869f
That sounds neat too. Depending on how you're planning to display it, if it's only in the CLI, I guess it could be easily glossed over. In the past I found users prefer putting it in their CI that blocks or exits code 1 if something fails, so that's more impactful. It's easier to manage versions too. Another option perhaps is that it can print out a publint.dev link so that they can open and view the results directly. |
Nice, so it's easy! Maybe we can add a regex and see if it's a url, then we just do things directly on that url. What do you think?
I think this is way better! Maybe in our comments we just give a lint to the user, so when they navigate it they see a collection of preview packages that they can click on and see the lintings. maybe that can be a new route in publint? |
Yeah I think we'd need to figure out a route for both features. When pasting a link to the search input, we can navigate to a route that handles the specific link to the tarball. I'm not quite sure yet what that could look like, perhaps:
Some kind of syntax that allows for other registries in the future. A mix of no1 and no2 could be nice to allow custom URLs, but also have a cleaner link for supported registries 🤔 What are the patterns for pkg.pr.new links could look like? There's http://pkg.pr.new/vite@main. and I guess http://pkg.pr.new/vite@SHA, http://pkg.pr.new/@scope/my-pkg@main, etc. Are there any other parameters / search params that can be used in the link? |
I love no 3 and 2, because that way, we can have a catch-all route and then forward whatever comes after the so https://publint.dev/pkg.pr.new/vite@main -> /vite@main -> https://pkg.pr.new/vite@main This way you won't need to handle all the edge cases of pkg.pr.new routing.
No we do not have any of that. |
We love publint. I wonder if we would be able to paste a pkg.pr.new url like http://pkg.pr.new/vite@main and have it linted.
It'd be nice to have tarballs checked by publint.
And I'm also thinking about adding a new option to pkg.pr.new where users can run
pkg-pr-new publish --publint
where they would have their package linted after publish.The text was updated successfully, but these errors were encountered: