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

Fixes for shipping dist/ files and running prepare in CI #84

Merged
merged 2 commits into from Nov 20, 2023
Merged

Conversation

lukekarrys
Copy link
Member

@lukekarrys lukekarrys commented Nov 18, 2023

I published 3.0.0 from my local environment but in doing so accidentally published it with many more files than necessary.

This fixes the issue so 3.0.1 can be published with only the necessary dist files.

This also fixes the publish step so dependencies are installed before prepare is called.

@lukekarrys lukekarrys requested a review from a team as a code owner November 18, 2023 06:39
@lukekarrys lukekarrys changed the title fix: only ship dist files Fixes for shipping dist/ files and running prepare in CI Nov 20, 2023
@wraithgar
Copy link
Member

If dependencies need to be installed for prepare to run don't we have an order of operations problem?

@lukekarrys
Copy link
Member Author

I don't think so, but check my math here:

  • npm publish is run
  • this automatically runs npm prepare
  • read now runs the tshy bin inside prepare

Currently tshy is not installed so the above fails. But with this PR we run install first which solves the problem.

@wraithgar
Copy link
Member

wraithgar commented Nov 20, 2023

Ok so prepare is something that runs during publish but that runs without any guarantee that install has already ran.

What confused me is that prepare is also something that runs during install, so in theory an npm install would have sufficed.

To prevent it having to run more than once, you run npm install --ignore-scripts then npm publish.

Out of scope for this PR, but that seems clunky all things considered.

@lukekarrys lukekarrys merged commit 425aac0 into main Nov 20, 2023
28 checks passed
@lukekarrys lukekarrys deleted the lk/files branch November 20, 2023 17:16
@github-actions github-actions bot mentioned this pull request Nov 20, 2023
lukekarrys pushed a commit that referenced this pull request Nov 27, 2023
🤖 I have created a release *beep* *boop*
---


## [3.0.1](v3.0.0...v3.0.1)
(2023-11-20)

### Bug Fixes

*
[`22cb8dc`](22cb8dc)
[#84](#84) only ship dist files
(@lukekarrys)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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 this pull request may close these issues.

None yet

2 participants