Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support ES2025 and RegExp duplicate named capturing groups #608

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ const options = {
// create a top-level tokens array containing all tokens
tokens: false,

// Set to 3, 5 (the default), 6, 7, 8, 9, 10, 11, 12, 13, 14 or 15 to specify the version of ECMAScript syntax you want to use.
// You can also set to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), 2021 (same as 12), 2022 (same as 13), 2023 (same as 14) or 2024 (same as 15) to use the year-based naming.
// Set to 3, 5 (the default), 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 or 16 to specify the version of ECMAScript syntax you want to use.
// You can also set to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), 2021 (same as 12), 2022 (same as 13), 2023 (same as 14), 2024 (same as 15) or 2025 (same as 16) to use the year-based naming.
// You can also set "latest" to use the most recently supported version.
ecmaVersion: 3,

Expand Down Expand Up @@ -231,11 +231,11 @@ We are building on top of Acorn, however, so that we can contribute back and hel

### What ECMAScript features do you support?

Espree supports all ECMAScript 2023 features and partially supports ECMAScript 2024 features.
Espree supports all ECMAScript 2024 features and partially supports ECMAScript 2025 features.

Because ECMAScript 2024 is still under development, we are implementing features as they are finalized. Currently, Espree supports:
Because ECMAScript 2025 is still under development, we are implementing features as they are finalized. Currently, Espree supports:

* [RegExp v flag with set notation + properties of strings](https://github.com/tc39/proposal-regexp-v-flag)
* [RegExp Duplicate named capturing groups](https://github.com/tc39/proposal-duplicate-named-capturing-groups)

See [finished-proposals.md](https://github.com/tc39/proposals/blob/master/finished-proposals.md) to know what features are finalized.

Expand Down
3 changes: 2 additions & 1 deletion lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const SUPPORTED_VERSIONS = [
12, // 2021
13, // 2022
14, // 2023
15 // 2024
15, // 2024
16 // 2025
];

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"funding": "https://opencollective.com/eslint",
"license": "BSD-2-Clause",
"dependencies": {
"acorn": "^8.11.3",
"acorn": "^8.12.0",
"acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^4.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
"index": 13,
"lineNumber": 1,
"column": 14,
"message": "Invalid regular expression: /(?<x>a)|(?<x>b)(?<x>c)/: Duplicate capture group name"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const re1 = /(?<x>a)|(?<x>b)(?<x>c)/;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
"index": 13,
"lineNumber": 1,
"column": 14,
"message": "Invalid regular expression: /(?<x>a)(?:(?<x>b)|(?<x>c))/: Duplicate capture group name"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const re1 = /(?<x>a)(?:(?<x>b)|(?<x>c))/;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
"index": 13,
"lineNumber": 1,
"column": 14,
"message": "Invalid regular expression: /(?<x>a)(?<x>b)/: Duplicate capture group name"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const re1 = /(?<x>a)(?<x>b)/;
Loading