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

Fix package.json (remove "pre" scripts) #67

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Conversation

guidanoli
Copy link
Contributor

@guidanoli guidanoli commented Mar 22, 2024

Since pnpm doesn't follow the policy of running prex before x, we have to make this dependence explicit (by running pnpm codegen before next dev or next build).

This was introduced by #64.

Closes #66

@guidanoli guidanoli requested a review from a team March 22, 2024 01:39
@guidanoli guidanoli self-assigned this Mar 22, 2024
Copy link
Contributor

@endersonmaia endersonmaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a .npmrc file with enable-pre-post-scripts=true would make pre and post scripts works.

I think it's a cleaner solution.

Reference: https://github.com/pnpm/pnpm/releases/tag/v6.1.0

@guidanoli
Copy link
Contributor Author

I think pre and post scripts are unintuitive.
For example, if you had a script called ttier, it would trigger prettier just because of their names.

@endersonmaia
Copy link
Contributor

I think pre and post scripts are unintuitive. For example, if you had a script called ttier, it would trigger prettier just because of their names.

I'm thinking in what case one would have a ttier command 😅, but I get your point.

@guidanoli
Copy link
Contributor Author

I think pre and post scripts are unintuitive. For example, if you had a script called ttier, it would trigger prettier just because of their names.

I'm thinking in what case one would have a ttier command 😅, but I get your point.

It's just an example. Other examples of real word pairs include:

  • fix and prefix
  • set and preset
  • tty and pretty
  • dict and predict
  • face and preface

But my point is that for a beginner to package.json format, I think it's very unexpected that x runs prex beforehand and postx afterward.

@guidanoli guidanoli merged commit 5a9de28 into main Mar 22, 2024
@guidanoli guidanoli deleted the feature/rm-pre-scripts branch March 22, 2024 12:29
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.

Missing pnpm codegen step in readme
2 participants