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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature: Add a --privacy flag for publishConfig > access #665

Closed
3 tasks done
JoshuaKGoldberg opened this issue Aug 21, 2023 · 5 comments 路 Fixed by #871
Closed
3 tasks done

馃殌 Feature: Add a --privacy flag for publishConfig > access #665

JoshuaKGoldberg opened this issue Aug 21, 2023 · 5 comments 路 Fixed by #871
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

Publish configs were added in #465 -> #466. It should be that if you initialize a new repository and add the requisite tokens, publishing should work immediately. But, per https://twitter.com/malloc007/status/1693623834509824120, the lack of access: true means packages might not immediately publish well.

Let's add a --privacy flag that defaults to "public". That way users have control over whether the package is public or private, and it's surfaced in the docs.

Additional Info

Thanks @ryota-murakami for speaking up! 鉂わ笍

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: accepting prs Please, send a pull request to resolve this! labels Aug 21, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title 馃殌 Feature: <short description of the feature> 馃殌 Feature: Add a --privacy flag for publishConfig > access Aug 21, 2023
@JoshuaKGoldberg JoshuaKGoldberg modified the milestone: Ready to Launch Aug 21, 2023
@ryota-murakami
Copy link
Contributor

@JoshuaKGoldberg I'm sorry, my explanation is lacking.
I have no need --private option.

My issue is I couldn't publish new package via create-typescript-app because provenance disallow publish new package no matter access or private

  • This is error message
npm notice Publishing to https://registry.npmjs.org/ with tag latest and default access
npm ERR! code EUSAGE
npm ERR! Can't generate provenance for new or private package, you must set `access` to public.

https://github.com/laststance/usd-query/actions/runs/5927145432/job/16070031891#step:9:50

  • this is given option. (this is default of crerate-typescript-app, no modify)
  "npm": {
    "publishArgs": ["--provenance --public"]
  }

https://github.com/laststance/usd-query/actions/runs/5927145432/job/16070031891#step:9:50

I passed --public, but --provenance option blocked publish because new package I atemmpt publish.

My understand correctly, this teemplate couldn't ship new package without modify config tempolary.
That's a point to I would say "issue".

@ryota-murakami
Copy link
Contributor

@JoshuaKGoldberg Recently, I've gotten used to npm publish and release-it, and I've come to think that this is not an issue at all.
Can I close it?

@JoshuaKGoldberg
Copy link
Owner Author

Sure, works for me!

@JoshuaKGoldberg JoshuaKGoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2023
@JoshuaKGoldberg JoshuaKGoldberg added status: wontfix This will not be worked on and removed status: accepting prs Please, send a pull request to resolve this! labels Sep 20, 2023
@JoshuaKGoldberg
Copy link
Owner Author

Ah, I actually hit this today:

  1. I created a new package
  2. I added GitHub and npm tokens
  3. Error: Can't generate provenance for new or private package, you must set access to public.

I'll add this feature in after all. 馃槃

@JoshuaKGoldberg JoshuaKGoldberg added this to the Post-Rename Migration milestone Sep 21, 2023
@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! and removed status: wontfix This will not be worked on labels Sep 21, 2023
JoshuaKGoldberg added a commit that referenced this issue Sep 22, 2023
## PR Checklist

- [x] Addresses an existing open issue: fixes #665
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Defaults to `--access public`, but provides an escape hatch for private
packages.
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

馃帀 This is included in version v1.32.0 馃帀

The release is available on:

Cheers! 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants