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

79 lines
3.1 KiB
JSON

{
"type": "File",
"start":0,"end":65,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":65}},
"program": {
"type": "Program",
"start":0,"end":65,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":65}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "FunctionDeclaration",
"start":0,"end":65,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":65}},
"id": {
"type": "Identifier",
"start":9,"end":19,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":19,"index":19},"identifierName":"loadImport"},
"name": "loadImport"
},
"generator": false,
"async": false,
"params": [
{
"type": "Identifier",
"start":20,"end":24,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":24,"index":24},"identifierName":"file"},
"name": "file"
}
],
"body": {
"type": "BlockStatement",
"start":26,"end":65,"loc":{"start":{"line":1,"column":26,"index":26},"end":{"line":3,"column":1,"index":65}},
"body": [
{
"type": "ReturnStatement",
"start":30,"end":63,"loc":{"start":{"line":2,"column":2,"index":30},"end":{"line":2,"column":35,"index":63}},
"argument": {
"type": "ImportExpression",
"start":37,"end":62,"loc":{"start":{"line":2,"column":9,"index":37},"end":{"line":2,"column":34,"index":62}},
"source": {
"type": "TemplateLiteral",
"start":44,"end":61,"loc":{"start":{"line":2,"column":16,"index":44},"end":{"line":2,"column":33,"index":61}},
"expressions": [
{
"type": "Identifier",
"start":52,"end":56,"loc":{"start":{"line":2,"column":24,"index":52},"end":{"line":2,"column":28,"index":56},"identifierName":"file"},
"name": "file"
}
],
"quasis": [
{
"type": "TemplateElement",
"start":45,"end":50,"loc":{"start":{"line":2,"column":17,"index":45},"end":{"line":2,"column":22,"index":50}},
"value": {
"raw": "test/",
"cooked": "test/"
},
"tail": false
},
{
"type": "TemplateElement",
"start":57,"end":60,"loc":{"start":{"line":2,"column":29,"index":57},"end":{"line":2,"column":32,"index":60}},
"value": {
"raw": ".js",
"cooked": ".js"
},
"tail": true
}
]
},
"options": null
}
}
],
"directives": []
}
}
],
"directives": []
}
}