Add sourceType module to new test
MODIFY
packages/@romejs/js-parser/test-fixtures/comments/export-external/input.test.md
packages/@romejs/js-parser/test-fixtures/comments/export-external/input.test.md
```javascript
Program {
corrupt: false
+ diagnostics: Array []
directives: Array []
filename: 'input.js'
hasHoistedVars: false
interpreter: undefined
mtime: undefined
- sourceType: 'script'
+ sourceType: 'module'
syntax: Array []
loc: Object {
filename: 'input.js'
@@ -46,40 +47,6 @@ Program {
}
}
]
- diagnostics: Array [
- Object {
- origins: Array [Object {category: 'js-parser'}]
- description: Object {
- category: 'parse/js'
- message: PARTIAL_BLESSED_DIAGNOSTIC_MESSAGE {value: '<emphasis>import</emphasis> and <emphasis>export</emphasis> can only appear in a module'}
- advice: Array [
- log {
- category: 'info'
- message: 'Change the extension to <emphasis>.mjs</emphasis> to turn this file into a module'
- }
- log {
- category: 'info'
- message: 'Add <emphasis>"type": "module"</emphasis> to your <filelink emphasis target="package.json" />'
- }
- ]
- }
- location: Object {
- filename: 'input.js'
- mtime: undefined
- sourceType: 'script'
- end: Object {
- column: 26
- index: 40
- line: 2
- }
- start: Object {
- column: 0
- index: 14
- line: 2
- }
- }
- }
- ]
body: Array [
ExportExternalDeclaration {
defaultSpecifier: undefined

ADD
packages/@romejs/js-parser/test-fixtures/comments/export-external/options.json
+{
+ "sourceType": "module"
+}

Add sourceType module to new test