-
Notifications
You must be signed in to change notification settings - Fork 7
Update Babel and Jest #1419
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: 2025-tooling-update
Are you sure you want to change the base?
Update Babel and Jest #1419
Conversation
- added browser targets
- not valid anymore with modern babel setup
# Conflicts: # package.json # themes/theme-gmd/babel.config.js # themes/theme-gmd/package.json # themes/theme-ios11/babel.config.js # themes/theme-ios11/package.json # yarn.lock
# Conflicts: # yarn.lock
- fetch is supported by all modern browsers
- guarantees shared build targets between babel and webpack
# Conflicts: # extensions/@shopgate-product-reviews/frontend/package.json # libraries/tracking-core/package.json
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.
Pull Request Overview
This PR updates Babel and Jest dependencies to their latest stable versions to improve compatibility, performance, and tooling support. The update includes migrating from Jest 24.9.0 to 29.7.0, which introduced a new snapshot format requiring all snapshots to be regenerated.
Key changes:
- Upgraded Babel packages from v7.5.x to v7.28.x
- Updated Jest from v24.9.0 to v29.7.0
- Modernized Babel configuration with improved preset options
- Removed obsolete Babel plugins and consolidated dependencies
Reviewed Changes
Copilot reviewed 241 out of 310 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
themes/theme-gmd/package.json |
Updated Babel and Jest dependencies to latest versions |
themes/theme-gmd/babel.config.js |
Modernized Babel configuration with new presets and removed obsolete plugins |
package.json |
Updated root-level Babel and Jest dependencies |
themes/theme-gmd/.browserslistrc |
Added browser support targets for Babel compilation |
themes/theme-gmd/jest.config.js |
Updated CSS module mock configuration |
| Snapshot files | Regenerated snapshots due to Jest 29 format changes |
| Test files | Updated mock function calls from require.requireActual to jest.requireActual |
Files not reviewed (1)
- themes/theme-gmd/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # extensions/@shopgate-product-reviews/frontend/package.json # libraries/tracking-core/package.json
| * Creates a mocked document with iframes. | ||
| * @param {Array} srcs A list of video URLs. | ||
| * @return {Object} | ||
| * Creates a mocked document with iframes (parity with your original helper). |
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.
remove "(parity with your original helper)", it is clearly an AI helper comment
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.
removed
| const options = { trackerName: 'mock' }; | ||
| const expectedObject = { expected: 'data' }; | ||
|
|
||
| // initial call as in original test |
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.
remove comment. original test is gone now
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.
removed
# Conflicts: # extensions/@shopgate-product-reviews/frontend/package.json # libraries/tracking-core/package.json
|
Comment 1: Comment 2: [
['@babel/plugin-transform-spread', {
loose: true,
}],
['@babel/plugin-transform-classes', {
loose: true,
}],
] |


Description
This pull requests updates all Babel-related dependencies to the latest stable versions for improved compatibility, performance, and tooling support.
Additionally it updates Jest to the latest version that's compatible with the current Shopgate infrastructure.
Type of change
How to test it
Since the Jest update to version 29 introduced a new snapshot format, every snapshot had to be updated. I would recommend to filter snapshots from the changed files.