Skip to content

Commit

Permalink
Release: Fix the release script
Browse files Browse the repository at this point in the history
PR jquerygh-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`.
  • Loading branch information
mgol committed Jul 10, 2024
1 parent 981b0c4 commit 5218ff2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
var dryrun = false,
skipRemote = false;

import fs from "fs";
import child from "child_process";
import path from "path";
import fs from "node:fs";
import child from "node:child_process";
import path from "node:path";
import chalk from "chalk";
import enquirer from "enquirer";
import { build } from "./tasks/build";
Expand Down Expand Up @@ -98,7 +98,7 @@ function initialize( next ) {
if ( !( fs.existsSync || path.existsSync )( packageFile ) ) {
die( "No " + packageFile + " in this directory" );
}
pkg = JSON.parse( fs.readFileSync( packageFile ) );
pkg = JSON.parse( fs.readFileSync( packageFile, "utf8" ) );

status( "Current version is " + pkg.version + "; generating release " + releaseVersion );
version = rsemver.exec( pkg.version );
Expand Down
23 changes: 23 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"chalk": "5.3.0",
"commitplease": "3.2.0",
"diff": "5.2.0",
"enquirer": "2.4.1",
"eslint": "8.57.0",
"eslint-config-jquery": "3.0.2",
"eslint-plugin-import": "2.29.1",
Expand Down

0 comments on commit 5218ff2

Please sign in to comment.