-
Couldn't load subscription status.
- Fork 557
Chore: Upgrade jest-environment-jsdom and auth0.js #2682
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
base: master
Are you sure you want to change the base?
Changes from all commits
f940b36
1e20ccb
a12a8d2
ad2be23
486b101
300915b
edfb9b8
58e2428
8277b9a
f546a4a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| module.exports = { | ||
| presets: [ | ||
| [ | ||
| '@babel/preset-env', | ||
| { | ||
| targets: { | ||
| esmodules: false | ||
|
Comment on lines
+6
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security & Maintenance Risk: No explicit Node.js target specified By only setting
While I understand from the review comments that you're keeping this approach to maintain ES2017 compatibility for the
The current configuration creates an implicit dependency on browserslist defaults which reduces build reproducibility. |
||
| }, | ||
| useBuiltIns: 'entry', | ||
| corejs: '3.26.1' | ||
| } | ||
| ], | ||
| '@babel/preset-react' | ||
| ], | ||
| plugins: [ | ||
| '@babel/plugin-proposal-function-bind', | ||
| "babel-plugin-stylus-compiler", | ||
| "version-inline", | ||
| "transform-css-import-to-string", | ||
| '@babel/plugin-proposal-object-rest-spread' | ||
| ] | ||
| }; | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,12 @@ | |
| "i18n:prettier": "prettier --write src/i18n/*", | ||
| "i18n:validate": "node -r esm scripts/lang-audit.js" | ||
| }, | ||
| "overrides": { | ||
| "jest-environment-jsdom": "^30.2.0", | ||
|
Comment on lines
+42
to
+43
This comment was marked as outdated.
Sorry, something went wrong.
ankita10119 marked this conversation as resolved.
Show resolved
Hide resolved
ankita10119 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "enzyme": { | ||
| "cheerio": "0.22.0" | ||
| } | ||
|
Comment on lines
+44
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pinning Cheerio Version: Why 0.22.0? Cheerio 0.22.0 was released in 2017 and has known security vulnerabilities. Pinning to this specific old version raises concerns:
Recommendation:
|
||
| }, | ||
| "devDependencies": { | ||
| "@auth0/component-cdn-uploader": "^2.2.2", | ||
| "@babel/core": "^7.0.0", | ||
|
|
@@ -54,6 +60,7 @@ | |
| "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", | ||
| "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", | ||
| "@babel/plugin-proposal-numeric-separator": "^7.0.0", | ||
| "@babel/plugin-proposal-object-rest-spread": "^7.20.7", | ||
| "@babel/plugin-proposal-optional-chaining": "^7.0.0", | ||
| "@babel/plugin-proposal-pipeline-operator": "^7.0.0", | ||
| "@babel/plugin-proposal-throw-expressions": "^7.0.0", | ||
|
|
@@ -75,7 +82,7 @@ | |
| "cross-env": "^7.0.3", | ||
| "css-loader": "^0.28.11", | ||
| "emojic": "^1.1.17", | ||
| "enzyme": "^3.1.1", | ||
| "enzyme": "^3.11.0", | ||
| "es-check": "^6.0.0", | ||
| "eslint": "^8.45.0", | ||
| "eslint-config-prettier": "^8.8.0", | ||
|
|
@@ -94,7 +101,7 @@ | |
| "grunt-webpack": "^5.0.0", | ||
| "husky": "^7.0.2", | ||
| "jest": "^29.3.1", | ||
| "jest-environment-jsdom": "^29.3.1", | ||
| "jest-environment-jsdom": "^30.2.0", | ||
| "jest-environment-jsdom-global": "^4.0.0", | ||
| "karma": "^6.4.1", | ||
| "karma-babel-preprocessor": "^8.0.2", | ||
|
|
@@ -119,7 +126,7 @@ | |
| "webpack-dev-server": "^4.11.1" | ||
| }, | ||
| "dependencies": { | ||
| "auth0-js": "^9.27.0", | ||
| "auth0-js": "^9.29.0", | ||
| "auth0-password-policies": "^1.0.2", | ||
| "blueimp-md5": "^2.19.0", | ||
| "classnames": "^2.3.2", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,17 @@ | |
| import { configure } from 'enzyme'; | ||
| import Adapter from '@cfaester/enzyme-adapter-react-18'; | ||
|
|
||
| import { TextEncoder, TextDecoder } from 'util'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Node.js Specific Import in Browser Test Environment Importing Concerns:
Recommendation: // Instead of Node.js util, use a proper polyfill:
import { TextEncoder, TextDecoder } from 'text-encoding';However, if this is working in practice and jest-environment-jsdom 30.x requires it, this is acceptable with a comment explaining why. |
||
|
|
||
| if (typeof global.TextEncoder === 'undefined') { | ||
This comment was marked as outdated.
Sorry, something went wrong. |
||
| global.TextEncoder = TextEncoder; | ||
| } | ||
|
|
||
| if (typeof global.TextDecoder === 'undefined') { | ||
| global.TextDecoder = TextDecoder; | ||
| } | ||
|
|
||
|
|
||
| configure({ adapter: new Adapter() }); | ||
|
|
||
| //jest polyfills | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.