Skip to content

Commit 1e14690

Browse files
authored
Fix release notes script to be in es6 import format (#774)
1 parent 49d83bb commit 1e14690

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

build/release-notes.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env node
22

3-
const fs = require('fs');
4-
const execSync = require('child_process').execSync;
5-
const ejs = require('ejs');
6-
const _ = require('lodash');
7-
const semver = require('semver');
3+
import * as fs from 'fs';
4+
import {execSync} from 'child_process';
5+
import * as ejs from 'ejs';
6+
import _ from 'lodash';
7+
import semver from 'semver';
88

99
const changelogPath = 'CHANGELOG.md';
1010
const changelog = fs.readFileSync(changelogPath, 'utf8');
@@ -36,6 +36,7 @@ let previousVersion = semver.maxSatisfying(gitTags, "<" + currentVersion, { incl
3636
const regex = /^## (\d+\.\d+\.\d+).*?\n(.+?)(?=\n^## \d+\.\d+\.\d+.*?\n)/gms;
3737

3838
let releaseNotes = [];
39+
let match;
3940
// eslint-disable-next-line no-cond-assign
4041
while (match = regex.exec(changelog)) {
4142
releaseNotes.push({

0 commit comments

Comments
 (0)