aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/utils/changelog_utils.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-19 01:00:39 +0800
committerFabio Berger <me@fabioberger.com>2018-06-19 05:08:33 +0800
commit3e64b3da398a90e6ddfc287ebf28ec780b64b56f (patch)
treec1788d98471b58f90d99fa8bedb1553725cec4b6 /packages/monorepo-scripts/src/utils/changelog_utils.ts
parent9a748c8bf1dfd1a090e3d44a4cbebb59bcedd5e6 (diff)
downloaddexon-sol-tools-3e64b3da398a90e6ddfc287ebf28ec780b64b56f.tar
dexon-sol-tools-3e64b3da398a90e6ddfc287ebf28ec780b64b56f.tar.gz
dexon-sol-tools-3e64b3da398a90e6ddfc287ebf28ec780b64b56f.tar.bz2
dexon-sol-tools-3e64b3da398a90e6ddfc287ebf28ec780b64b56f.tar.lz
dexon-sol-tools-3e64b3da398a90e6ddfc287ebf28ec780b64b56f.tar.xz
dexon-sol-tools-3e64b3da398a90e6ddfc287ebf28ec780b64b56f.tar.zst
dexon-sol-tools-3e64b3da398a90e6ddfc287ebf28ec780b64b56f.zip
Use semver library instead of semverUtils
Diffstat (limited to 'packages/monorepo-scripts/src/utils/changelog_utils.ts')
-rw-r--r--packages/monorepo-scripts/src/utils/changelog_utils.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/monorepo-scripts/src/utils/changelog_utils.ts b/packages/monorepo-scripts/src/utils/changelog_utils.ts
index 4e09fc842..a589fe985 100644
--- a/packages/monorepo-scripts/src/utils/changelog_utils.ts
+++ b/packages/monorepo-scripts/src/utils/changelog_utils.ts
@@ -3,13 +3,12 @@ import * as _ from 'lodash';
import * as moment from 'moment';
import * as path from 'path';
import { exec as execAsync } from 'promisify-child-process';
+import semver = require('semver');
import semverSort = require('semver-sort');
import { constants } from '../constants';
import { Change, Changelog, VersionChangelog } from '../types';
-import { semverUtils } from './semver_utils';
-
const CHANGELOG_MD_HEADER = `
<!--
This file is auto-generated using the monorepo-scripts package. Don't edit directly.
@@ -56,7 +55,7 @@ export const changelogUtils = {
return true;
}
const lastEntry = changelog[0];
- if (semverUtils.lessThan(lastEntry.version, currentVersion)) {
+ if (semver.lt(lastEntry.version, currentVersion)) {
throw new Error(
`Found CHANGELOG version lower then current package version. ${packageName} current: ${currentVersion}, Changelog: ${
lastEntry.version