sanitycheck: drop acorn-stage3, upgrade to v8 (for `??`)

pull/3653/head
Rob Pilling 2024-11-22 07:59:58 +00:00
parent a8f1aa97e5
commit 2fe22ec5de
3 changed files with 11 additions and 148 deletions

View File

@ -11,10 +11,9 @@ apploader.init({
});*/ });*/
var jsparse = (() => { var jsparse = (() => {
var acorn, stage3; var acorn;
try { try {
acorn = require("acorn"); acorn = require("acorn");
stage3 = require("acorn-stage3");
} catch (e) { } catch (e) {
console.log("====================================================="); console.log("=====================================================");
console.log(" ACORN NOT FOUND"); console.log(" ACORN NOT FOUND");
@ -25,8 +24,7 @@ var jsparse = (() => {
return str => {throw new Error("no acorn")}; return str => {throw new Error("no acorn")};
} }
var parser = acorn.Parser.extend(stage3) return str => acorn.parse(str, { ecmaVersion: 2020 });
return str => parser.parse(str, { ecmaVersion: 2020 });
})(); })();
var BASEDIR = __dirname+"/../"; var BASEDIR = __dirname+"/../";

150
package-lock.json generated
View File

@ -9,8 +9,7 @@
"version": "0.0.1", "version": "0.0.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"acorn": "^7.2.0", "acorn": "^8.0.0"
"acorn-stage3": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/eslint-plugin": "^7.8.0",
@ -445,9 +444,10 @@
"dev": true "dev": true
}, },
"node_modules/acorn": { "node_modules/acorn": {
"version": "7.4.1", "version": "8.14.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
"license": "MIT",
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
}, },
@ -455,21 +455,6 @@
"node": ">=0.4.0" "node": ">=0.4.0"
} }
}, },
"node_modules/acorn-class-fields": {
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/acorn-class-fields/-/acorn-class-fields-0.3.7.tgz",
"integrity": "sha512-jdUWSFce0fuADUljmExz4TWpPkxmRW/ZCPRqeeUzbGf0vFUcpQYbyq52l75qGd0oSwwtAepeL6hgb/naRgvcKQ==",
"license": "MIT",
"dependencies": {
"acorn-private-class-elements": "^0.2.7"
},
"engines": {
"node": ">=4.8.2"
},
"peerDependencies": {
"acorn": "^6 || ^7 || ^8"
}
},
"node_modules/acorn-jsx": { "node_modules/acorn-jsx": {
"version": "5.3.2", "version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
@ -479,65 +464,6 @@
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
} }
}, },
"node_modules/acorn-private-class-elements": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/acorn-private-class-elements/-/acorn-private-class-elements-0.2.7.tgz",
"integrity": "sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA==",
"license": "MIT",
"engines": {
"node": ">=4.8.2"
},
"peerDependencies": {
"acorn": "^6.1.0 || ^7 || ^8"
}
},
"node_modules/acorn-private-methods": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/acorn-private-methods/-/acorn-private-methods-0.3.3.tgz",
"integrity": "sha512-46oeEol3YFvLSah5m9hGMlNpxDBCEkdceJgf01AjqKYTK9r6HexKs2rgSbLK81pYjZZMonhftuUReGMlbbv05w==",
"license": "MIT",
"dependencies": {
"acorn-private-class-elements": "^0.2.7"
},
"engines": {
"node": ">=4.8.2"
},
"peerDependencies": {
"acorn": "^6 || ^7 || ^8"
}
},
"node_modules/acorn-stage3": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/acorn-stage3/-/acorn-stage3-4.0.0.tgz",
"integrity": "sha512-BR+LaADtA6GTB5prkNqWmlmCLYmkyW0whvSxdHhbupTaro2qBJ95fJDEiRLPUmiACGHPaYyeH9xmNJWdGfXRQw==",
"license": "MIT",
"dependencies": {
"acorn-class-fields": "^0.3.7",
"acorn-private-methods": "^0.3.3",
"acorn-static-class-features": "^0.2.4"
},
"engines": {
"node": ">=4.8.2"
},
"peerDependencies": {
"acorn": "^7.4 || ^8"
}
},
"node_modules/acorn-static-class-features": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/acorn-static-class-features/-/acorn-static-class-features-0.2.4.tgz",
"integrity": "sha512-5X4mpYq5J3pdndLmIB0+WtFd/mKWnNYpuTlTzj32wUu/PMmEGOiayQ5UrqgwdBNiaZBtDDh5kddpP7Yg2QaQYA==",
"license": "MIT",
"dependencies": {
"acorn-private-class-elements": "^0.2.7"
},
"engines": {
"node": ">=4.8.2"
},
"peerDependencies": {
"acorn": "^6.1.0 || ^7 || ^8"
}
},
"node_modules/ajv": { "node_modules/ajv": {
"version": "6.12.6", "version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@ -1384,18 +1310,6 @@
"url": "https://opencollective.com/eslint" "url": "https://opencollective.com/eslint"
} }
}, },
"node_modules/espree/node_modules/acorn": {
"version": "8.11.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
"integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
"dev": true,
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/esquery": { "node_modules/esquery": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
@ -3852,17 +3766,9 @@
"dev": true "dev": true
}, },
"acorn": { "acorn": {
"version": "7.4.1", "version": "8.14.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="
},
"acorn-class-fields": {
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/acorn-class-fields/-/acorn-class-fields-0.3.7.tgz",
"integrity": "sha512-jdUWSFce0fuADUljmExz4TWpPkxmRW/ZCPRqeeUzbGf0vFUcpQYbyq52l75qGd0oSwwtAepeL6hgb/naRgvcKQ==",
"requires": {
"acorn-private-class-elements": "^0.2.7"
}
}, },
"acorn-jsx": { "acorn-jsx": {
"version": "5.3.2", "version": "5.3.2",
@ -3871,38 +3777,6 @@
"dev": true, "dev": true,
"requires": {} "requires": {}
}, },
"acorn-private-class-elements": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/acorn-private-class-elements/-/acorn-private-class-elements-0.2.7.tgz",
"integrity": "sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA==",
"requires": {}
},
"acorn-private-methods": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/acorn-private-methods/-/acorn-private-methods-0.3.3.tgz",
"integrity": "sha512-46oeEol3YFvLSah5m9hGMlNpxDBCEkdceJgf01AjqKYTK9r6HexKs2rgSbLK81pYjZZMonhftuUReGMlbbv05w==",
"requires": {
"acorn-private-class-elements": "^0.2.7"
}
},
"acorn-stage3": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/acorn-stage3/-/acorn-stage3-4.0.0.tgz",
"integrity": "sha512-BR+LaADtA6GTB5prkNqWmlmCLYmkyW0whvSxdHhbupTaro2qBJ95fJDEiRLPUmiACGHPaYyeH9xmNJWdGfXRQw==",
"requires": {
"acorn-class-fields": "^0.3.7",
"acorn-private-methods": "^0.3.3",
"acorn-static-class-features": "^0.2.4"
}
},
"acorn-static-class-features": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/acorn-static-class-features/-/acorn-static-class-features-0.2.4.tgz",
"integrity": "sha512-5X4mpYq5J3pdndLmIB0+WtFd/mKWnNYpuTlTzj32wUu/PMmEGOiayQ5UrqgwdBNiaZBtDDh5kddpP7Yg2QaQYA==",
"requires": {
"acorn-private-class-elements": "^0.2.7"
}
},
"ajv": { "ajv": {
"version": "6.12.6", "version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@ -4539,14 +4413,6 @@
"acorn": "^8.9.0", "acorn": "^8.9.0",
"acorn-jsx": "^5.3.2", "acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^3.4.1" "eslint-visitor-keys": "^3.4.1"
},
"dependencies": {
"acorn": {
"version": "8.11.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
"integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
"dev": true
}
} }
}, },
"esquery": { "esquery": {

View File

@ -27,7 +27,6 @@
"update-local-apps": "apps/*/metadata.json" "update-local-apps": "apps/*/metadata.json"
}, },
"dependencies": { "dependencies": {
"acorn": "^7.2.0", "acorn": "^8.0.0"
"acorn-stage3": "^4.0.0"
} }
} }