From 806c2fff4cbebaf4506ca498a411d2edc18b2824 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Mon, 6 May 2024 13:54:48 -0600 Subject: [PATCH] Lint changed files by default in pre-push hook Currently if you install the pre-push hook by running `yarn setup-git-hooks`, then each time you push, every file that can be linted will be. This is incredibly time-consuming if you want to push a branch and you've only changed a handful of files on your branch. To address this, this commit adds a shell script which replaces the existing `lint` and `lint:fix` package scripts. This new script not only runs in "check" and "fix" modes (that is, either check and exit without fixes, or check and automatically make fixes), it also has the ability to detect which files have changed within the branch that you're on and only run ESLint and Prettier on those files. To accomplish this, the argument to `eslint` and `prettier` have been simplified so that instead of excluding non-lintable files when these commands are called, ignore files are used instead. This required updating to Prettier 3, which reads from both `.prettierignore` and `.gitignore`, a useful task Prettier 2 did not do. Of course, you don't need to install the Git hook to take advantage of the changes in this commit. The `lint` and `lint:fix` package scripts now take advantage of the new shell script, and there are also two new package scripts that delegate to the script, namely, `lint:only-branch` and `lint:fix:only-branch`. Finally, CI will still run `yarn lint` to ensure that all files in the repo still pass lint. --- .eslintrc.js | 4 + .prettierignore | 4 + .prettierrc.js | 1 + package.json | 20 ++-- scripts/lint.sh | 276 ++++++++++++++++++++++++++++++++++++++++++++ scripts/pre-push.sh | 10 ++ yarn.lock | 261 ++++++++++------------------------------- 7 files changed, 368 insertions(+), 208 deletions(-) create mode 100644 .prettierignore create mode 100755 scripts/lint.sh create mode 100755 scripts/pre-push.sh diff --git a/.eslintrc.js b/.eslintrc.js index 34a1d792a2e..225d272d2cd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,6 +3,7 @@ module.exports = { extends: ['@metamask/eslint-config', '@metamask/eslint-config-nodejs'], ignorePatterns: [ '!.eslintrc.js', + '!.prettierrc.js', '!jest.config.js', 'node_modules', '**/dist', @@ -127,5 +128,8 @@ module.exports = { 'import/resolver': { typescript: {}, }, + jsdoc: { + mode: 'typescript', + }, }, }; diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..635ab9def95 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +!.* +.yarn +.yarnrc.yml +merged-packages diff --git a/.prettierrc.js b/.prettierrc.js index 36634700bfe..58bac7292c4 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -2,6 +2,7 @@ * @type {import('prettier').Options} */ module.exports = { + plugins: ['prettier-plugin-packagejson'], // All of these are defaults except singleQuote, but we specify them // for explicitness quoteProps: 'as-needed', diff --git a/package.json b/package.json index 05306d8ad82..7580baf4567 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,10 @@ "changelog:update": "yarn workspaces foreach --no-private --parallel --interlaced --verbose run changelog:update", "changelog:validate": "yarn workspaces foreach --no-private --parallel --interlaced --verbose run changelog:validate", "create-package": "ts-node scripts/create-package", - "lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies", - "lint:dependencies": "depcheck && yarn dedupe --check", - "lint:dependencies:fix": "depcheck && yarn dedupe", - "lint:eslint": "eslint . --cache --ext js,ts", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies:fix", - "lint:misc": "prettier '**/*.json' '**/*.md' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path .gitignore", + "lint": "./scripts/lint.sh check", + "lint:fix": "./scripts/lint.sh fix", + "lint:fix:only-branch": "./scripts/lint.sh fix --relative-to-branch", + "lint:only-branch": "./scripts/lint.sh check --relative-to-branch", "prepack": "./scripts/prepack.sh", "prepare-preview-builds": "./scripts/prepare-preview-builds.sh", "publish-previews": "yarn workspaces foreach --no-private --parallel --verbose run publish:preview", @@ -39,7 +37,7 @@ "update-readme-content": "ts-node scripts/update-readme-content.ts" }, "simple-git-hooks": { - "pre-push": "yarn lint" + "pre-push": "./scripts/pre-push.sh" }, "resolutions": { "tsup@^8.0.2": "patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch" @@ -64,14 +62,14 @@ "babel-jest": "^27.5.1", "depcheck": "^1.4.7", "eslint": "^8.44.0", - "eslint-config-prettier": "^8.5.0", + "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^2.5.0", "eslint-interactive": "^10.8.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-jest": "^27.1.5", "eslint-plugin-jsdoc": "^39.9.1", "eslint-plugin-n": "^15.7.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-promise": "^6.1.1", "eth-block-tracker": "^8.0.0", "execa": "^5.0.0", @@ -79,8 +77,8 @@ "jest": "^27.5.1", "jest-silent-reporter": "^0.5.0", "nock": "^13.3.1", - "prettier": "^2.7.1", - "prettier-plugin-packagejson": "^2.4.5", + "prettier": "^3.2.5", + "prettier-plugin-packagejson": "^2.5.0", "simple-git-hooks": "^2.8.0", "ts-node": "^10.9.1", "tsup": "^8.0.2", diff --git a/scripts/lint.sh b/scripts/lint.sh new file mode 100755 index 00000000000..e2cf2d6bd81 --- /dev/null +++ b/scripts/lint.sh @@ -0,0 +1,276 @@ +#!/bin/bash + +set -uo pipefail + +DEFAULT_BRANCH_NAME=main + +already_printed_banner=0 + +red() { + printf "\x1B[31m" + echo -n "$@" + printf "\x1B[0m" +} + +magenta() { + printf "\x1B[35m" + echo -n "$@" + printf "\x1B[0m" +} + +bold() { + printf "\x1B[1m" + echo -n "$@" + printf "\x1B[22m" +} + +banner() { + if [[ $already_printed_banner -eq 1 ]]; then + echo + fi + printf '%s\n' "$(magenta "===" "$@" "===")" + already_printed_banner=1 +} + +error() { + printf '%s\n' "$(red "ERROR:" "$@")" +} + +print-usage() { + cat < [--relative-to-branch] + +$(bold "ARGUMENTS") + -r, --relative-to-branch Filters the set of files that will be + checked or fixed to only those which have + been added, changed, or deleted on this + branch relative to the base branch. If + omitted, all files will be processed. + + How to process the files in this repo. + Whether to only run checks ($(bold "check") + or to fix files that violate checks ($(bold "fix")). +EOT +} + +get-base-branch() { + local current_branch_name="$1" + + # 1. Print the name of the refs attached to commits that have taken place on + # this branch. + # 2. Split the output so each line = one ref, excluding empty lines. + # 3. Exclude tags and remote branches. + # 4. Choose the first local branch name that is not the current branch name. + git log --pretty=format:'%D' | \ + tr ',' '\n' | \ + grep -v '^$' | \ + sed -E 's/^[ ]+|[ ]+$//' | \ + grep -E -v '^tag: ' | \ + grep -E -v '^origin/' | \ + grep -E -v '\b'"$current_branch_name"'\b' | \ + head -n 1 +} + +get-files-to-lint() { + local current_branch_name="$1" + + local base_branch + if [[ "$current_branch_name" == "$DEFAULT_BRANCH_NAME" ]]; then + base_branch="origin/$current_branch_name" + else + base_branch="$(get-base-branch "$current_branch_name")" + fi + + if [[ -z "$base_branch" ]]; then + echo "" + else + # List files in commits that have occurred on this branch + git diff "$base_branch...HEAD" --name-only + # List unstaged files + git diff --name-only + fi +} + +get-unique-files-to-lint() { + get-files-to-lint "$@" | uniq +} + +run-eslint() { + local mode="$1" + local relative_to_branch="$2" + local files_to_lint="$3" + + local extra_eslint_options + if [[ "$mode" == "fix" ]]; then + extra_eslint_options="--fix" + else + extra_eslint_options="" + fi + + if [[ $relative_to_branch -eq 1 ]]; then + echo "$files_to_lint" | while IFS=$'\n' read -r line; do + printf '%s\0' "$line" + done | grep --null-data -E '\.[jt]s$' | xargs -0 yarn eslint --cache $extra_eslint_options + else + yarn eslint --cache --ext js,ts $extra_eslint_options . + fi +} + +run-prettier() { + local mode="$1" + local relative_to_branch="$2" + local files_to_lint="$3" + + local extra_prettier_options + if [[ "$mode" == "fix" ]]; then + extra_prettier_options="--write" + else + extra_prettier_options="--check" + fi + + if [[ $relative_to_branch -eq 1 ]]; then + echo "$files_to_lint" | while IFS=$'\n' read -r line; do + printf '%s\0' "$line" + done | xargs -0 yarn prettier --ignore-unknown $extra_prettier_options + else + yarn prettier $extra_prettier_options . + fi +} + +run-yarn-constraints() { + local mode="$1" + + local extra_yarn_constraints_options + if [[ "$mode" == "fix" ]]; then + extra_yarn_constraints_options="--fix" + else + extra_yarn_constraints_options="" + fi + + yarn constraints $extra_yarn_constraints_options +} + +run-yarn-depcheck() { + yarn depcheck +} + +run-yarn-dedupe() { + local mode="$1" + local extra_yarn_dedupe_options + + if [[ "$mode" == "fix" ]]; then + extra_yarn_dedupe_options="" + else + extra_yarn_dedupe_options="--check" + fi + + yarn dedupe --check $extra_yarn_dedupe_options +} + +main() { + local mode= + local relative_to_branch=0 + local current_branch_name + local files_to_lint="" + local eslint_result + local prettier_result + local yarn_constraints_result + local yarn_depcheck_result + local yarn_dedupe_result + + while [[ $# -gt 0 ]]; do + case "${1:-}" in + -r | --relative-to-branch) + relative_to_branch=1 + shift + ;; + -*) + error "Unknown argument '$1'." + echo + print-usage + exit 1 + ;; + *) + if [[ -n $mode ]]; then + error "Unknown argument '$1'." + echo + print-usage + exit 1 + else + mode="$1" + shift + fi + ;; + esac + done + + if [[ -z "$mode" ]]; then + error "Missing 'mode'." + echo + print-usage + exit 1 + fi + + if [[ $relative_to_branch -eq 1 ]]; then + current_branch_name="$(git branch --show-current)" + + if [[ -z "$current_branch_name" ]]; then + error "Current branch not detected. Perhaps you're in detached HEAD state or in the middle of an operation?" + exit 1 + fi + + files_to_lint="$(get-unique-files-to-lint "$current_branch_name")" + + if [[ "$files_to_lint" == "" ]]; then + error "Could not find base branch." + exit 1 + fi + + if [[ -n "$files_to_lint" ]]; then + banner "Files to $mode" + echo "$files_to_lint" | while IFS=$'\n' read -r line; do + echo "- $line" + done + fi + fi + + if [[ $relative_to_branch -eq 1 ]]; then + banner "Processing branch-specific files via ESLint" + else + banner "Processing all files via ESLint" + fi + run-eslint "$mode" "$relative_to_branch" "$files_to_lint" + eslint_result=$? + + if [[ $relative_to_branch -eq 1 ]]; then + banner "Processing branch-specific files via Prettier" + else + banner "Processing all files via Prettier" + fi + run-prettier "$mode" "$relative_to_branch" "$files_to_lint" + prettier_result=$? + + banner "Processing Yarn constraints" + run-yarn-constraints "$mode" + yarn_constraints_result=$? + + banner "Processing dependencies" + run-yarn-depcheck "$mode" + yarn_depcheck_result=$? + run-yarn-dedupe "$mode" + yarn_dedupe_result=$? + + [[ + $eslint_result -eq 0 && + $prettier_result -eq 0 && + $yarn_constraints_result -eq 0 && + $yarn_depcheck_result -eq 0 && + $yarn_dedupe_result -eq 0 + ]] +} + +main "$@" diff --git a/scripts/pre-push.sh b/scripts/pre-push.sh new file mode 100755 index 00000000000..923eb765f45 --- /dev/null +++ b/scripts/pre-push.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# If the push refs start with (delete), then we're deleting a branch, so skip the pre-push hook +# Source: +stdin="$(cat -)" +if echo "$stdin" | grep -q "^(delete)"; then + exit 0 +fi + +exec yarn lint:only-branch diff --git a/yarn.lock b/yarn.lock index ebce990e4ac..0e082cd3216 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1940,14 +1940,14 @@ __metadata: babel-jest: ^27.5.1 depcheck: ^1.4.7 eslint: ^8.44.0 - eslint-config-prettier: ^8.5.0 + eslint-config-prettier: ^9.1.0 eslint-import-resolver-typescript: ^2.5.0 eslint-interactive: ^10.8.0 eslint-plugin-import: 2.26.0 eslint-plugin-jest: ^27.1.5 eslint-plugin-jsdoc: ^39.9.1 eslint-plugin-n: ^15.7.0 - eslint-plugin-prettier: ^4.2.1 + eslint-plugin-prettier: ^5.1.3 eslint-plugin-promise: ^6.1.1 eth-block-tracker: ^8.0.0 execa: ^5.0.0 @@ -1955,8 +1955,8 @@ __metadata: jest: ^27.5.1 jest-silent-reporter: ^0.5.0 nock: ^13.3.1 - prettier: ^2.7.1 - prettier-plugin-packagejson: ^2.4.5 + prettier: ^3.2.5 + prettier-plugin-packagejson: ^2.5.0 simple-git-hooks: ^2.8.0 ts-node: ^10.9.1 tsup: ^8.0.2 @@ -3304,17 +3304,10 @@ __metadata: languageName: node linkType: hard -"@pkgr/utils@npm:^2.3.1": - version: 2.4.2 - resolution: "@pkgr/utils@npm:2.4.2" - dependencies: - cross-spawn: ^7.0.3 - fast-glob: ^3.3.0 - is-glob: ^4.0.3 - open: ^9.1.0 - picocolors: ^1.0.0 - tslib: ^2.6.0 - checksum: 24e04c121269317d259614cd32beea3af38277151c4002df5883c4be920b8e3490bb897748e844f9d46bf68230f86dabd4e8f093773130e7e60529a769a132fc +"@pkgr/core@npm:^0.1.0": + version: 0.1.1 + resolution: "@pkgr/core@npm:0.1.1" + checksum: 6f25fd2e3008f259c77207ac9915b02f1628420403b2630c92a07ff963129238c9262afc9e84344c7a23b5cc1f3965e2cd17e3798219f5fd78a63d144d3cceba languageName: node linkType: hard @@ -4559,13 +4552,6 @@ __metadata: languageName: node linkType: hard -"big-integer@npm:^1.6.44": - version: 1.6.51 - resolution: "big-integer@npm:1.6.51" - checksum: 3d444173d1b2e20747e2c175568bedeebd8315b0637ea95d75fd27830d3b8e8ba36c6af40374f36bdaea7b5de376dcada1b07587cb2a79a928fccdb6e6e3c518 - languageName: node - linkType: hard - "bignumber.js@npm:^9.0.1": version: 9.1.1 resolution: "bignumber.js@npm:9.1.1" @@ -4647,15 +4633,6 @@ __metadata: languageName: node linkType: hard -"bplist-parser@npm:^0.2.0": - version: 0.2.0 - resolution: "bplist-parser@npm:0.2.0" - dependencies: - big-integer: ^1.6.44 - checksum: d5339dd16afc51de6c88f88f58a45b72ed6a06aa31f5557d09877575f220b7c1d3fbe375da0b62e6a10d4b8ed80523567e351f24014f5bc886ad523758142cdd - languageName: node - linkType: hard - "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -4816,15 +4793,6 @@ __metadata: languageName: node linkType: hard -"bundle-name@npm:^3.0.0": - version: 3.0.0 - resolution: "bundle-name@npm:3.0.0" - dependencies: - run-applescript: ^5.0.0 - checksum: edf2b1fbe6096ed32e7566947ace2ea937ee427391744d7510a2880c4b9a5b3543d3f6c551236a29e5c87d3195f8e2912516290e638c15bcbede7b37cc375615 - languageName: node - linkType: hard - "bundle-require@npm:^4.0.0": version: 4.0.2 resolution: "bundle-require@npm:4.0.2" @@ -5408,28 +5376,6 @@ __metadata: languageName: node linkType: hard -"default-browser-id@npm:^3.0.0": - version: 3.0.0 - resolution: "default-browser-id@npm:3.0.0" - dependencies: - bplist-parser: ^0.2.0 - untildify: ^4.0.0 - checksum: 279c7ad492542e5556336b6c254a4eaf31b2c63a5433265655ae6e47301197b6cfb15c595a6fdc6463b2ff8e1a1a1ed3cba56038a60e1527ba4ab1628c6b9941 - languageName: node - linkType: hard - -"default-browser@npm:^4.0.0": - version: 4.0.0 - resolution: "default-browser@npm:4.0.0" - dependencies: - bundle-name: ^3.0.0 - default-browser-id: ^3.0.0 - execa: ^7.1.1 - titleize: ^3.0.0 - checksum: 40c5af984799042b140300be5639c9742599bda76dc9eba5ac9ad5943c83dd36cebc4471eafcfddf8e0ec817166d5ba89d56f08e66a126c7c7908a179cead1a7 - languageName: node - linkType: hard - "defaults@npm:^1.0.3": version: 1.0.4 resolution: "defaults@npm:1.0.4" @@ -5450,13 +5396,6 @@ __metadata: languageName: node linkType: hard -"define-lazy-prop@npm:^3.0.0": - version: 3.0.0 - resolution: "define-lazy-prop@npm:3.0.0" - checksum: 54884f94caac0791bf6395a3ec530ce901cf71c47b0196b8754f3fd17edb6c0e80149c1214429d851873bb0d689dbe08dcedbb2306dc45c8534a5934723851b6 - languageName: node - linkType: hard - "define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": version: 1.2.0 resolution: "define-properties@npm:1.2.0" @@ -5916,14 +5855,14 @@ __metadata: languageName: node linkType: hard -"eslint-config-prettier@npm:^8.5.0": - version: 8.8.0 - resolution: "eslint-config-prettier@npm:8.8.0" +"eslint-config-prettier@npm:^9.1.0": + version: 9.1.0 + resolution: "eslint-config-prettier@npm:9.1.0" peerDependencies: eslint: ">=7.0.0" bin: eslint-config-prettier: bin/cli.js - checksum: 1e94c3882c4d5e41e1dcfa2c368dbccbfe3134f6ac7d40101644d3bfbe3eb2f2ffac757f3145910b5eacf20c0e85e02b91293d3126d770cbf3dc390b3564681c + checksum: 9229b768c879f500ee54ca05925f31b0c0bafff3d9f5521f98ff05127356de78c81deb9365c86a5ec4efa990cb72b74df8612ae15965b14136044c73e1f6a907 languageName: node linkType: hard @@ -6089,18 +6028,23 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:^4.2.1": - version: 4.2.1 - resolution: "eslint-plugin-prettier@npm:4.2.1" +"eslint-plugin-prettier@npm:^5.1.3": + version: 5.1.3 + resolution: "eslint-plugin-prettier@npm:5.1.3" dependencies: prettier-linter-helpers: ^1.0.0 + synckit: ^0.8.6 peerDependencies: - eslint: ">=7.28.0" - prettier: ">=2.0.0" + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + eslint-config-prettier: "*" + prettier: ">=3.0.0" peerDependenciesMeta: + "@types/eslint": + optional: true eslint-config-prettier: optional: true - checksum: b9e839d2334ad8ec7a5589c5cb0f219bded260839a857d7a486997f9870e95106aa59b8756ff3f37202085ebab658de382b0267cae44c3a7f0eb0bcc03a4f6d6 + checksum: eb2a7d46a1887e1b93788ee8f8eb81e0b6b2a6f5a66a62bc6f375b033fc4e7ca16448da99380be800042786e76cf5c0df9c87a51a2c9b960ed47acbd7c0b9381 languageName: node linkType: hard @@ -6456,23 +6400,6 @@ __metadata: languageName: node linkType: hard -"execa@npm:^7.1.1": - version: 7.1.1 - resolution: "execa@npm:7.1.1" - dependencies: - cross-spawn: ^7.0.3 - get-stream: ^6.0.1 - human-signals: ^4.3.0 - is-stream: ^3.0.0 - merge-stream: ^2.0.0 - npm-run-path: ^5.1.0 - onetime: ^6.0.0 - signal-exit: ^3.0.7 - strip-final-newline: ^3.0.0 - checksum: 21fa46fc69314ace4068cf820142bdde5b643a5d89831c2c9349479c1555bff137a291b8e749e7efca36535e4e0a8c772c11008ca2e84d2cbd6ca141a3c8f937 - languageName: node - linkType: hard - "execa@npm:^8.0.1": version: 8.0.1 resolution: "execa@npm:8.0.1" @@ -6874,7 +6801,7 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": +"get-stream@npm:^6.0.0": version: 6.0.1 resolution: "get-stream@npm:6.0.1" checksum: e04ecece32c92eebf5b8c940f51468cd53554dcbb0ea725b2748be583c9523d00128137966afce410b9b051eb2ef16d657cd2b120ca8edafcf5a65e81af63cad @@ -7264,13 +7191,6 @@ __metadata: languageName: node linkType: hard -"human-signals@npm:^4.3.0": - version: 4.3.1 - resolution: "human-signals@npm:4.3.1" - checksum: 6f12958df3f21b6fdaf02d90896c271df00636a31e2bbea05bddf817a35c66b38a6fdac5863e2df85bd52f34958997f1f50350ff97249e1dff8452865d5235d1 - languageName: node - linkType: hard - "human-signals@npm:^5.0.0": version: 5.0.0 resolution: "human-signals@npm:5.0.0" @@ -7506,24 +7426,6 @@ __metadata: languageName: node linkType: hard -"is-docker@npm:^2.0.0": - version: 2.2.1 - resolution: "is-docker@npm:2.2.1" - bin: - is-docker: cli.js - checksum: 3fef7ddbf0be25958e8991ad941901bf5922ab2753c46980b60b05c1bf9c9c2402d35e6dc32e4380b980ef5e1970a5d9d5e5aa2e02d77727c3b6b5e918474c56 - languageName: node - linkType: hard - -"is-docker@npm:^3.0.0": - version: 3.0.0 - resolution: "is-docker@npm:3.0.0" - bin: - is-docker: cli.js - checksum: b698118f04feb7eaf3338922bd79cba064ea54a1c3db6ec8c0c8d8ee7613e7e5854d802d3ef646812a8a3ace81182a085dfa0a71cc68b06f3fa794b9783b3c90 - languageName: node - linkType: hard - "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -7577,17 +7479,6 @@ __metadata: languageName: node linkType: hard -"is-inside-container@npm:^1.0.0": - version: 1.0.0 - resolution: "is-inside-container@npm:1.0.0" - dependencies: - is-docker: ^3.0.0 - bin: - is-inside-container: cli.js - checksum: c50b75a2ab66ab3e8b92b3bc534e1ea72ca25766832c0623ac22d134116a98bcf012197d1caabe1d1c4bd5f84363d4aa5c36bb4b585fbcaf57be172cd10a1a03 - languageName: node - linkType: hard - "is-installed-globally@npm:^0.4.0": version: 0.4.0 resolution: "is-installed-globally@npm:0.4.0" @@ -7756,15 +7647,6 @@ __metadata: languageName: node linkType: hard -"is-wsl@npm:^2.2.0": - version: 2.2.0 - resolution: "is-wsl@npm:2.2.0" - dependencies: - is-docker: ^2.0.0 - checksum: 20849846ae414997d290b75e16868e5261e86ff5047f104027026fd61d8b5a9b0b3ade16239f35e1a067b3c7cc02f70183cb661010ed16f4b6c7c93dad1b19d8 - languageName: node - linkType: hard - "isarray@npm:0.0.1": version: 0.0.1 resolution: "isarray@npm:0.0.1" @@ -9541,18 +9423,6 @@ __metadata: languageName: node linkType: hard -"open@npm:^9.1.0": - version: 9.1.0 - resolution: "open@npm:9.1.0" - dependencies: - default-browser: ^4.0.0 - define-lazy-prop: ^3.0.0 - is-inside-container: ^1.0.0 - is-wsl: ^2.2.0 - checksum: 3993c0f61d51fed8ac290e99c9c3cf45d3b6cfb3e2aa2b74cafd312c3486c22fd81df16ac8f3ab91dd8a4e3e729a16fc2480cfc406c4833416cf908acf1ae7c9 - languageName: node - linkType: hard - "optionator@npm:^0.9.3": version: 0.9.3 resolution: "optionator@npm:0.9.3" @@ -9884,22 +9754,22 @@ __metadata: languageName: node linkType: hard -"prettier-plugin-packagejson@npm:^2.4.5": - version: 2.4.5 - resolution: "prettier-plugin-packagejson@npm:2.4.5" +"prettier-plugin-packagejson@npm:^2.5.0": + version: 2.5.0 + resolution: "prettier-plugin-packagejson@npm:2.5.0" dependencies: - sort-package-json: 2.5.1 - synckit: 0.8.5 + sort-package-json: 2.10.0 + synckit: 0.9.0 peerDependencies: prettier: ">= 1.16.0" peerDependenciesMeta: prettier: optional: true - checksum: 9d7529e42546c157194c5d490890852c7e97d2c3ae529f83e3caec61ec97b5bc63b28b25836d7de579accde09b6e161cc9145b2d4105822586b589eedb1f2d14 + checksum: 0b05b02e96173abc1220d11a5ae6fbdefd45823ad86e5aba70bd52377f555db82fbe41c67bdfb186fa3f4c2ef5d12d4803b7215cb301533829a8389b411bb99a languageName: node linkType: hard -"prettier@npm:^2.7.1, prettier@npm:^2.8.8": +"prettier@npm:^2.8.8": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: @@ -9908,6 +9778,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^3.2.5": + version: 3.2.5 + resolution: "prettier@npm:3.2.5" + bin: + prettier: bin/prettier.cjs + checksum: 2ee4e1417572372afb7a13bb446b34f20f1bf1747db77cf6ccaf57a9be005f2f15c40f903d41a6b79eec3f57fff14d32a20fb6dee1f126da48908926fe43c311 + languageName: node + linkType: hard + "pretty-format@npm:^27.0.0, pretty-format@npm:^27.5.1": version: 27.5.1 resolution: "pretty-format@npm:27.5.1" @@ -10369,15 +10248,6 @@ __metadata: languageName: node linkType: hard -"run-applescript@npm:^5.0.0": - version: 5.0.0 - resolution: "run-applescript@npm:5.0.0" - dependencies: - execa: ^5.0.0 - checksum: d00c2dbfa5b2d774de7451194b8b125f40f65fc183de7d9dcae97f57f59433586d3c39b9001e111c38bfa24c3436c99df1bb4066a2a0c90d39a8c4cd6889af77 - languageName: node - linkType: hard - "run-async@npm:^2.3.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -10480,7 +10350,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.x, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:7.x, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.0 resolution: "semver@npm:7.6.0" dependencies: @@ -10585,7 +10455,7 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": +"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 @@ -10696,9 +10566,9 @@ __metadata: languageName: node linkType: hard -"sort-package-json@npm:2.5.1": - version: 2.5.1 - resolution: "sort-package-json@npm:2.5.1" +"sort-package-json@npm:2.10.0": + version: 2.10.0 + resolution: "sort-package-json@npm:2.10.0" dependencies: detect-indent: ^7.0.1 detect-newline: ^4.0.0 @@ -10706,10 +10576,11 @@ __metadata: git-hooks-list: ^3.0.0 globby: ^13.1.2 is-plain-obj: ^4.1.0 + semver: ^7.6.0 sort-object-keys: ^1.1.3 bin: sort-package-json: cli.js - checksum: 69ec7a6275fa518e3fa883558b77d14cb19e57115b458581aba9ef38eb629ab5836c6a2158ad124a0c9419b819e132fbd2a2df5a4fb8448f91339c470dba5101 + checksum: 095e5c5075c9799d3d6174f82e963fa3be0a1d193af0be656b651d2e5b563dfc794f46c7aa74e3fc761de3fba76951ad2d3de716cf50b3aca4e938f63edbfcae languageName: node linkType: hard @@ -11066,13 +10937,23 @@ __metadata: languageName: node linkType: hard -"synckit@npm:0.8.5": - version: 0.8.5 - resolution: "synckit@npm:0.8.5" +"synckit@npm:0.9.0": + version: 0.9.0 + resolution: "synckit@npm:0.9.0" dependencies: - "@pkgr/utils": ^2.3.1 - tslib: ^2.5.0 - checksum: 8a9560e5d8f3d94dc3cf5f7b9c83490ffa30d320093560a37b88f59483040771fd1750e76b9939abfbb1b5a23fd6dfbae77f6b338abffe7cae7329cd9b9bb86b + "@pkgr/core": ^0.1.0 + tslib: ^2.6.2 + checksum: c38bc3df0306c3242ddc5628d766ef0b4ca85a8a861b0a26b03483f09eca31a7fbdbcefb1b9fdee9e49db7739df25ce728cb2c6aef02ddc58bf46ee71924a36b + languageName: node + linkType: hard + +"synckit@npm:^0.8.6": + version: 0.8.8 + resolution: "synckit@npm:0.8.8" + dependencies: + "@pkgr/core": ^0.1.0 + tslib: ^2.6.2 + checksum: 9ed5d33abb785f5f24e2531efd53b2782ca77abf7912f734d170134552b99001915531be5a50297aa45c5701b5c9041e8762e6cd7a38e41e2461c1e7fccdedf8 languageName: node linkType: hard @@ -11187,13 +11068,6 @@ __metadata: languageName: node linkType: hard -"titleize@npm:^3.0.0": - version: 3.0.0 - resolution: "titleize@npm:3.0.0" - checksum: 71fbbeabbfb36ccd840559f67f21e356e1d03da2915b32d2ae1a60ddcc13a124be2739f696d2feb884983441d159a18649e8d956648d591bdad35c430a6b6d28 - languageName: node - linkType: hard - "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -11360,7 +11234,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.5.0, tslib@npm:^2.6.0": +"tslib@npm:^2.0.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad @@ -11659,13 +11533,6 @@ __metadata: languageName: node linkType: hard -"untildify@npm:^4.0.0": - version: 4.0.0 - resolution: "untildify@npm:4.0.0" - checksum: 39ced9c418a74f73f0a56e1ba4634b4d959422dff61f4c72a8e39f60b99380c1b45ed776fbaa0a4101b157e4310d873ad7d114e8534ca02609b4916bb4187fb9 - languageName: node - linkType: hard - "update-browserslist-db@npm:^1.0.11": version: 1.0.11 resolution: "update-browserslist-db@npm:1.0.11"