Fix: Bumping prerelease count changes from chronus (#2918)

This commit is contained in:
Timothee Guerin 2024-02-14 15:40:39 -08:00 коммит произвёл GitHub
Родитель 4879eea2e3
Коммит 69e93a8310
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
8 изменённых файлов: 72 добавлений и 974 удалений

Просмотреть файл

@ -1,3 +0,0 @@
---
"@typespec/compiler": none
---

Просмотреть файл

@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: internal
packages:
- "@typespec/internal-build-utils"
---
Fix: Bumping prerelease count changes from chronus

Просмотреть файл

@ -91,6 +91,7 @@ jobs:
- job: npm_dev - job: npm_dev
dependsOn: npm_stable dependsOn: npm_stable
displayName: Npm publish dev version displayName: Npm publish dev version
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') # Only publish -dev on main branch.
pool: pool:
name: azsdk-pool-mms-win-2022-general name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022 vmImage: windows-2022

Просмотреть файл

@ -63,7 +63,7 @@ jobs:
steps: steps:
- checkout: self - checkout: self
- script: npx -p @chronus/github-pr-commenter@0.2.0 chronus-github-pr-commenter verify - script: npx -p @chronus/github-pr-commenter@0.3.0 chronus-github-pr-commenter verify
displayName: Make comment about changes displayName: Make comment about changes
env: env:
GITHUB_TOKEN: $(azuresdk-github-pat) GITHUB_TOKEN: $(azuresdk-github-pat)

Просмотреть файл

@ -29,8 +29,7 @@
"watch": "tsc --build ./tsconfig.ws.json --watch" "watch": "tsc --build ./tsconfig.ws.json --watch"
}, },
"devDependencies": { "devDependencies": {
"@changesets/cli": "^2.27.1", "@chronus/chronus": "^0.7.0",
"@chronus/chronus": "^0.6.0",
"@pnpm/find-workspace-packages": "^6.0.9", "@pnpm/find-workspace-packages": "^6.0.9",
"c8": "^9.1.0", "c8": "^9.1.0",
"cspell": "^8.3.2", "cspell": "^8.3.2",

Просмотреть файл

@ -40,7 +40,6 @@
"!dist/test/**" "!dist/test/**"
], ],
"dependencies": { "dependencies": {
"@changesets/read": "^0.6.0",
"@pnpm/find-workspace-packages": "^6.0.9", "@pnpm/find-workspace-packages": "^6.0.9",
"cspell": "^8.3.2", "cspell": "^8.3.2",
"semver": "^7.6.0", "semver": "^7.6.0",

Просмотреть файл

@ -1,5 +1,6 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
import getAllChanges from "@changesets/read"; import { NodeChronusHost, loadChronusWorkspace } from "@chronus/chronus";
import { readChangeDescriptions } from "@chronus/chronus/change";
import { findWorkspacePackagesNoCheck } from "@pnpm/find-workspace-packages"; import { findWorkspacePackagesNoCheck } from "@pnpm/find-workspace-packages";
import { readFile, writeFile } from "fs/promises"; import { readFile, writeFile } from "fs/promises";
import { join } from "path"; import { join } from "path";
@ -36,16 +37,17 @@ interface BumpManifest {
* @returns map of package to number of changes. * @returns map of package to number of changes.
*/ */
async function getChangeCountPerPackage(workspaceRoot: string) { async function getChangeCountPerPackage(workspaceRoot: string) {
const changesets = await getAllChanges(workspaceRoot); const ws = await loadChronusWorkspace(NodeChronusHost, workspaceRoot);
const changesets = await readChangeDescriptions(NodeChronusHost, ws);
const changeCounts: Record<string, number> = {}; const changeCounts: Record<string, number> = {};
for (const changeset of changesets) { for (const changeset of changesets) {
for (const change of changeset.releases) { for (const pkgName of changeset.packages) {
if (!(change.name in changeCounts)) { if (!(pkgName in changeCounts)) {
// Count all changes that are not "none" // Count all changes that are not "none"
changeCounts[change.name] = 0; changeCounts[pkgName] = 0;
} }
changeCounts[change.name] += 1; changeCounts[pkgName] += 1;
} }
} }

1014
pnpm-lock.yaml сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу