beachball 2.60.0 → 2.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/bump/bumpInMemory.d.ts +9 -0
- package/lib/bump/bumpInMemory.d.ts.map +1 -0
- package/lib/bump/bumpInMemory.js +32 -0
- package/lib/bump/bumpInMemory.js.map +1 -0
- package/lib/bump/bumpInPlace.d.ts.map +1 -1
- package/lib/bump/bumpInPlace.js +11 -9
- package/lib/bump/bumpInPlace.js.map +1 -1
- package/lib/bump/bumpMinSemverRange.d.ts +7 -1
- package/lib/bump/bumpMinSemverRange.d.ts.map +1 -1
- package/lib/bump/bumpMinSemverRange.js +32 -17
- package/lib/bump/bumpMinSemverRange.js.map +1 -1
- package/lib/bump/gatherBumpInfo.d.ts +2 -2
- package/lib/bump/gatherBumpInfo.d.ts.map +1 -1
- package/lib/bump/gatherBumpInfo.js +4 -21
- package/lib/bump/gatherBumpInfo.js.map +1 -1
- package/lib/bump/setDependentVersions.d.ts +7 -2
- package/lib/bump/setDependentVersions.d.ts.map +1 -1
- package/lib/bump/setDependentVersions.js +17 -5
- package/lib/bump/setDependentVersions.js.map +1 -1
- package/lib/bump/updateLockFile.js +4 -4
- package/lib/bump/updateLockFile.js.map +1 -1
- package/lib/bump/updatePackageJsons.d.ts +1 -1
- package/lib/bump/updatePackageJsons.d.ts.map +1 -1
- package/lib/bump/updatePackageJsons.js +7 -4
- package/lib/bump/updatePackageJsons.js.map +1 -1
- package/lib/bump/updateRelatedChangeType.d.ts +3 -3
- package/lib/bump/updateRelatedChangeType.d.ts.map +1 -1
- package/lib/bump/updateRelatedChangeType.js +19 -17
- package/lib/bump/updateRelatedChangeType.js.map +1 -1
- package/lib/changefile/getChangedPackages.d.ts +4 -1
- package/lib/changefile/getChangedPackages.d.ts.map +1 -1
- package/lib/changefile/getChangedPackages.js +17 -9
- package/lib/changefile/getChangedPackages.js.map +1 -1
- package/lib/changefile/readChangeFiles.d.ts +1 -0
- package/lib/changefile/readChangeFiles.d.ts.map +1 -1
- package/lib/changefile/readChangeFiles.js +8 -6
- package/lib/changefile/readChangeFiles.js.map +1 -1
- package/lib/changefile/unlinkChangeFiles.js +4 -4
- package/lib/changefile/unlinkChangeFiles.js.map +1 -1
- package/lib/changefile/writeChangeFiles.d.ts.map +1 -1
- package/lib/changefile/writeChangeFiles.js +6 -5
- package/lib/changefile/writeChangeFiles.js.map +1 -1
- package/lib/changelog/writeChangelog.d.ts.map +1 -1
- package/lib/changelog/writeChangelog.js +9 -8
- package/lib/changelog/writeChangelog.js.map +1 -1
- package/lib/cli.js +20 -8
- package/lib/cli.js.map +1 -1
- package/lib/commands/bump.d.ts +3 -1
- package/lib/commands/bump.d.ts.map +1 -1
- package/lib/commands/bump.js +4 -3
- package/lib/commands/bump.js.map +1 -1
- package/lib/commands/canary.d.ts +7 -1
- package/lib/commands/canary.d.ts.map +1 -1
- package/lib/commands/canary.js +5 -3
- package/lib/commands/canary.js.map +1 -1
- package/lib/commands/change.js +1 -0
- package/lib/commands/change.js.map +1 -1
- package/lib/commands/init.d.ts.map +1 -1
- package/lib/commands/init.js +5 -10
- package/lib/commands/init.js.map +1 -1
- package/lib/commands/publish.d.ts +4 -1
- package/lib/commands/publish.d.ts.map +1 -1
- package/lib/commands/publish.js +8 -5
- package/lib/commands/publish.js.map +1 -1
- package/lib/commands/sync.js +6 -4
- package/lib/commands/sync.js.map +1 -1
- package/lib/env.js +1 -1
- package/lib/env.js.map +1 -1
- package/lib/help.d.ts.map +1 -1
- package/lib/help.js +6 -1
- package/lib/help.js.map +1 -1
- package/lib/logging/indent.d.ts.map +1 -1
- package/lib/logging/indent.js.map +1 -1
- package/lib/monorepo/getPackageGroups.d.ts.map +1 -1
- package/lib/monorepo/getPackageGroups.js +1 -0
- package/lib/monorepo/getPackageGroups.js.map +1 -1
- package/lib/monorepo/getPackageInfos.d.ts.map +1 -1
- package/lib/monorepo/getPackageInfos.js +4 -3
- package/lib/monorepo/getPackageInfos.js.map +1 -1
- package/lib/monorepo/getScopedPackages.d.ts +5 -2
- package/lib/monorepo/getScopedPackages.d.ts.map +1 -1
- package/lib/monorepo/getScopedPackages.js +8 -2
- package/lib/monorepo/getScopedPackages.js.map +1 -1
- package/lib/object/cloneObject.js +4 -0
- package/lib/object/cloneObject.js.map +1 -1
- package/lib/object/readJson.d.ts +5 -0
- package/lib/object/readJson.d.ts.map +1 -0
- package/lib/object/readJson.js +21 -0
- package/lib/object/readJson.js.map +1 -0
- package/lib/object/writeJson.d.ts +2 -0
- package/lib/object/writeJson.d.ts.map +1 -0
- package/lib/object/writeJson.js +13 -0
- package/lib/object/writeJson.js.map +1 -0
- package/lib/options/getCliOptions.d.ts.map +1 -1
- package/lib/options/getCliOptions.js +7 -2
- package/lib/options/getCliOptions.js.map +1 -1
- package/lib/options/getOptions.d.ts.map +1 -1
- package/lib/options/getOptions.js +1 -0
- package/lib/options/getOptions.js.map +1 -1
- package/lib/options/getPackageInfosWithOptions.d.ts.map +1 -1
- package/lib/options/getPackageInfosWithOptions.js +2 -0
- package/lib/options/getPackageInfosWithOptions.js.map +1 -1
- package/lib/options/getRepoOptions.d.ts.map +1 -1
- package/lib/options/getRepoOptions.js +2 -0
- package/lib/options/getRepoOptions.js.map +1 -1
- package/lib/packageManager/getNpmPackageInfo.d.ts +42 -0
- package/lib/packageManager/getNpmPackageInfo.d.ts.map +1 -0
- package/lib/packageManager/getNpmPackageInfo.js +46 -0
- package/lib/packageManager/getNpmPackageInfo.js.map +1 -0
- package/lib/packageManager/listPackageVersions.d.ts +8 -15
- package/lib/packageManager/listPackageVersions.d.ts.map +1 -1
- package/lib/packageManager/listPackageVersions.js +13 -39
- package/lib/packageManager/listPackageVersions.js.map +1 -1
- package/lib/packageManager/npmArgs.d.ts +10 -2
- package/lib/packageManager/npmArgs.d.ts.map +1 -1
- package/lib/packageManager/npmArgs.js +10 -5
- package/lib/packageManager/npmArgs.js.map +1 -1
- package/lib/packageManager/packPackage.d.ts.map +1 -1
- package/lib/packageManager/packPackage.js +12 -7
- package/lib/packageManager/packPackage.js.map +1 -1
- package/lib/packageManager/packagePublish.d.ts.map +1 -1
- package/lib/packageManager/packagePublish.js +1 -0
- package/lib/packageManager/packagePublish.js.map +1 -1
- package/lib/publish/bumpAndPush.d.ts +3 -1
- package/lib/publish/bumpAndPush.d.ts.map +1 -1
- package/lib/publish/bumpAndPush.js +9 -5
- package/lib/publish/bumpAndPush.js.map +1 -1
- package/lib/publish/displayManualRecovery.js +2 -2
- package/lib/publish/displayManualRecovery.js.map +1 -1
- package/lib/publish/performPublishOverrides.d.ts.map +1 -1
- package/lib/publish/performPublishOverrides.js +5 -26
- package/lib/publish/performPublishOverrides.js.map +1 -1
- package/lib/publish/publishToRegistry.d.ts.map +1 -1
- package/lib/publish/publishToRegistry.js +2 -0
- package/lib/publish/publishToRegistry.js.map +1 -1
- package/lib/types/BeachballOptions.d.ts +14 -9
- package/lib/types/BeachballOptions.d.ts.map +1 -1
- package/lib/types/BumpInfo.d.ts +13 -5
- package/lib/types/BumpInfo.d.ts.map +1 -1
- package/lib/types/ChangeInfo.d.ts.map +1 -1
- package/lib/types/ChangeLog.d.ts.map +1 -1
- package/lib/types/DeepReadonly.d.ts.map +1 -1
- package/lib/types/PackageInfo.d.ts +11 -4
- package/lib/types/PackageInfo.d.ts.map +1 -1
- package/lib/validation/validate.d.ts +5 -1
- package/lib/validation/validate.d.ts.map +1 -1
- package/lib/validation/validate.js +33 -16
- package/lib/validation/validate.js.map +1 -1
- package/package.json +14 -4
- package/lib/validation/isChangeFileNeeded.d.ts +0 -4
- package/lib/validation/isChangeFileNeeded.d.ts.map +0 -1
- package/lib/validation/isChangeFileNeeded.js +0 -19
- package/lib/validation/isChangeFileNeeded.js.map +0 -1
- package/lib/validation/isGitAvailable.d.ts +0 -2
- package/lib/validation/isGitAvailable.d.ts.map +0 -1
- package/lib/validation/isGitAvailable.js +0 -15
- package/lib/validation/isGitAvailable.js.map +0 -1
package/README.md
CHANGED
|
@@ -93,7 +93,7 @@ $ beachball publish -r http://localhost:4873 -t beta
|
|
|
93
93
|
|
|
94
94
|
### Overriding concurrency
|
|
95
95
|
|
|
96
|
-
In large monorepos, the process of fetching versions for sync or before publishing can be time-consuming due to the high number of packages. To optimize performance, you can override the concurrency for
|
|
96
|
+
In large monorepos, the process of fetching versions for sync or before publishing can be time-consuming due to the high number of packages. To optimize performance, you can override the concurrency for fetching from the registry by setting `options.npmReadConcurrency` (default: 10). You can also increase concurrency for hook calls and publish operations via `options.concurrency` (default: 1; respects topological order).
|
|
97
97
|
|
|
98
98
|
### API surface
|
|
99
99
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BumpInfo } from '../types/BumpInfo';
|
|
2
|
+
import type { BeachballOptions } from '../types/BeachballOptions';
|
|
3
|
+
import type { PackageInfos } from '../types/PackageInfo';
|
|
4
|
+
/**
|
|
5
|
+
* Gather bump info and bump versions in memory.
|
|
6
|
+
* Does NOT mutate the given `originalPackageInfos`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function bumpInMemory(options: BeachballOptions, originalPackageInfos: PackageInfos): BumpInfo;
|
|
9
|
+
//# sourceMappingURL=bumpInMemory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bumpInMemory.d.ts","sourceRoot":"","sources":["../../src/bump/bumpInMemory.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIzD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,YAAY,GAAG,QAAQ,CAoBpG"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bumpInMemory = void 0;
|
|
4
|
+
const changeTypes_1 = require("../changefile/changeTypes");
|
|
5
|
+
const readChangeFiles_1 = require("../changefile/readChangeFiles");
|
|
6
|
+
const bumpInPlace_1 = require("./bumpInPlace");
|
|
7
|
+
const getScopedPackages_1 = require("../monorepo/getScopedPackages");
|
|
8
|
+
const getPackageGroups_1 = require("../monorepo/getPackageGroups");
|
|
9
|
+
const cloneObject_1 = require("../object/cloneObject");
|
|
10
|
+
/**
|
|
11
|
+
* Gather bump info and bump versions in memory.
|
|
12
|
+
* Does NOT mutate the given `originalPackageInfos`.
|
|
13
|
+
*/
|
|
14
|
+
function bumpInMemory(options, originalPackageInfos) {
|
|
15
|
+
const packageInfos = (0, cloneObject_1.cloneObject)(originalPackageInfos);
|
|
16
|
+
const changes = (0, readChangeFiles_1.readChangeFiles)(options, packageInfos);
|
|
17
|
+
// Determine base change types for each package (not considering disallowedChangeTypes or groups)
|
|
18
|
+
const calculatedChangeTypes = (0, changeTypes_1.initializePackageChangeTypes)(changes);
|
|
19
|
+
const bumpInfo = {
|
|
20
|
+
calculatedChangeTypes,
|
|
21
|
+
packageInfos,
|
|
22
|
+
packageGroups: (0, getPackageGroups_1.getPackageGroups)(packageInfos, options.path, options.groups),
|
|
23
|
+
changeFileChangeInfos: changes,
|
|
24
|
+
modifiedPackages: new Set(),
|
|
25
|
+
scopedPackages: new Set((0, getScopedPackages_1.getScopedPackages)(options, packageInfos)),
|
|
26
|
+
dependentChangedBy: {},
|
|
27
|
+
};
|
|
28
|
+
(0, bumpInPlace_1.bumpInPlace)(bumpInfo, options);
|
|
29
|
+
return bumpInfo;
|
|
30
|
+
}
|
|
31
|
+
exports.bumpInMemory = bumpInMemory;
|
|
32
|
+
//# sourceMappingURL=bumpInMemory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bumpInMemory.js","sourceRoot":"","sources":["../../src/bump/bumpInMemory.ts"],"names":[],"mappings":";;;AAAA,2DAAyE;AACzE,mEAAgE;AAEhE,+CAA4C;AAE5C,qEAAkE;AAElE,mEAAgE;AAChE,uDAAoD;AAEpD;;;GAGG;AACH,SAAgB,YAAY,CAAC,OAAyB,EAAE,oBAAkC;IACxF,MAAM,YAAY,GAAG,IAAA,yBAAW,EAAC,oBAAoB,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,IAAA,iCAAe,EAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAEvD,iGAAiG;IACjG,MAAM,qBAAqB,GAAG,IAAA,0CAA4B,EAAC,OAAO,CAAC,CAAC;IAEpE,MAAM,QAAQ,GAAa;QACzB,qBAAqB;QACrB,YAAY;QACZ,aAAa,EAAE,IAAA,mCAAgB,EAAC,YAAY,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;QAC3E,qBAAqB,EAAE,OAAO;QAC9B,gBAAgB,EAAE,IAAI,GAAG,EAAU;QACnC,cAAc,EAAE,IAAI,GAAG,CAAC,IAAA,qCAAiB,EAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACjE,kBAAkB,EAAE,EAAE;KACvB,CAAC;IAEF,IAAA,yBAAW,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAE/B,OAAO,QAAQ,CAAC;AAClB,CAAC;AApBD,oCAoBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bumpInPlace.d.ts","sourceRoot":"","sources":["../../src/bump/bumpInPlace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAKlE;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"bumpInPlace.d.ts","sourceRoot":"","sources":["../../src/bump/bumpInPlace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAKlE;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CA6C/E"}
|
package/lib/bump/bumpInPlace.js
CHANGED
|
@@ -13,9 +13,9 @@ const changeTypes_1 = require("../changefile/changeTypes");
|
|
|
13
13
|
*/
|
|
14
14
|
function bumpInPlace(bumpInfo, options) {
|
|
15
15
|
const { bumpDeps } = options;
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
const
|
|
16
|
+
// Precondition (pass 1): calculatedChangeTypes includes ONLY changes direct from the change files
|
|
17
|
+
// (no dependents or groups)
|
|
18
|
+
const { calculatedChangeTypes, changeFileChangeInfos } = bumpInfo;
|
|
19
19
|
// TODO: when we do "locked", or "lock step" versioning, we could simply skip setting grouped change types
|
|
20
20
|
// - set the version for all packages in the group in (bumpPackageInfoVersion())
|
|
21
21
|
// - the main concern is how to capture the bump reason in grouped changelog
|
|
@@ -37,17 +37,19 @@ function bumpInPlace(bumpInfo, options) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
// Calculate change types for
|
|
40
|
+
// Pass 3: Calculate change types for dependents and groups.
|
|
41
|
+
// TODO: fix weird behavior - https://github.com/microsoft/beachball/issues/620
|
|
42
|
+
const dependents = bumpDeps ? (0, getDependentsForPackages_1.getDependentsForPackages)(bumpInfo) : undefined;
|
|
41
43
|
for (const { change } of changeFileChangeInfos) {
|
|
42
|
-
(0, updateRelatedChangeType_1.updateRelatedChangeType)({ change, bumpInfo, dependents
|
|
44
|
+
(0, updateRelatedChangeType_1.updateRelatedChangeType)({ change, bumpInfo, dependents });
|
|
43
45
|
}
|
|
44
46
|
// pass 3: actually bump the packages in the bumpInfo in memory (no disk writes at this point)
|
|
45
|
-
Object.keys(calculatedChangeTypes)
|
|
47
|
+
for (const pkgName of Object.keys(calculatedChangeTypes)) {
|
|
46
48
|
(0, bumpPackageInfoVersion_1.bumpPackageInfoVersion)(pkgName, bumpInfo, options);
|
|
47
|
-
}
|
|
48
|
-
// step 4: Bump all the
|
|
49
|
+
}
|
|
50
|
+
// step 4: Bump all the dependency version ranges and collect dependentChangedBy for the changelog
|
|
51
|
+
// (also add any modifiedPackages not previously detected--this should only happen if bumpDeps was false)
|
|
49
52
|
bumpInfo.dependentChangedBy = (0, setDependentVersions_1.setDependentVersions)(bumpInfo, options);
|
|
50
|
-
Object.keys(bumpInfo.dependentChangedBy).forEach(pkg => modifiedPackages.add(pkg));
|
|
51
53
|
}
|
|
52
54
|
exports.bumpInPlace = bumpInPlace;
|
|
53
55
|
//# sourceMappingURL=bumpInPlace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bumpInPlace.js","sourceRoot":"","sources":["../../src/bump/bumpInPlace.ts"],"names":[],"mappings":";;;AACA,yEAAsE;AACtE,uEAAoE;AACpE,qEAAkE;AAElE,iEAA8D;AAC9D,2DAA6D;AAG7D;;;;GAIG;AACH,SAAgB,WAAW,CAAC,QAAkB,EAAE,OAAyB;IACvE,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAC7B,MAAM,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"bumpInPlace.js","sourceRoot":"","sources":["../../src/bump/bumpInPlace.ts"],"names":[],"mappings":";;;AACA,yEAAsE;AACtE,uEAAoE;AACpE,qEAAkE;AAElE,iEAA8D;AAC9D,2DAA6D;AAG7D;;;;GAIG;AACH,SAAgB,WAAW,CAAC,QAAkB,EAAE,OAAyB;IACvE,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAC7B,kGAAkG;IAClG,4BAA4B;IAC5B,MAAM,EAAE,qBAAqB,EAAE,qBAA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BAAkB,GAAG,IAAA,2CAAoB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACxE,CAAC;AA7CD,kCA6CC"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Bump the semver range for a dependency to match the new version of a package.
|
|
3
|
+
* @param newVersion The new version of the package
|
|
4
|
+
* @param currentRange Current version range for the dependency.
|
|
5
|
+
* @returns New semver range for the dependency
|
|
6
|
+
*/
|
|
7
|
+
export declare function bumpMinSemverRange(newVersion: string, currentRange: string): string;
|
|
2
8
|
//# sourceMappingURL=bumpMinSemverRange.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bumpMinSemverRange.d.ts","sourceRoot":"","sources":["../../src/bump/bumpMinSemverRange.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"bumpMinSemverRange.d.ts","sourceRoot":"","sources":["../../src/bump/bumpMinSemverRange.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CA8CnF"}
|
|
@@ -6,37 +6,52 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.bumpMinSemverRange = void 0;
|
|
7
7
|
const semver_1 = __importDefault(require("semver"));
|
|
8
8
|
const getWorkspaceRange_1 = require("../packageManager/getWorkspaceRange");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Bump the semver range for a dependency to match the new version of a package.
|
|
11
|
+
* @param newVersion The new version of the package
|
|
12
|
+
* @param currentRange Current version range for the dependency.
|
|
13
|
+
* @returns New semver range for the dependency
|
|
14
|
+
*/
|
|
15
|
+
function bumpMinSemverRange(newVersion, currentRange) {
|
|
16
|
+
if (currentRange === '*' || currentRange.startsWith('file:') || currentRange.startsWith('catalog:')) {
|
|
17
|
+
return currentRange;
|
|
12
18
|
}
|
|
13
|
-
|
|
19
|
+
if (currentRange[0] === '~' || currentRange[0] === '^') {
|
|
20
|
+
// ~1.0.0
|
|
21
|
+
// ^1.0.0
|
|
22
|
+
return currentRange[0] + newVersion;
|
|
23
|
+
}
|
|
24
|
+
const workspaceRange = (0, getWorkspaceRange_1.getWorkspaceRange)(currentRange);
|
|
14
25
|
if (workspaceRange === '*' || workspaceRange === '~' || workspaceRange === '^') {
|
|
15
26
|
// For basic workspace ranges we can just preserve current value and replace during publish
|
|
16
27
|
// https://pnpm.io/workspaces#workspace-protocol-workspace
|
|
17
|
-
return
|
|
18
|
-
}
|
|
19
|
-
if (semverRange[0] === '~' || semverRange[0] === '^') {
|
|
20
|
-
// ~1.0.0
|
|
21
|
-
// ^1.0.0
|
|
22
|
-
return semverRange[0] + minVersion;
|
|
28
|
+
return currentRange;
|
|
23
29
|
}
|
|
24
30
|
if (workspaceRange && (workspaceRange[0] === '~' || workspaceRange[0] === '^')) {
|
|
25
31
|
// workspace:~1.0.0
|
|
26
32
|
// workspace:^1.0.0
|
|
27
|
-
return `workspace:${workspaceRange[0]}${
|
|
33
|
+
return `workspace:${workspaceRange[0]}${newVersion}`;
|
|
28
34
|
}
|
|
29
|
-
if (
|
|
30
|
-
// Less frequently used, but
|
|
35
|
+
if (currentRange.includes('>')) {
|
|
36
|
+
// Less frequently used, but use the new version as a minimum for this kind of range.
|
|
31
37
|
// more complex understanding of the semver range utility is needed to do more
|
|
32
38
|
// >=1.0.0 <2.0.0
|
|
33
|
-
return `>=${
|
|
39
|
+
return `>=${newVersion} <${semver_1.default.inc(newVersion, 'major')}`;
|
|
34
40
|
}
|
|
35
|
-
if (
|
|
41
|
+
if (currentRange.includes(' - ')) {
|
|
36
42
|
// 1.0.0 - 2.0.0
|
|
37
|
-
return `${
|
|
43
|
+
return `${newVersion} - ${semver_1.default.inc(newVersion, 'major')}`;
|
|
44
|
+
}
|
|
45
|
+
if (semver_1.default.valid(currentRange)) {
|
|
46
|
+
// Exact version match, e.g. 1.0.0
|
|
47
|
+
return newVersion;
|
|
48
|
+
}
|
|
49
|
+
// For unrecognized valid semver ranges: if the new version satisfies the current range, keep it
|
|
50
|
+
if (semver_1.default.validRange(currentRange) && semver_1.default.satisfies(newVersion, currentRange)) {
|
|
51
|
+
return currentRange;
|
|
38
52
|
}
|
|
39
|
-
return
|
|
53
|
+
// Fallback: return the exact new version
|
|
54
|
+
return newVersion;
|
|
40
55
|
}
|
|
41
56
|
exports.bumpMinSemverRange = bumpMinSemverRange;
|
|
42
57
|
//# sourceMappingURL=bumpMinSemverRange.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bumpMinSemverRange.js","sourceRoot":"","sources":["../../src/bump/bumpMinSemverRange.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,2EAAwE;AAExE,SAAgB,kBAAkB,CAAC,UAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"bumpMinSemverRange.js","sourceRoot":"","sources":["../../src/bump/bumpMinSemverRange.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,2EAAwE;AAExE;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,UAAkB,EAAE,YAAoB;IACzE,IAAI,YAAY,KAAK,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QACnG,OAAO,YAAY,CAAC;KACrB;IAED,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QACtD,SAAS;QACT,SAAS;QACT,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;KACrC;IAED,MAAM,cAAc,GAAG,IAAA,qCAAiB,EAAC,YAAY,CAAC,CAAC;IACvD,IAAI,cAAc,KAAK,GAAG,IAAI,cAAc,KAAK,GAAG,IAAI,cAAc,KAAK,GAAG,EAAE;QAC9E,2FAA2F;QAC3F,0DAA0D;QAC1D,OAAO,YAAY,CAAC;KACrB;IACD,IAAI,cAAc,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,EAAE;QAC9E,mBAAmB;QACnB,mBAAmB;QACnB,OAAO,aAAa,cAAc,CAAC,CAAC,CAAC,GAAG,UAAU,EAAE,CAAC;KACtD;IAED,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC9B,qFAAqF;QACrF,8EAA8E;QAC9E,iBAAiB;QACjB,OAAO,KAAK,UAAU,KAAK,gBAAM,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC;KAC9D;IACD,IAAI,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAChC,gBAAgB;QAChB,OAAO,GAAG,UAAU,MAAM,gBAAM,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC;KAC7D;IAED,IAAI,gBAAM,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE;QAC9B,kCAAkC;QAClC,OAAO,UAAU,CAAC;KACnB;IAED,gGAAgG;IAChG,IAAI,gBAAM,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,gBAAM,CAAC,SAAS,CAAC,UAAU,EAAE,YAAY,CAAC,EAAE;QACjF,OAAO,YAAY,CAAC;KACrB;IAED,yCAAyC;IACzC,OAAO,UAAU,CAAC;AACpB,CAAC;AA9CD,gDA8CC"}
|
|
@@ -2,7 +2,7 @@ import type { BumpInfo } from '../types/BumpInfo';
|
|
|
2
2
|
import type { BeachballOptions } from '../types/BeachballOptions';
|
|
3
3
|
import type { PackageInfos } from '../types/PackageInfo';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* @deprecated Use `bumpInMemory` instead.
|
|
6
6
|
*/
|
|
7
|
-
export declare function gatherBumpInfo(options: BeachballOptions,
|
|
7
|
+
export declare function gatherBumpInfo(options: BeachballOptions, originalPackageInfos: PackageInfos): BumpInfo;
|
|
8
8
|
//# sourceMappingURL=gatherBumpInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gatherBumpInfo.d.ts","sourceRoot":"","sources":["../../src/bump/gatherBumpInfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gatherBumpInfo.d.ts","sourceRoot":"","sources":["../../src/bump/gatherBumpInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,YAAY,GAAG,QAAQ,CAEtG"}
|
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.gatherBumpInfo = void 0;
|
|
4
|
-
const
|
|
5
|
-
const readChangeFiles_1 = require("../changefile/readChangeFiles");
|
|
6
|
-
const bumpInPlace_1 = require("./bumpInPlace");
|
|
7
|
-
const getScopedPackages_1 = require("../monorepo/getScopedPackages");
|
|
8
|
-
const getPackageGroups_1 = require("../monorepo/getPackageGroups");
|
|
4
|
+
const bumpInMemory_1 = require("./bumpInMemory");
|
|
9
5
|
/**
|
|
10
|
-
*
|
|
6
|
+
* @deprecated Use `bumpInMemory` instead.
|
|
11
7
|
*/
|
|
12
|
-
function gatherBumpInfo(options,
|
|
13
|
-
|
|
14
|
-
// Determine base change types for each package (not considering disallowedChangeTypes or groups)
|
|
15
|
-
const calculatedChangeTypes = (0, changeTypes_1.initializePackageChangeTypes)(changes);
|
|
16
|
-
const bumpInfo = {
|
|
17
|
-
calculatedChangeTypes,
|
|
18
|
-
packageInfos,
|
|
19
|
-
packageGroups: (0, getPackageGroups_1.getPackageGroups)(packageInfos, options.path, options.groups),
|
|
20
|
-
changeFileChangeInfos: changes,
|
|
21
|
-
modifiedPackages: new Set(),
|
|
22
|
-
scopedPackages: new Set((0, getScopedPackages_1.getScopedPackages)(options, packageInfos)),
|
|
23
|
-
dependentChangedBy: {},
|
|
24
|
-
};
|
|
25
|
-
(0, bumpInPlace_1.bumpInPlace)(bumpInfo, options);
|
|
26
|
-
return bumpInfo;
|
|
8
|
+
function gatherBumpInfo(options, originalPackageInfos) {
|
|
9
|
+
return (0, bumpInMemory_1.bumpInMemory)(options, originalPackageInfos);
|
|
27
10
|
}
|
|
28
11
|
exports.gatherBumpInfo = gatherBumpInfo;
|
|
29
12
|
//# sourceMappingURL=gatherBumpInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gatherBumpInfo.js","sourceRoot":"","sources":["../../src/bump/gatherBumpInfo.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"gatherBumpInfo.js","sourceRoot":"","sources":["../../src/bump/gatherBumpInfo.ts"],"names":[],"mappings":";;;AAGA,iDAA8C;AAE9C;;GAEG;AACH,SAAgB,cAAc,CAAC,OAAyB,EAAE,oBAAkC;IAC1F,OAAO,IAAA,2BAAY,EAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;AACrD,CAAC;AAFD,wCAEC"}
|
|
@@ -2,8 +2,13 @@ import type { BeachballOptions } from '../types/BeachballOptions';
|
|
|
2
2
|
import type { BumpInfo } from '../types/BumpInfo';
|
|
3
3
|
/**
|
|
4
4
|
* Go through the deps of each package and bump the version range for in-repo deps if needed.
|
|
5
|
+
* Prior to calling this, it's expected that:
|
|
6
|
+
* - package versions in `bumpInfo.packageInfos` have been bumped per change files and dependentChangeTypes
|
|
7
|
+
* - `bumpInfo.modifiedPackages` contains all packages whose version has been bumped
|
|
5
8
|
*
|
|
6
|
-
* **This mutates
|
|
9
|
+
* **This mutates dependency versions in `packageInfos`** and might add to `bumpInfo.modifiedPackages`.
|
|
10
|
+
* Probably the only case where it will change `modifiedPackages` is if `BeachballOptions.bumpDeps` is false
|
|
11
|
+
* (or if this is being called by `sync` which didn't previously bump dependents).
|
|
7
12
|
*/
|
|
8
|
-
export declare function setDependentVersions(bumpInfo: Pick<BumpInfo, 'packageInfos' | 'scopedPackages'>, options: Pick<BeachballOptions, 'verbose'>): BumpInfo['dependentChangedBy'];
|
|
13
|
+
export declare function setDependentVersions(bumpInfo: Pick<BumpInfo, 'packageInfos' | 'scopedPackages' | 'modifiedPackages'>, options: Pick<BeachballOptions, 'verbose'>): BumpInfo['dependentChangedBy'];
|
|
9
14
|
//# sourceMappingURL=setDependentVersions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDependentVersions.d.ts","sourceRoot":"","sources":["../../src/bump/setDependentVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD
|
|
1
|
+
{"version":3,"file":"setDependentVersions.d.ts","sourceRoot":"","sources":["../../src/bump/setDependentVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,gBAAgB,GAAG,kBAAkB,CAAC,EAChF,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GACzC,QAAQ,CAAC,oBAAoB,CAAC,CA+ChC"}
|
|
@@ -5,23 +5,31 @@ const PackageInfo_1 = require("../types/PackageInfo");
|
|
|
5
5
|
const bumpMinSemverRange_1 = require("./bumpMinSemverRange");
|
|
6
6
|
/**
|
|
7
7
|
* Go through the deps of each package and bump the version range for in-repo deps if needed.
|
|
8
|
+
* Prior to calling this, it's expected that:
|
|
9
|
+
* - package versions in `bumpInfo.packageInfos` have been bumped per change files and dependentChangeTypes
|
|
10
|
+
* - `bumpInfo.modifiedPackages` contains all packages whose version has been bumped
|
|
8
11
|
*
|
|
9
|
-
* **This mutates
|
|
12
|
+
* **This mutates dependency versions in `packageInfos`** and might add to `bumpInfo.modifiedPackages`.
|
|
13
|
+
* Probably the only case where it will change `modifiedPackages` is if `BeachballOptions.bumpDeps` is false
|
|
14
|
+
* (or if this is being called by `sync` which didn't previously bump dependents).
|
|
10
15
|
*/
|
|
11
16
|
function setDependentVersions(bumpInfo, options) {
|
|
12
|
-
const { packageInfos, scopedPackages } = bumpInfo;
|
|
17
|
+
const { packageInfos, scopedPackages, modifiedPackages } = bumpInfo;
|
|
13
18
|
const { verbose } = options;
|
|
14
19
|
const dependentChangedBy = {};
|
|
15
20
|
for (const [pkgName, info] of Object.entries(packageInfos)) {
|
|
16
|
-
if (!scopedPackages.has(pkgName)) {
|
|
21
|
+
if (!scopedPackages.allInScope && !scopedPackages.has(pkgName)) {
|
|
17
22
|
continue; // out of scope
|
|
18
23
|
}
|
|
19
24
|
for (const depType of PackageInfo_1.consideredDependencies) {
|
|
20
25
|
const deps = info[depType] || {};
|
|
21
26
|
for (const [dep, existingVersionRange] of Object.entries(deps)) {
|
|
22
27
|
const depPackage = packageInfos[dep];
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
// TODO: should this use the initial modifiedPackages rather than the possibly-updated one?
|
|
29
|
+
// (considering updates could introduce order sensitivity, though the old logic that didn't
|
|
30
|
+
// check modifiedPackages at all also had that issue)
|
|
31
|
+
if (!depPackage || !modifiedPackages.has(dep)) {
|
|
32
|
+
continue; // external dependency or not modified
|
|
25
33
|
}
|
|
26
34
|
const bumpedVersionRange = (0, bumpMinSemverRange_1.bumpMinSemverRange)(depPackage.version, existingVersionRange);
|
|
27
35
|
// TODO: dependent bumps in workspace:*/^/~ ranges will be missed
|
|
@@ -30,6 +38,10 @@ function setDependentVersions(bumpInfo, options) {
|
|
|
30
38
|
deps[dep] = bumpedVersionRange;
|
|
31
39
|
dependentChangedBy[pkgName] ?? (dependentChangedBy[pkgName] = new Set());
|
|
32
40
|
dependentChangedBy[pkgName].add(dep);
|
|
41
|
+
// Unless bumpDeps was false, the package should have been added to modifiedPackages
|
|
42
|
+
// by updateRelatedChangeType plus bumpPackageInfoVersion, but to be safe we add it here too.
|
|
43
|
+
// TODO: fix behavior - https://github.com/microsoft/beachball/issues/620
|
|
44
|
+
modifiedPackages.add(pkgName);
|
|
33
45
|
if (verbose) {
|
|
34
46
|
console.log(`${pkgName} needs to be bumped because ${dep} ${existingVersionRange} -> ${bumpedVersionRange}`);
|
|
35
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDependentVersions.js","sourceRoot":"","sources":["../../src/bump/setDependentVersions.ts"],"names":[],"mappings":";;;AAEA,sDAA8D;AAC9D,6DAA0D;AAE1D
|
|
1
|
+
{"version":3,"file":"setDependentVersions.js","sourceRoot":"","sources":["../../src/bump/setDependentVersions.ts"],"names":[],"mappings":";;;AAEA,sDAA8D;AAC9D,6DAA0D;AAE1D;;;;;;;;;GASG;AACH,SAAgB,oBAAoB,CAClC,QAAgF,EAChF,OAA0C;IAE1C,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,QAAQ,CAAC;IACpE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,MAAM,kBAAkB,GAAmC,EAAE,CAAC;IAE9D,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QAC1D,IAAI,CAAC,cAA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,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.updateLockFile = void 0;
|
|
7
|
-
const
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const packageManager_1 = require("../packageManager/packageManager");
|
|
10
10
|
const env_1 = require("../env");
|
|
@@ -20,15 +20,15 @@ async function updateLockFile(options) {
|
|
|
20
20
|
const root = options.path;
|
|
21
21
|
let updateFile;
|
|
22
22
|
let updateCommand;
|
|
23
|
-
if (
|
|
23
|
+
if (fs_1.default.existsSync(path_1.default.join(root, 'package-lock.json'))) {
|
|
24
24
|
updateFile = 'package-lock.json';
|
|
25
25
|
updateCommand = ['npm', 'install', '--package-lock-only', '--ignore-scripts'];
|
|
26
26
|
}
|
|
27
|
-
else if (
|
|
27
|
+
else if (fs_1.default.existsSync(path_1.default.join(root, 'pnpm-lock.yaml'))) {
|
|
28
28
|
updateFile = 'pnpm-lock.yaml';
|
|
29
29
|
updateCommand = ['pnpm', 'install', '--lockfile-only', '--ignore-scripts'];
|
|
30
30
|
}
|
|
31
|
-
else if (
|
|
31
|
+
else if (fs_1.default.existsSync(path_1.default.join(root, 'yarn.lock'))) {
|
|
32
32
|
const version = await (0, packageManager_1.packageManager)('yarn', ['--version'], { cwd: root });
|
|
33
33
|
if (version.success) {
|
|
34
34
|
// For yarn v1, local versions aren't recorded in the lock file, so we don't need an update.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateLockFile.js","sourceRoot":"","sources":["../../src/bump/updateLockFile.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"updateLockFile.js","sourceRoot":"","sources":["../../src/bump/updateLockFile.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,qEAAkE;AAClE,gCAA6B;AAG7B;;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,IAAI,UAAU,IAAI,aAAa,EAAE;QAC/B,OAAO,CAAC,GAAG,CAAC,YAAY,UAAU,yBAAyB,CAAC,CAAC;QAE7D,MAAM,GAAG,GAAG,MAAM,IAAA,+BAAc,EAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;QAE5G,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,YAAY,UAAU,wBAAwB,CAAC,CAAC;SAC9D;KACF;AACH,CAAC;AAxCD,wCAwCC"}
|
|
@@ -2,5 +2,5 @@ import { type PackageInfos } from '../types/PackageInfo';
|
|
|
2
2
|
/**
|
|
3
3
|
* Update package.json files for modified packages after bumping.
|
|
4
4
|
*/
|
|
5
|
-
export declare function updatePackageJsons(modifiedPackages:
|
|
5
|
+
export declare function updatePackageJsons(modifiedPackages: ReadonlySet<string>, packageInfos: Readonly<PackageInfos>): void;
|
|
6
6
|
//# sourceMappingURL=updatePackageJsons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatePackageJsons.d.ts","sourceRoot":"","sources":["../../src/bump/updatePackageJsons.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAA4C,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"updatePackageJsons.d.ts","sourceRoot":"","sources":["../../src/bump/updatePackageJsons.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAA4C,MAAM,sBAAsB,CAAC;AAInG;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,IAAI,CA+BpH"}
|
|
@@ -4,20 +4,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.updatePackageJsons = void 0;
|
|
7
|
-
const
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const PackageInfo_1 = require("../types/PackageInfo");
|
|
9
|
+
const readJson_1 = require("../object/readJson");
|
|
10
|
+
const writeJson_1 = require("../object/writeJson");
|
|
9
11
|
/**
|
|
10
12
|
* Update package.json files for modified packages after bumping.
|
|
11
13
|
*/
|
|
12
14
|
function updatePackageJsons(modifiedPackages, packageInfos) {
|
|
13
15
|
for (const pkgName of modifiedPackages) {
|
|
14
16
|
const info = packageInfos[pkgName];
|
|
15
|
-
if (!
|
|
17
|
+
if (!fs_1.default.existsSync(info.packageJsonPath)) {
|
|
16
18
|
// rare case in highly active monorepos where a package might have been deleted in main
|
|
17
19
|
console.warn(`Skipping ${pkgName} since package.json does not exist`);
|
|
18
20
|
continue;
|
|
19
21
|
}
|
|
20
|
-
const packageJson =
|
|
22
|
+
const packageJson = (0, readJson_1.readJson)(info.packageJsonPath);
|
|
21
23
|
if (!info.private) {
|
|
22
24
|
packageJson.version = info.version;
|
|
23
25
|
}
|
|
@@ -29,11 +31,12 @@ function updatePackageJsons(modifiedPackages, packageInfos) {
|
|
|
29
31
|
// would overwrite those incorrectly!
|
|
30
32
|
for (const [dep, updatedVersion] of Object.entries(updatedDeps)) {
|
|
31
33
|
if (modifiedPackages.has(dep) && packageJson[depKind]?.[dep]) {
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
32
35
|
packageJson[depKind][dep] = updatedVersion;
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
|
-
|
|
39
|
+
(0, writeJson_1.writeJson)(info.packageJsonPath, packageJson);
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
42
|
exports.updatePackageJsons = updatePackageJsons;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatePackageJsons.js","sourceRoot":"","sources":["../../src/bump/updatePackageJsons.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"updatePackageJsons.js","sourceRoot":"","sources":["../../src/bump/updatePackageJsons.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,sDAAmG;AACnG,iDAA8C;AAC9C,mDAAgD;AAEhD;;GAEG;AACH,SAAgB,kBAAkB,CAAC,gBAAqC,EAAE,YAAoC;IAC5G,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE;QACtC,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE;YACxC,uFAAuF;YACvF,OAAO,CAAC,IAAI,CAAC,YAAY,OAAO,oCAAoC,CAAC,CAAC;YACtE,SAAS;SACV;QACD,MAAM,WAAW,GAAG,IAAA,mBAAQ,EAAc,IAAI,CAAC,eAAe,CAAC,CAAC;QAEhE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;SACpC;QAED,KAAK,MAAM,OAAO,IAAI,oCAAsB,EAAE;YAC5C,mGAAmG;YACnG,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAExC,wFAAwF;YACxF,2FAA2F;YAC3F,qCAAqC;YACrC,KAAK,MAAM,CAAC,GAAG,EAAE,cAAc,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;gBAC/D,IAAI,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE;oBAC5D,oEAAoE;oBACpE,WAAW,CAAC,OAAO,CAAE,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC;iBAC7C;aACF;SACF;QAED,IAAA,qBAAS,EAAC,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;KAC9C;AACH,CAAC;AA/BD,gDA+BC"}
|
|
@@ -15,9 +15,10 @@ import { ChangeFileInfo } from '../types/ChangeInfo';
|
|
|
15
15
|
* - For non-grouped packages that have changed, the highest change type from any change file
|
|
16
16
|
* - For each grouped package where anything in the group has changed, the highest change type
|
|
17
17
|
* from any change file in the group
|
|
18
|
+
* - `dependents` is undefined if `BeachballOptions.bumpDeps` was false
|
|
18
19
|
*
|
|
19
20
|
* What it mutates:
|
|
20
|
-
* - `bumpInfo.calculatedChangeTypes`:
|
|
21
|
+
* - `bumpInfo.calculatedChangeTypes`: update change type for package and dependents
|
|
21
22
|
* - all dependents' change types as part of a group update
|
|
22
23
|
*
|
|
23
24
|
* What it does not do:
|
|
@@ -26,7 +27,6 @@ import { ChangeFileInfo } from '../types/ChangeInfo';
|
|
|
26
27
|
export declare function updateRelatedChangeType(params: {
|
|
27
28
|
change: ChangeFileInfo;
|
|
28
29
|
bumpInfo: Pick<BumpInfo, 'calculatedChangeTypes' | 'packageGroups' | 'packageInfos'>;
|
|
29
|
-
dependents: PackageDependents;
|
|
30
|
-
bumpDeps: boolean;
|
|
30
|
+
dependents: PackageDependents | undefined;
|
|
31
31
|
}): void;
|
|
32
32
|
//# sourceMappingURL=updateRelatedChangeType.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateRelatedChangeType.d.ts","sourceRoot":"","sources":["../../src/bump/updateRelatedChangeType.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"updateRelatedChangeType.d.ts","sourceRoot":"","sources":["../../src/bump/updateRelatedChangeType.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE;IAC9C,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,uBAAuB,GAAG,eAAe,GAAG,cAAc,CAAC,CAAC;IACrF,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAC;CAC3C,GAAG,IAAI,CAqEP"}
|
|
@@ -17,64 +17,66 @@ const changeTypes_1 = require("../changefile/changeTypes");
|
|
|
17
17
|
* - For non-grouped packages that have changed, the highest change type from any change file
|
|
18
18
|
* - For each grouped package where anything in the group has changed, the highest change type
|
|
19
19
|
* from any change file in the group
|
|
20
|
+
* - `dependents` is undefined if `BeachballOptions.bumpDeps` was false
|
|
20
21
|
*
|
|
21
22
|
* What it mutates:
|
|
22
|
-
* - `bumpInfo.calculatedChangeTypes`:
|
|
23
|
+
* - `bumpInfo.calculatedChangeTypes`: update change type for package and dependents
|
|
23
24
|
* - all dependents' change types as part of a group update
|
|
24
25
|
*
|
|
25
26
|
* What it does not do:
|
|
26
27
|
* - `bumpInfo.calculatedChangeTypes`: will not mutate the `change.packageName` change type
|
|
27
28
|
*/
|
|
28
29
|
function updateRelatedChangeType(params) {
|
|
29
|
-
const { change, bumpInfo, dependents
|
|
30
|
+
const { change, bumpInfo, dependents } = params;
|
|
30
31
|
const { calculatedChangeTypes, packageGroups, packageInfos } = bumpInfo;
|
|
31
32
|
// If dependentChangeType is none (or somehow unset), there's nothing to do.
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
33
|
+
const dependentChangeType = (0, changeTypes_1.getMaxChangeType)([change.dependentChangeType]);
|
|
34
|
+
if (dependentChangeType === 'none') {
|
|
34
35
|
return;
|
|
35
36
|
}
|
|
36
|
-
const entryPointPackageName = change.packageName;
|
|
37
37
|
// Enqueue the first package.
|
|
38
38
|
// This part of the bump algorithm is a performance bottleneck, so it's important to bail early
|
|
39
39
|
// whenever possible, and to use `seen` to reduce queue insertion.
|
|
40
40
|
// https://github.com/microsoft/beachball/pull/1042
|
|
41
|
-
const queue = [
|
|
41
|
+
const queue = [change.packageName];
|
|
42
42
|
const seen = new Set();
|
|
43
43
|
while (queue.length > 0) {
|
|
44
|
-
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
45
|
+
const subjectPackage = queue.shift();
|
|
45
46
|
// Step 1. Update change type of the subjectPackage according to dependentChangeType if needed.
|
|
46
|
-
|
|
47
|
+
// (Skip for the initial package.)
|
|
48
|
+
if (subjectPackage !== change.packageName) {
|
|
47
49
|
const oldType = calculatedChangeTypes[subjectPackage];
|
|
48
|
-
calculatedChangeTypes[subjectPackage] = (0, changeTypes_1.getMaxChangeType)([oldType,
|
|
50
|
+
calculatedChangeTypes[subjectPackage] = (0, changeTypes_1.getMaxChangeType)([oldType, dependentChangeType], packageInfos[subjectPackage]?.combinedOptions?.disallowedChangeTypes);
|
|
51
|
+
// TODO: what's the interaction with groups here?
|
|
49
52
|
if (calculatedChangeTypes[subjectPackage] === oldType) {
|
|
50
53
|
// We didn't change this type, so keep going.
|
|
51
54
|
continue;
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
// Step 2. For all dependent packages of the current subjectPackage, place in queue to be updated at least to the "updatedChangeType"
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
// (dependents will be undefined if bumpDeps was false)
|
|
59
|
+
const dependentPackages = dependents?.[subjectPackage];
|
|
60
|
+
if (dependentPackages?.length) {
|
|
57
61
|
for (const dependentPackage of dependentPackages) {
|
|
58
62
|
if (seen.has(dependentPackage)) {
|
|
59
63
|
continue;
|
|
60
64
|
}
|
|
61
65
|
seen.add(dependentPackage);
|
|
62
|
-
queue.push(
|
|
66
|
+
queue.push(dependentPackage);
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
// TODO: when we do "locked", or "lock step" versioning, we could simply skip this grouped traversal,
|
|
66
70
|
// - set the version for all packages in the group in bumpPackageInfoVersion()
|
|
67
71
|
// - the main concern is how to capture the bump reason in grouped changelog
|
|
68
72
|
// Step 3. For group-linked packages, update the change type to the max(change file info's change type, propagated update change type)
|
|
73
|
+
// TODO: ensure this is consistent with other group handling, and whether it's necessary at all if bumpDeps is false
|
|
69
74
|
const group = Object.values(packageGroups).find(g => g.packageNames.includes(subjectPackage));
|
|
70
|
-
if (group && !group.disallowedChangeTypes?.includes(
|
|
75
|
+
if (group && !group.disallowedChangeTypes?.includes(dependentChangeType)) {
|
|
71
76
|
for (const packageNameInGroup of group.packageNames) {
|
|
72
77
|
if (!seen.has(packageNameInGroup)) {
|
|
73
78
|
seen.add(packageNameInGroup);
|
|
74
|
-
queue.push(
|
|
75
|
-
subjectPackage: packageNameInGroup,
|
|
76
|
-
changeType: updatedChangeType,
|
|
77
|
-
});
|
|
79
|
+
queue.push(packageNameInGroup);
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateRelatedChangeType.js","sourceRoot":"","sources":["../../src/bump/updateRelatedChangeType.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"updateRelatedChangeType.js","sourceRoot":"","sources":["../../src/bump/updateRelatedChangeType.ts"],"names":[],"mappings":";;;AAAA,2DAA6D;AAI7D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,uBAAuB,CAAC,MAIvC;IACC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAChD,MAAM,EAAE,qBAAqB,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;IAExE,4EAA4E;IAC5E,MAAM,mBAAmB,GAAG,IAAA,8BAAgB,EAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC3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AC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QAE9F,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EAAE;YACxE,KAAK,MAAM,kBAAkB,IAAI,KAAK,CAAC,YAAY,EAAE;gBACnD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE;oBACjC,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;oBAC7B,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;iBAChC;aACF;SACF;KACF;AACH,CAAC;AAzED,0DAyEC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { BeachballOptions } from '../types/BeachballOptions';
|
|
2
2
|
import type { PackageInfos } from '../types/PackageInfo';
|
|
3
3
|
/**
|
|
4
|
-
* Gets all the changed packages which do not already have a change file
|
|
4
|
+
* Gets all the changed packages which do not already have a change file and are in scope.
|
|
5
|
+
*
|
|
6
|
+
* If `options.all` is true, returns all the packages in scope (skipping all git operations),
|
|
7
|
+
* regardless of whether they've changed.
|
|
5
8
|
*/
|
|
6
9
|
export declare function getChangedPackages(options: BeachballOptions, packageInfos: PackageInfos): string[];
|
|
7
10
|
//# sourceMappingURL=getChangedPackages.d.ts.map
|