Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/updateNpmVer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
const fs = require('fs');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
const replace = require('replace-in-file');
const {getAnnotations, computeVersionToUpdate} = require('./lib/versions.js');

let exclude=[];
Expand All @@ -26,7 +25,8 @@ async function updateFiles(moduleData){
to: updatedNpm,
};
try {
const results = await replace(options)
const { replaceInFile } = await import('replace-in-file');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we convert the whole script to ESM instead to not mix require and import in a single file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let us keep this for now, as it is the easiest way to keep all branches to work on TC, so that it wont block any going on things
migrating to ESM will need to update all script files here and its libarary in all supported branches, let us create a ticket, so we can do it in other PR and apply it to all branches

const results = await replaceInFile(options)
console.log('\x1b[33m', "Updated "+ moduleData.package + " from version " +
moduleData.version + " to " + moduleData.updatedVersion);
}
Expand Down
Loading