Chore: Upgrade jest-environment-jsdom, auth0.js and component-cdn-uploader#2690
Chore: Upgrade jest-environment-jsdom, auth0.js and component-cdn-uploader#2690ankita10119 wants to merge 10 commits intomasterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
f41fd13 to
0767407
Compare
This comment has been minimized.
This comment has been minimized.
yogeshchoudhary147
left a comment
There was a problem hiding this comment.
Great work on this PR. This is a really important cleanup—getting rid of deprecated packages and strengthening the test setup is a big win. The new browser utility and the IE11 fixes look correct. LGTM!
This comment was marked as off-topic.
This comment was marked as off-topic.
src/core/web_api/p2_api.js
Outdated
| } | ||
| if (this.isUniversalLogin && ulpTelemetry) { | ||
| telemetry = { | ||
| ...ulpTelemetry, |
There was a problem hiding this comment.
Object spread operator incompatible with IE11
The object spread syntax (...ulpTelemetry, ...ulpTelemetry.env) is not supported in IE11, even with Babel polyfills. While Babel will transpile this, the PR description mentions replacing spread syntax with Object.assign for IE11 compatibility.
For consistency with the stated goals, replace with Object.assign:
telemetry = Object.assign({}, ulpTelemetry, {
env: Object.assign({}, ulpTelemetry.env, {
'lock.js-ulp': getVersion(),
'auth0.js-ulp': auth0.version.raw
})
});There was a problem hiding this comment.
@ankita10119 please check this, if this is relevant
There was a problem hiding this comment.
Addressed and updated
Changes
This pull request upgrades several dependencies and refactors the test setup to align with the latest version of
Jestandjsdom. It removes the deprecatedjest-environment-jsdom-globalin favor of the built-in "jsdom" environment, updates browser utilities, and ensures that all tests continue to run reliably after the upgrade.Dependency Upgrades
jest-environment-jsdom-globaland replaced it with the built-in "jsdom" test environment.jest-environment-jsdomfrom version^29.3.1to^30.2.0.auth0-jsfrom version^9.27.0to^9.29.0.@auth0/component-cdn-uploaderfrom version^2.2.2to^2.4.0.Test Infrastructure Changes
jest-environment-jsdom-globalfunctionality by defining a globaljsdom.reconfigure()mock within src/tests/setup-tests.js.window.location,href,pathname, andsearchacross tests.TextEncoder,MessagePort, and other web APIs required byjsdom.Code Updates
Object.assignfor better legacy browser compatibility (IE 11).Testing
Reference
https://github.com/auth0/lock/security/dependabot/189
Checklist