-
Notifications
You must be signed in to change notification settings - Fork 17
chore(deps): bump the all-npm-dependencies group with 14 updates #1810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
e38bc33
210ee62
4e78aac
4b6c91f
2b2dc30
2cf874f
d4df561
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /** | ||
| * Custom Jest resolver that handles ESM-only packages. | ||
| * | ||
| * Some packages (e.g., unicorn-magic, is-unicode-supported) only provide | ||
| * "import" conditions in their package.json exports maps. When babel-jest | ||
| * transforms ESM to CJS, the resulting require() calls fail because Jest's | ||
| * default resolver only checks "require" and "node" conditions. | ||
| * | ||
| * This resolver falls back to the "import" condition when the default | ||
| * resolution fails, allowing these packages to be resolved correctly. | ||
| */ | ||
| module.exports = (path, options) => { | ||
| try { | ||
| return options.defaultResolver(path, options); | ||
| } catch (error) { | ||
| // If default resolution fails, retry with "import" condition added | ||
| return options.defaultResolver(path, { | ||
| ...options, | ||
| conditions: [...(options.conditions || []), 'import'], | ||
| }); | ||
| } | ||
| }; | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,36 +44,36 @@ | |
| "author": "GitHub", | ||
| "license": "MIT", | ||
| "dependencies": { | ||
| "chalk": "^4.1.2", | ||
| "commander": "^12.0.0", | ||
| "execa": "^5.1.1", | ||
| "chalk": "^5.6.2", | ||
| "commander": "^14.0.3", | ||
| "execa": "^9.6.1", | ||
| "js-yaml": "^4.1.1" | ||
|
Comment on lines
46
to
50
|
||
| }, | ||
| "devDependencies": { | ||
| "@babel/core": "^7.29.0", | ||
| "@babel/preset-env": "^7.29.0", | ||
| "@commitlint/cli": "^20.4.1", | ||
| "@commitlint/config-conventional": "^20.4.1", | ||
| "@eslint/compat": "^2.0.0", | ||
| "@eslint/compat": "^2.0.4", | ||
| "@eslint/js": "^10.0.0", | ||
| "@types/glob": "^9.0.0", | ||
| "@types/jest": "^30.0.0", | ||
| "@types/js-yaml": "^4.0.5", | ||
| "@types/node": "^25.2.3", | ||
| "@typescript-eslint/eslint-plugin": "^8.55.0", | ||
| "@typescript-eslint/parser": "^8.55.0", | ||
| "esbuild": "^0.25.0", | ||
| "@types/node": "^25.5.2", | ||
| "@typescript-eslint/eslint-plugin": "^8.58.0", | ||
| "@typescript-eslint/parser": "^8.58.0", | ||
| "esbuild": "^0.28.0", | ||
| "babel-jest": "^30.2.0", | ||
| "eslint": "^10.0.0", | ||
| "eslint-plugin-security": "^3.0.1", | ||
| "eslint-plugin-security": "^4.0.0", | ||
| "glob": "^13.0.1", | ||
| "globals": "^17.0.0", | ||
| "husky": "^9.1.7", | ||
| "jest": "^30.2.0", | ||
| "markdownlint-cli2": "^0.21.0", | ||
| "ts-jest": "^29.4.6", | ||
| "typescript": "^5.0.0", | ||
| "typescript-eslint": "^8.0.0" | ||
| "markdownlint-cli2": "^0.22.0", | ||
| "ts-jest": "^29.4.9", | ||
| "typescript": "^6.0.2", | ||
| "typescript-eslint": "^8.58.0" | ||
| }, | ||
| "overrides": { | ||
| "test-exclude": "^7.0.1", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jest-resolver.js retries resolution with an added "import" condition for any resolver error. This can mask unrelated resolution problems (typos, missing files, etc.) and make failures harder to diagnose. Consider only retrying for export-condition related errors (e.g., ERR_PACKAGE_PATH_NOT_EXPORTED / exports resolution failures) and rethrowing the original error when the fallback also fails.