MCPcopy Index your code
hub / github.com/adobe/react-spectrum / run

Method run

scripts/bumpVersions.js:92–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90 }
91
92 async run() {
93 await this.getExistingPackages();
94 this.getChangedPackages();
95
96 await this.getVersionBumps();
97 for (let pkg in this.versionBumps) {
98 let bump = this.versionBumps[pkg];
99 if (bump === 'unreleased' || bump === 'unchanged') {
100 continue;
101 }
102
103 this.addReleasedPackage(pkg, bump);
104 }
105
106 let all = process.argv.findIndex(arg => arg === '--all');
107 if (all >= 0) {
108 let bump = process.argv[all + 1] ?? 'patch';
109 for (let name in this.workspacePackages) {
110 if (this.versionBumps[name]) {
111 continue;
112 }
113
114 let filePath = this.workspacePackages[name].location + '/package.json';
115 let pkg = JSON.parse(fs.readFileSync(filePath, 'utf8'));
116 if (!pkg.private) {
117 let prerelease = semver.parse(pkg.version).prerelease;
118 let b = prerelease.length === 0 ? bump : prerelease[0];
119 this.changedPackages.add(name);
120 this.addReleasedPackage(name, b);
121 }
122 }
123 }
124
125 let versions = this.getVersions();
126 await this.promptVersions(versions);
127 this.bumpVersions(versions);
128 this.commit(versions);
129 }
130
131 async getExistingPackages() {
132 // Find what packages already exist on npm

Callers 13

buildFunction · 0.80
runFunction · 0.80
packageFunction · 0.80
mainFunction · 0.80
runBuildFunction · 0.80

Calls 10

getExistingPackagesMethod · 0.95
getChangedPackagesMethod · 0.95
getVersionBumpsMethod · 0.95
addReleasedPackageMethod · 0.95
getVersionsMethod · 0.95
promptVersionsMethod · 0.95
bumpVersionsMethod · 0.95
commitMethod · 0.95
addMethod · 0.65
parseMethod · 0.45

Tested by 1

runBuildFunction · 0.64