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

95 lines
3.4 KiB
JSON

{
"type": "File",
"start":0,"end":76,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":24,"index":76}},
"program": {
"type": "Program",
"start":0,"end":76,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":24,"index":76}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ImportDeclaration",
"start":0,"end":76,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":5,"column":24,"index":76}},
"specifiers": [
{
"type": "ImportSpecifier",
"start":21,"end":24,"loc":{"start":{"line":2,"column":12,"index":21},"end":{"line":2,"column":15,"index":24}},
"imported": {
"type": "Identifier",
"start":21,"end":24,"loc":{"start":{"line":2,"column":12,"index":21},"end":{"line":2,"column":15,"index":24},"identifierName":"Foo"},
"name": "Foo"
},
"local": {
"type": "Identifier",
"start":21,"end":24,"loc":{"start":{"line":2,"column":12,"index":21},"end":{"line":2,"column":15,"index":24},"identifierName":"Foo"},
"name": "Foo"
},
"trailingComments": [
{
"type": "CommentBlock",
"value": " Two ",
"start":27,"end":36,"loc":{"start":{"line":3,"column":2,"index":27},"end":{"line":3,"column":11,"index":36}}
},
{
"type": "CommentBlock",
"value": " Three ",
"start":40,"end":51,"loc":{"start":{"line":4,"column":2,"index":40},"end":{"line":4,"column":13,"index":51}}
}
],
"leadingComments": [
{
"type": "CommentBlock",
"value": " One ",
"start":11,"end":20,"loc":{"start":{"line":2,"column":2,"index":11},"end":{"line":2,"column":11,"index":20}}
}
]
}
],
"source": {
"type": "StringLiteral",
"start":70,"end":75,"loc":{"start":{"line":5,"column":18,"index":70},"end":{"line":5,"column":23,"index":75}},
"extra": {
"rawValue": "foo",
"raw": "\"foo\""
},
"value": "foo"
},
"attributes": [],
"innerComments": [
{
"type": "CommentBlock",
"value": " Four ",
"start":54,"end":64,"loc":{"start":{"line":5,"column":2,"index":54},"end":{"line":5,"column":12,"index":64}}
}
]
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
},
"comments": [
{
"type": "CommentBlock",
"value": " One ",
"start":11,"end":20,"loc":{"start":{"line":2,"column":2,"index":11},"end":{"line":2,"column":11,"index":20}}
},
{
"type": "CommentBlock",
"value": " Two ",
"start":27,"end":36,"loc":{"start":{"line":3,"column":2,"index":27},"end":{"line":3,"column":11,"index":36}}
},
{
"type": "CommentBlock",
"value": " Three ",
"start":40,"end":51,"loc":{"start":{"line":4,"column":2,"index":40},"end":{"line":4,"column":13,"index":51}}
},
{
"type": "CommentBlock",
"value": " Four ",
"start":54,"end":64,"loc":{"start":{"line":5,"column":2,"index":54},"end":{"line":5,"column":12,"index":64}}
}
]
}