Skip to content

Commit

Permalink
fix: remove dependency on shelljs in esbuild-update script
Browse files Browse the repository at this point in the history
  • Loading branch information
mattem authored and alexeagle committed Sep 2, 2021
1 parent 08b4380 commit 0f17126
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/update-esbuild-versions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const https = require('https');
const { exec } = require('shelljs');
const { execSync } = require('child_process');
const { mkdirSync, createWriteStream, readFileSync, writeFileSync } = require('fs');
const { join } = require('path');
const { tmpdir } = require('os');
Expand Down Expand Up @@ -73,7 +73,7 @@ async function main() {
const downloadPath = join(tmpDir, platform);

await downloadFile(`https://registry.npmjs.org/${platform}/-/${platform}-${version}.tgz`, downloadPath);
const shasum = exec(`shasum -a 256 ${downloadPath}`, {silent: true}).stdout.split(' ')[0];
const shasum = execSync(`shasum -a 256 ${downloadPath}`, {silent: true, encoding: 'utf-8'}).split(' ')[0];

return [new RegExp(`${_var}_SHA = "(.+?)"`, 's'), shasum];
}));
Expand Down

0 comments on commit 0f17126

Please sign in to comment.