Fix: Bumping prerelease count changes from chronus (#2918)
This commit is contained in:
Родитель
4879eea2e3
Коммит
69e93a8310
|
@ -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
|
||||
dependsOn: npm_stable
|
||||
displayName: Npm publish dev version
|
||||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') # Only publish -dev on main branch.
|
||||
pool:
|
||||
name: azsdk-pool-mms-win-2022-general
|
||||
vmImage: windows-2022
|
||||
|
|
|
@ -63,7 +63,7 @@ jobs:
|
|||
steps:
|
||||
- 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
|
||||
env:
|
||||
GITHUB_TOKEN: $(azuresdk-github-pat)
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
"watch": "tsc --build ./tsconfig.ws.json --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.27.1",
|
||||
"@chronus/chronus": "^0.6.0",
|
||||
"@chronus/chronus": "^0.7.0",
|
||||
"@pnpm/find-workspace-packages": "^6.0.9",
|
||||
"c8": "^9.1.0",
|
||||
"cspell": "^8.3.2",
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
"!dist/test/**"
|
||||
],
|
||||
"dependencies": {
|
||||
"@changesets/read": "^0.6.0",
|
||||
"@pnpm/find-workspace-packages": "^6.0.9",
|
||||
"cspell": "^8.3.2",
|
||||
"semver": "^7.6.0",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* 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 { readFile, writeFile } from "fs/promises";
|
||||
import { join } from "path";
|
||||
|
@ -36,16 +37,17 @@ interface BumpManifest {
|
|||
* @returns map of package to number of changes.
|
||||
*/
|
||||
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> = {};
|
||||
|
||||
for (const changeset of changesets) {
|
||||
for (const change of changeset.releases) {
|
||||
if (!(change.name in changeCounts)) {
|
||||
for (const pkgName of changeset.packages) {
|
||||
if (!(pkgName in changeCounts)) {
|
||||
// Count all changes that are not "none"
|
||||
changeCounts[change.name] = 0;
|
||||
changeCounts[pkgName] = 0;
|
||||
}
|
||||
changeCounts[change.name] += 1;
|
||||
changeCounts[pkgName] += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче