mirror of https://github.com/webpack/webpack.git
refactor: migrate on `acorn-import-attributes`
This commit is contained in:
parent
941d3a6017
commit
f137fd2bcf
|
|
@ -6,7 +6,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Parser: AcornParser } = require("acorn");
|
const { Parser: AcornParser } = require("acorn");
|
||||||
const { importAssertions } = require("acorn-import-assertions");
|
const { importAttributesOrAssertions } = require("acorn-import-attributes");
|
||||||
const { SyncBailHook, HookMap } = require("tapable");
|
const { SyncBailHook, HookMap } = require("tapable");
|
||||||
const vm = require("vm");
|
const vm = require("vm");
|
||||||
const Parser = require("../Parser");
|
const Parser = require("../Parser");
|
||||||
|
|
@ -108,7 +108,7 @@ const ALLOWED_MEMBER_TYPES_ALL = 0b11;
|
||||||
|
|
||||||
// Syntax: https://developer.mozilla.org/en/SpiderMonkey/Parser_API
|
// Syntax: https://developer.mozilla.org/en/SpiderMonkey/Parser_API
|
||||||
|
|
||||||
const parser = AcornParser.extend(importAssertions);
|
const parser = AcornParser.extend(importAttributesOrAssertions);
|
||||||
|
|
||||||
class VariableInfo {
|
class VariableInfo {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
"@webassemblyjs/wasm-edit": "^1.12.1",
|
"@webassemblyjs/wasm-edit": "^1.12.1",
|
||||||
"@webassemblyjs/wasm-parser": "^1.12.1",
|
"@webassemblyjs/wasm-parser": "^1.12.1",
|
||||||
"acorn": "^8.7.1",
|
"acorn": "^8.7.1",
|
||||||
"acorn-import-assertions": "^1.9.0",
|
"acorn-import-attributes": "^1.9.4",
|
||||||
"browserslist": "^4.21.10",
|
"browserslist": "^4.21.10",
|
||||||
"chrome-trace-event": "^1.0.2",
|
"chrome-trace-event": "^1.0.2",
|
||||||
"enhanced-resolve": "^5.17.0",
|
"enhanced-resolve": "^5.17.0",
|
||||||
|
|
|
||||||
|
|
@ -1471,10 +1471,10 @@ abbrev@1.0.x:
|
||||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
|
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
|
||||||
integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==
|
integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==
|
||||||
|
|
||||||
acorn-import-assertions@^1.9.0:
|
acorn-import-attributes@^1.9.4:
|
||||||
version "1.9.0"
|
version "1.9.4"
|
||||||
resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac"
|
resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.4.tgz#415c98c21c63d067e3f5c6ad121b6173d5ac4d3b"
|
||||||
integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==
|
integrity sha512-dNIX/5UEnZvVL94dV2scl4VIooK36D8AteP4xiz7cPKhDbhLhSuWkzG580g+Q7TXJklp+Z21SiaK7/HpLO84Qg==
|
||||||
|
|
||||||
acorn-jsx@^5.3.2:
|
acorn-jsx@^5.3.2:
|
||||||
version "5.3.2"
|
version "5.3.2"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue