diff --git a/.github/actionlint.yml b/.github/actionlint.yml index e83312f9..db3495ac 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -3,3 +3,7 @@ paths: ignore: # We need to ignore the expected missing inputs in test-checkout-and-setup.yml - 'missing input "is-high-risk-environment".+' + .github/workflows/changelog-check.yml: + ignore: + # Ignore SC2086 warnings related to shell commands + - 'SC2086:.+' diff --git a/.github/workflows/changelog-check.yml b/.github/workflows/changelog-check.yml new file mode 100644 index 00000000..243ff763 --- /dev/null +++ b/.github/workflows/changelog-check.yml @@ -0,0 +1,74 @@ +name: Changelog Check + +on: + workflow_call: + inputs: + base-branch: + required: true + type: string + feature-branch: + required: true + type: string + pr-number: + required: false + type: string + secrets: + gh-token: + required: true + +jobs: + check-changelog: + runs-on: ubuntu-latest + steps: + - name: Checkout github-tools repository + uses: actions/checkout@v4 + with: + repository: MetaMask/github-tools + ref: changelog-checker + path: github-tools + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version-file: ./github-tools/.nvmrc + cache-dependency-path: ./github-tools/yarn.lock + cache: yarn + + - name: Enable Corepack + run: corepack enable + shell: bash + working-directory: ./github-tools + + - name: Install dependencies + run: yarn --immutable + shell: bash + working-directory: ./github-tools + + - name: Check PR Labels + id: label-check + run: | + # Fetch labels from the GitHub API + labels=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ + "https://api.github.com/repos/${{ github.repository }}/issues/${{ inputs.pr-number }}/labels") + + # Proceed with checking for the 'no-changelog' label using jq + if echo "$labels" | jq -e '.[] | select(.name == "no-changelog")'; then + echo "No-changelog label found, skipping changelog check." + echo "SKIP_CHANGELOG=true" >> $GITHUB_ENV + else + echo "SKIP_CHANGELOG=false" >> $GITHUB_ENV + echo "No-changelog label not found, proceeding with changelog check." + fi + env: + GITHUB_TOKEN: ${{ secrets.gh-token }} + shell: bash + + - name: Check Changelog + if: env.SKIP_CHANGELOG != 'true' + id: changelog-check + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.gh-token }} + working-directory: ./github-tools + run: | + yarn run changelog-check ${{ github.repository }} ${{ inputs.base-branch }} ${{ inputs.feature-branch }} diff --git a/package.json b/package.json index 5b77bc9c..06d895d0 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "description": "Tools for interacting with the GitHub API to do metrics gathering", "scripts": { + "changelog-check": "ts-node src/changelog-check.ts", "count-references-to-contributor-docs": "ts-node --swc src/scripts/count-references-to-contributor-docs/cli.ts", "gen:commits": "node .github/scripts/generate-rc-commits.mjs", "get-review-metrics": "ts-node src/get-review-metrics.ts", @@ -20,6 +21,7 @@ "update-release-sheet": "node .github/scripts/update-release-sheet.mjs" }, "dependencies": { + "@metamask/auto-changelog": "4.1.0", "@metamask/utils": "^7.1.0", "@octokit/graphql": "^7.0.1", "@octokit/request": "^8.1.1", @@ -30,6 +32,7 @@ "csv-parse": "5.6.0", "googleapis": "144.0.0", "luxon": "^3.3.0", + "node-fetch": "2.6.12", "ora": "^5.4.1", "simple-git": "3.27.0" }, @@ -42,23 +45,27 @@ "@metamask/eslint-config-typescript": "^12.0.0", "@swc/cli": "^0.1.62", "@swc/core": "^1.3.80", + "@types/axios": "^0.14.4", + "@types/diff": "^7", + "@types/fs-extra": "^11.0.4", "@types/jest": "^28.1.6", "@types/node": "^20.3.2", + "@types/node-fetch": "^2.6.12", "@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/parser": "^5.43.0", "depcheck": "^1.4.3", "eslint": "^8.44.0", - "eslint-config-prettier": "^8.8.0", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-jest": "^27.2.2", "eslint-plugin-jsdoc": "^39.9.1", "eslint-plugin-n": "^15.7.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-promise": "^6.1.1", "jest": "^28.1.3", "jest-it-up": "^2.0.2", - "prettier": "^2.7.1", - "prettier-plugin-packagejson": "^2.3.0", + "prettier": "^3.3.3", + "prettier-plugin-packagejson": "^2.5.2", "ts-jest": "^28.0.7", "ts-node": "^10.9.1", "typescript": "^5.1.3" @@ -67,6 +74,9 @@ "engines": { "node": ">=20.0.0" }, + "peerDependencies": { + "prettier": ">=3.0.0" + }, "lavamoat": { "allowScripts": { "@lavamoat/preinstall-always-fail": false, diff --git a/src/changelog-check.ts b/src/changelog-check.ts new file mode 100644 index 00000000..f7624409 --- /dev/null +++ b/src/changelog-check.ts @@ -0,0 +1,154 @@ +import { parseChangelog } from '@metamask/auto-changelog'; +import nodeFetch from 'node-fetch'; + +/** + * Asynchronously fetches the CHANGELOG.md file content from a specified GitHub repository and branch. + * The function constructs a URL to access the raw content of the file using GitHub's raw content service. + * It handles authorization using an optional GitHub token from environment variables. + * + * @param repo - The full name of the repository (e.g., "owner/repo"). + * @param branch - The branch from which to fetch the CHANGELOG.md file. + * @returns A promise that resolves to the content of the CHANGELOG.md file as a string. + * If the fetch operation fails, it logs an error and returns an empty string. + */ +async function fetchChangelogFromGitHub( + repo: string, + branch: string, +): Promise { + const url = `https://raw.githubusercontent.com/${repo}/${branch}/CHANGELOG.md`; + // eslint-disable-next-line n/no-process-env + const token = process.env.GITHUB_TOKEN ?? ''; + + try { + const headers = token ? { Authorization: `Bearer ${token}` } : {}; + const response = await nodeFetch(url, { + headers, + }); + + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + + return await response.text(); + } catch (error) { + console.error( + `❌ Error fetching CHANGELOG.md from ${branch} on ${repo}:`, + error, + ); + throw error; + } +} + +/** + * Compares the changelog entries between the base and feature branches to determine if there are differences. + * + * @param baseChanges - The content of the '[Unreleased]' section from the base branch's CHANGELOG.md. + * @param featureChanges - The content of the '[Unreleased]' section from the feature branch's CHANGELOG.md. + * @returns Returns true if there are new or differing number of entries in the feature branch compared to the base branch. + */ +function compareChangeLogs( + baseChanges: string[], + featureChanges: string[], +): boolean { + const newEntries = featureChanges.filter( + (entry) => !baseChanges.includes(entry), + ); + + // Log and return true if there are new entries + if (newEntries.length > 0) { + console.log('New entries in feature branch:', newEntries); + return true; + } + + // Check if the number of entries has changed + if (baseChanges.length !== featureChanges.length) { + console.log( + 'The number of entries has changed. Base branch has', + baseChanges.length, + 'entries, while feature branch has', + featureChanges.length, + 'entries.', + ); + return true; + } + + // If no new entries and the size has not changed, return false + return false; +} + +/** + * Validates that the CHANGELOG.md in a feature branch has been updated correctly by comparing it + * against the CHANGELOG.md in the base branch. + * @param repo - The GitHub repository from which to fetch the CHANGELOG.md file. + * @param baseBranch - The base branch (typically 'main' or 'master') to compare against. + * @param featureBranch - The feature branch that should contain the updated CHANGELOG.md. + */ +async function validateChangelog( + repo: string, + baseBranch: string, + featureBranch: string, +) { + console.log(`🔍 Fetching CHANGELOG.md from GitHub repository: ${repo}`); + + const [baseChangelogContent, featureChangelogContent] = await Promise.all([ + fetchChangelogFromGitHub(repo, baseBranch), + fetchChangelogFromGitHub(repo, featureBranch), + ]); + + if (!featureChangelogContent) { + throw new Error('❌ CHANGELOG.md is missing in the feature branch.'); + } + + const baseUnreleasedChanges = parseChangelog({ + changelogContent: baseChangelogContent, + repoUrl: '', // Not needed as we're only parsing unreleased changes + }).getReleaseChanges('Unreleased'); + + const featureUnreleasedChanges = parseChangelog({ + changelogContent: featureChangelogContent, + repoUrl: '', // Not needed as we're only parsing unreleased changes + }).getReleaseChanges('Unreleased'); + + const baseChanges = Object.values(baseUnreleasedChanges).flat(); + const featureChanges = Object.values(featureUnreleasedChanges).flat(); + + console.log('🔍 Comparing changelog entries...'); + + console.log('Base unreleased section:', baseUnreleasedChanges); + console.log('Feature unreleased section:', featureUnreleasedChanges); + + const hasChanges = compareChangeLogs(baseChanges, featureChanges); + + if (!hasChanges) { + throw new Error( + "❌ No new entries detected under '## Unreleased'. Please update the changelog.", + ); + } + + console.log('✅ CHANGELOG.md has been correctly updated.'); +} + +// Parse command-line arguments +const args = process.argv.slice(2); +if (args.length < 3) { + console.error( + '❌ Usage: ts-node scripts/check-changelog.js ', + ); + throw new Error('❌ Missing required arguments.'); +} + +const [githubRepo, baseBranch, featureBranch] = args; + +// Ensure all required arguments are provided +if (!githubRepo || !baseBranch || !featureBranch) { + console.error( + '❌ Usage: ts-node src/check-changelog.ts ', + ); + throw new Error('❌ Missing required arguments.'); +} + +// Run the validation +validateChangelog(githubRepo, baseBranch, featureBranch).catch((error) => { + console.error('❌ Unexpected error:', error); + throw error; +}); diff --git a/src/scripts/count-references-to-contributor-docs/cli.ts b/src/scripts/count-references-to-contributor-docs/cli.ts index 9cc60738..9a43268e 100644 --- a/src/scripts/count-references-to-contributor-docs/cli.ts +++ b/src/scripts/count-references-to-contributor-docs/cli.ts @@ -15,7 +15,7 @@ const REPOSITORY_NAMES = [ 'snaps', ] as const; -type RepositoryName = typeof REPOSITORY_NAMES[number]; +type RepositoryName = (typeof REPOSITORY_NAMES)[number]; /** * It is not necessary for us to query all of the pull requests or pull requests diff --git a/yarn.lock b/yarn.lock index 9a7e42e0..6ed11d0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -941,6 +941,22 @@ __metadata: languageName: node linkType: hard +"@metamask/auto-changelog@npm:4.1.0": + version: 4.1.0 + resolution: "@metamask/auto-changelog@npm:4.1.0" + dependencies: + diff: "npm:^5.0.0" + execa: "npm:^5.1.1" + semver: "npm:^7.3.5" + yargs: "npm:^17.0.1" + peerDependencies: + prettier: ">=3.0.0" + bin: + auto-changelog: dist/cli.js + checksum: 10/fe31a9eb364939c83bc5098482b761ca93593081680c4cba17b221150b4d32636cb25fd708e3692c198feddc95d8bcf524e19fa93567fb5aa30b03ea93249250 + languageName: node + linkType: hard + "@metamask/eslint-config-jest@npm:^12.0.0": version: 12.1.0 resolution: "@metamask/eslint-config-jest@npm:12.1.0" @@ -997,6 +1013,7 @@ __metadata: dependencies: "@lavamoat/allow-scripts": "npm:^2.3.1" "@lavamoat/preinstall-always-fail": "npm:^1.0.0" + "@metamask/auto-changelog": "npm:4.1.0" "@metamask/eslint-config": "npm:^12.0.0" "@metamask/eslint-config-jest": "npm:^12.0.0" "@metamask/eslint-config-nodejs": "npm:^12.0.0" @@ -1008,33 +1025,40 @@ __metadata: "@slack/web-api": "npm:^6.0.0" "@swc/cli": "npm:^0.1.62" "@swc/core": "npm:^1.3.80" + "@types/axios": "npm:^0.14.4" + "@types/diff": "npm:^7" + "@types/fs-extra": "npm:^11.0.4" "@types/jest": "npm:^28.1.6" "@types/luxon": "npm:^3.3.0" "@types/node": "npm:^20.3.2" + "@types/node-fetch": "npm:^2.6.12" "@typescript-eslint/eslint-plugin": "npm:^5.43.0" "@typescript-eslint/parser": "npm:^5.43.0" axios: "npm:^0.24.0" csv-parse: "npm:5.6.0" depcheck: "npm:^1.4.3" eslint: "npm:^8.44.0" - eslint-config-prettier: "npm:^8.8.0" + eslint-config-prettier: "npm:^9.1.0" eslint-plugin-import: "npm:^2.27.5" eslint-plugin-jest: "npm:^27.2.2" eslint-plugin-jsdoc: "npm:^39.9.1" eslint-plugin-n: "npm:^15.7.0" - eslint-plugin-prettier: "npm:^4.2.1" + eslint-plugin-prettier: "npm:^5.2.1" eslint-plugin-promise: "npm:^6.1.1" googleapis: "npm:144.0.0" jest: "npm:^28.1.3" jest-it-up: "npm:^2.0.2" luxon: "npm:^3.3.0" + node-fetch: "npm:2.6.12" ora: "npm:^5.4.1" - prettier: "npm:^2.7.1" - prettier-plugin-packagejson: "npm:^2.3.0" + prettier: "npm:^3.3.3" + prettier-plugin-packagejson: "npm:^2.5.2" simple-git: "npm:3.27.0" ts-jest: "npm:^28.0.7" ts-node: "npm:^10.9.1" typescript: "npm:^5.1.3" + peerDependencies: + prettier: ">=3.0.0" languageName: unknown linkType: soft @@ -1367,6 +1391,20 @@ __metadata: languageName: node linkType: hard +"@pkgr/core@npm:^0.1.0": + version: 0.1.2 + resolution: "@pkgr/core@npm:0.1.2" + checksum: 10/5160ec9f2e3232da681824a42583ef80e637ae6143339bd1db176848efd244dd71d177ccb7fd729261d8dcaf88486ce701d39500d873ed5caf16e8c281e9e28a + languageName: node + linkType: hard + +"@pkgr/core@npm:^0.2.1": + version: 0.2.1 + resolution: "@pkgr/core@npm:0.2.1" + checksum: 10/f644417c46b31fef0eb67353562d844e38ddb381c8b8b00053c0410e43cbc4999a038c742599b0cf957ed753978a058ebd60694e38a9e5bc8242639fd57cfe2a + languageName: node + linkType: hard + "@scure/base@npm:~1.1.0": version: 1.1.2 resolution: "@scure/base@npm:1.1.2" @@ -1659,6 +1697,15 @@ __metadata: languageName: node linkType: hard +"@types/axios@npm:^0.14.4": + version: 0.14.4 + resolution: "@types/axios@npm:0.14.4" + dependencies: + axios: "npm:*" + checksum: 10/51defed1e76e3fa7e63ae999c2e8c7c253be9b1a1fa3006f4413a0c461234a7e9e7e5df1bb2f64be221617fa94ed2272345ef19724dd550ad01a090510714275 + languageName: node + linkType: hard + "@types/babel__core@npm:^7.1.14": version: 7.1.19 resolution: "@types/babel__core@npm:7.1.19" @@ -1728,13 +1775,20 @@ __metadata: languageName: node linkType: hard -"@types/glob@npm:^7.1.1": - version: 7.1.3 - resolution: "@types/glob@npm:7.1.3" +"@types/diff@npm:^7": + version: 7.0.1 + resolution: "@types/diff@npm:7.0.1" + checksum: 10/ef8c5fe0ea56737e8967c3db5e78518134f704e8e2971cb4ba6f2ed46ed5e13b4bbe41a6b2b78122b8f47c618ac25550f85a681633636a3a020369042523295d + languageName: node + linkType: hard + +"@types/fs-extra@npm:^11.0.4": + version: 11.0.4 + resolution: "@types/fs-extra@npm:11.0.4" dependencies: - "@types/minimatch": "npm:*" + "@types/jsonfile": "npm:*" "@types/node": "npm:*" - checksum: 10/e0eef12285f548f15d887145590594a04ccce7f7e645fb047cbac18cb093f25d507ffbcc725312294c224bb78cf980fce33e5807de8d6f8a868b4186253499d4 + checksum: 10/acc4c1eb0cde7b1f23f3fe6eb080a14832d8fa9dc1761aa444c5e2f0f6b6fa657ed46ebae32fb580a6700fc921b6165ce8ac3e3ba030c3dd15f10ad4dd4cae98 languageName: node linkType: hard @@ -1812,6 +1866,15 @@ __metadata: languageName: node linkType: hard +"@types/jsonfile@npm:*": + version: 6.1.4 + resolution: "@types/jsonfile@npm:6.1.4" + dependencies: + "@types/node": "npm:*" + checksum: 10/309fda20eb5f1cf68f2df28931afdf189c5e7e6bec64ac783ce737bb98908d57f6f58757ad5da9be37b815645a6f914e2d4f3ac66c574b8fe1ba6616284d0e97 + languageName: node + linkType: hard + "@types/keyv@npm:^3.1.4": version: 3.1.4 resolution: "@types/keyv@npm:3.1.4" @@ -1828,7 +1891,7 @@ __metadata: languageName: node linkType: hard -"@types/minimatch@npm:*, @types/minimatch@npm:^3.0.3": +"@types/minimatch@npm:^3.0.3": version: 3.0.5 resolution: "@types/minimatch@npm:3.0.5" checksum: 10/c41d136f67231c3131cf1d4ca0b06687f4a322918a3a5adddc87ce90ed9dbd175a3610adee36b106ae68c0b92c637c35e02b58c8a56c424f71d30993ea220b92 @@ -1842,6 +1905,16 @@ __metadata: languageName: node linkType: hard +"@types/node-fetch@npm:^2.6.12": + version: 2.6.12 + resolution: "@types/node-fetch@npm:2.6.12" + dependencies: + "@types/node": "npm:*" + form-data: "npm:^4.0.0" + checksum: 10/8107c479da83a3114fcbfa882eba95ee5175cccb5e4dd53f737a96f2559ae6262f662176b8457c1656de09ec393cc7b20a266c077e4bfb21e929976e1cf4d0f9 + languageName: node + linkType: hard + "@types/node@npm:*, @types/node@npm:>=12.0.0": version: 22.13.1 resolution: "@types/node@npm:22.13.1" @@ -2406,6 +2479,17 @@ __metadata: languageName: node linkType: hard +"axios@npm:*, axios@npm:^1.7.4": + version: 1.8.3 + resolution: "axios@npm:1.8.3" + dependencies: + follow-redirects: "npm:^1.15.6" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: 10/050f911cadd6d47a38ddbf91d2f8da2c34661dda8077e7ad6546e8178701125366fddbba07211a648b6815cf6c2c3c91c0a65d8b968e3d1a6054a21141ff9c01 + languageName: node + linkType: hard + "axios@npm:^0.24.0": version: 0.24.0 resolution: "axios@npm:0.24.0" @@ -2415,17 +2499,6 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.7.4": - version: 1.7.9 - resolution: "axios@npm:1.7.9" - dependencies: - follow-redirects: "npm:^1.15.6" - form-data: "npm:^4.0.0" - proxy-from-env: "npm:^1.1.0" - checksum: 10/b7a5f660ea53ba9c2a745bf5ad77ad8bf4f1338e13ccc3f9f09f810267d6c638c03dac88b55dae8dc98b79c57d2d6835be651d58d2af97c174f43d289a9fd007 - languageName: node - linkType: hard - "babel-jest@npm:^28.1.3": version: 28.1.3 resolution: "babel-jest@npm:28.1.3" @@ -3266,20 +3339,27 @@ __metadata: languageName: node linkType: hard -"detect-indent@npm:^6.0.0": - version: 6.1.0 - resolution: "detect-indent@npm:6.1.0" - checksum: 10/ab953a73c72dbd4e8fc68e4ed4bfd92c97eb6c43734af3900add963fd3a9316f3bc0578b018b24198d4c31a358571eff5f0656e81a1f3b9ad5c547d58b2d093d +"detect-indent@npm:^7.0.1": + version: 7.0.1 + resolution: "detect-indent@npm:7.0.1" + checksum: 10/cbf3f0b1c3c881934ca94428e1179b26ab2a587e0d719031d37a67fb506d49d067de54ff057cb1e772e75975fed5155c01cd4518306fee60988b1486e3fc7768 languageName: node linkType: hard -"detect-newline@npm:3.1.0, detect-newline@npm:^3.0.0": +"detect-newline@npm:^3.0.0": version: 3.1.0 resolution: "detect-newline@npm:3.1.0" checksum: 10/ae6cd429c41ad01b164c59ea36f264a2c479598e61cba7c99da24175a7ab80ddf066420f2bec9a1c57a6bead411b4655ff15ad7d281c000a89791f48cbe939e7 languageName: node linkType: hard +"detect-newline@npm:^4.0.0": + version: 4.0.1 + resolution: "detect-newline@npm:4.0.1" + checksum: 10/0409ecdfb93419591ccff24fccfe2ddddad29b66637d1ed898872125b25af05014fdeedc9306339577060f69f59fe6e9830cdd80948597f136dfbffefa60599c + languageName: node + linkType: hard + "diff-sequences@npm:^28.1.1": version: 28.1.1 resolution: "diff-sequences@npm:28.1.1" @@ -3294,6 +3374,13 @@ __metadata: languageName: node linkType: hard +"diff@npm:^5.0.0": + version: 5.2.0 + resolution: "diff@npm:5.2.0" + checksum: 10/01b7b440f83a997350a988e9d2f558366c0f90f15be19f4aa7f1bb3109a4e153dfc3b9fbf78e14ea725717017407eeaa2271e3896374a0181e8f52445740846d + languageName: node + linkType: hard + "dir-glob@npm:^3.0.1": version: 3.0.1 resolution: "dir-glob@npm:3.0.1" @@ -3539,14 +3626,14 @@ __metadata: languageName: node linkType: hard -"eslint-config-prettier@npm:^8.8.0": - version: 8.10.0 - resolution: "eslint-config-prettier@npm:8.10.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: 10/0a51ab1417cbf80fabcf7a406960a142663539c8140fdb0a187b78f3d708b9d137a62a4bc4e689150e290b667750ddabd1740a516623b0cb4adb6cc1962cfe2c + checksum: 10/411e3b3b1c7aa04e3e0f20d561271b3b909014956c4dba51c878bf1a23dbb8c800a3be235c46c4732c70827276e540b6eed4636d9b09b444fd0a8e07f0fcd830 languageName: node linkType: hard @@ -3665,18 +3752,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.2.1": + version: 5.2.6 + resolution: "eslint-plugin-prettier@npm:5.2.6" dependencies: prettier-linter-helpers: "npm:^1.0.0" + synckit: "npm:^0.11.0" peerDependencies: - eslint: ">=7.28.0" - prettier: ">=2.0.0" + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + eslint-config-prettier: ">= 7.0.0 <10.0.0 || >=10.1.0" + prettier: ">=3.0.0" peerDependenciesMeta: + "@types/eslint": + optional: true eslint-config-prettier: optional: true - checksum: 10/d387f85dd1bfcb6bc6b794845fee6afb9ebb2375653de6bcde6e615892fb97f85121a7c012a4651b181fc09953bdf54c9bc70cab7ad297019d89ae87dd007e28 + checksum: 10/8f82a3c6bbf2db358476e745501349c8f3d5f0976f15c4af2a07dd62bb70291d29500ad09a354bb33e645c98a378d35544a92e9758aeb65530b1ec6e2dc8b8f9 languageName: node linkType: hard @@ -3905,7 +3997,7 @@ __metadata: languageName: node linkType: hard -"execa@npm:^5.0.0": +"execa@npm:^5.0.0, execa@npm:^5.1.1": version: 5.1.1 resolution: "execa@npm:5.1.1" dependencies: @@ -3991,7 +4083,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.9": version: 3.3.1 resolution: "fast-glob@npm:3.3.1" dependencies: @@ -4036,6 +4128,18 @@ __metadata: languageName: node linkType: hard +"fdir@npm:^6.4.3": + version: 6.4.3 + resolution: "fdir@npm:6.4.3" + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + checksum: 10/8e6d20f4590dc168de1374a9cadaa37e20ca6e0b822aa247c230e7ea1d9e9674a68cd816146435e4ecc98f9285091462ab7e5e56eebc9510931a1794e4db68b2 + languageName: node + linkType: hard + "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -4321,6 +4425,13 @@ __metadata: languageName: node linkType: hard +"get-stdin@npm:^9.0.0": + version: 9.0.0 + resolution: "get-stdin@npm:9.0.0" + checksum: 10/5972bc34d05932b45512c8e2d67b040f1c1ca8afb95c56cbc480985f2d761b7e37fe90dc8abd22527f062cc5639a6930ff346e9952ae4c11a2d4275869459594 + languageName: node + linkType: hard + "get-stream@npm:^3.0.0": version: 3.0.0 resolution: "get-stream@npm:3.0.0" @@ -4354,10 +4465,10 @@ __metadata: languageName: node linkType: hard -"git-hooks-list@npm:1.0.3": - version: 1.0.3 - resolution: "git-hooks-list@npm:1.0.3" - checksum: 10/a1dd03d39c1d727ba08a35dbdbdcc6e96de8c4170c942dc95bf787ca6e34998d39fb5295a00242b58a3d265de0b69a0686d0cf583baa6b7830f268542c4576b9 +"git-hooks-list@npm:^3.0.0": + version: 3.2.0 + resolution: "git-hooks-list@npm:3.2.0" + checksum: 10/1bc1ecd9d68c56523e96109581a7e8d2cfefc9320171dff67b0010dcc3611deff9ea32720f3eb65abfc4ba971372658f5dd118d7de458161939ba88ac8824f4f languageName: node linkType: hard @@ -4431,22 +4542,6 @@ __metadata: languageName: node linkType: hard -"globby@npm:10.0.0": - version: 10.0.0 - resolution: "globby@npm:10.0.0" - dependencies: - "@types/glob": "npm:^7.1.1" - array-union: "npm:^2.1.0" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.0.3" - glob: "npm:^7.1.3" - ignore: "npm:^5.1.1" - merge2: "npm:^1.2.3" - slash: "npm:^3.0.0" - checksum: 10/d0c94128706b5e12a251ddbd1b87cf0e67e57e373c816f242bb7a4a2fbe931602db1a330780d511a5bce675c25fac297622ac01d540c8479cca9c8177528947a - languageName: node - linkType: hard - "globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" @@ -4970,13 +5065,6 @@ __metadata: languageName: node linkType: hard -"is-plain-obj@npm:2.1.0": - version: 2.1.0 - resolution: "is-plain-obj@npm:2.1.0" - checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa - languageName: node - linkType: hard - "is-plain-obj@npm:^1.0.0": version: 1.1.0 resolution: "is-plain-obj@npm:1.1.0" @@ -4984,6 +5072,13 @@ __metadata: languageName: node linkType: hard +"is-plain-obj@npm:^4.1.0": + version: 4.1.0 + resolution: "is-plain-obj@npm:4.1.0" + checksum: 10/6dc45da70d04a81f35c9310971e78a6a3c7a63547ef782e3a07ee3674695081b6ca4e977fbb8efc48dae3375e0b34558d2bcd722aec9bddfa2d7db5b041be8ce + languageName: node + linkType: hard + "is-plain-object@npm:^5.0.0": version: 5.0.0 resolution: "is-plain-object@npm:5.0.0" @@ -5842,15 +5937,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^6.0.0": - version: 6.0.0 - resolution: "lru-cache@npm:6.0.0" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10/fc1fe2ee205f7c8855fa0f34c1ab0bcf14b6229e35579ec1fd1079f31d6fc8ef8eb6fd17f2f4d99788d7e339f50e047555551ebd5e434dda503696e7c6591825 - languageName: node - linkType: hard - "lru-cache@npm:^7.7.1": version: 7.13.1 resolution: "lru-cache@npm:7.13.1" @@ -5937,7 +6023,7 @@ __metadata: languageName: node linkType: hard -"merge2@npm:^1.2.3, merge2@npm:^1.3.0, merge2@npm:^1.4.1": +"merge2@npm:^1.3.0, merge2@npm:^1.4.1": version: 1.4.1 resolution: "merge2@npm:1.4.1" checksum: 10/7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 @@ -6166,6 +6252,20 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:2.6.12": + version: 2.6.12 + resolution: "node-fetch@npm:2.6.12" + dependencies: + whatwg-url: "npm:^5.0.0" + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 10/370ed4d906edad9709a81b54a0141d37d2973a27dc80c723d8ac14afcec6dc67bc6c70986a96992b64ec75d08159cc4b65ce6aa9063941168ea5ac73b24df9f8 + languageName: node + linkType: hard + "node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" @@ -6604,6 +6704,13 @@ __metadata: languageName: node linkType: hard +"picomatch@npm:^4.0.2": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: 10/ce617b8da36797d09c0baacb96ca8a44460452c89362d7cb8f70ca46b4158ba8bc3606912de7c818eb4a939f7f9015cef3c766ec8a0c6bfc725fdc078e39c717 + languageName: node + linkType: hard + "pify@npm:^2.2.0": version: 2.3.0 resolution: "pify@npm:2.3.0" @@ -6670,26 +6777,27 @@ __metadata: languageName: node linkType: hard -"prettier-plugin-packagejson@npm:^2.3.0": - version: 2.3.0 - resolution: "prettier-plugin-packagejson@npm:2.3.0" +"prettier-plugin-packagejson@npm:^2.5.2": + version: 2.5.10 + resolution: "prettier-plugin-packagejson@npm:2.5.10" dependencies: - sort-package-json: "npm:1.57.0" + sort-package-json: "npm:2.15.1" + synckit: "npm:0.9.2" peerDependencies: prettier: ">= 1.16.0" peerDependenciesMeta: prettier: optional: true - checksum: 10/a00434639b6a5bb5d036451d442c86d6167397d8cba3b1916548e98b16ca673738f80df67e43a8de52754c9bd6fcc953dd82ed635f7a74895eed7db3316a1eb2 + checksum: 10/24192855a3bab72125e61a987e944301ac86cbc905f3d172a0cb954548b1f1802f821efef78afc396766f866e573692a391665e606b03dcd6ac00b5f17f68bd2 languageName: node linkType: hard -"prettier@npm:^2.7.1": - version: 2.7.1 - resolution: "prettier@npm:2.7.1" +"prettier@npm:^3.3.3": + version: 3.5.3 + resolution: "prettier@npm:3.5.3" bin: - prettier: bin-prettier.js - checksum: 10/9d29f81c1a470efca6851cd926a3e132a8d9c9d290c3d084c917c1c5aad5c392551406cf6012c724a136bd15911ede5eadc255d121c2761813b33a541a9c34c6 + prettier: bin/prettier.cjs + checksum: 10/7050c08f674d9e49fbd9a4c008291d0715471f64e94cc5e4b01729affce221dfc6875c8de7e66b728c64abc9352eefb7eaae071b5f79d30081be207b53774b78 languageName: node linkType: hard @@ -7101,14 +7209,12 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.x, semver@npm:^7.0.0, 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": - version: 7.5.4 - resolution: "semver@npm:7.5.4" - dependencies: - lru-cache: "npm:^6.0.0" +"semver@npm:7.x, semver@npm:^7.0.0, 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.7.1 + resolution: "semver@npm:7.7.1" bin: semver: bin/semver.js - checksum: 10/985dec0d372370229a262c737063860fabd4a1c730662c1ea3200a2f649117761a42184c96df62a0e885e76fbd5dace41087d6c1ac0351b13c0df5d6bcb1b5ac + checksum: 10/4cfa1eb91ef3751e20fc52e47a935a0118d56d6f15a837ab814da0c150778ba2ca4f1a4d9068b33070ea4273629e615066664c2cfcd7c272caf7a8a0f6518b2c languageName: node linkType: hard @@ -7314,19 +7420,21 @@ __metadata: languageName: node linkType: hard -"sort-package-json@npm:1.57.0": - version: 1.57.0 - resolution: "sort-package-json@npm:1.57.0" +"sort-package-json@npm:2.15.1": + version: 2.15.1 + resolution: "sort-package-json@npm:2.15.1" dependencies: - detect-indent: "npm:^6.0.0" - detect-newline: "npm:3.1.0" - git-hooks-list: "npm:1.0.3" - globby: "npm:10.0.0" - is-plain-obj: "npm:2.1.0" + detect-indent: "npm:^7.0.1" + detect-newline: "npm:^4.0.0" + get-stdin: "npm:^9.0.0" + git-hooks-list: "npm:^3.0.0" + is-plain-obj: "npm:^4.1.0" + semver: "npm:^7.6.0" sort-object-keys: "npm:^1.1.3" + tinyglobby: "npm:^0.2.9" bin: sort-package-json: cli.js - checksum: 10/abc217315070ffd6559b32b95917b92c8376880c0d17b4ad2b0eeacdffb38bf723b892a56c56d91ae6999fca3369bfdf5e29b1b02b2fc944b0cbb299c069d0e8 + checksum: 10/3378565a07368e00eeb625e6b85d1edf9a3bf9f88ced32423bd3036ddb8c674fb8c0fb559044ef939e6de20bb7550423e992f4abd19cff2398d006f0fe8afc82 languageName: node linkType: hard @@ -7599,6 +7707,26 @@ __metadata: languageName: node linkType: hard +"synckit@npm:0.9.2": + version: 0.9.2 + resolution: "synckit@npm:0.9.2" + dependencies: + "@pkgr/core": "npm:^0.1.0" + tslib: "npm:^2.6.2" + checksum: 10/d45c4288be9c0232343650643892a7edafb79152c0c08d7ae5d33ca2c296b67a0e15f8cb5c9153969612c4ea5cd5686297542384aab977db23cfa6653fe02027 + languageName: node + linkType: hard + +"synckit@npm:^0.11.0": + version: 0.11.3 + resolution: "synckit@npm:0.11.3" + dependencies: + "@pkgr/core": "npm:^0.2.1" + tslib: "npm:^2.8.1" + checksum: 10/041ebcf2a36e2e121f5d52c2d48a3125a6ed0f9185501d42ff802060563d0a7555be77f466b1d706f4b85054a329d1acd13ccbc37a63825aa022e68a9551535d + languageName: node + linkType: hard + "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.2.1 resolution: "tar@npm:6.2.1" @@ -7641,6 +7769,16 @@ __metadata: languageName: node linkType: hard +"tinyglobby@npm:^0.2.9": + version: 0.2.12 + resolution: "tinyglobby@npm:0.2.12" + dependencies: + fdir: "npm:^6.4.3" + picomatch: "npm:^4.0.2" + checksum: 10/4ad28701fa9118b32ef0e27f409e0a6c5741e8b02286d50425c1f6f71e6d6c6ded9dd5bbbbb714784b08623c4ec4d150151f1d3d996cfabe0495f908ab4f7002 + languageName: node + linkType: hard + "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -7780,6 +7918,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:^2.6.2, tslib@npm:^2.8.1": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10/3e2e043d5c2316461cb54e5c7fe02c30ef6dccb3384717ca22ae5c6b5bc95232a6241df19c622d9c73b809bea33b187f6dbc73030963e29950c2141bc32a79f7 + languageName: node + linkType: hard + "tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0" @@ -8195,7 +8340,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.3.1": +"yargs@npm:^17.0.1, yargs@npm:^17.3.1": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: