Skip to content

Commit b0a1fb5

Browse files
authoredMar 24, 2022
Build: Make the release script an ES module
This is now required by the latest chalk versions. Closes gh-459
1 parent a1665a4 commit b0a1fb5

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed
 

‎.eslintrc.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
{
22
"root": true,
33

4-
"extends": "./.eslintrc-node.json"
4+
"extends": "./.eslintrc-node.json",
5+
6+
"overrides": [
7+
{
8+
"files": ["**/*.mjs"],
9+
"parserOptions": {
10+
"sourceType": "module"
11+
}
12+
}
13+
]
514
}

‎build/release.js ‎build/release.mjs

+7-5
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@
99
var dryrun = false,
1010
skipRemote = false;
1111

12-
var fs = require( "fs" ),
13-
child = require( "child_process" ),
14-
path = require( "path" ),
15-
chalk = require( "chalk" ),
16-
{ prompt } = require( "enquirer" );
12+
import fs from "fs";
13+
import child from "child_process";
14+
import path from "path";
15+
import chalk from "chalk";
16+
import enquirer from "enquirer";
1717

1818
var releaseVersion,
1919
nextVersion,
2020
isBeta,
2121
pkg,
2222

23+
prompt = enquirer.prompt,
24+
2325
repoURL = "git@github.com:jquery/jquery-migrate.git",
2426
branch = "main",
2527

0 commit comments

Comments
 (0)
Please sign in to comment.