Closed guillaumep closed 1 year ago
Thanks, I’ll take a look asap.
Can you share the contents of src/apiPreloader.js
, and the eslint config for display-name
?
The only difference between 1.0.12 and 1.0.13 of es-iterator-helpers are that v1.0.13 adds explicit dependency declarations which were previously implicit. I can't conceive of how that would affect this.
Do you use npm, or an alternative?
Can you share the contents of
src/apiPreloader.js
Unfortunately I can't because it is proprietary code, however I can say it happens on any file in the project I'm working on.
and the eslint config for
display-name
?
Minimal .eslintrc
which reproduces the issue with es-iterator-helpers@1.0.12:
{
"root": true,
"extends": [
"plugin:react/recommended",
],
}
Do you use npm, or an alternative?
Using yarn classic (1.22.17).
The only difference between 1.0.12 and 1.0.13 of es-iterator-helpers are that v1.0.13 adds explicit dependency declarations which were previously implicit. I can't conceive of how that would affect this.
I've tried diffing yarn.lock
between installing version 1.0.12 and 1.0.13. No deps change between both installations. The only difference in the lock file is the version of es-iterator-helpers.
I've run yarn install both for version 1.0.12 and 1.0.13, clearing the node module directory between each run. Here's the diff:
$ env LC_ALL=C diff -rq node_modules.12 node_modules.13
Files node_modules.12/.yarn-integrity and node_modules.13/.yarn-integrity differ
Only in node_modules.12/enzyme-adapter-react-16/node_modules: internal-slot
Only in node_modules.12/enzyme-adapter-utils/node_modules: internal-slot
Only in node_modules.13/es-abstract/node_modules: internal-slot
Files node_modules.12/es-iterator-helpers/.eslintrc and node_modules.13/es-iterator-helpers/.eslintrc differ
Files node_modules.12/es-iterator-helpers/CHANGELOG.md and node_modules.13/es-iterator-helpers/CHANGELOG.md differ
Only in node_modules.13/es-iterator-helpers: node_modules
Files node_modules.12/es-iterator-helpers/package.json and node_modules.13/es-iterator-helpers/package.json differ
Only in node_modules.12/eslint-config-airbnb/node_modules: internal-slot
Only in node_modules.12/eslint-config-airbnb-base/node_modules: internal-slot
Only in node_modules.12/eslint-plugin-react/node_modules: es-iterator-helpers
Only in node_modules.12/function.prototype.name/node_modules: internal-slot
Files node_modules.12/internal-slot/.eslintrc and node_modules.13/internal-slot/.eslintrc differ
Files node_modules.12/internal-slot/.nycrc and node_modules.13/internal-slot/.nycrc differ
Files node_modules.12/internal-slot/CHANGELOG.md and node_modules.13/internal-slot/CHANGELOG.md differ
Files node_modules.12/internal-slot/README.md and node_modules.13/internal-slot/README.md differ
Files node_modules.12/internal-slot/index.js and node_modules.13/internal-slot/index.js differ
Only in node_modules.13/internal-slot: node_modules
Files node_modules.12/internal-slot/package.json and node_modules.13/internal-slot/package.json differ
Files node_modules.12/internal-slot/test/index.js and node_modules.13/internal-slot/test/index.js differ
Only in node_modules.12/jsx-ast-utils/node_modules: internal-slot
Only in node_modules.12/object.getownpropertydescriptors/node_modules: internal-slot
Only in node_modules.12/poe-scripts/node_modules: internal-slot
Only in node_modules.12/string.prototype.matchall: node_modules
Only in node_modules.12/util/node_modules: internal-slot
$ env LC_ALL=C diff -ru node_modules.12 node_modules.13
diff -ru node_modules.12/.yarn-integrity node_modules.13/.yarn-integrity
--- node_modules.12/.yarn-integrity 2023-08-25 22:01:48.919572920 -0400
+++ node_modules.13/.yarn-integrity 2023-08-25 22:02:12.007722065 -0400
@@ -92,7 +92,7 @@
"enzyme-adapter-react-16@^1.15.7",
"enzyme-react-intl@^2.0.6",
"enzyme@^3.11.0",
- "es-iterator-helpers@1.0.12",
+ "es-iterator-helpers@1.0.13",
"es6-object-assign@^1.1.0",
"es6-promisify@^6.0.2",
"eslint-config-airbnb-base@15.0.0",
@@ -945,7 +945,7 @@
"es-abstract@^1.21.2": "https://artifactory.outboxtechnology.com/artifactory/api/npm/npm-remote/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc",
"es-abstract@^1.21.3": "https://artifactory.outboxtechnology.com/artifactory/api/npm/npm-remote/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc",
"es-array-method-boxes-properly@^1.0.0": "https://artifactory.outboxtechnology.com/artifactory/api/npm/npm-remote/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e",
- "es-iterator-helpers@1.0.12": "https://artifactory.outboxtechnology.com/artifactory/api/npm/npm-remote/es-iterator-helpers/-/es-iterator-helpers-1.0.12.tgz#272f7270f270f4d63dd8aa718228ffa901fd086e",
+ "es-iterator-helpers@1.0.13": "https://artifactory.outboxtechnology.com/artifactory/api/npm/npm-remote/es-iterator-helpers/-/es-iterator-helpers-1.0.13.tgz#72101046ffc19baf9996adc70e6177a26e6e8084",
"es-iterator-helpers@^1.0.12": "https://artifactory.outboxtechnology.com/artifactory/api/npm/npm-remote/es-iterator-helpers/-/es-iterator-helpers-1.0.13.tgz#72101046ffc19baf9996adc70e6177a26e6e8084",
"es-module-lexer@^0.9.0": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz",
"es-set-tostringtag@^2.0.1": "https://artifactory.outboxtechnology.com/artifactory/api/npm/npm-remote/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8",
Only in node_modules.12/enzyme-adapter-react-16/node_modules: internal-slot
Only in node_modules.12/enzyme-adapter-utils/node_modules: internal-slot
Only in node_modules.13/es-abstract/node_modules: internal-slot
diff -ru node_modules.12/es-iterator-helpers/.eslintrc node_modules.13/es-iterator-helpers/.eslintrc
--- node_modules.12/es-iterator-helpers/.eslintrc 2023-08-25 10:33:49.826999000 -0400
+++ node_modules.13/es-iterator-helpers/.eslintrc 2023-08-23 14:55:09.690999000 -0400
@@ -3,6 +3,10 @@
"extends": "@ljharb",
+ "plugins": [
+ "import",
+ ],
+
"globals": {
"Iterator": false,
},
@@ -52,6 +56,7 @@
"no-negated-condition": 1,
"object-curly-newline": 0,
"sort-keys": 0,
+ "import/no-extraneous-dependencies": 2,
},
"overrides": [
@@ -60,6 +65,7 @@
"rules": {
"eqeqeq": ["error", "allow-null"],
"max-params": 0,
+ "import/no-extraneous-dependencies": [2, { "devDependencies": true }],
},
},
],
diff -ru node_modules.12/es-iterator-helpers/CHANGELOG.md node_modules.13/es-iterator-helpers/CHANGELOG.md
--- node_modules.12/es-iterator-helpers/CHANGELOG.md 2023-08-25 10:33:49.826999000 -0400
+++ node_modules.13/es-iterator-helpers/CHANGELOG.md 2023-08-23 14:55:09.690999000 -0400
@@ -5,6 +5,12 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [v1.0.13](https://github.com/es-shims/iterator-helpers/compare/v1.0.12...v1.0.13) - 2023-08-16
+
+### Fixed
+
+- [Deps] add missing deps; add eslint-plugin-import [`#3`](https://github.com/es-shims/iterator-helpers/issues/3)
+
## [v1.0.12](https://github.com/es-shims/iterator-helpers/compare/v1.0.11...v1.0.12) - 2023-07-14
### Commits
Only in node_modules.13/es-iterator-helpers: node_modules
diff -ru node_modules.12/es-iterator-helpers/package.json node_modules.13/es-iterator-helpers/package.json
--- node_modules.12/es-iterator-helpers/package.json 2023-08-25 10:33:49.826999000 -0400
+++ node_modules.13/es-iterator-helpers/package.json 2023-08-23 14:55:09.690999000 -0400
@@ -1,6 +1,6 @@
{
"name": "es-iterator-helpers",
- "version": "1.0.12",
+ "version": "1.0.13",
"description": "An ESnext spec-compliant iterator helpers shim/polyfill/replacement that works as far down as ES3.",
"main": "index.json",
"exports": {
@@ -127,10 +127,14 @@
"homepage": "https://github.com/es-shims/iterator-helpers#readme",
"dependencies": {
"asynciterator.prototype": "^1.0.0",
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
"es-abstract": "^1.21.3",
"es-set-tostringtag": "^2.0.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.2.1",
"globalthis": "^1.0.3",
+ "has-property-descriptors": "^1.0.0",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
"internal-slot": "^1.0.5",
@@ -144,6 +148,7 @@
"auto-changelog": "^2.4.0",
"es-value-fixtures": "^1.4.2",
"eslint": "=8.8.0",
+ "eslint-plugin-import": "^2.28.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.3",
"functions-have-names": "^1.2.3",
Only in node_modules.12/eslint-config-airbnb/node_modules: internal-slot
Only in node_modules.12/eslint-config-airbnb-base/node_modules: internal-slot
Only in node_modules.12/eslint-plugin-react/node_modules: es-iterator-helpers
Only in node_modules.12/function.prototype.name/node_modules: internal-slot
diff -ru node_modules.12/internal-slot/.eslintrc node_modules.13/internal-slot/.eslintrc
--- node_modules.12/internal-slot/.eslintrc 2023-08-23 14:55:09.921999000 -0400
+++ node_modules.13/internal-slot/.eslintrc 2023-08-24 12:45:29.029000000 -0400
@@ -7,5 +7,6 @@
"max-params": [2, 3],
"new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }],
"no-magic-numbers": 0,
+ "operator-linebreak": [2, "before"],
},
}
diff -ru node_modules.12/internal-slot/.nycrc node_modules.13/internal-slot/.nycrc
--- node_modules.12/internal-slot/.nycrc 2023-08-23 14:55:09.921999000 -0400
+++ node_modules.13/internal-slot/.nycrc 2023-08-24 12:45:29.029000000 -0400
@@ -2,6 +2,10 @@
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
+ "lines": 86,
+ "statements": 85.93,
+ "functions": 82.43,
+ "branches": 76.06,
"exclude": [
"coverage",
"test"
diff -ru node_modules.12/internal-slot/CHANGELOG.md node_modules.13/internal-slot/CHANGELOG.md
--- node_modules.12/internal-slot/CHANGELOG.md 2023-08-23 14:55:09.921999000 -0400
+++ node_modules.13/internal-slot/CHANGELOG.md 2023-08-24 12:45:29.029000000 -0400
@@ -4,35 +4,6 @@
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
-#### [v1.0.5](https://github.com/ljharb/internal-slot/compare/v1.0.4...v1.0.5)
-
-> 9 February 2023
-
-- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`e427703`](https://github.com/ljharb/internal-slot/commit/e427703bfc669c590a863ec77ecd3789d7b7c458)
-- [Deps] update `get-intrinsic` [`aa652f0`](https://github.com/ljharb/internal-slot/commit/aa652f05c5c15b4ed1a118be60f0565e47bd7208)
-- [Fix] improve assertion message [`8df86e3`](https://github.com/ljharb/internal-slot/commit/8df86e3ea21786b5eb7654f22202665c8b63accf)
-
-#### [v1.0.4](https://github.com/ljharb/internal-slot/compare/v1.0.3...v1.0.4)
-
-> 13 December 2022
-
-- [actions] reuse common workflows [`82a1aee`](https://github.com/ljharb/internal-slot/commit/82a1aee603bce8627930597edb3a04b4970ed151)
-- [meta] use `npmignore` to autogenerate an npmignore file [`56f7e71`](https://github.com/ljharb/internal-slot/commit/56f7e7182dd934dd6c1b80497a110670d02a91b9)
-- [actions] use `node/install` instead of `node/run`; use `codecov` action [`e25ff67`](https://github.com/ljharb/internal-slot/commit/e25ff67d568f77c1b66168957d82b080779e1c0a)
-- [actions] update rebase action to use reusable workflow [`227e81e`](https://github.com/ljharb/internal-slot/commit/227e81eaef7230a265103ef1ef0618d2920c3f30)
-- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `foreach`, `object-inspect`, `tape` [`fc9f319`](https://github.com/ljharb/internal-slot/commit/fc9f319d136ddf2e79910390d1e7ad279d41cc01)
-- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`0a72a0f`](https://github.com/ljharb/internal-slot/commit/0a72a0f389511b41645f441da19257a266cb37f7)
-- [actions] update codecov uploader [`e2b993f`](https://github.com/ljharb/internal-slot/commit/e2b993f143278a30424ebd5526019e59828989d0)
-- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`8f0ab80`](https://github.com/ljharb/internal-slot/commit/8f0ab808afdd458001c35c828962dc714d824754)
-- [actions] update checkout action [`8da4b91`](https://github.com/ljharb/internal-slot/commit/8da4b91c3454671da2e53a831ca0928147965a09)
-- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@safe-publish-latest`, `tape` [`7ab37aa`](https://github.com/ljharb/internal-slot/commit/7ab37aabf01ded2605fa583a9866b62172f82e30)
-- [readme] add github actions/codecov badges [`71234be`](https://github.com/ljharb/internal-slot/commit/71234bef4ef99e2f17d72ae3a1b7c0522519b7d7)
-- [Fix] `assert`: throw on a nonexistent slot even when an object already has other slots [`12580bd`](https://github.com/ljharb/internal-slot/commit/12580bd26fe9f8603566e9e076092b5e1fb7340b)
-- [Tests] use `for-each` instead of `foreach` [`7229df0`](https://github.com/ljharb/internal-slot/commit/7229df01666ccb022dde82686d84b97b7bcfc53a)
-- [meta] use `prepublishOnly` script for npm 7+ [`8728872`](https://github.com/ljharb/internal-slot/commit/8728872cfbd735d3ae87e885c081a08d5b26edf0)
-- [Deps] update `get-intrinsic` [`1b7088f`](https://github.com/ljharb/internal-slot/commit/1b7088fa970c33757816b08357814bdbf6d722b6)
-- [Deps] update `get-intrinsic` [`063621e`](https://github.com/ljharb/internal-slot/commit/063621ec99d1b9262d3898c0ecad0e1e98be5f75)
-
#### [v1.0.3](https://github.com/ljharb/internal-slot/compare/v1.0.2...v1.0.3)
> 26 January 2021
diff -ru node_modules.12/internal-slot/README.md node_modules.13/internal-slot/README.md
--- node_modules.12/internal-slot/README.md 2023-08-23 14:55:09.921999000 -0400
+++ node_modules.13/internal-slot/README.md 2023-08-24 12:45:29.029000000 -0400
@@ -1,7 +1,5 @@
# internal-slot <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
-[![github actions][actions-image]][actions-url]
-[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
@@ -52,7 +50,3 @@
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/internal-slot.svg
[downloads-url]: https://npm-stat.com/charts.html?package=internal-slot
-[codecov-image]: https://codecov.io/gh/ljharb/internal-slot/branch/main/graphs/badge.svg
-[codecov-url]: https://app.codecov.io/gh/ljharb/internal-slot/
-[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/internal-slot
-[actions-url]: https://github.com/ljharb/internal-slot/actions
diff -ru node_modules.12/internal-slot/index.js node_modules.13/internal-slot/index.js
--- node_modules.12/internal-slot/index.js 2023-08-23 14:55:09.921999000 -0400
+++ node_modules.13/internal-slot/index.js 2023-08-24 12:45:29.029000000 -0400
@@ -15,9 +15,6 @@
throw new $TypeError('`slot` must be a string');
}
channel.assert(O);
- if (!SLOT.has(O, slot)) {
- throw new $TypeError('`' + slot + '` is not present on `O`');
- }
},
get: function (O, slot) {
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
Only in node_modules.13/internal-slot: node_modules
diff -ru node_modules.12/internal-slot/package.json node_modules.13/internal-slot/package.json
--- node_modules.12/internal-slot/package.json 2023-08-23 14:55:09.921999000 -0400
+++ node_modules.13/internal-slot/package.json 2023-08-24 12:45:29.029000000 -0400
@@ -1,12 +1,10 @@
{
"name": "internal-slot",
- "version": "1.0.5",
+ "version": "1.0.3",
"description": "ES spec-like internal slots",
"main": "index.js",
"scripts": {
- "prepack": "npmignore --auto --commentLines=autogenerated",
- "prepublishOnly": "safe-publish-latest",
- "prepublish": "not-in-publish || npm run prepublishOnly",
+ "prepublish": "safe-publish-latest",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"pretest": "npm run lint",
@@ -41,19 +39,18 @@
"node": ">= 0.4"
},
"devDependencies": {
- "@ljharb/eslint-config": "^21.0.1",
- "aud": "^2.0.2",
- "auto-changelog": "^2.4.0",
- "eslint": "=8.8.0",
- "for-each": "^0.3.3",
- "npmignore": "^0.3.0",
+ "@ljharb/eslint-config": "^17.5.0",
+ "aud": "^1.1.3",
+ "auto-changelog": "^2.2.1",
+ "eslint": "^7.18.0",
+ "foreach": "^2.0.5",
"nyc": "^10.3.2",
- "object-inspect": "^1.12.3",
- "safe-publish-latest": "^2.0.0",
- "tape": "^5.6.3"
+ "object-inspect": "^1.9.0",
+ "safe-publish-latest": "^1.1.4",
+ "tape": "^5.1.1"
},
"dependencies": {
- "get-intrinsic": "^1.2.0",
+ "get-intrinsic": "^1.1.0",
"has": "^1.0.3",
"side-channel": "^1.0.4"
},
@@ -62,10 +59,5 @@
"unreleased": false,
"commitLimit": false,
"backfillLimit": false
- },
- "publishConfig": {
- "ignore": [
- ".github/workflows"
- ]
}
}
diff -ru node_modules.12/internal-slot/test/index.js node_modules.13/internal-slot/test/index.js
--- node_modules.12/internal-slot/test/index.js 2023-08-23 14:55:09.921999000 -0400
+++ node_modules.13/internal-slot/test/index.js 2023-08-24 12:45:29.029000000 -0400
@@ -2,7 +2,7 @@
var test = require('tape');
var inspect = require('object-inspect');
-var forEach = require('for-each');
+var forEach = require('foreach');
var SLOT = require('../');
@@ -32,7 +32,6 @@
var o = {};
SLOT.set(o, 'x');
t.doesNotThrow(function () { SLOT.assert(o, 'x'); }, 'existent slot noops');
- t['throws'](function () { SLOT.assert(o, 'y'); }, 'thing with a slot throws on a nonexistent slot');
t.end();
});
Only in node_modules.12/jsx-ast-utils/node_modules: internal-slot
Only in node_modules.12/object.getownpropertydescriptors/node_modules: internal-slot
Only in node_modules.12/poe-scripts/node_modules: internal-slot
Only in node_modules.12/string.prototype.matchall: node_modules
Only in node_modules.12/util/node_modules: internal-slot
I can make it work using es-iterator-helpers@1.0.13 if I also specify explicitly internal-slot@1.0.5. However internal-slot@1.0.3 and internal-slot@1.0.4 breaks.
ok, well that's the problem. if you're using PnP, normal module resolution breaks, and issues like this can come up.
you should always be on the latest in-range version of everything, which means internal-slot v1.0.5. There's bugfixes in it that are applicable here. Additionally, es-iterator-helpers
explicitly requires ^1.0.5
, which means that if yarn is installing a version less than that, yarn is broken.
Closing since everything works with the declared compatible dependencies.
Looks indeed like it is a yarn classic issue when resolving dependency versions. Thanks for investigating!
Is there an existing issue for this?
Description Overview
Running with es-iterator-helpers@1.0.13 fails with error:
No such error occurs with es-iterator-helpers@1.0.12.
It is possible the issue lies with es-iterator-helpers. However since Google produces no results when looking up the error, I'm reporting the issue with a way to mitigate the issue so others can find it.
Full stack trace:
Expected Behavior
Would be nice if it could work with es-iterator-helpers@1.0.13.
eslint-plugin-react version
v7.33.2
eslint version
v8.2.0
node version
v16.14.2