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 .publish run target to npm_package #155

Closed
alexeagle opened this issue Jun 3, 2022 · 8 comments · Fixed by #1074
Closed

Add .publish run target to npm_package #155

alexeagle opened this issue Jun 3, 2022 · 8 comments · Fixed by #1074
Assignees
Labels
enhancement New feature or request funding needed Contribute to https://opencollective.com/aspect-build help wanted Aspect isn't prioritizing this, but the community could

Comments

@alexeagle
Copy link
Member

Should be able to build a package and publish it to some registry

@gregmagolan gregmagolan added this to the 1.1 milestone Aug 8, 2022
@gregmagolan
Copy link
Member

Should be fairly easy to add a .publish run target to npm_package (same as pkg_npm has in rules_nodejs).

To make it more useful it should come with stamping support. The shape of stamping in npm_package needs a little thought

@gregmagolan gregmagolan added the enhancement New feature or request label Aug 8, 2022
@gregmagolan gregmagolan changed the title Demonstrate how to publish to npm Add .publish run target to npm_package Aug 8, 2022
@alexeagle
Copy link
Member Author

yeah I keep wanting to do something with stamping - but really the minimum necessary thing is just a jq filter to replace the version in package.json, so maybe we want to add stamping support to the jq rule in aspect_bazel_lib and then at most we'd need to make npm_package macro expand to include one of those

@alexeagle
Copy link
Member Author

bazel-contrib/bazel-lib#223 for that jq prereq

@alexeagle
Copy link
Member Author

Stamping of package.json is done so this is unblocked for someone

@alexeagle alexeagle added the help wanted Aspect isn't prioritizing this, but the community could label Aug 24, 2022
@gregmagolan
Copy link
Member

FYI, #498 will add the option to have npm on the PATH which will make implementing this feature much easier than in rules_nodejs.

@alexeagle
Copy link
Member Author

note from one user, if you pnpm publish in the output tree today, the .git is tree directories up and still find by pnpm when it check for a dirty git state. You can use --no-git-checks to avoid that.

@alexeagle alexeagle added the funding needed Contribute to https://opencollective.com/aspect-build label Nov 23, 2022
@gregmagolan gregmagolan moved this to 📋 Backlog in Open Source Feb 5, 2023
@thesayyn thesayyn self-assigned this May 17, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Open Source May 23, 2023
@shawnzhu
Copy link

how to ship this change into the official doc? it is still about rules_js v1.26.x while I saw this feature is available in v1.30.0

@gregmagolan
Copy link
Member

how to ship this change into the official doc? it is still about rules_js v1.26.x while I saw this feature is available in v1.30.0

I'll put up a PR to the docsite to update to the latest version of rules_js. One day we'll have some more automation for that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request funding needed Contribute to https://opencollective.com/aspect-build help wanted Aspect isn't prioritizing this, but the community could
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants