beachball
Advanced tools
Comparing version 1.6.4 to 1.7.0
# Changelog - beachball | ||
This log was last generated on Tue, 18 Jun 2019 06:30:52 GMT and should not be manually modified. | ||
This log was last generated on Sun, 23 Jun 2019 00:40:30 GMT and should not be manually modified. | ||
## 1.7.0 | ||
Sun, 23 Jun 2019 00:40:30 GMT | ||
### Minor | ||
- adding smarts about which change files are already in master (kchau@microsoft.com) | ||
## 1.6.4 | ||
Tue, 18 Jun 2019 06:30:52 GMT | ||
Tue, 18 Jun 2019 06:30:58 GMT | ||
@@ -8,0 +15,0 @@ ### Patches |
@@ -15,3 +15,3 @@ export interface PackageInfo { | ||
packageChangeTypes: { | ||
[pkgName: string]: "none" | "patch" | "minor" | "major"; | ||
[pkgName: string]: "patch" | "minor" | "major" | "none"; | ||
}; | ||
@@ -18,0 +18,0 @@ packageInfos: { |
@@ -20,4 +20,4 @@ import { ChangeInfo } from './ChangeInfo'; | ||
export declare function getPackageChangeTypes(cwd: string): { | ||
[pkgName: string]: "none" | "patch" | "minor" | "major"; | ||
[pkgName: string]: "patch" | "minor" | "major" | "none"; | ||
}; | ||
//# sourceMappingURL=changefile.d.ts.map |
@@ -26,4 +26,7 @@ "use strict"; | ||
try { | ||
const packageName = JSON.parse(fs_1.default.readFileSync(path_1.default.join(root, 'package.json')).toString()).name; | ||
packageRoots[root] = packageName; | ||
const packageJson = JSON.parse(fs_1.default.readFileSync(path_1.default.join(root, 'package.json')).toString()); | ||
if (!packageJson.private) { | ||
const packageName = packageJson.name; | ||
packageRoots[root] = packageName; | ||
} | ||
} | ||
@@ -63,5 +66,7 @@ catch (e) { | ||
const changedPackages = getAllChangedPackages(branch, cwd); | ||
if (!changePath || !fs_1.default.existsSync(changePath)) { | ||
const changeFileResult = git_1.git(['ls-tree', '-r', '--name-only', '--full-tree', branch, 'change'], { cwd }); | ||
if (!changePath || !fs_1.default.existsSync(changePath) || !changeFileResult.success) { | ||
return changedPackages; | ||
} | ||
const remoteChangeFiles = changeFileResult.stdout.split(/\n/).map(line => path_1.default.basename(line.trim())); | ||
const changeFileDirents = fs_1.default.readdirSync(changePath, { withFileTypes: true }); | ||
@@ -71,3 +76,3 @@ const changeFiles = changeFileDirents.filter(dirent => dirent.isFile).map(dirent => dirent.name); | ||
changeFiles.forEach(file => { | ||
if (path_1.default.basename(file) === 'CHANGELOG.md') { | ||
if (file === 'CHANGELOG.md' || file === 'CHANGELOG.md' || remoteChangeFiles.includes(file)) { | ||
return; | ||
@@ -74,0 +79,0 @@ } |
@@ -226,6 +226,11 @@ "use strict"; | ||
if (remotesResult.success) { | ||
const allRemotes = remotesResult.stdout.split('\n').map(line => line.substring(line.indexOf('\t'), line.lastIndexOf(' ')).trim()); | ||
if (allRemotes.length > 0) { | ||
const remote = allRemotes.find(r => url_1.default.format(url_1.default.parse(r)).toLowerCase() === normalizedUrl); | ||
const allRemotes = {}; | ||
remotesResult.stdout.split('\n').forEach(line => { | ||
const parts = line.split(/\s+/); | ||
allRemotes[parts[1]] = url_1.default.format(url_1.default.parse(parts[0])).toLowerCase(); | ||
}); | ||
if (Object.keys(allRemotes).length > 0) { | ||
const remote = allRemotes[normalizedUrl]; | ||
if (remote) { | ||
console.log(`Found a matching remote URL from package.json named "${remote}/master"`); | ||
return `${remote}/master`; | ||
@@ -235,4 +240,5 @@ } | ||
} | ||
console.log(`Defaults to "origin/master"`); | ||
return 'origin/master'; | ||
} | ||
exports.getDefaultRemoteMaster = getDefaultRemoteMaster; |
{ | ||
"name": "beachball", | ||
"version": "1.6.4", | ||
"version": "1.7.0", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93813
56
2266
1
0