Files
Nicolò RibaudoandGitHub 2818e21eda Enable import attributes parsing by default (#16850)
* Enable import attributes parsing by default

* Remove plugin from tests

* Update fixtures

* Fix failures

* `make build`

* Fix TS errors

* Fix

* Update .d.ts

* Move in core

* [babel 8] Remove syntax plugins from preset-env

* Update fixtures

* Fix ESM build of Babel 7 and standalone

* Update flow allowlist

* Update parser fixtures for Babel 8

* Update generator tests

* Update parser test

* Update standalone

* Do not run import attribtues plugin test in Babel 8

* Make tests pass in babel 8

* Fix Babel 8 build

* [babel 8] Stop printing legacy "with" attributes

* fix prettier integration test

* Fix Babel 8 compat in syntax-import-attributes

* Try fix

* Do not error for the removed `importAttributes` plugin

* Skip a test in babel7/8 compat e2e

* Throw an error when using removed option from the parser

* Fixes after rebase

* Raise `ImportCallArity` also when `createImportExpressions`

* Fix linting
2024-10-24 20:33:39 +02:00

62 lines
2.2 KiB
JSON

{
"type": "File",
"start":0,"end":51,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":51,"index":51}},
"program": {
"type": "Program",
"start":0,"end":51,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":51,"index":51}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ImportDeclaration",
"start":0,"end":51,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":51,"index":51}},
"phase": "defer",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start":13,"end":20,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":20,"index":20}},
"local": {
"type": "Identifier",
"start":18,"end":20,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":1,"column":20,"index":20},"identifierName":"ns"},
"name": "ns"
}
}
],
"source": {
"type": "StringLiteral",
"start":26,"end":29,"loc":{"start":{"line":1,"column":26,"index":26},"end":{"line":1,"column":29,"index":29}},
"extra": {
"rawValue": "x",
"raw": "\"x\""
},
"value": "x"
},
"attributes": [
{
"type": "ImportAttribute",
"start":37,"end":48,"loc":{"start":{"line":1,"column":37,"index":37},"end":{"line":1,"column":48,"index":48}},
"key": {
"type": "Identifier",
"start":37,"end":41,"loc":{"start":{"line":1,"column":37,"index":37},"end":{"line":1,"column":41,"index":41},"identifierName":"attr"},
"name": "attr"
},
"value": {
"type": "StringLiteral",
"start":43,"end":48,"loc":{"start":{"line":1,"column":43,"index":43},"end":{"line":1,"column":48,"index":48}},
"extra": {
"rawValue": "val",
"raw": "\"val\""
},
"value": "val"
}
}
]
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}