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(scripts): prettify package.json when updating version numbers #4552

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Mar 20, 2023

Issue

Fixes: #4551

Description

Uses prettier when overwriting package.json

Testing

Verified that prettier formatted package.json was not updated:

$ yarn generate-clients -g codegen/sdk-codegen/aws-models/acm.json -n

$ git add clients/client-acm

$ git diff --cached
diff --git a/clients/client-acm/package.json b/clients/client-acm/package.json
index 958c32120e..4fc6bc5248 100644
--- a/clients/client-acm/package.json
+++ b/clients/client-acm/package.json
@@ -65,27 +65,15 @@
     "typedoc": "0.23.23",
     "typescript": "~4.9.5"
   },
-  "engines": {
-    "node": ">=14.0.0"
-  },
-  "typesVersions": {
-    "<4.0": {
-      "dist-types/*": [
-        "dist-types/ts3.4/*"
-      ]
-    }
-  },
-  "files": [
-    "dist-*"
-  ],
+  "engines": { "node": ">=14.0.0" },
+  "typesVersions": { "<4.0": { "dist-types/*": ["dist-types/ts3.4/*"] } },
+  "files": ["dist-*"],
   "author": {
     "name": "AWS SDK for JavaScript Team",
     "url": "https://aws.amazon.com/javascript/"
   },
   "license": "Apache-2.0",
-  "browser": {
-    "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"

$ git commit -m "chore(client-acm): prettify package.json" --no-verify

$ yarn update:versions:default

# No changes to package.json, as update-versions script also uses prettier
$ git status --short clients/client-acm

The reformatting of package.json was done in #4553


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr marked this pull request as ready for review March 20, 2023 20:29
@trivikr trivikr requested a review from a team as a code owner March 20, 2023 20:29
@trivikr trivikr merged commit 4d47810 into aws:main Mar 20, 2023
@trivikr trivikr deleted the use-prettier-while-updating-versions branch March 20, 2023 21:31
@github-actions
Copy link

github-actions bot commented Apr 4, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release scripts are overriding formatting of client package.json
3 participants