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

Possibly provide more of the built-in npm "dry run" output #184

Closed
forevermatt opened this issue Mar 20, 2024 · 4 comments · Fixed by #185
Closed

Possibly provide more of the built-in npm "dry run" output #184

forevermatt opened this issue Mar 20, 2024 · 4 comments · Fixed by #185

Comments

@forevermatt
Copy link

Have you considered including more of the standard output of npm's "dry run" mode? I find that quite helpful sometimes, such as to see what all files would be included in the published package (so that I can adjust things to remove unneeded files).

Here's a slightly-redacted example of what npm shows:

npm notice 📦  @some-org/some-package@1.2.3
npm notice === Tarball Contents === 
npm notice 1.1kB  LICENSE                            
npm notice 2.6kB  README.md                          
npm notice 20.3kB dist/index.js                      
npm notice 17.8kB dist/index.mjs                     
npm notice 1.4kB  package.json                       
npm notice 3.1kB  src/SomeFile.svelte
npm notice 72B    src/index.js                       
npm notice 1.8kB  src/loader.js
...

However, the npm-publish GitHub action seems to only show something like this:

Run JS-DevTools/npm-publish@v3
  with:
    token: ***
    dry-run: true
🙅‍♀️ @some-org/some-package@1.2.3 publish skipped.

Thank for making helpful open source packages, nonetheless! 😁

@mcous
Copy link
Member

mcous commented Mar 20, 2024

I like this idea! I think what might be happening here is that dry-run doesn't affect the version check logic, so if you're in dry-run mode but the version in question is already released, npm publish --dry-run will never be called.

What we could do is have dry-run proceed past the version check (with appropriate logging) and run npm publish --dry-run no matter what. I think if we do that, we'll get the nice little pack log

@forevermatt
Copy link
Author

Sounds promising, thanks! Unfortunately, I'm not familiar enough with this codebase to submit a PR myself. Sorry. 😞

@mcous
Copy link
Member

mcous commented Mar 20, 2024

All good! It’ll be a pretty small lift if my assumptions hold 🤞, will take a crack at it by Friday

@forevermatt
Copy link
Author

Awesome, thanks! We're already seeing those changes in our builds, and it looks great! 😁 🎉

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 a pull request may close this issue.

2 participants