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

feat: replace format:write to format --write #815

Closed
wants to merge 3 commits into from

Conversation

DanexQ
Copy link
Contributor

@DanexQ DanexQ commented Sep 7, 2023

PR Checklist

Overview

All format:write has been replaced with format --write.

Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

A good start, but let's remove the old unnecessary script rather than just rename it.

TIL scripts can have spaces in their names! pnpm run "format --write" 😄

package.json Outdated
@@ -25,7 +25,7 @@
"build": "tsup",
"create:test": "node script/create-test-e2e.js",
"format": "prettier \"**/*\" --ignore-unknown",
"format:write": "pnpm format --write",
"format --write": "pnpm format --write",
Copy link
Owner

Choose a reason for hiding this comment

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

The idea here was to remove this extra script altogether:

Suggested change
"format --write": "pnpm format --write",

@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for author Needs an action taken by the original poster label Sep 7, 2023
@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #815 (5ef68e8) into main (c66fdda) will increase coverage by 0.56%.
Report is 4 commits behind head on main.
The diff coverage is 80.99%.

@@            Coverage Diff             @@
##             main     #815      +/-   ##
==========================================
+ Coverage   91.61%   92.18%   +0.56%     
==========================================
  Files          84       84              
  Lines        4161     4220      +59     
  Branches      248      261      +13     
==========================================
+ Hits         3812     3890      +78     
+ Misses        349      330      -19     
Flag Coverage Δ
create 71.95% <78.78%> (-0.09%) ⬇️
initialize 34.61% <78.78%> (+0.52%) ⬆️
migrate 73.27% <78.78%> (-0.08%) ⬇️
unit 52.51% <79.33%> (+4.81%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/shared/types.ts 0.00% <0.00%> (ø)
src/shared/options/augmentOptionsWithExcludes.ts 62.09% <50.00%> (-0.49%) ⬇️
src/bin/index.ts 100.00% <100.00%> (ø)
src/bin/mode.ts 100.00% <100.00%> (ø)
src/create/index.ts 89.04% <100.00%> (+0.15%) ⬆️
src/initialize/index.ts 97.77% <100.00%> (+0.05%) ⬆️
src/migrate/index.ts 97.56% <100.00%> (+0.06%) ⬆️
src/shared/options/readOptions.ts 89.23% <100.00%> (+15.89%) ⬆️
src/steps/finalizeDependencies.ts 100.00% <100.00%> (ø)
src/steps/uninstallPackages.ts 100.00% <100.00%> (ø)
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@DanexQ
Copy link
Contributor Author

DanexQ commented Sep 7, 2023

You're right. Hope it's fine.

@@ -103,7 +103,7 @@ describe("writePackageJson", () => {
"scripts": {
"build": "tsup",
"format": "prettier \\"**/*\\" --ignore-unknown",
"format:write": "pnpm format --write",
"format --write": "pnpm format --write",
Copy link
Owner

Choose a reason for hiding this comment

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

@DanexQ this is still buggy - it should be removed.

@JoshuaKGoldberg
Copy link
Owner

@DanexQ I'm going to go ahead and close this out, as I want this feature in before Hacktoberfest this coming week. Thanks for trying it out though! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for author Needs an action taken by the original poster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature: Replace format:write with format --write
2 participants