Skip to content

Commit

Permalink
Fix release notes script to be in es6 import format (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM authored Jan 13, 2022
1 parent 49d83bb commit 1e14690
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions build/release-notes.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node

const fs = require('fs');
const execSync = require('child_process').execSync;
const ejs = require('ejs');
const _ = require('lodash');
const semver = require('semver');
import * as fs from 'fs';
import {execSync} from 'child_process';
import * as ejs from 'ejs';
import _ from 'lodash';
import semver from 'semver';

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

let releaseNotes = [];
let match;
// eslint-disable-next-line no-cond-assign
while (match = regex.exec(changelog)) {
releaseNotes.push({
Expand Down

0 comments on commit 1e14690

Please sign in to comment.