Skip to content

Commit

Permalink
Emotion upgrade (#12366)
Browse files Browse the repository at this point in the history
* Emotion upgrade

* Ignore type for now

* yarn dedupe run

* Update `styles.const` snapshot

* Skip global styles tests for now

* Update form snapshot

* Remove `global-styles` snapshot tests
  • Loading branch information
amoore108 authored Feb 6, 2025
1 parent bbb865f commit 67aa588
Show file tree
Hide file tree
Showing 299 changed files with 332 additions and 3,664 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ updates:
update-types: ['version-update:semver-major']
- dependency-name: '@typescript-eslint/eslint-plugin'
update-types: ['version-update:semver-major']
# https://jira.dev.bbc.co.uk/browse/NEWSWORLDSERVICE-2186: Latest version of Emotion contains a memory leak that needs resolved: https://github.com/emotion-js/emotion/issues/3221
- dependency-name: '@emotion/*'
# Opera Mini unsupported packages
- dependency-name: 'uuid' # https://github.com/bbc/simorgh/pull/11840
- dependency-name: '@types/uuid' # https://github.com/bbc/simorgh/pull/11840
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-6b67494872-10.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/gopd-npm-1.0.1-10c1d0b534-5fbc7ad57b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@ module.exports = {
],
],
timers: 'modern',
workerIdleMemoryLimit: '512MB',
};
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@
"homepage": "https://github.com/bbc/simorgh#readme",
"dependencies": {
"@bbc/web-vitals": "2.4.1",
"@emotion/cache": "11.11.0",
"@emotion/react": "11.11.4",
"@emotion/cache": "11.14.0",
"@emotion/react": "11.14.0",
"@emotion/server": "11.11.0",
"@emotion/styled": "11.11.5",
"@emotion/styled": "11.14.0",
"@loadable/component": "5.16.4",
"@loadable/server": "5.16.5",
"@optimizely/react-sdk": "3.2.3",
Expand Down Expand Up @@ -145,9 +145,9 @@
"@babel/preset-typescript": "7.26.0",
"@babel/runtime": "7.26.7",
"@cypress/webpack-preprocessor": "6.0.2",
"@emotion/babel-plugin": "11.11.0",
"@emotion/babel-preset-css-prop": "11.11.0",
"@emotion/jest": "11.11.0",
"@emotion/babel-plugin": "11.13.5",
"@emotion/babel-preset-css-prop": "11.12.0",
"@emotion/jest": "11.13.0",
"@esbuild/darwin-arm64": "0.24.2",
"@esbuild/darwin-x64": "0.24.2",
"@esbuild/linux-arm64": "0.24.2",
Expand Down

This file was deleted.

20 changes: 0 additions & 20 deletions src/app/legacy/psammead/psammead-styles/src/global-styles.test.jsx

This file was deleted.

6 changes: 2 additions & 4 deletions src/app/lib/styles.const/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ exports[`Styles NEGATIVE_MARGIN should match text 1`] = `

exports[`Styles NegativeMargin should match text 1`] = `
{
"map": "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBCOEIiLCJmaWxlIjoiaW5kZXgudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIEdST1VQXzFfTUFYX1dJRFRILFxuICBHUk9VUF8yX01JTl9XSURUSCxcbiAgR1JPVVBfM19NSU5fV0lEVEgsXG59IGZyb20gJy4uLy4uL2NvbXBvbmVudHMvVGhlbWVQcm92aWRlci9tZWRpYVF1ZXJpZXMnO1xuaW1wb3J0IHtcbiAgTUFSR0lOX0FCT1ZFXzQwMFBYLFxuICBNQVJHSU5fQkVMT1dfNDAwUFgsXG4gIFFVQURSVVBMRSxcbiAgVFJJUExFLFxufSBmcm9tICcuLi8uLi9jb21wb25lbnRzL1RoZW1lUHJvdmlkZXIvc3BhY2luZ3MnO1xuXG5leHBvcnQgY29uc3QgTkVHQVRJVkVfTUFSR0lOID0gYCR7R1JPVVBfMV9NQVhfV0lEVEh9IHtcbiAgICAvKiBUbyByZW1vdmUgR0VMIE1hcmdpbnMgKi9cbiAgICBtYXJnaW46ICR7UVVBRFJVUExFfXJlbSAtJHtNQVJHSU5fQkVMT1dfNDAwUFh9IDA7XG4gICAgcGFkZGluZzogMCAke01BUkdJTl9CRUxPV180MDBQWH07XG4gIH1cbiAgJHtHUk9VUF8yX01JTl9XSURUSH0ge1xuICAgIG1hcmdpbjogJHtRVUFEUlVQTEV9cmVtIC0ke01BUkdJTl9BQk9WRV80MDBQWH0gMDtcbiAgfVxuICAke0dST1VQXzNfTUlOX1dJRFRIfSB7XG4gICAgbWFyZ2luOiAke1RSSVBMRX1yZW0gLSR7TUFSR0lOX0FCT1ZFXz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LCAxcHgsIDFweCwgMXB4KTtcbmhlaWdodDogMXB4O1xub3ZlcmZsb3c6IGhpZGRlbjtcbnBvc2l0aW9uOiBhYnNvbHV0ZTtcbndpZHRoOiAxcHg7XG5tYXJnaW46IDA7XG5gO1xuIl19 */",
"name": "1qlli7s-NegativeMargin",
"name": "1fx7y7j-NegativeMargin",
"next": undefined,
"styles": "@media (max-width: 24.9375rem){margin:2rem -0.5rem 0;padding:0 0.5rem;}@media (min-width: 25rem){margin:2rem -1rem 0;}@media (min-width: 37.5rem){margin:1.5rem -1rem 0;};label:NegativeMargin;",
"toString": [Function],
"styles": "@media (max-width: 24.9375rem){margin:2rem -0.5rem 0;padding:0 0.5rem;}@media (min-width: 25rem){margin:2rem -1rem 0;}@media (min-width: 37.5rem){margin:1.5rem -1rem 0;};label:NegativeMargin;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBCOEIiLCJmaWxlIjoiaW5kZXgudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIEdST1VQXzFfTUFYX1dJRFRILFxuICBHUk9VUF8yX01JTl9XSURUSCxcbiAgR1JPVVBfM19NSU5fV0lEVEgsXG59IGZyb20gJy4uLy4uL2NvbXBvbmVudHMvVGhlbWVQcm92aWRlci9tZWRpYVF1ZXJpZXMnO1xuaW1wb3J0IHtcbiAgTUFSR0lOX0FCT1ZFXzQwMFBYLFxuICBNQVJHSU5fQkVMT1dfNDAwUFgsXG4gIFFVQURSVVBMRSxcbiAgVFJJUExFLFxufSBmcm9tICcuLi8uLi9jb21wb25lbnRzL1RoZW1lUHJvdmlkZXIvc3BhY2luZ3MnO1xuXG5leHBvcnQgY29uc3QgTkVHQVRJVkVfTUFSR0lOID0gYCR7R1JP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3JnaC9ibG9iL2M5MjUzYjkyOGJjNGRiMjY4YzFkM2VmZjIzNzY1N2E1M2M3Nzc2MzMvc3JjL2FwcC9sZWdhY3kvcHNhbW1lYWQvcHNhbW1lYWQtdmlzdWFsbHktaGlkZGVuLXRleHQvc3JjL2luZGV4LmpzeCNMMy1MMTEpLFxuICogIHdoaWNoIHdlIGNhbm5vdCB1c2UgZGlyZWN0bHkgYXMgd2UgcmVxdWlyZSBjb250cm9sIG92ZXIgX3doZW5fIHRoZXkgYXJlIGFwcGxpZWQuXG4gKi9cbmV4cG9ydCBjb25zdCB2aXN1YWxseUhpZGRlblN0eWxlID0gYFxuY2xpcC1wYXRoOiBpbnNldCgxMDAlKTtcbmNsaXA6IHJlY3QoMXB4LCAxcHgsIDFweCwgMXB4KTtcbmhlaWdodDogMXB4O1xub3ZlcmZsb3c6IGhpZGRlbjtcbnBvc2l0aW9uOiBhYnNvbHV0ZTtcbndpZHRoOiAxcHg7XG5tYXJnaW46IDA7XG5gO1xuIl19 */",
}
`;

Expand Down
1 change: 1 addition & 0 deletions ws-nextjs-app/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const unitTests = {

const config: import('jest').Config = {
projects: [unitTests, canonicalIntegrationTests, ampIntegrationTests],
workerIdleMemoryLimit: '512MB',
};

export default config;
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,88 @@ exports[`Form should render and match snapshot 1`] = `
outline-offset: 0.1875rem;
}
.emotion-8 {
scroll-margin-top: 2.75rem;
border: solid 0.0625rem #141414;
outline: solid 0.0625rem transparent;
width: 100%;
min-height: 2.75rem;
padding: 0.5rem;
font-family: ReithSans,Helvetica,Arial,sans-serif;
font-style: normal;
font-weight: 400;
font-size: 0.9375rem;
line-height: 1.25rem;
}
@media (min-width: 20rem) and (max-width: 37.4375rem) {
.emotion-8 {
font-size: 1rem;
line-height: 1.25rem;
}
}
@media (min-width: 37.5rem) {
.emotion-8 {
font-size: 1rem;
line-height: 1.25rem;
}
}
@media screen and (forced-colors: active) {
.emotion-8 {
border-color: canvasText;
outline: 0;
}
}
.emotion-8:focus {
outline: 0.1875rem solid #FFFFFF;
box-shadow: 0 0 0 0.1875rem #000000;
outline-offset: 0.1875rem;
}
.emotion-14 {
scroll-margin-top: 2.75rem;
border: solid 0.0625rem #141414;
outline: solid 0.0625rem transparent;
width: 100%;
min-height: 2.75rem;
padding: 0.5rem;
font-family: ReithSans,Helvetica,Arial,sans-serif;
font-style: normal;
font-weight: 400;
font-size: 0.9375rem;
line-height: 1.25rem;
}
@media (min-width: 20rem) and (max-width: 37.4375rem) {
.emotion-14 {
font-size: 1rem;
line-height: 1.25rem;
}
}
@media (min-width: 37.5rem) {
.emotion-14 {
font-size: 1rem;
line-height: 1.25rem;
}
}
@media screen and (forced-colors: active) {
.emotion-14 {
border-color: canvasText;
outline: 0;
}
}
.emotion-14:focus {
outline: 0.1875rem solid #FFFFFF;
box-shadow: 0 0 0 0.1875rem #000000;
outline-offset: 0.1875rem;
}
.emotion-17 {
scroll-margin-top: 2.75rem;
border: solid 0.0625rem #141414;
Expand Down Expand Up @@ -579,7 +661,7 @@ exports[`Form should render and match snapshot 1`] = `
<div>
<input
aria-invalid="false"
class="emotion-5"
class="emotion-8"
id="txt49018835"
name="txt49018835"
type="email"
Expand Down Expand Up @@ -621,7 +703,7 @@ exports[`Form should render and match snapshot 1`] = `
<div>
<input
aria-invalid="false"
class="emotion-5"
class="emotion-14"
id="txt49018963"
name="txt49018963"
type="tel"
Expand Down
Loading

0 comments on commit 67aa588

Please sign in to comment.