diff --git a/package.json b/package.json index ec944602d..8406222c5 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "@angular/compiler": "15.2.2", "@babel/code-frame": "7.18.6", - "@babel/parser": "7.21.2", + "@babel/parser": "7.21.3", "@babel/types": "7.21.3", "@glimmer/syntax": "0.84.2", "@iarna/toml": "2.2.5", diff --git a/src/language-js/parse/postprocess/index.js b/src/language-js/parse/postprocess/index.js index 3370789b8..3d6757fe9 100644 --- a/src/language-js/parse/postprocess/index.js +++ b/src/language-js/parse/postprocess/index.js @@ -105,15 +105,7 @@ function postprocess(ast, options) { } } break; - case "DeclareInterface": - case "InterfaceDeclaration": case "TSInterfaceDeclaration": - if (isNonEmptyArray(node.mixins)) { - throwSyntaxError( - node.mixins[0], - "Interface declaration cannot have 'mixins' clause." - ); - } if (isNonEmptyArray(node.implements)) { throwSyntaxError( node.implements[0], diff --git a/tests/format/misc/errors/flow/interface/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/flow/interface/__snapshots__/jsfmt.spec.js.snap index 0330abc95..3419dcf57 100644 --- a/tests/format/misc/errors/flow/interface/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/flow/interface/__snapshots__/jsfmt.spec.js.snap @@ -13,9 +13,9 @@ exports[`snippet: #0 [flow] format 1`] = ` `; exports[`snippet: #1 [babel-flow] format 1`] = ` -"Interface declaration cannot have 'mixins' clause. (1:20) +"Unexpected token, expected "{" (1:13) > 1 | interface A mixins B {} - | ^" + | ^" `; exports[`snippet: #1 [flow] format 1`] = ` @@ -25,9 +25,9 @@ exports[`snippet: #1 [flow] format 1`] = ` `; exports[`snippet: #2 [babel-flow] format 1`] = ` -"Interface declaration cannot have 'implements' clause. (1:24) +"Unexpected token, expected "{" (1:13) > 1 | interface A implements B {} - | ^" + | ^" `; exports[`snippet: #2 [flow] format 1`] = ` @@ -37,9 +37,9 @@ exports[`snippet: #2 [flow] format 1`] = ` `; exports[`snippet: #3 [babel-flow] format 1`] = ` -"Interface declaration cannot have 'mixins' clause. (1:28) +"Unexpected token, expected "{" (1:21) > 1 | declare interface A mixins B {} - | ^" + | ^" `; exports[`snippet: #3 [flow] format 1`] = ` @@ -49,9 +49,9 @@ exports[`snippet: #3 [flow] format 1`] = ` `; exports[`snippet: #4 [babel-flow] format 1`] = ` -"Interface declaration cannot have 'implements' clause. (1:32) +"Unexpected token, expected "{" (1:21) > 1 | declare interface A implements B {} - | ^" + | ^" `; exports[`snippet: #4 [flow] format 1`] = ` diff --git a/yarn.lock b/yarn.lock index 353beaa68..a159b8253 100644 --- a/yarn.lock +++ b/yarn.lock @@ -229,12 +229,12 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:7.21.2, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.18.11": - version: 7.21.2 - resolution: "@babel/parser@npm:7.21.2" +"@babel/parser@npm:7.21.3, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.18.11": + version: 7.21.3 + resolution: "@babel/parser@npm:7.21.3" bin: parser: ./bin/babel-parser.js - checksum: e2b89de2c63d4cdd2cafeaea34f389bba729727eec7a8728f736bc472a59396059e3e9fe322c9bed8fd126d201fb609712949dc8783f4cae4806acd9a73da6ff + checksum: a71e6456a1260c2a943736b56cc0acdf5f2a53c6c79e545f56618967e51f9b710d1d3359264e7c979313a7153741b1d95ad8860834cc2ab4ce4f428b13cc07be languageName: node linkType: hard @@ -6714,7 +6714,7 @@ __metadata: "@angular/compiler": 15.2.2 "@babel/code-frame": 7.18.6 "@babel/generator": 7.21.3 - "@babel/parser": 7.21.2 + "@babel/parser": 7.21.3 "@babel/types": 7.21.3 "@esbuild-plugins/node-modules-polyfill": 0.2.2 "@glimmer/reference": 0.84.2