1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Description: avoid Nodejs module astring
Revert upstream change to switch code parser:
The change was done because of a bug/shortcoming in the old parser
which was since solved,
and the replacement parser is not in Debian.
Author: Jonas Smedegaard <dr@jones.dk>
Reviewed-By: Yadd <yadd@debian.org>
Last-Update: 2022-05-30
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
},
"devDependencies": {
"@ls-lint/ls-lint": "^1.11.2",
- "astring": "^1.8.5",
+ "escodegen": "^1.12.0",
"eslint": "^7.32.0",
"eslump": "^3.0.0",
"esm": "^3.2.25",
--- a/test/mocha/spidermonkey.js
+++ b/test/mocha/spidermonkey.js
@@ -2,13 +2,13 @@
import assert from "assert";
import fs from "fs";
import * as acorn from "acorn";
-import * as astring from "astring";
+import escodegen from "escodegen";
import * as AST from "../../lib/ast.js";
import { parse } from "../../lib/parse.js";
import { minify } from "../../main.js";
const acornParse = acorn.default ? acorn.default.parse : acorn.parse;
-const astringGenerate = astring.default ? astring.default.generate : astring.generate;
+const astringGenerate = escodegen.generate;
describe("spidermonkey export/import sanity test", function() {
it("Should judge between directives and strings correctly on import", async function() {
|