Skip to content

Commit b1c3e4d

Browse files
committed
refactor: switch to ESM
1 parent 35e7833 commit b1c3e4d

10 files changed

+30
-29
lines changed

check-obsolete.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const { execSync } = require("child_process");
2-
const fs = require("fs");
3-
const JSON5 = require("json5");
4-
const path = require("path");
5-
const yargs = require("yargs");
1+
import { execSync } from "node:child_process";
2+
import * as fs from "node:fs";
3+
import path from "node:path";
4+
import JSON5 from "json5";
5+
import yargs from "yargs";
66

77
const args = yargs(process.argv)
88
.usage("$0 [--debug]")

cleanup.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const fs = require("fs");
2-
const path = require("path");
3-
const yargs = require("yargs");
1+
import * as fs from "node:fs";
2+
import path from "node:path";
3+
import yargs from "yargs";
44

55
const args = yargs(process.argv)
66
.help()

configure-styles.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const fs = require("node:fs");
2-
const yargs = require("yargs");
3-
const path = require("path");
1+
import * as fs from "node:fs";
2+
import path from "node:path";
3+
import yargs from "yargs";
44

55
const args = yargs(process.argv)
66
.usage("$0 [--bootstrap --minimal]")

copy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const fs = require("fs");
2-
const path = require("path");
1+
import * as fs from "node:fs";
2+
import path from "node:path";
33

44
const internalExclude = ["node_modules", "elm-stuff", "project", ".DS_Store"];
55
const rootExclude = ["dist", "node_modules", "webdriver-ts"];

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "js-framework-benchmark",
33
"version": "1.0.0",
44
"description": "Simple Benchmark for Javascript client side rendering",
5+
"type": "module",
56
"scripts": {
67
"clean": "node cleanup.js",
78
"build": "node rebuild-all.js --ci",

rebuild-all.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const takeWhile = require("lodash/takeWhile");
2-
const { execSync } = require("child_process");
3-
const fs = require("fs");
4-
const path = require("path");
5-
const yargs = require("yargs");
1+
import { execSync } from "node:child_process";
2+
import * as fs from "node:fs";
3+
import path from "node:path";
4+
import yargs from "yargs";
5+
import { takeWhile } from "lodash";
66

77
const args = yargs(process.argv.slice(2))
88
.usage("$0 [--ci --docker keyed/framework1 ... non-keyed/frameworkN]")

rebuild-build-single.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const { execSync } = require("child_process");
2-
const fs = require("fs");
3-
const path = require("path");
4-
const yargs = require("yargs");
1+
import { execSync } from "node:child_process";
2+
import * as fs from "node:fs";
3+
import path from "node:path";
4+
import yargs from "yargs";
55

66
const args = yargs(process.argv.slice(2))
77
.usage("$0 [--ci --docker keyed/framework1 ... non-keyed/frameworkN]")

rebuild-check-single.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const { execSync } = require("child_process");
2-
const yargs = require("yargs");
1+
import { execSync } from "node:child_process";
2+
import yargs from "yargs";
33

44
const args = yargs(process.argv.slice(2))
55
.usage("$0 [keyed/framework1 ... non-keyed/frameworkN]")

rebuild-single.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const { execSync } = require("child_process");
2-
const yargs = require("yargs");
1+
import { execSync } from "node:child_process";
2+
import yargs from "yargs";
33

44
const args = yargs(process.argv.slice(2))
55
.usage("$0 [--ci --docker keyed/framework1 ... non-keyed/frameworkN]")

zip.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const fs = require("fs");
2-
const path = require("path");
3-
const AdmZip = require("adm-zip");
1+
import * as fs from "node:fs";
2+
import path from "node:path";
3+
import AdmZip from "adm-zip";
44

55
const zip = new AdmZip();
66
const outputFile = "build.zip";

0 commit comments

Comments
 (0)