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

89 lines
3.4 KiB
JSON

{
"type": "File",
"start":0,"end":78,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":78}},
"program": {
"type": "Program",
"start":0,"end":78,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":78}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "DeclareModule",
"start":0,"end":78,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":78}},
"id": {
"type": "StringLiteral",
"start":15,"end":18,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":18,"index":18}},
"extra": {
"rawValue": "M",
"raw": "\"M\""
},
"value": "M"
},
"body": {
"type": "BlockStatement",
"start":19,"end":78,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":4,"column":1,"index":78}},
"body": [
{
"type": "ImportDeclaration",
"start":23,"end":47,"loc":{"start":{"line":2,"column":2,"index":23},"end":{"line":2,"column":26,"index":47}},
"importKind": "type",
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start":35,"end":36,"loc":{"start":{"line":2,"column":14,"index":35},"end":{"line":2,"column":15,"index":36}},
"local": {
"type": "Identifier",
"start":35,"end":36,"loc":{"start":{"line":2,"column":14,"index":35},"end":{"line":2,"column":15,"index":36},"identifierName":"T"},
"name": "T"
}
}
],
"source": {
"type": "StringLiteral",
"start":42,"end":46,"loc":{"start":{"line":2,"column":21,"index":42},"end":{"line":2,"column":25,"index":46}},
"extra": {
"rawValue": "TM",
"raw": "\"TM\""
},
"value": "TM"
},
"attributes": []
},
{
"type": "ImportDeclaration",
"start":50,"end":76,"loc":{"start":{"line":3,"column":2,"index":50},"end":{"line":3,"column":28,"index":76}},
"importKind": "typeof",
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start":64,"end":65,"loc":{"start":{"line":3,"column":16,"index":64},"end":{"line":3,"column":17,"index":65}},
"local": {
"type": "Identifier",
"start":64,"end":65,"loc":{"start":{"line":3,"column":16,"index":64},"end":{"line":3,"column":17,"index":65},"identifierName":"U"},
"name": "U"
}
}
],
"source": {
"type": "StringLiteral",
"start":71,"end":75,"loc":{"start":{"line":3,"column":23,"index":71},"end":{"line":3,"column":27,"index":75}},
"extra": {
"rawValue": "UM",
"raw": "\"UM\""
},
"value": "UM"
},
"attributes": []
}
]
},
"kind": "CommonJS"
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}