From cd9df73ba34ccaae37422e4ef53a30a6fbb80bc3 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Sat, 28 Sep 2024 08:02:33 +0000 Subject: [PATCH 01/12] docs: Update README sponsors --- README.md | 2 +- packages/eslint-scope/README.md | 2 +- packages/eslint-visitor-keys/README.md | 2 +- packages/espree/README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 72aa6463..3df31cd5 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

diff --git a/packages/eslint-scope/README.md b/packages/eslint-scope/README.md index 2cdce2b9..9d54fb2d 100644 --- a/packages/eslint-scope/README.md +++ b/packages/eslint-scope/README.md @@ -100,7 +100,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

diff --git a/packages/eslint-visitor-keys/README.md b/packages/eslint-visitor-keys/README.md index 3bea023e..f05f4e2a 100644 --- a/packages/eslint-visitor-keys/README.md +++ b/packages/eslint-visitor-keys/README.md @@ -112,7 +112,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

diff --git a/packages/espree/README.md b/packages/espree/README.md index 415fa6be..16944f74 100644 --- a/packages/espree/README.md +++ b/packages/espree/README.md @@ -253,7 +253,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

From 98884ec0db3db54503ae77714ece17f5799d4a07 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Mon, 30 Sep 2024 08:02:45 +0000 Subject: [PATCH 02/12] docs: Update README sponsors --- README.md | 2 +- packages/eslint-scope/README.md | 2 +- packages/eslint-visitor-keys/README.md | 2 +- packages/espree/README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3df31cd5..04d13ce2 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

diff --git a/packages/eslint-scope/README.md b/packages/eslint-scope/README.md index 9d54fb2d..791d2149 100644 --- a/packages/eslint-scope/README.md +++ b/packages/eslint-scope/README.md @@ -100,7 +100,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

diff --git a/packages/eslint-visitor-keys/README.md b/packages/eslint-visitor-keys/README.md index f05f4e2a..8bfc429b 100644 --- a/packages/eslint-visitor-keys/README.md +++ b/packages/eslint-visitor-keys/README.md @@ -112,7 +112,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

diff --git a/packages/espree/README.md b/packages/espree/README.md index 16944f74..326561a4 100644 --- a/packages/espree/README.md +++ b/packages/espree/README.md @@ -253,7 +253,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

From e66d99958f111fe0d53d37f6a3c2b77656fca681 Mon Sep 17 00:00:00 2001 From: Amaresh S M Date: Mon, 30 Sep 2024 19:58:05 +0530 Subject: [PATCH 03/12] chore: remove assert from rollup external array (#634) --- packages/eslint-scope/rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-scope/rollup.config.js b/packages/eslint-scope/rollup.config.js index 135e147a..564ff2f7 100644 --- a/packages/eslint-scope/rollup.config.js +++ b/packages/eslint-scope/rollup.config.js @@ -1,6 +1,6 @@ export default { input: "./lib/index.js", - external: ["assert", "estraverse", "esrecurse"], + external: ["estraverse", "esrecurse"], treeshake: false, output: { format: "cjs", From f2d23f3ec7397ad7594075e09621965d68b07dc2 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Tue, 1 Oct 2024 08:02:54 +0000 Subject: [PATCH 04/12] docs: Update README sponsors --- README.md | 2 +- packages/eslint-scope/README.md | 2 +- packages/eslint-visitor-keys/README.md | 2 +- packages/espree/README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 04d13ce2..f0a10af5 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

WordHint Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

diff --git a/packages/eslint-scope/README.md b/packages/eslint-scope/README.md index 791d2149..9302a63d 100644 --- a/packages/eslint-scope/README.md +++ b/packages/eslint-scope/README.md @@ -100,7 +100,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

WordHint Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

diff --git a/packages/eslint-visitor-keys/README.md b/packages/eslint-visitor-keys/README.md index 8bfc429b..bd9dd3ef 100644 --- a/packages/eslint-visitor-keys/README.md +++ b/packages/eslint-visitor-keys/README.md @@ -112,7 +112,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

WordHint Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

diff --git a/packages/espree/README.md b/packages/espree/README.md index 326561a4..1decea29 100644 --- a/packages/espree/README.md +++ b/packages/espree/README.md @@ -253,7 +253,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

WordHint Goread.io Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

From 29ee460a6cac2d28b35b01604ffda26a4999b4ee Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Sun, 6 Oct 2024 08:23:53 +0200 Subject: [PATCH 05/12] docs: Use prerendered sponsors for README (#636) --- README.md | 16 ++--- package.json | 1 - packages/eslint-scope/README.md | 16 ++--- packages/eslint-visitor-keys/README.md | 16 ++--- packages/espree/README.md | 16 ++--- tools/update-readme.js | 91 ++------------------------ 6 files changed, 35 insertions(+), 121 deletions(-) diff --git a/README.md b/README.md index f0a10af5..ff2de4be 100644 --- a/README.md +++ b/README.md @@ -14,20 +14,18 @@ This repository is the home of the following packages: We work hard to ensure that the packages inside this repository are safe for everyone and that security issues are addressed quickly and responsibly. Read the full [security policy](https://github.com/eslint/.github/blob/master/SECURITY.md). -## Sponsors - -The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) to get your logo on our README and website. - +## Sponsors + +The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) +to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Platinum Sponsors

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

- - - -

Technology Sponsors

+

Technology Sponsors

+Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

- + diff --git a/package.json b/package.json index 650c49a6..5e715a54 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ ] }, "devDependencies": { - "common-tags": "^1.8.2", "eslint": "^9.11.1", "eslint-config-eslint": "^11.0.0", "eslint-plugin-chai-friendly": "^1.0.0", diff --git a/packages/eslint-scope/README.md b/packages/eslint-scope/README.md index 9302a63d..49685d86 100644 --- a/packages/eslint-scope/README.md +++ b/packages/eslint-scope/README.md @@ -90,20 +90,18 @@ We work hard to ensure that ESLint Scope is safe for everyone and that security ESLint Scope is licensed under a permissive BSD 2-clause license. -## Sponsors - -The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) to get your logo on our README and website. - +## Sponsors + +The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) +to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Platinum Sponsors

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

- - - -

Technology Sponsors

+

Technology Sponsors

+Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

- + diff --git a/packages/eslint-visitor-keys/README.md b/packages/eslint-visitor-keys/README.md index bd9dd3ef..409c82d6 100644 --- a/packages/eslint-visitor-keys/README.md +++ b/packages/eslint-visitor-keys/README.md @@ -102,20 +102,18 @@ Welcome. See [ESLint contribution guidelines](https://eslint.org/docs/developer- [Node.js]: https://nodejs.org/ [ESTree]: https://github.com/estree/estree -## Sponsors - -The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) to get your logo on our README and website. - +## Sponsors + +The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) +to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Platinum Sponsors

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

- - - -

Technology Sponsors

+

Technology Sponsors

+Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

- + diff --git a/packages/espree/README.md b/packages/espree/README.md index 1decea29..5201050f 100644 --- a/packages/espree/README.md +++ b/packages/espree/README.md @@ -243,20 +243,18 @@ See [finished-proposals.md](https://github.com/tc39/proposals/blob/master/finish In general, we do not support experimental JavaScript features. We may make exceptions from time to time depending on the maturity of the features. -## Sponsors - -The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) to get your logo on our README and website. - +## Sponsors + +The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) +to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Platinum Sponsors

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

- - - -

Technology Sponsors

+

Technology Sponsors

+Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

- + diff --git a/tools/update-readme.js b/tools/update-readme.js index 520a268c..226a211e 100644 --- a/tools/update-readme.js +++ b/tools/update-readme.js @@ -11,98 +11,29 @@ //----------------------------------------------------------------------------- import { readFileSync, readdirSync, writeFileSync } from "node:fs"; -import { stripIndents } from "common-tags"; import got from "got"; //----------------------------------------------------------------------------- // Data //----------------------------------------------------------------------------- -const SPONSORS_URL = "https://raw.githubusercontent.com/eslint/eslint.org/main/src/_data/sponsors.json"; - -const TECH_SPONSORS_URL = "https://raw.githubusercontent.com/eslint/eslint.org/main/src/_data/techsponsors.json"; - -const TECH_SPONSORS_IMAGE_PATH = "https://raw.githubusercontent.com/eslint/eslint.org/main/src"; +const SPONSORS_URL = "https://raw.githubusercontent.com/eslint/eslint.org/main/includes/sponsors.md"; const README_FILE_PATHS = [ "./README.md", ...readdirSync("./packages").map(dir => `./packages/${dir}/README.md`) ]; -const heights = { - platinum: 128, - gold: 96, - silver: 64, - bronze: 32 -}; - //----------------------------------------------------------------------------- // Helpers //----------------------------------------------------------------------------- /** - * Fetches the latest sponsors data from the website. - * @returns {Object} The sponsors data object. + * Fetches the latest sponsors from the website. + * @returns {Promise}} Prerendered sponsors markdown. */ -async function fetchSponsorsData() { - const data = await got(SPONSORS_URL).json(); - - // remove backers from sponsors list - not shown on readme - delete data.backers; - - return data; -} - -/** - * Fetches the latest tech sponsors data from the website. - * @returns {Array} The tech sponsors array of data object. - */ -async function fetchTechSponsors() { - const data = await got(TECH_SPONSORS_URL).json(); - - return data; -} - -/** - * Formats an array of sponsors into HTML for the readme. - * @param {Object} sponsors The object of sponsors. - * @returns {string} The HTML for the readme. - */ -function formatSponsors(sponsors) { - const nonEmptySponsors = Object.keys(sponsors).filter( - tier => sponsors[tier].length > 0 - ); - - return stripIndents` - ${nonEmptySponsors - .map( - tier => `

${tier[0].toUpperCase()}${tier.slice(1)} Sponsors

-

${sponsors[tier] - .map( - sponsor => - `${sponsor.name}` - ) - .join(" ")}

` - ) - .join("")} - `; -} - -/** - * Formats an array of sponsors into HTML for the readme. - * @param {Array} sponsors The array of sponsors. - * @returns {string} The HTML for the readme. - */ -function formatTechSponsors(sponsors) { - return stripIndents` -

Technology Sponsors

-

${sponsors - .map( - sponsor => - `${sponsor.name}` - ) - .join(" ")}

- `; +async function fetchSponsorsMarkdown() { + return got(SPONSORS_URL).text(); } //----------------------------------------------------------------------------- @@ -110,10 +41,7 @@ function formatTechSponsors(sponsors) { //----------------------------------------------------------------------------- (async () => { - const [techSponsors, allSponsors] = await Promise.all([ - fetchTechSponsors(), - fetchSponsorsData() - ]); + const allSponsors = await fetchSponsorsMarkdown(); README_FILE_PATHS.forEach(filePath => { @@ -122,12 +50,7 @@ function formatTechSponsors(sponsors) { let newReadme = readme.replace( /[\w\W]*?/u, - formatSponsors(allSponsors) - ); - - newReadme = newReadme.replace( - /[\w\W]*?/u, - formatTechSponsors(techSponsors) + `\n${allSponsors}\n` ); // replace multiple consecutive blank lines with just one blank line From c174944567399ade019ba780020dadd563b25130 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Sun, 6 Oct 2024 08:02:26 +0000 Subject: [PATCH 06/12] docs: Update README sponsors --- README.md | 1 + packages/eslint-scope/README.md | 1 + packages/eslint-visitor-keys/README.md | 1 + packages/espree/README.md | 1 + 4 files changed, 4 insertions(+) diff --git a/README.md b/README.md index ff2de4be..ad432550 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ We work hard to ensure that the packages inside this repository are safe for eve The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) to get your logo on our READMEs and [website](https://eslint.org/sponsors). +

Platinum Sponsors

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

diff --git a/packages/eslint-scope/README.md b/packages/eslint-scope/README.md index 49685d86..1c2a0293 100644 --- a/packages/eslint-scope/README.md +++ b/packages/eslint-scope/README.md @@ -96,6 +96,7 @@ ESLint Scope is licensed under a permissive BSD 2-clause license. The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) to get your logo on our READMEs and [website](https://eslint.org/sponsors). +

Platinum Sponsors

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

diff --git a/packages/eslint-visitor-keys/README.md b/packages/eslint-visitor-keys/README.md index 409c82d6..402bfb61 100644 --- a/packages/eslint-visitor-keys/README.md +++ b/packages/eslint-visitor-keys/README.md @@ -108,6 +108,7 @@ Welcome. See [ESLint contribution guidelines](https://eslint.org/docs/developer- The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) to get your logo on our READMEs and [website](https://eslint.org/sponsors). +

Platinum Sponsors

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

diff --git a/packages/espree/README.md b/packages/espree/README.md index 5201050f..9228971b 100644 --- a/packages/espree/README.md +++ b/packages/espree/README.md @@ -249,6 +249,7 @@ In general, we do not support experimental JavaScript features. We may make exce The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) to get your logo on our READMEs and [website](https://eslint.org/sponsors). +

Platinum Sponsors

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

From ee227ef1a2214b2139ef13d491eee7dd836ea91a Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Mon, 21 Oct 2024 17:31:35 +0200 Subject: [PATCH 07/12] chore: Remove unnecessary IIFE in update-readme (#637) --- tools/update-readme.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/tools/update-readme.js b/tools/update-readme.js index 226a211e..a6df7ab6 100644 --- a/tools/update-readme.js +++ b/tools/update-readme.js @@ -40,23 +40,21 @@ async function fetchSponsorsMarkdown() { // Main //----------------------------------------------------------------------------- -(async () => { - const allSponsors = await fetchSponsorsMarkdown(); +const allSponsors = await fetchSponsorsMarkdown(); - README_FILE_PATHS.forEach(filePath => { +README_FILE_PATHS.forEach(filePath => { - // read readme file - const readme = readFileSync(filePath, "utf8"); + // read readme file + const readme = readFileSync(filePath, "utf8"); - let newReadme = readme.replace( - /[\w\W]*?/u, - `\n${allSponsors}\n` - ); + let newReadme = readme.replace( + /[\w\W]*?/u, + `\n${allSponsors}\n` + ); - // replace multiple consecutive blank lines with just one blank line - newReadme = newReadme.replace(/(?<=^|\n)\n{2,}/gu, "\n"); + // replace multiple consecutive blank lines with just one blank line + newReadme = newReadme.replace(/(?<=^|\n)\n{2,}/gu, "\n"); - // output to the files - writeFileSync(filePath, newReadme, "utf8"); - }); -})(); + // output to the files + writeFileSync(filePath, newReadme, "utf8"); +}); From 5165f62461de4a1c1f730966ecbff11fed1ca214 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Fri, 25 Oct 2024 08:02:29 +0000 Subject: [PATCH 08/12] docs: Update README sponsors --- README.md | 2 +- packages/eslint-scope/README.md | 2 +- packages/eslint-visitor-keys/README.md | 2 +- packages/espree/README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ad432550..274b729f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders

Technology Sponsors

Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

diff --git a/packages/eslint-scope/README.md b/packages/eslint-scope/README.md index 1c2a0293..e60b4db3 100644 --- a/packages/eslint-scope/README.md +++ b/packages/eslint-scope/README.md @@ -101,7 +101,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders

Technology Sponsors

Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

diff --git a/packages/eslint-visitor-keys/README.md b/packages/eslint-visitor-keys/README.md index 402bfb61..3cbbdd39 100644 --- a/packages/eslint-visitor-keys/README.md +++ b/packages/eslint-visitor-keys/README.md @@ -113,7 +113,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders

Technology Sponsors

Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

diff --git a/packages/espree/README.md b/packages/espree/README.md index 9228971b..b971ea5a 100644 --- a/packages/espree/README.md +++ b/packages/espree/README.md @@ -254,7 +254,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Automattic Airbnb

Gold Sponsors

trunk.io

Silver Sponsors

JetBrains Liftoff American Express Workleap

Bronze Sponsors

-

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders Nextbase Starter Kit

+

WordHint Anagram Solver Icons8 Discord GitBook Nx HeroCoders

Technology Sponsors

Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

From 28456b462b1136c77a4b552a6bf09136ef6714db Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 25 Oct 2024 18:41:06 +0530 Subject: [PATCH 09/12] ci: add Node.js v23 (#638) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 764f129f..c3f3af69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [22.x, 21.x, 20.x, 18.x, "18.18.0"] + node: [23.x, 22.x, 21.x, 20.x, 18.x, "18.18.0"] include: - os: windows-latest node: "lts/*" From 2fd422278bfad826d601795670004f9d6da72ef7 Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Tue, 29 Oct 2024 18:49:32 +0900 Subject: [PATCH 10/12] feat: add support for Import Attributes and RegExp Modifiers (#639) * feat: add support for import attributes and RegExp modifiers * test: fix test case * test: add test case to eslint-scope --- .../eslint-scope/tests/import-attributes.js | 185 + .../eslint-visitor-keys/lib/visitor-keys.js | 16 +- packages/espree/package.json | 2 +- ...-attributes-with-dupe-key.module-result.js | 6 + ...-import-attributes-with-dupe-key.result.js | 6 + ...lid-import-attributes-with-dupe-key.src.js | 1 + ...mic-with-multiple-trailing-comma.result.js | 6 + ...ynamic-with-multiple-trailing-comma.src.js | 1 + ...h-multiple-trailing-comma.module-result.js | 6 + ...tes-with-multiple-trailing-comma.result.js | 6 + ...ibutes-with-multiple-trailing-comma.src.js | 1 + ...ttributes-with-number-key.module-result.js | 6 + ...mport-attributes-with-number-key.result.js | 6 + ...d-import-attributes-with-number-key.src.js | 1 + ...ributes-with-number-value.module-result.js | 6 + ...ort-attributes-with-number-value.result.js | 6 + ...import-attributes-with-number-value.src.js | 1 + .../valid-import-attributes.module-result.js | 4157 +++++++++++++++++ .../valid-import-attributes.result.js | 6 + .../valid-import-attributes.src.js | 12 + ...nvalid-regexp-dupe-add-modifiers.result.js | 6 + .../invalid-regexp-dupe-add-modifiers.src.js | 1 + .../invalid-regexp-dupe-modifiers.result.js | 6 + .../invalid-regexp-dupe-modifiers.src.js | 1 + ...lid-regexp-dupe-remove-modifiers.result.js | 6 + ...nvalid-regexp-dupe-remove-modifiers.src.js | 1 + .../invalid-regexp-empty-modifiers.result.js | 6 + .../invalid-regexp-empty-modifiers.src.js | 1 + ...invalid-regexp-unknown-modifiers.result.js | 6 + .../invalid-regexp-unknown-modifiers.src.js | 1 + .../valid-regexp-modifiers.result.js | 424 ++ .../valid-regexp-modifiers.src.js | 5 + 32 files changed, 4896 insertions(+), 5 deletions(-) create mode 100644 packages/eslint-scope/tests/import-attributes.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.module-result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dynamic-with-multiple-trailing-comma.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dynamic-with-multiple-trailing-comma.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.module-result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.module-result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.module-result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.module-result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-add-modifiers.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-add-modifiers.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-modifiers.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-modifiers.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-remove-modifiers.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-remove-modifiers.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-empty-modifiers.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-empty-modifiers.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-unknown-modifiers.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-unknown-modifiers.src.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/valid-regexp-modifiers.result.js create mode 100644 packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/valid-regexp-modifiers.src.js diff --git a/packages/eslint-scope/tests/import-attributes.js b/packages/eslint-scope/tests/import-attributes.js new file mode 100644 index 00000000..b76cfb77 --- /dev/null +++ b/packages/eslint-scope/tests/import-attributes.js @@ -0,0 +1,185 @@ +/** + * @fileoverview Tests for ES2025 Import Attributes. + * @author Yosuke Ota + */ + +import assert from "node:assert"; +import * as espree from "espree"; +import { KEYS } from "eslint-visitor-keys"; +import { analyze } from "../lib/index.js"; + +describe("Import Attributes", () => { + + describe("const type = \"json\"; import pkg from \"./package.json\" with { type: \"json\" };", () => { + let ast; + let scopeManager; + let globalScope; + + beforeEach(() => { + ast = espree.parse("const type = \"json\"; import pkg from \"./package.json\" with { type: \"json\" };", { ecmaVersion: 16, sourceType: "module" }); + scopeManager = analyze(ast, { ecmaVersion: 16, sourceType: "module", childVisitorKeys: KEYS }); + ({ globalScope } = scopeManager); + }); + + it("the global scope should not have any variables", () => { + assert.strictEqual(globalScope.variables.length, 0); + }); + + it("the global scope should have one child scope, a module scope", () => { + assert.strictEqual(globalScope.childScopes.length, 1); + assert.strictEqual(globalScope.childScopes[0].type, "module"); + }); + + it("the module scope should not have any child scopes", () => { + const moduleScope = globalScope.childScopes[0]; + + assert.strictEqual(moduleScope.childScopes.length, 0); + }); + + it("the module scope should have two variables", () => { + const moduleScope = globalScope.childScopes[0]; + + assert.strictEqual(moduleScope.variables.length, 2); + assert.strictEqual(moduleScope.variables[0].name, "type"); + assert.strictEqual(moduleScope.variables[1].name, "pkg"); + }); + + it("the type variable should have one reference, a variable declaration", () => { + const moduleScope = globalScope.childScopes[0]; + const typeVariable = moduleScope.variables[0]; + + assert.strictEqual(typeVariable.references.length, 1); + assert.strictEqual(typeVariable.references[0].identifier, ast.body[0].declarations[0].id); + }); + }); + + describe("const type = \"json\"; export * from \"./package.json\" with { type: \"json\" };", () => { + let ast; + let scopeManager; + let globalScope; + + beforeEach(() => { + ast = espree.parse("const type = \"json\"; export * from \"./package.json\" with { type: \"json\" };", { ecmaVersion: 16, sourceType: "module" }); + scopeManager = analyze(ast, { ecmaVersion: 16, sourceType: "module", childVisitorKeys: KEYS }); + ({ globalScope } = scopeManager); + }); + + it("the global scope should not have any variables", () => { + assert.strictEqual(globalScope.variables.length, 0); + }); + + it("the global scope should have one child scope, a module scope", () => { + assert.strictEqual(globalScope.childScopes.length, 1); + assert.strictEqual(globalScope.childScopes[0].type, "module"); + }); + + it("the module scope should not have any child scopes", () => { + const moduleScope = globalScope.childScopes[0]; + + assert.strictEqual(moduleScope.childScopes.length, 0); + }); + + it("the module scope should have one variable, a type variable", () => { + const moduleScope = globalScope.childScopes[0]; + + assert.strictEqual(moduleScope.variables.length, 1); + assert.strictEqual(moduleScope.variables[0].name, "type"); + }); + + it("the type variable should have one reference, a variable declaration", () => { + const moduleScope = globalScope.childScopes[0]; + const typeVariable = moduleScope.variables[0]; + + assert.strictEqual(typeVariable.references.length, 1); + assert.strictEqual(typeVariable.references[0].identifier, ast.body[0].declarations[0].id); + }); + }); + + + describe("const type = \"json\"; export { default } from \"./package.json\" with { type: \"json\" };", () => { + let ast; + let scopeManager; + let globalScope; + + beforeEach(() => { + ast = espree.parse("const type = \"json\"; export { default } from \"./package.json\" with { type: \"json\" };", { ecmaVersion: 16, sourceType: "module" }); + scopeManager = analyze(ast, { ecmaVersion: 16, sourceType: "module", childVisitorKeys: KEYS }); + ({ globalScope } = scopeManager); + }); + + it("the global scope should not have any variables", () => { + assert.strictEqual(globalScope.variables.length, 0); + }); + + it("the global scope should have one child scope, a module scope", () => { + assert.strictEqual(globalScope.childScopes.length, 1); + assert.strictEqual(globalScope.childScopes[0].type, "module"); + }); + + it("the module scope should not have any child scopes", () => { + const moduleScope = globalScope.childScopes[0]; + + assert.strictEqual(moduleScope.childScopes.length, 0); + }); + + it("the module scope should have one variable, a type variable", () => { + const moduleScope = globalScope.childScopes[0]; + + assert.strictEqual(moduleScope.variables.length, 1); + assert.strictEqual(moduleScope.variables[0].name, "type"); + }); + + it("the type variable should have one reference, a variable declaration", () => { + const moduleScope = globalScope.childScopes[0]; + const typeVariable = moduleScope.variables[0]; + + assert.strictEqual(typeVariable.references.length, 1); + assert.strictEqual(typeVariable.references[0].identifier, ast.body[0].declarations[0].id); + }); + }); + + + describe("const type = \"json\"; import(\"./package.json\", { with: { type } });", () => { + let ast; + let scopeManager; + let globalScope; + + beforeEach(() => { + ast = espree.parse("const type = \"json\"; import(\"./package.json\", { with: { type } });", { ecmaVersion: 16, sourceType: "module" }); + scopeManager = analyze(ast, { ecmaVersion: 16, sourceType: "module", childVisitorKeys: KEYS }); + ({ globalScope } = scopeManager); + }); + + it("the global scope should not have any variables", () => { + assert.strictEqual(globalScope.variables.length, 0); + }); + + it("the global scope should have one child scope, a module scope", () => { + assert.strictEqual(globalScope.childScopes.length, 1); + assert.strictEqual(globalScope.childScopes[0].type, "module"); + }); + + it("the module scope should not have any child scopes", () => { + const moduleScope = globalScope.childScopes[0]; + + assert.strictEqual(moduleScope.childScopes.length, 0); + }); + + it("the module scope should have one variable, a type variable", () => { + const moduleScope = globalScope.childScopes[0]; + + assert.strictEqual(moduleScope.variables.length, 1); + assert.strictEqual(moduleScope.variables[0].name, "type"); + }); + + + it("the type variable should have two references, a variable declaration and import options", () => { + const moduleScope = globalScope.childScopes[0]; + const typeVariable = moduleScope.variables[0]; + + assert.strictEqual(typeVariable.references.length, 2); + assert.strictEqual(typeVariable.references[0].identifier, ast.body[0].declarations[0].id); + assert.strictEqual(typeVariable.references[1].identifier, ast.body[1].expression.options.properties[0].value.properties[0].value); + }); + }); +}); diff --git a/packages/eslint-visitor-keys/lib/visitor-keys.js b/packages/eslint-visitor-keys/lib/visitor-keys.js index f54a3474..41feb4b2 100644 --- a/packages/eslint-visitor-keys/lib/visitor-keys.js +++ b/packages/eslint-visitor-keys/lib/visitor-keys.js @@ -87,7 +87,8 @@ const KEYS = { ], ExportAllDeclaration: [ "exported", - "source" + "source", + "attributes" ], ExportDefaultDeclaration: [ "declaration" @@ -95,7 +96,8 @@ const KEYS = { ExportNamedDeclaration: [ "declaration", "specifiers", - "source" + "source", + "attributes" ], ExportSpecifier: [ "exported", @@ -136,15 +138,21 @@ const KEYS = { "consequent", "alternate" ], + ImportAttribute: [ + "key", + "value" + ], ImportDeclaration: [ "specifiers", - "source" + "source", + "attributes" ], ImportDefaultSpecifier: [ "local" ], ImportExpression: [ - "source" + "source", + "options" ], ImportNamespaceSpecifier: [ "local" diff --git a/packages/espree/package.json b/packages/espree/package.json index 17d075d0..f8db9429 100644 --- a/packages/espree/package.json +++ b/packages/espree/package.json @@ -32,7 +32,7 @@ "funding": "https://opencollective.com/eslint", "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^4.1.0" }, diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.module-result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.module-result.js new file mode 100644 index 00000000..d325af7b --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.module-result.js @@ -0,0 +1,6 @@ +export default { + "index": 41, + "lineNumber": 1, + "column": 42, + "message": "Duplicate attribute key 'type'" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.result.js new file mode 100644 index 00000000..521323ed --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.result.js @@ -0,0 +1,6 @@ +export default { + "index": 0, + "lineNumber": 1, + "column": 1, + "message": "'import' and 'export' may appear only with 'sourceType: module'" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.src.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.src.js new file mode 100644 index 00000000..b0e54b16 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dupe-key.src.js @@ -0,0 +1 @@ +import "./foo.json" with { type: "json", type: "html" }; diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dynamic-with-multiple-trailing-comma.result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dynamic-with-multiple-trailing-comma.result.js new file mode 100644 index 00000000..094f16ff --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dynamic-with-multiple-trailing-comma.result.js @@ -0,0 +1,6 @@ +export default { + "index": 19, + "lineNumber": 1, + "column": 20, + "message": "Unexpected token ," +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dynamic-with-multiple-trailing-comma.src.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dynamic-with-multiple-trailing-comma.src.js new file mode 100644 index 00000000..497bf31e --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-dynamic-with-multiple-trailing-comma.src.js @@ -0,0 +1 @@ +import("foo.json", , ); diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.module-result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.module-result.js new file mode 100644 index 00000000..7e321e96 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.module-result.js @@ -0,0 +1,6 @@ +export default { + "index": 41, + "lineNumber": 1, + "column": 42, + "message": "Unexpected token ," +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.result.js new file mode 100644 index 00000000..521323ed --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.result.js @@ -0,0 +1,6 @@ +export default { + "index": 0, + "lineNumber": 1, + "column": 1, + "message": "'import' and 'export' may appear only with 'sourceType: module'" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.src.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.src.js new file mode 100644 index 00000000..829b2008 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-multiple-trailing-comma.src.js @@ -0,0 +1 @@ +import "./foo.json" with { type: "json", , }; diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.module-result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.module-result.js new file mode 100644 index 00000000..857f4294 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.module-result.js @@ -0,0 +1,6 @@ +export default { + "index": 27, + "lineNumber": 1, + "column": 28, + "message": "Unexpected token 42" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.result.js new file mode 100644 index 00000000..521323ed --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.result.js @@ -0,0 +1,6 @@ +export default { + "index": 0, + "lineNumber": 1, + "column": 1, + "message": "'import' and 'export' may appear only with 'sourceType: module'" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.src.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.src.js new file mode 100644 index 00000000..e027bc72 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-key.src.js @@ -0,0 +1 @@ +import "./foo.json" with { 42: "s" }; diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.module-result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.module-result.js new file mode 100644 index 00000000..93a8baf7 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.module-result.js @@ -0,0 +1,6 @@ +export default { + "index": 33, + "lineNumber": 1, + "column": 34, + "message": "Unexpected token 42" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.result.js new file mode 100644 index 00000000..521323ed --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.result.js @@ -0,0 +1,6 @@ +export default { + "index": 0, + "lineNumber": 1, + "column": 1, + "message": "'import' and 'export' may appear only with 'sourceType: module'" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.src.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.src.js new file mode 100644 index 00000000..24a34555 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/invalid-import-attributes-with-number-value.src.js @@ -0,0 +1 @@ +import "./foo.json" with { type: 42 }; diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.module-result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.module-result.js new file mode 100644 index 00000000..afabbb96 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.module-result.js @@ -0,0 +1,4157 @@ +export default { + "type": "Program", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 46 + } + }, + "range": [ + 0, + 670 + ], + "body": [ + { + "type": "ImportDeclaration", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "range": [ + 0, + 52 + ], + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 7, + 11 + ], + "local": { + "type": "Identifier", + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 7, + 11 + ], + "name": "json" + } + } + ], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "range": [ + 17, + 29 + ], + "value": "./foo.json", + "raw": "\"./foo.json\"" + }, + "attributes": [ + { + "type": "ImportAttribute", + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "range": [ + 37, + 49 + ], + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "range": [ + 37, + 41 + ], + "name": "type" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "range": [ + 43, + 49 + ], + "value": "json", + "raw": "\"json\"" + } + } + ] + }, + { + "type": "ImportDeclaration", + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 42 + } + }, + "range": [ + 53, + 95 + ], + "specifiers": [], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "range": [ + 60, + 72 + ], + "value": "./foo.json", + "raw": "\"./foo.json\"" + }, + "attributes": [ + { + "type": "ImportAttribute", + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 39 + } + }, + "range": [ + 80, + 92 + ], + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + }, + "range": [ + 80, + 84 + ], + "name": "type" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 39 + } + }, + "range": [ + 86, + 92 + ], + "value": "json", + "raw": "\"json\"" + } + } + ] + }, + { + "type": "ExportNamedDeclaration", + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 51 + } + }, + "range": [ + 96, + 147 + ], + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + }, + "range": [ + 104, + 105 + ], + "local": { + "type": "Identifier", + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + }, + "range": [ + 104, + 105 + ], + "name": "v" + }, + "exported": { + "type": "Identifier", + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + }, + "range": [ + 104, + 105 + ], + "name": "v" + } + } + ], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "range": [ + 112, + 124 + ], + "value": "./foo.json", + "raw": "\"./foo.json\"" + }, + "attributes": [ + { + "type": "ImportAttribute", + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 48 + } + }, + "range": [ + 132, + 144 + ], + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 40 + } + }, + "range": [ + 132, + 136 + ], + "name": "type" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 3, + "column": 42 + }, + "end": { + "line": 3, + "column": 48 + } + }, + "range": [ + 138, + 144 + ], + "value": "json", + "raw": "\"json\"" + } + } + ] + }, + { + "type": "ExportAllDeclaration", + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 57 + } + }, + "range": [ + 148, + 205 + ], + "exported": { + "type": "Identifier", + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 16 + } + }, + "range": [ + 160, + 164 + ], + "name": "json" + }, + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + }, + "range": [ + 170, + 182 + ], + "value": "./foo.json", + "raw": "\"./foo.json\"" + }, + "attributes": [ + { + "type": "ImportAttribute", + "loc": { + "start": { + "line": 4, + "column": 42 + }, + "end": { + "line": 4, + "column": 54 + } + }, + "range": [ + 190, + 202 + ], + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 4, + "column": 42 + }, + "end": { + "line": 4, + "column": 46 + } + }, + "range": [ + 190, + 194 + ], + "name": "type" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 4, + "column": 48 + }, + "end": { + "line": 4, + "column": 54 + } + }, + "range": [ + 196, + 202 + ], + "value": "json", + "raw": "\"json\"" + } + } + ] + }, + { + "type": "VariableDeclaration", + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 57 + } + }, + "range": [ + 206, + 263 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 56 + } + }, + "range": [ + 212, + 262 + ], + "id": { + "type": "Identifier", + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + }, + "range": [ + 212, + 213 + ], + "name": "a" + }, + "init": { + "type": "ImportExpression", + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 56 + } + }, + "range": [ + 216, + 262 + ], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 27 + } + }, + "range": [ + 223, + 233 + ], + "value": "foo.json", + "raw": "\"foo.json\"" + }, + "options": { + "type": "ObjectExpression", + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 55 + } + }, + "range": [ + 235, + 261 + ], + "properties": [ + { + "type": "Property", + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 53 + } + }, + "range": [ + 237, + 259 + ], + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 35 + } + }, + "range": [ + 237, + 241 + ], + "name": "with" + }, + "value": { + "type": "ObjectExpression", + "loc": { + "start": { + "line": 5, + "column": 37 + }, + "end": { + "line": 5, + "column": 53 + } + }, + "range": [ + 243, + 259 + ], + "properties": [ + { + "type": "Property", + "loc": { + "start": { + "line": 5, + "column": 39 + }, + "end": { + "line": 5, + "column": 51 + } + }, + "range": [ + 245, + 257 + ], + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 5, + "column": 39 + }, + "end": { + "line": 5, + "column": 43 + } + }, + "range": [ + 245, + 249 + ], + "name": "type" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 5, + "column": 45 + }, + "end": { + "line": 5, + "column": 51 + } + }, + "range": [ + 251, + 257 + ], + "value": "json", + "raw": "\"json\"" + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 31 + } + }, + "range": [ + 264, + 295 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 30 + } + }, + "range": [ + 270, + 294 + ], + "id": { + "type": "Identifier", + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + }, + "range": [ + 270, + 271 + ], + "name": "b" + }, + "init": { + "type": "ImportExpression", + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 30 + } + }, + "range": [ + 274, + 294 + ], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 27 + } + }, + "range": [ + 281, + 291 + ], + "value": "foo.json", + "raw": "\"foo.json\"" + }, + "options": null + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 59 + } + }, + "range": [ + 320, + 379 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 58 + } + }, + "range": [ + 326, + 378 + ], + "id": { + "type": "Identifier", + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 7 + } + }, + "range": [ + 326, + 327 + ], + "name": "c" + }, + "init": { + "type": "ImportExpression", + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 58 + } + }, + "range": [ + 330, + 378 + ], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 27 + } + }, + "range": [ + 337, + 347 + ], + "value": "foo.json", + "raw": "\"foo.json\"" + }, + "options": { + "type": "ObjectExpression", + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 55 + } + }, + "range": [ + 349, + 375 + ], + "properties": [ + { + "type": "Property", + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 53 + } + }, + "range": [ + 351, + 373 + ], + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 35 + } + }, + "range": [ + 351, + 355 + ], + "name": "with" + }, + "value": { + "type": "ObjectExpression", + "loc": { + "start": { + "line": 7, + "column": 37 + }, + "end": { + "line": 7, + "column": 53 + } + }, + "range": [ + 357, + 373 + ], + "properties": [ + { + "type": "Property", + "loc": { + "start": { + "line": 7, + "column": 39 + }, + "end": { + "line": 7, + "column": 51 + } + }, + "range": [ + 359, + 371 + ], + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 7, + "column": 39 + }, + "end": { + "line": 7, + "column": 43 + } + }, + "range": [ + 359, + 363 + ], + "name": "type" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 7, + "column": 45 + }, + "end": { + "line": 7, + "column": 51 + } + }, + "range": [ + 365, + 371 + ], + "value": "json", + "raw": "\"json\"" + }, + "kind": "init" + } + ] + }, + "kind": "init" + } + ] + } + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 35 + } + }, + "range": [ + 380, + 415 + ], + "declarations": [ + { + "type": "VariableDeclarator", + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 34 + } + }, + "range": [ + 386, + 414 + ], + "id": { + "type": "Identifier", + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 7 + } + }, + "range": [ + 386, + 387 + ], + "name": "d" + }, + "init": { + "type": "ImportExpression", + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 34 + } + }, + "range": [ + 390, + 414 + ], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 27 + } + }, + "range": [ + 397, + 407 + ], + "value": "foo.json", + "raw": "\"foo.json\"" + }, + "options": { + "type": "Identifier", + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 32 + } + }, + "range": [ + 409, + 412 + ], + "name": "foo" + } + } + } + ], + "kind": "const" + }, + { + "type": "ImportDeclaration", + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 40 + } + }, + "range": [ + 416, + 456 + ], + "specifiers": [], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 19 + } + }, + "range": [ + 423, + 435 + ], + "value": "./foo.json", + "raw": "\"./foo.json\"" + }, + "attributes": [ + { + "type": "ImportAttribute", + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 37 + } + }, + "range": [ + 443, + 453 + ], + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 30 + } + }, + "range": [ + 443, + 446 + ], + "name": "foo" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 37 + } + }, + "range": [ + 448, + 453 + ], + "value": "bar", + "raw": "\"bar\"" + } + } + ] + }, + { + "type": "ImportDeclaration", + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 44 + } + }, + "range": [ + 485, + 529 + ], + "specifiers": [], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 19 + } + }, + "range": [ + 492, + 504 + ], + "value": "./foo.json", + "raw": "\"./foo.json\"" + }, + "attributes": [ + { + "type": "ImportAttribute", + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 41 + } + }, + "range": [ + 512, + 526 + ], + "key": { + "type": "Literal", + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 33 + } + }, + "range": [ + 512, + 518 + ], + "value": "type", + "raw": "\"type\"" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 41 + } + }, + "range": [ + 520, + 526 + ], + "value": "json", + "raw": "\"json\"" + } + } + ] + }, + { + "type": "ImportDeclaration", + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 44 + } + }, + "range": [ + 550, + 594 + ], + "specifiers": [], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 19 + } + }, + "range": [ + 557, + 569 + ], + "value": "./foo.json", + "raw": "\"./foo.json\"" + }, + "attributes": [ + { + "type": "ImportAttribute", + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "range": [ + 577, + 583 + ], + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 28 + } + }, + "range": [ + 577, + 578 + ], + "name": "a" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "range": [ + 580, + 583 + ], + "value": "a", + "raw": "\"a\"" + } + }, + { + "type": "ImportAttribute", + "loc": { + "start": { + "line": 11, + "column": 35 + }, + "end": { + "line": 11, + "column": 41 + } + }, + "range": [ + 585, + 591 + ], + "key": { + "type": "Identifier", + "loc": { + "start": { + "line": 11, + "column": 35 + }, + "end": { + "line": 11, + "column": 36 + } + }, + "range": [ + 585, + 586 + ], + "name": "b" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 11, + "column": 38 + }, + "end": { + "line": 11, + "column": 41 + } + }, + "range": [ + 588, + 591 + ], + "value": "b", + "raw": "\"b\"" + } + } + ] + }, + { + "type": "ImportDeclaration", + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 46 + } + }, + "range": [ + 624, + 670 + ], + "specifiers": [], + "source": { + "type": "Literal", + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 19 + } + }, + "range": [ + 631, + 643 + ], + "value": "./foo.json", + "raw": "\"./foo.json\"" + }, + "attributes": [ + { + "type": "ImportAttribute", + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 41 + } + }, + "range": [ + 651, + 665 + ], + "key": { + "type": "Literal", + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 33 + } + }, + "range": [ + 651, + 657 + ], + "value": "type", + "raw": "\"type\"" + }, + "value": { + "type": "Literal", + "loc": { + "start": { + "line": 12, + "column": 35 + }, + "end": { + "line": 12, + "column": 41 + } + }, + "range": [ + 659, + 665 + ], + "value": "json", + "raw": "\"json\"" + } + } + ] + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "range": [ + 0, + 6 + ] + }, + { + "type": "Identifier", + "value": "json", + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 7, + 11 + ] + }, + { + "type": "Identifier", + "value": "from", + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 12, + 16 + ] + }, + { + "type": "String", + "value": "\"./foo.json\"", + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "range": [ + 17, + 29 + ] + }, + { + "type": "Keyword", + "value": "with", + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "range": [ + 30, + 34 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "range": [ + 35, + 36 + ] + }, + { + "type": "Identifier", + "value": "type", + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "range": [ + 37, + 41 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "range": [ + 41, + 42 + ] + }, + { + "type": "String", + "value": "\"json\"", + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 49 + } + }, + "range": [ + 43, + 49 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 1, + "column": 50 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "range": [ + 50, + 51 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 1, + "column": 51 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "range": [ + 51, + 52 + ] + }, + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "range": [ + 53, + 59 + ] + }, + { + "type": "String", + "value": "\"./foo.json\"", + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "range": [ + 60, + 72 + ] + }, + { + "type": "Keyword", + "value": "with", + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + }, + "range": [ + 73, + 77 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "range": [ + 78, + 79 + ] + }, + { + "type": "Identifier", + "value": "type", + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + }, + "range": [ + 80, + 84 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 32 + } + }, + "range": [ + 84, + 85 + ] + }, + { + "type": "String", + "value": "\"json\"", + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 39 + } + }, + "range": [ + 86, + 92 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 2, + "column": 40 + }, + "end": { + "line": 2, + "column": 41 + } + }, + "range": [ + 93, + 94 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 42 + } + }, + "range": [ + 94, + 95 + ] + }, + { + "type": "Keyword", + "value": "export", + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + }, + "range": [ + 96, + 102 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + }, + "range": [ + 103, + 104 + ] + }, + { + "type": "Identifier", + "value": "v", + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + }, + "range": [ + 104, + 105 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + }, + "range": [ + 105, + 106 + ] + }, + { + "type": "Identifier", + "value": "from", + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "range": [ + 107, + 111 + ] + }, + { + "type": "String", + "value": "\"./foo.json\"", + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "range": [ + 112, + 124 + ] + }, + { + "type": "Keyword", + "value": "with", + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + }, + "range": [ + 125, + 129 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 35 + } + }, + "range": [ + 130, + 131 + ] + }, + { + "type": "Identifier", + "value": "type", + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 40 + } + }, + "range": [ + 132, + 136 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "range": [ + 136, + 137 + ] + }, + { + "type": "String", + "value": "\"json\"", + "loc": { + "start": { + "line": 3, + "column": 42 + }, + "end": { + "line": 3, + "column": 48 + } + }, + "range": [ + 138, + 144 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 50 + } + }, + "range": [ + 145, + 146 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 3, + "column": 50 + }, + "end": { + "line": 3, + "column": 51 + } + }, + "range": [ + 146, + 147 + ] + }, + { + "type": "Keyword", + "value": "export", + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + }, + "range": [ + 148, + 154 + ] + }, + { + "type": "Punctuator", + "value": "*", + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "range": [ + 155, + 156 + ] + }, + { + "type": "Identifier", + "value": "as", + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 11 + } + }, + "range": [ + 157, + 159 + ] + }, + { + "type": "Identifier", + "value": "json", + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 16 + } + }, + "range": [ + 160, + 164 + ] + }, + { + "type": "Identifier", + "value": "from", + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 21 + } + }, + "range": [ + 165, + 169 + ] + }, + { + "type": "String", + "value": "\"./foo.json\"", + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + }, + "range": [ + 170, + 182 + ] + }, + { + "type": "Keyword", + "value": "with", + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + }, + "range": [ + 183, + 187 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 4, + "column": 40 + }, + "end": { + "line": 4, + "column": 41 + } + }, + "range": [ + 188, + 189 + ] + }, + { + "type": "Identifier", + "value": "type", + "loc": { + "start": { + "line": 4, + "column": 42 + }, + "end": { + "line": 4, + "column": 46 + } + }, + "range": [ + 190, + 194 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 4, + "column": 46 + }, + "end": { + "line": 4, + "column": 47 + } + }, + "range": [ + 194, + 195 + ] + }, + { + "type": "String", + "value": "\"json\"", + "loc": { + "start": { + "line": 4, + "column": 48 + }, + "end": { + "line": 4, + "column": 54 + } + }, + "range": [ + 196, + 202 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 4, + "column": 55 + }, + "end": { + "line": 4, + "column": 56 + } + }, + "range": [ + 203, + 204 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 4, + "column": 56 + }, + "end": { + "line": 4, + "column": 57 + } + }, + "range": [ + 204, + 205 + ] + }, + { + "type": "Keyword", + "value": "const", + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + }, + "range": [ + 206, + 211 + ] + }, + { + "type": "Identifier", + "value": "a", + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + }, + "range": [ + 212, + 213 + ] + }, + { + "type": "Punctuator", + "value": "=", + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + }, + "range": [ + 214, + 215 + ] + }, + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 16 + } + }, + "range": [ + 216, + 222 + ] + }, + { + "type": "Punctuator", + "value": "(", + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + }, + "range": [ + 222, + 223 + ] + }, + { + "type": "String", + "value": "\"foo.json\"", + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 27 + } + }, + "range": [ + 223, + 233 + ] + }, + { + "type": "Punctuator", + "value": ",", + "loc": { + "start": { + "line": 5, + "column": 27 + }, + "end": { + "line": 5, + "column": 28 + } + }, + "range": [ + 233, + 234 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 30 + } + }, + "range": [ + 235, + 236 + ] + }, + { + "type": "Identifier", + "value": "with", + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 35 + } + }, + "range": [ + 237, + 241 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 5, + "column": 35 + }, + "end": { + "line": 5, + "column": 36 + } + }, + "range": [ + 241, + 242 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 5, + "column": 37 + }, + "end": { + "line": 5, + "column": 38 + } + }, + "range": [ + 243, + 244 + ] + }, + { + "type": "Identifier", + "value": "type", + "loc": { + "start": { + "line": 5, + "column": 39 + }, + "end": { + "line": 5, + "column": 43 + } + }, + "range": [ + 245, + 249 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 5, + "column": 43 + }, + "end": { + "line": 5, + "column": 44 + } + }, + "range": [ + 249, + 250 + ] + }, + { + "type": "String", + "value": "\"json\"", + "loc": { + "start": { + "line": 5, + "column": 45 + }, + "end": { + "line": 5, + "column": 51 + } + }, + "range": [ + 251, + 257 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 5, + "column": 52 + }, + "end": { + "line": 5, + "column": 53 + } + }, + "range": [ + 258, + 259 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 5, + "column": 54 + }, + "end": { + "line": 5, + "column": 55 + } + }, + "range": [ + 260, + 261 + ] + }, + { + "type": "Punctuator", + "value": ")", + "loc": { + "start": { + "line": 5, + "column": 55 + }, + "end": { + "line": 5, + "column": 56 + } + }, + "range": [ + 261, + 262 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 5, + "column": 56 + }, + "end": { + "line": 5, + "column": 57 + } + }, + "range": [ + 262, + 263 + ] + }, + { + "type": "Keyword", + "value": "const", + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 5 + } + }, + "range": [ + 264, + 269 + ] + }, + { + "type": "Identifier", + "value": "b", + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + }, + "range": [ + 270, + 271 + ] + }, + { + "type": "Punctuator", + "value": "=", + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + }, + "range": [ + 272, + 273 + ] + }, + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 16 + } + }, + "range": [ + 274, + 280 + ] + }, + { + "type": "Punctuator", + "value": "(", + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 17 + } + }, + "range": [ + 280, + 281 + ] + }, + { + "type": "String", + "value": "\"foo.json\"", + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 27 + } + }, + "range": [ + 281, + 291 + ] + }, + { + "type": "Punctuator", + "value": ",", + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 28 + } + }, + "range": [ + 291, + 292 + ] + }, + { + "type": "Punctuator", + "value": ")", + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 30 + } + }, + "range": [ + 293, + 294 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + }, + "range": [ + 294, + 295 + ] + }, + { + "type": "Keyword", + "value": "const", + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 5 + } + }, + "range": [ + 320, + 325 + ] + }, + { + "type": "Identifier", + "value": "c", + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 7 + } + }, + "range": [ + 326, + 327 + ] + }, + { + "type": "Punctuator", + "value": "=", + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + }, + "range": [ + 328, + 329 + ] + }, + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 16 + } + }, + "range": [ + 330, + 336 + ] + }, + { + "type": "Punctuator", + "value": "(", + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 17 + } + }, + "range": [ + 336, + 337 + ] + }, + { + "type": "String", + "value": "\"foo.json\"", + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 27 + } + }, + "range": [ + 337, + 347 + ] + }, + { + "type": "Punctuator", + "value": ",", + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + }, + "range": [ + 347, + 348 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 30 + } + }, + "range": [ + 349, + 350 + ] + }, + { + "type": "Identifier", + "value": "with", + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 35 + } + }, + "range": [ + 351, + 355 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 36 + } + }, + "range": [ + 355, + 356 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 7, + "column": 37 + }, + "end": { + "line": 7, + "column": 38 + } + }, + "range": [ + 357, + 358 + ] + }, + { + "type": "Identifier", + "value": "type", + "loc": { + "start": { + "line": 7, + "column": 39 + }, + "end": { + "line": 7, + "column": 43 + } + }, + "range": [ + 359, + 363 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 7, + "column": 43 + }, + "end": { + "line": 7, + "column": 44 + } + }, + "range": [ + 363, + 364 + ] + }, + { + "type": "String", + "value": "\"json\"", + "loc": { + "start": { + "line": 7, + "column": 45 + }, + "end": { + "line": 7, + "column": 51 + } + }, + "range": [ + 365, + 371 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 7, + "column": 52 + }, + "end": { + "line": 7, + "column": 53 + } + }, + "range": [ + 372, + 373 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 7, + "column": 54 + }, + "end": { + "line": 7, + "column": 55 + } + }, + "range": [ + 374, + 375 + ] + }, + { + "type": "Punctuator", + "value": ",", + "loc": { + "start": { + "line": 7, + "column": 55 + }, + "end": { + "line": 7, + "column": 56 + } + }, + "range": [ + 375, + 376 + ] + }, + { + "type": "Punctuator", + "value": ")", + "loc": { + "start": { + "line": 7, + "column": 57 + }, + "end": { + "line": 7, + "column": 58 + } + }, + "range": [ + 377, + 378 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 7, + "column": 58 + }, + "end": { + "line": 7, + "column": 59 + } + }, + "range": [ + 378, + 379 + ] + }, + { + "type": "Keyword", + "value": "const", + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + }, + "range": [ + 380, + 385 + ] + }, + { + "type": "Identifier", + "value": "d", + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 7 + } + }, + "range": [ + 386, + 387 + ] + }, + { + "type": "Punctuator", + "value": "=", + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + }, + "range": [ + 388, + 389 + ] + }, + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 16 + } + }, + "range": [ + 390, + 396 + ] + }, + { + "type": "Punctuator", + "value": "(", + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 17 + } + }, + "range": [ + 396, + 397 + ] + }, + { + "type": "String", + "value": "\"foo.json\"", + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 27 + } + }, + "range": [ + 397, + 407 + ] + }, + { + "type": "Punctuator", + "value": ",", + "loc": { + "start": { + "line": 8, + "column": 27 + }, + "end": { + "line": 8, + "column": 28 + } + }, + "range": [ + 407, + 408 + ] + }, + { + "type": "Identifier", + "value": "foo", + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 32 + } + }, + "range": [ + 409, + 412 + ] + }, + { + "type": "Punctuator", + "value": ")", + "loc": { + "start": { + "line": 8, + "column": 33 + }, + "end": { + "line": 8, + "column": 34 + } + }, + "range": [ + 413, + 414 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 8, + "column": 34 + }, + "end": { + "line": 8, + "column": 35 + } + }, + "range": [ + 414, + 415 + ] + }, + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 6 + } + }, + "range": [ + 416, + 422 + ] + }, + { + "type": "String", + "value": "\"./foo.json\"", + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 19 + } + }, + "range": [ + 423, + 435 + ] + }, + { + "type": "Keyword", + "value": "with", + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 24 + } + }, + "range": [ + 436, + 440 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 26 + } + }, + "range": [ + 441, + 442 + ] + }, + { + "type": "Identifier", + "value": "foo", + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 30 + } + }, + "range": [ + 443, + 446 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 31 + } + }, + "range": [ + 446, + 447 + ] + }, + { + "type": "String", + "value": "\"bar\"", + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 37 + } + }, + "range": [ + 448, + 453 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 9, + "column": 38 + }, + "end": { + "line": 9, + "column": 39 + } + }, + "range": [ + 454, + 455 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 9, + "column": 39 + }, + "end": { + "line": 9, + "column": 40 + } + }, + "range": [ + 455, + 456 + ] + }, + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 6 + } + }, + "range": [ + 485, + 491 + ] + }, + { + "type": "String", + "value": "\"./foo.json\"", + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 19 + } + }, + "range": [ + 492, + 504 + ] + }, + { + "type": "Keyword", + "value": "with", + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 24 + } + }, + "range": [ + 505, + 509 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 10, + "column": 25 + }, + "end": { + "line": 10, + "column": 26 + } + }, + "range": [ + 510, + 511 + ] + }, + { + "type": "String", + "value": "\"type\"", + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 33 + } + }, + "range": [ + 512, + 518 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 10, + "column": 33 + }, + "end": { + "line": 10, + "column": 34 + } + }, + "range": [ + 518, + 519 + ] + }, + { + "type": "String", + "value": "\"json\"", + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 41 + } + }, + "range": [ + 520, + 526 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 10, + "column": 42 + }, + "end": { + "line": 10, + "column": 43 + } + }, + "range": [ + 527, + 528 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 10, + "column": 43 + }, + "end": { + "line": 10, + "column": 44 + } + }, + "range": [ + 528, + 529 + ] + }, + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 6 + } + }, + "range": [ + 550, + 556 + ] + }, + { + "type": "String", + "value": "\"./foo.json\"", + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 19 + } + }, + "range": [ + 557, + 569 + ] + }, + { + "type": "Keyword", + "value": "with", + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + }, + "range": [ + 570, + 574 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + }, + "range": [ + 575, + 576 + ] + }, + { + "type": "Identifier", + "value": "a", + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 28 + } + }, + "range": [ + 577, + 578 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 29 + } + }, + "range": [ + 578, + 579 + ] + }, + { + "type": "String", + "value": "\"a\"", + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "range": [ + 580, + 583 + ] + }, + { + "type": "Punctuator", + "value": ",", + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 34 + } + }, + "range": [ + 583, + 584 + ] + }, + { + "type": "Identifier", + "value": "b", + "loc": { + "start": { + "line": 11, + "column": 35 + }, + "end": { + "line": 11, + "column": 36 + } + }, + "range": [ + 585, + 586 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 11, + "column": 36 + }, + "end": { + "line": 11, + "column": 37 + } + }, + "range": [ + 586, + 587 + ] + }, + { + "type": "String", + "value": "\"b\"", + "loc": { + "start": { + "line": 11, + "column": 38 + }, + "end": { + "line": 11, + "column": 41 + } + }, + "range": [ + 588, + 591 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 11, + "column": 42 + }, + "end": { + "line": 11, + "column": 43 + } + }, + "range": [ + 592, + 593 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 11, + "column": 43 + }, + "end": { + "line": 11, + "column": 44 + } + }, + "range": [ + 593, + 594 + ] + }, + { + "type": "Keyword", + "value": "import", + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 6 + } + }, + "range": [ + 624, + 630 + ] + }, + { + "type": "String", + "value": "\"./foo.json\"", + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 19 + } + }, + "range": [ + 631, + 643 + ] + }, + { + "type": "Keyword", + "value": "with", + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 24 + } + }, + "range": [ + 644, + 648 + ] + }, + { + "type": "Punctuator", + "value": "{", + "loc": { + "start": { + "line": 12, + "column": 25 + }, + "end": { + "line": 12, + "column": 26 + } + }, + "range": [ + 649, + 650 + ] + }, + { + "type": "String", + "value": "\"type\"", + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 33 + } + }, + "range": [ + 651, + 657 + ] + }, + { + "type": "Punctuator", + "value": ":", + "loc": { + "start": { + "line": 12, + "column": 33 + }, + "end": { + "line": 12, + "column": 34 + } + }, + "range": [ + 657, + 658 + ] + }, + { + "type": "String", + "value": "\"json\"", + "loc": { + "start": { + "line": 12, + "column": 35 + }, + "end": { + "line": 12, + "column": 41 + } + }, + "range": [ + 659, + 665 + ] + }, + { + "type": "Punctuator", + "value": ",", + "loc": { + "start": { + "line": 12, + "column": 41 + }, + "end": { + "line": 12, + "column": 42 + } + }, + "range": [ + 665, + 666 + ] + }, + { + "type": "Punctuator", + "value": "}", + "loc": { + "start": { + "line": 12, + "column": 44 + }, + "end": { + "line": 12, + "column": 45 + } + }, + "range": [ + 668, + 669 + ] + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 12, + "column": 45 + }, + "end": { + "line": 12, + "column": 46 + } + }, + "range": [ + 669, + 670 + ] + } + ] +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.result.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.result.js new file mode 100644 index 00000000..521323ed --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.result.js @@ -0,0 +1,6 @@ +export default { + "index": 0, + "lineNumber": 1, + "column": 1, + "message": "'import' and 'export' may appear only with 'sourceType: module'" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.src.js b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.src.js new file mode 100644 index 00000000..eef7bd04 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/import-attributes/valid-import-attributes.src.js @@ -0,0 +1,12 @@ +import json from "./foo.json" with { type: "json" }; +import "./foo.json" with { type: "json" }; +export {v} from "./foo.json" with { type: "json" }; +export * as json from "./foo.json" with { type: "json" }; +const a = import("foo.json", { with: { type: "json" } }); +const b = import("foo.json", ); // Allow trailing comma +const c = import("foo.json", { with: { type: "json" } }, ); +const d = import("foo.json", foo ); +import "./foo.json" with { foo: "bar" }; // Allow unknown attributes +import "./foo.json" with { "type": "json" }; // Allow string key +import "./foo.json" with { a: "a", b: "b" }; // Allow multiple attributes +import "./foo.json" with { "type": "json", }; // Allow trailing comma diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-add-modifiers.result.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-add-modifiers.result.js new file mode 100644 index 00000000..240ddc09 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-add-modifiers.result.js @@ -0,0 +1,6 @@ +export default { + "index": 1, + "lineNumber": 1, + "column": 2, + "message": "Invalid regular expression: /(?ii:p)?/: Duplicate regular expression modifiers" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-add-modifiers.src.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-add-modifiers.src.js new file mode 100644 index 00000000..b3d74b51 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-add-modifiers.src.js @@ -0,0 +1 @@ +/(?ii:p)?/; diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-modifiers.result.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-modifiers.result.js new file mode 100644 index 00000000..e8c0f982 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-modifiers.result.js @@ -0,0 +1,6 @@ +export default { + "index": 1, + "lineNumber": 1, + "column": 2, + "message": "Invalid regular expression: /(?i-i:p)?/: Duplicate regular expression modifiers" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-modifiers.src.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-modifiers.src.js new file mode 100644 index 00000000..d98be680 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-modifiers.src.js @@ -0,0 +1 @@ +/(?i-i:p)?/; diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-remove-modifiers.result.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-remove-modifiers.result.js new file mode 100644 index 00000000..e2b0b179 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-remove-modifiers.result.js @@ -0,0 +1,6 @@ +export default { + "index": 1, + "lineNumber": 1, + "column": 2, + "message": "Invalid regular expression: /(?-ii:p)?/: Duplicate regular expression modifiers" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-remove-modifiers.src.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-remove-modifiers.src.js new file mode 100644 index 00000000..6100af90 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-dupe-remove-modifiers.src.js @@ -0,0 +1 @@ +/(?-ii:p)?/; diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-empty-modifiers.result.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-empty-modifiers.result.js new file mode 100644 index 00000000..38ead2b6 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-empty-modifiers.result.js @@ -0,0 +1,6 @@ +export default { + "index": 1, + "lineNumber": 1, + "column": 2, + "message": "Invalid regular expression: /(?-:p)?/: Invalid regular expression modifiers" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-empty-modifiers.src.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-empty-modifiers.src.js new file mode 100644 index 00000000..f9ace52b --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-empty-modifiers.src.js @@ -0,0 +1 @@ +/(?-:p)?/; diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-unknown-modifiers.result.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-unknown-modifiers.result.js new file mode 100644 index 00000000..d1299850 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-unknown-modifiers.result.js @@ -0,0 +1,6 @@ +export default { + "index": 1, + "lineNumber": 1, + "column": 2, + "message": "Invalid regular expression: /(?u:p)?/: Invalid group" +}; \ No newline at end of file diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-unknown-modifiers.src.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-unknown-modifiers.src.js new file mode 100644 index 00000000..1f828c14 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/invalid-regexp-unknown-modifiers.src.js @@ -0,0 +1 @@ +/(?u:p)?/; diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/valid-regexp-modifiers.result.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/valid-regexp-modifiers.result.js new file mode 100644 index 00000000..dc0a7ae8 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/valid-regexp-modifiers.result.js @@ -0,0 +1,424 @@ +import conditionalRegex from "../../../../lib/conditional-regex-value.js"; + +export default { + "type": "Program", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 13 + } + }, + "range": [ + 0, + 67 + ], + "body": [ + { + "type": "ExpressionStatement", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "range": [ + 0, + 12 + ], + "expression": conditionalRegex({ + "type": "Literal", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 0, + 11 + ], + "value": null, + "raw": "/(?i-m:p)?/", + "regex": { + "pattern": "(?i-m:p)?", + "flags": "" + } + }) + }, + { + "type": "ExpressionStatement", + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "range": [ + 13, + 26 + ], + "expression": conditionalRegex({ + "type": "Literal", + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "range": [ + 13, + 25 + ], + "value": null, + "raw": "/(?i-m:p)?/u", + "regex": { + "pattern": "(?i-m:p)?", + "flags": "u" + } + }) + }, + { + "type": "ExpressionStatement", + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "range": [ + 27, + 39 + ], + "expression": conditionalRegex({ + "type": "Literal", + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "range": [ + 27, + 38 + ], + "value": null, + "raw": "/(?ims:p)?/", + "regex": { + "pattern": "(?ims:p)?", + "flags": "" + } + }) + }, + { + "type": "ExpressionStatement", + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 13 + } + }, + "range": [ + 40, + 53 + ], + "expression": conditionalRegex({ + "type": "Literal", + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 12 + } + }, + "range": [ + 40, + 52 + ], + "value": null, + "raw": "/(?ims-:p)?/", + "regex": { + "pattern": "(?ims-:p)?", + "flags": "" + } + }) + }, + { + "type": "ExpressionStatement", + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 13 + } + }, + "range": [ + 54, + 67 + ], + "expression": conditionalRegex({ + "type": "Literal", + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + }, + "range": [ + 54, + 66 + ], + "value": null, + "raw": "/(?-ims:p)?/", + "regex": { + "pattern": "(?-ims:p)?", + "flags": "" + } + }) + } + ], + "sourceType": "script", + "tokens": [ + { + "type": "RegularExpression", + "value": "/(?i-m:p)?/", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "range": [ + 0, + 11 + ], + "regex": { + "flags": "", + "pattern": "(?i-m:p)?" + } + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "range": [ + 11, + 12 + ] + }, + { + "type": "RegularExpression", + "value": "/(?i-m:p)?/u", + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "range": [ + 13, + 25 + ], + "regex": { + "flags": "u", + "pattern": "(?i-m:p)?" + } + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "range": [ + 25, + 26 + ] + }, + { + "type": "RegularExpression", + "value": "/(?ims:p)?/", + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "range": [ + 27, + 38 + ], + "regex": { + "flags": "", + "pattern": "(?ims:p)?" + } + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "range": [ + 38, + 39 + ] + }, + { + "type": "RegularExpression", + "value": "/(?ims-:p)?/", + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 12 + } + }, + "range": [ + 40, + 52 + ], + "regex": { + "flags": "", + "pattern": "(?ims-:p)?" + } + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + }, + "range": [ + 52, + 53 + ] + }, + { + "type": "RegularExpression", + "value": "/(?-ims:p)?/", + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + }, + "range": [ + 54, + 66 + ], + "regex": { + "flags": "", + "pattern": "(?-ims:p)?" + } + }, + { + "type": "Punctuator", + "value": ";", + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + }, + "range": [ + 66, + 67 + ] + } + ] +}; diff --git a/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/valid-regexp-modifiers.src.js b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/valid-regexp-modifiers.src.js new file mode 100644 index 00000000..5ae7ebf7 --- /dev/null +++ b/packages/espree/tests/fixtures/ecma-version/16/regexp-modifiers/valid-regexp-modifiers.src.js @@ -0,0 +1,5 @@ +/(?i-m:p)?/; +/(?i-m:p)?/u; +/(?ims:p)?/; +/(?ims-:p)?/; +/(?-ims:p)?/; From 552c5d8e3b1107c1bebe73423c8ef67ecb36b202 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Tue, 29 Oct 2024 15:41:55 +0100 Subject: [PATCH 11/12] docs: Support for Import Attributes and RegExp Modifiers (#641) --- packages/espree/docs/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/espree/docs/README.md b/packages/espree/docs/README.md index a783216f..cacb72e3 100644 --- a/packages/espree/docs/README.md +++ b/packages/espree/docs/README.md @@ -236,6 +236,8 @@ Espree supports all ECMAScript 2024 features and partially supports ECMAScript 2 Because ECMAScript 2025 is still under development, we are implementing features as they are finalized. Currently, Espree supports: * [RegExp Duplicate named capturing groups](https://github.com/tc39/proposal-duplicate-named-capturing-groups) +* [RegExp Pattern modifiers](https://github.com/tc39/proposal-regexp-modifiers) +* [Import Attributes](https://github.com/tc39/proposal-import-attributes) See [finished-proposals.md](https://github.com/tc39/proposals/blob/master/finished-proposals.md) to know what features are finalized. From 844078a1df7736019eee52665b67393ffcfd4c18 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 20:24:16 +0100 Subject: [PATCH 12/12] chore: release main (#640) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 6 +++--- packages/eslint-scope/CHANGELOG.md | 15 +++++++++++++++ packages/eslint-scope/package.json | 6 +++--- packages/eslint-visitor-keys/CHANGELOG.md | 7 +++++++ packages/eslint-visitor-keys/package.json | 2 +- packages/espree/CHANGELOG.md | 14 ++++++++++++++ packages/espree/package.json | 4 ++-- 7 files changed, 45 insertions(+), 9 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f618dfd6..ff50f2d2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,5 +1,5 @@ { - "packages/espree": "10.2.0", - "packages/eslint-scope": "8.1.0", - "packages/eslint-visitor-keys": "4.1.0" + "packages/espree": "10.3.0", + "packages/eslint-scope": "8.2.0", + "packages/eslint-visitor-keys": "4.2.0" } diff --git a/packages/eslint-scope/CHANGELOG.md b/packages/eslint-scope/CHANGELOG.md index 99e9920a..1882cc54 100644 --- a/packages/eslint-scope/CHANGELOG.md +++ b/packages/eslint-scope/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [8.2.0](https://github.com/eslint/js/compare/eslint-scope-v8.1.0...eslint-scope-v8.2.0) (2024-10-29) + + +### Features + +* add support for Import Attributes and RegExp Modifiers ([#639](https://github.com/eslint/js/issues/639)) ([2fd4222](https://github.com/eslint/js/commit/2fd422278bfad826d601795670004f9d6da72ef7)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * eslint-visitor-keys bumped from ^4.1.0 to ^4.2.0 + * espree bumped from ^10.2.0 to ^10.3.0 + ## [8.1.0](https://github.com/eslint/js/compare/eslint-scope-v8.0.2...eslint-scope-v8.1.0) (2024-09-27) diff --git a/packages/eslint-scope/package.json b/packages/eslint-scope/package.json index ffc065c6..759d8ec3 100644 --- a/packages/eslint-scope/package.json +++ b/packages/eslint-scope/package.json @@ -11,7 +11,7 @@ }, "./package.json": "./package.json" }, - "version": "8.1.0", + "version": "8.2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -48,8 +48,8 @@ "c8": "^7.7.3", "chai": "^4.3.4", "eslint-release": "^3.2.0", - "eslint-visitor-keys": "^4.1.0", - "espree": "^10.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "mocha": "^9.0.1", "npm-license": "^0.3.3", "rollup": "^2.52.7", diff --git a/packages/eslint-visitor-keys/CHANGELOG.md b/packages/eslint-visitor-keys/CHANGELOG.md index c5d622b3..ac62fe31 100644 --- a/packages/eslint-visitor-keys/CHANGELOG.md +++ b/packages/eslint-visitor-keys/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.2.0](https://github.com/eslint/js/compare/eslint-visitor-keys-v4.1.0...eslint-visitor-keys-v4.2.0) (2024-10-29) + + +### Features + +* add support for Import Attributes and RegExp Modifiers ([#639](https://github.com/eslint/js/issues/639)) ([2fd4222](https://github.com/eslint/js/commit/2fd422278bfad826d601795670004f9d6da72ef7)) + ## [4.1.0](https://github.com/eslint/js/compare/eslint-visitor-keys-v4.0.0...eslint-visitor-keys-v4.1.0) (2024-09-27) diff --git a/packages/eslint-visitor-keys/package.json b/packages/eslint-visitor-keys/package.json index 708c46d3..4dc2123d 100644 --- a/packages/eslint-visitor-keys/package.json +++ b/packages/eslint-visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "eslint-visitor-keys", - "version": "4.1.0", + "version": "4.2.0", "description": "Constants and utilities about visitor keys to traverse AST.", "type": "module", "main": "dist/eslint-visitor-keys.cjs", diff --git a/packages/espree/CHANGELOG.md b/packages/espree/CHANGELOG.md index e789cd28..dc5b5738 100644 --- a/packages/espree/CHANGELOG.md +++ b/packages/espree/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [10.3.0](https://github.com/eslint/js/compare/espree-v10.2.0...espree-v10.3.0) (2024-10-29) + + +### Features + +* add support for Import Attributes and RegExp Modifiers ([#639](https://github.com/eslint/js/issues/639)) ([2fd4222](https://github.com/eslint/js/commit/2fd422278bfad826d601795670004f9d6da72ef7)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * eslint-visitor-keys bumped from ^4.1.0 to ^4.2.0 + ## [10.2.0](https://github.com/eslint/js/compare/espree-v10.1.0...espree-v10.2.0) (2024-09-27) diff --git a/packages/espree/package.json b/packages/espree/package.json index f8db9429..ca08d881 100644 --- a/packages/espree/package.json +++ b/packages/espree/package.json @@ -16,7 +16,7 @@ ], "./package.json": "./package.json" }, - "version": "10.2.0", + "version": "10.3.0", "files": [ "lib", "dist/espree.cjs", @@ -34,7 +34,7 @@ "dependencies": { "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.1.0" + "eslint-visitor-keys": "^4.2.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^28.0.0", pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy