Skip to content

Commit ffa305f

Browse files
authored
Release: Fix the release script
PR gh-503 erroneously removed the `enquirer` dependency, required for the release process. Restore it. In addition, update built-in module imports to use the `node:` prefix and add a missing "utf8" value in one `fs.readFileSync`. Fixes gh-521 Ref gh-503
1 parent 981b0c4 commit ffa305f

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

build/release.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
var dryrun = false,
88
skipRemote = false;
99

10-
import fs from "fs";
11-
import child from "child_process";
12-
import path from "path";
10+
import fs from "node:fs";
11+
import child from "node:child_process";
12+
import path from "node:path";
1313
import chalk from "chalk";
1414
import enquirer from "enquirer";
1515
import { build } from "./tasks/build";
@@ -98,7 +98,7 @@ function initialize( next ) {
9898
if ( !( fs.existsSync || path.existsSync )( packageFile ) ) {
9999
die( "No " + packageFile + " in this directory" );
100100
}
101-
pkg = JSON.parse( fs.readFileSync( packageFile ) );
101+
pkg = JSON.parse( fs.readFileSync( packageFile, "utf8" ) );
102102

103103
status( "Current version is " + pkg.version + "; generating release " + releaseVersion );
104104
version = rsemver.exec( pkg.version );

package-lock.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"chalk": "5.3.0",
4242
"commitplease": "3.2.0",
4343
"diff": "5.2.0",
44+
"enquirer": "2.4.1",
4445
"eslint": "8.57.0",
4546
"eslint-config-jquery": "3.0.2",
4647
"eslint-plugin-import": "2.29.1",

0 commit comments

Comments
 (0)