-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate package to ECMAScript modules
BREAKING CHANGE: parse-domain will now be released as native ECMAScript module. There's no CommonJS build anymore. If you're still using CommonJS, you need to import it asynchronously using `await import("parse-domain")`. If you're still using Node 12, you may need to update it to the latest 12.x version.
- Loading branch information
Showing
42 changed files
with
597 additions
and
4,572 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": [ | ||
"peerigon/presets/prettier-typescript.js", | ||
// See https://github.com/peerigon/eslint-config-peerigon#peerigonstylesno-default-export | ||
"peerigon/styles/no-default-export", | ||
"peerigon/styles/no-null" | ||
], | ||
"env": { | ||
"node": true | ||
}, | ||
"root": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
#!/usr/bin/env node | ||
|
||
"use strict"; | ||
|
||
const { EOL } = require("os"); | ||
import { EOL } from "os"; | ||
|
||
(async () => { | ||
process.argv.push( | ||
"--", | ||
"../../serialized-tries", | ||
"../../../build-esm/serialized-tries" | ||
); | ||
process.argv.push("--", "../../serialized-tries"); | ||
|
||
const updateTries = await import("../build/scripts/update-tries.js"); | ||
|
||
await require("../build-cjs/src/scripts/update-tries.js").done; | ||
await updateTries.done; | ||
|
||
process.stderr.write("Running smoke test... "); | ||
|
||
require("../build-cjs/src/smoke-test.js").runSmokeTest(); | ||
const smokeTest = await import("../build/smoke-test.js"); | ||
|
||
smokeTest.runSmokeTest(); | ||
|
||
process.stdout.write("ok" + EOL); | ||
})().catch((error) => { | ||
console.error(`parse-domain update failed: ${error}`); | ||
// eslint-disable-next-line no-process-exit, node/no-process-exit | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.