aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/monorepo-scripts/src/convert_changelogs.ts5
-rw-r--r--packages/monorepo-scripts/src/utils.ts9
-rw-r--r--packages/typescript-typings/CHANGELOG.json2
3 files changed, 14 insertions, 2 deletions
diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts
index 419f36ff4..76ce50ced 100644
--- a/packages/monorepo-scripts/src/convert_changelogs.ts
+++ b/packages/monorepo-scripts/src/convert_changelogs.ts
@@ -28,7 +28,10 @@ const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..');
};
for (const line of lines) {
if (_.startsWith(line, '## ')) {
- const version = line.substr(4).split(' - ')[0];
+ let version = line.substr(4).split(' - ')[0];
+ if (version === '0.x.x') {
+ version = utils.getNextPatchVersion(lernaPackage.package.version);
+ }
const dateStr = line.split('_')[1];
let date;
if (!_.includes(dateStr, 'TBD')) {
diff --git a/packages/monorepo-scripts/src/utils.ts b/packages/monorepo-scripts/src/utils.ts
index 5423cabd9..73f6260d3 100644
--- a/packages/monorepo-scripts/src/utils.ts
+++ b/packages/monorepo-scripts/src/utils.ts
@@ -1,5 +1,14 @@
+import * as _ from 'lodash';
+
export const utils = {
log(...args: any[]): void {
console.log(...args); // tslint:disable-line:no-console
},
+ getNextPatchVersion(currentVersion: string): string {
+ const versionSegments = currentVersion.split('.');
+ const patch = _.parseInt(_.last(versionSegments) as string);
+ const newPatch = patch + 1;
+ const newPatchVersion = `${versionSegments[0]}.${versionSegments[1]}.${newPatch}`;
+ return newPatchVersion;
+ },
};
diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json
index e12b8fe19..1bb6b752c 100644
--- a/packages/typescript-typings/CHANGELOG.json
+++ b/packages/typescript-typings/CHANGELOG.json
@@ -1,6 +1,6 @@
[
{
- "version": "0.x.x",
+ "version": "0.0.2",
"changes": []
}
] \ No newline at end of file