Skip to content

Commit

Permalink
Mark assert attributes with extra.deprecatedAssertSyntax (#15667)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed May 29, 2023
1 parent a516e15 commit 3511622
Show file tree
Hide file tree
Showing 21 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/babel-parser/src/parser/statement.ts
Expand Up @@ -3272,6 +3272,7 @@ export default abstract class StatementParser extends ExpressionParser {
at: this.state.startLoc,
});
}
this.addExtra(node, "deprecatedAssertSyntax", true);
} else {
this.expectOnePlugin(["importAttributes", "importAssertions"]);
}
Expand Down
Expand Up @@ -23,6 +23,9 @@
},
"value": "foo"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -39,6 +39,9 @@
"value": "foo.json"
},
"declaration": null,
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -34,6 +34,9 @@
},
"value": "foo.json"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -33,6 +33,9 @@
},
"value": "foo.json"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -30,6 +30,9 @@
},
"value": "foo.json"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down Expand Up @@ -80,6 +83,9 @@
"value": "foo.json"
},
"declaration": null,
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -30,6 +30,9 @@
},
"value": "foo"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down Expand Up @@ -80,6 +83,9 @@
"value": "foo"
},
"declaration": null,
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -44,6 +44,9 @@
},
"value": "foo"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": []
},
{
Expand All @@ -69,6 +72,9 @@
},
"value": "foo"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": []
},
{
Expand Down Expand Up @@ -100,6 +106,9 @@
"value": "foo"
},
"declaration": null,
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": []
},
{
Expand All @@ -125,6 +134,9 @@
},
"value": "foo"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": []
}
],
Expand Down
Expand Up @@ -20,6 +20,9 @@
},
"value": "foo"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -30,6 +30,9 @@
},
"value": "foo.json"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -19,6 +19,9 @@
},
"value": "foo.json"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -36,6 +36,9 @@
"value": "foo"
},
"declaration": null,
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -40,6 +40,9 @@
"value": "foo"
},
"declaration": null,
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -36,6 +36,9 @@
"value": "foo.json"
},
"declaration": null,
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -36,6 +36,9 @@
"value": "foo.json"
},
"declaration": null,
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -36,6 +36,9 @@
"value": "foo.json"
},
"declaration": null,
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -20,6 +20,9 @@
},
"value": "x"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -20,6 +20,9 @@
},
"value": "x"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -30,6 +30,9 @@
},
"value": "foo.json"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -30,6 +30,9 @@
},
"value": "foo.json"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down
Expand Up @@ -30,6 +30,9 @@
},
"value": "foo.json"
},
"extra": {
"deprecatedAssertSyntax": true
},
"attributes": [
{
"type": "ImportAttribute",
Expand Down

0 comments on commit 3511622

Please sign in to comment.