From c387276efac8da06e0d8a4eae06989aa0e6631eb Mon Sep 17 00:00:00 2001 From: Mysak0CZ Date: Fri, 23 Aug 2024 14:01:22 +0200 Subject: [PATCH 1/4] [utils] [fix] `parse`: also delete parserOptions.projectService --- utils/CHANGELOG.md | 5 +++++ utils/parse.js | 1 + 2 files changed, 6 insertions(+) diff --git a/utils/CHANGELOG.md b/utils/CHANGELOG.md index 3e2f5a8997..366a834bdb 100644 --- a/utils/CHANGELOG.md +++ b/utils/CHANGELOG.md @@ -8,6 +8,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ### Changed - [types] use shared config (thanks [@ljharb]) +### Fixed +- `parse`: also delete `parserOptions.projectService` ([#3039], thanks [@Mysak0CZ]) + ## v2.8.1 - 2024-02-26 ### Fixed @@ -142,6 +145,7 @@ Yanked due to critical issue with cache key resulting from #839. ### Fixed - `unambiguous.test()` regex is now properly in multiline mode +[#3039]: https://github.com/import-js/eslint-plugin-import/pull/3039 [#2963]: https://github.com/import-js/eslint-plugin-import/pull/2963 [#2755]: https://github.com/import-js/eslint-plugin-import/pull/2755 [#2714]: https://github.com/import-js/eslint-plugin-import/pull/2714 @@ -188,6 +192,7 @@ Yanked due to critical issue with cache key resulting from #839. [@manuth]: https://github.com/manuth [@maxkomarychev]: https://github.com/maxkomarychev [@mgwalker]: https://github.com/mgwalker +[@Mysak0CZ]: https://github.com/Mysak0CZ [@nicolo-ribaudo]: https://github.com/nicolo-ribaudo [@pmcelhaney]: https://github.com/pmcelhaney [@sergei-startsev]: https://github.com/sergei-startsev diff --git a/utils/parse.js b/utils/parse.js index 94aca1d0f8..75d527b008 100644 --- a/utils/parse.js +++ b/utils/parse.js @@ -134,6 +134,7 @@ exports.default = function parse(path, content, context) { // only parse one file in isolate mode, which is much, much faster. // https://github.com/import-js/eslint-plugin-import/issues/1408#issuecomment-509298962 delete parserOptions.EXPERIMENTAL_useProjectService; + delete parserOptions.projectService; delete parserOptions.project; delete parserOptions.projects; From bab3a109dce63d0b4fdc4b876dc77f01c34aca4c Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 25 Aug 2024 15:15:43 -0700 Subject: [PATCH 2/4] [utils] [meta] add `exports`, `main` In theory this should only be breaking if someone is requiring tsconfig.json --- utils/CHANGELOG.md | 1 + utils/package.json | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/utils/CHANGELOG.md b/utils/CHANGELOG.md index 366a834bdb..ac6883b1c4 100644 --- a/utils/CHANGELOG.md +++ b/utils/CHANGELOG.md @@ -7,6 +7,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ### Changed - [types] use shared config (thanks [@ljharb]) +- [meta] add `exports`, `main` ### Fixed - `parse`: also delete `parserOptions.projectService` ([#3039], thanks [@Mysak0CZ]) diff --git a/utils/package.json b/utils/package.json index 4704971505..23c8b08e9c 100644 --- a/utils/package.json +++ b/utils/package.json @@ -5,15 +5,46 @@ "engines": { "node": ">=4" }, + "main": false, + "exports": { + "./ModuleCache": "./ModuleCache.js", + "./ModuleCache.js": "./ModuleCache.js", + "./declaredScope": "./declaredScope.js", + "./declaredScope.js": "./declaredScope.js", + "./hash": "./hash.js", + "./hash.js": "./hash.js", + "./ignore": "./ignore.js", + "./ignore.js": "./ignore.js", + "./module-require": "./module-require.js", + "./module-require.js": "./module-require.js", + "./moduleVisitor": "./moduleVisitor.js", + "./moduleVisitor.js": "./moduleVisitor.js", + "./parse": "./parse.js", + "./parse.js": "./parse.js", + "./pkgDir": "./pkgDir.js", + "./pkgDir.js": "./pkgDir.js", + "./pkgUp": "./pkgUp.js", + "./pkgUp.js": "./pkgUp.js", + "./readPkgUp": "./readPkgUp.js", + "./readPkgUp.js": "./readPkgUp.js", + "./resolve": "./resolve.js", + "./resolve.js": "./resolve.js", + "./unambiguous": "./unambiguous.js", + "./unambiguous.js": "./unambiguous.js", + "./visit": "./visit.js", + "./visit.js": "./visit.js", + "./package.json": "./package.json" + }, "scripts": { "prepublishOnly": "cp ../{LICENSE,.npmrc} ./", "tsc": "tsc -p .", + "posttsc": "attw -P .", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/import-js/eslint-plugin-import.git", - "directory": "utils" + "directory": "utils" }, "keywords": [ "eslint-plugin-import", @@ -31,6 +62,7 @@ "debug": "^3.2.7" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.15.4", "@ljharb/tsconfig": "^0.2.0", "@types/debug": "^4.1.12", "@types/eslint": "^8.56.3", From 9b1a3b96caa656fe94bda709c364c7e230028432 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 25 Aug 2024 16:22:22 -0700 Subject: [PATCH 3/4] [utils] v2.8.2 --- utils/CHANGELOG.md | 10 +++++++--- utils/package.json | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/utils/CHANGELOG.md b/utils/CHANGELOG.md index ac6883b1c4..43bd0e022b 100644 --- a/utils/CHANGELOG.md +++ b/utils/CHANGELOG.md @@ -5,13 +5,17 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ## Unreleased -### Changed -- [types] use shared config (thanks [@ljharb]) -- [meta] add `exports`, `main` +## v2.8.2 - 2024-08-25 ### Fixed - `parse`: also delete `parserOptions.projectService` ([#3039], thanks [@Mysak0CZ]) +### Changed +- [types] use shared config (thanks [@ljharb]) +- [meta] add `exports`, `main` +- [meta] add `repository.directory` field +- [refactor] avoid hoisting + ## v2.8.1 - 2024-02-26 ### Fixed diff --git a/utils/package.json b/utils/package.json index 23c8b08e9c..6d69e2414a 100644 --- a/utils/package.json +++ b/utils/package.json @@ -1,6 +1,6 @@ { "name": "eslint-module-utils", - "version": "2.8.1", + "version": "2.8.2", "description": "Core utilities to support eslint-plugin-import and other module-related plugins.", "engines": { "node": ">=4" From bdff75d51fc73895f9e1697a02765daf12815714 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 25 Aug 2024 19:00:48 -0700 Subject: [PATCH 4/4] [Deps] update `array-includes`, `array.prototype.findlastindex`, `eslint-module-utils`, `hasown`, `is-core-module`, `object.fromentries`, `object.groupby`, `object.values` --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b9fa1eb35f..de0055a09a 100644 --- a/package.json +++ b/package.json @@ -105,21 +105,21 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" }, "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.4", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", "array.prototype.flat": "^1.3.2", "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.1", - "is-core-module": "^2.13.1", + "eslint-module-utils": "^2.8.2", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.2", - "object.values": "^1.1.7", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", "semver": "^6.3.1", "tsconfig-paths": "^3.15.0" }