refactor: replace cherow with meriyah for parsing es (#986)

This commit is contained in:
Caleb Boyd
2022-05-05 11:50:46 -05:00
committed by GitHub
parent af7e1cb1be
commit ac1d444b17
4 changed files with 1408 additions and 2456 deletions
+1394 -2442
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -2,7 +2,7 @@
"name": "nexe",
"description": "Create a single executable out of your Node.js application",
"license": "MIT",
"version": "4.0.0-beta.19",
"version": "4.0.0-rc.1",
"contributors": [
"Craig Condon <craig.j.condon@gmail.com> (http://crcn.io)",
"Jared Allard <jaredallard@outlook.com>",
@@ -44,11 +44,11 @@
"app-builder": "^7.0.4",
"caw": "^2.0.1",
"chalk": "^2.4.2",
"cherow": "1.6.9",
"download": "^8.0.0",
"globby": "^11.0.2",
"got": "^11.8.2",
"minimist": "^1.2.5",
"meriyah": "^4.2.1",
"minimist": "^1.2.6",
"mkdirp": "^1.0.4",
"multistream": "^4.1.0",
"ora": "^3.4.0",
@@ -66,14 +66,14 @@
"@types/ora": "^3.2.0",
"@types/rimraf": "3.0.2",
"@types/semver": "^7.3.8",
"chai": "^4.3.4",
"chai": "^4.3.6",
"execa": "^5.1.1",
"mocha": "^9.1.2",
"prettier": "^2.4.1",
"ts-node": "^10.2.1",
"mocha": "^10.0.0",
"prettier": "^2.6.2",
"ts-node": "^10.7.0",
"tslint": "^6.1.1",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.3.0",
"typescript": "^4.4.3"
"typescript": "^4.6.4"
}
}
+3 -1
View File
@@ -261,7 +261,9 @@ function normalizeOptions(input?: Partial<NexeOptions>): NexeOptions {
options.downloadOptions.agent = process.env.HTTPS_PROXY
? caw(process.env.HTTPS_PROXY, { protocol: 'https' })
: options.downloadOptions.agent || require('https').globalAgent
options.downloadOptions.rejectUnauthorized = process.env.NODE_TLS_REJECT_UNAUTHORIZED ? false : true
options.downloadOptions.rejectUnauthorized = process.env.NODE_TLS_REJECT_UNAUTHORIZED
? false
: true
options.rc = options.rc || extractCliMap(/^rc-.*/, options)
options.output =
+3 -5
View File
@@ -1,5 +1,5 @@
import { NexeCompiler } from '../compiler'
import { parse } from 'cherow'
import { parse } from 'meriyah'
import { wrap, semverGt } from '../util'
function walkSome(node: any, visit: Function) {
@@ -37,12 +37,10 @@ export default async function main(compiler: NexeCompiler, next: () => Promise<v
const file = await compiler.readFileAsync(bootFile),
ast = parse(file.contents.toString(), {
loc: true,
tolerant: true,
next: true,
globalReturn: true,
node: true,
skipShebang: true,
loc: true,
specDeviation: true,
}),
location = { start: { line: 0 } }