Skip to content

Commit b14385f

Browse files
authored
Merge branch 'main' into ab/personalise-highlights
2 parents 2d15e88 + b82228c commit b14385f

File tree

169 files changed

+1279
-2021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+1279
-2021
lines changed

apps-rendering/.storybook/fonts-css.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import CleanCSS from 'clean-css';
2-
31
type FontFamily =
42
| 'GH Guardian Headline'
53
| 'Guardian Egyptian Web' // Legacy of GH Guardian Headline
@@ -278,5 +276,4 @@ const getStyleString: () => string = () => {
278276
);
279277
};
280278

281-
export const getFontsCss = (): string =>
282-
new CleanCSS().minify(getStyleString()).styles;
279+
export const getFontsCss = (): string => getStyleString();

apps-rendering/.storybook/main.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ module.exports = {
1616
// Global options for webpack
1717
config.resolve.extensions?.push('.ts', '.tsx');
1818

19-
config.resolve.fallback ??= {};
20-
// clean-css will try to import these packages
21-
config.resolve.fallback['http'] = false;
22-
config.resolve.fallback['https'] = false;
23-
2419
// Required as otherwise 'process' will not be defined when included on its own (without .env)
2520
// e.g process?.env?.SOME_VAR
2621
config.plugins.push(

apps-rendering/.storybook/preview.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,14 @@ export const viewports = [320, 375, 480, 660, 740, 980, 1140, 1300];
8282

8383
export const parameters = {
8484
viewport: {
85-
viewports: guardianViewports,
86-
defaultViewport: 'wide',
85+
options: guardianViewports,
8786
},
8887
layout: 'fullscreen',
8988
};
89+
90+
export const initialGlobals = {
91+
viewport: {
92+
value: 'wide',
93+
isRotated: false,
94+
},
95+
};

apps-rendering/config/.eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ module.exports = {
118118
{
119119
files: ['**/*.tsx'],
120120
rules: {
121-
'@typescript-eslint/ban-types': [
121+
'@typescript-eslint/no-restricted-types': [
122122
'error',
123123
{
124124
types: {
@@ -132,7 +132,6 @@ module.exports = {
132132
'React.FC':
133133
'Please use const MyThing = ({foo, bar}: Props) instead',
134134
},
135-
extendDefaults: true,
136135
},
137136
],
138137
},

apps-rendering/package.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,15 @@
4646
"@guardian/cdk": "62.0.1",
4747
"@guardian/content-api-models": "31.0.0",
4848
"@guardian/content-atom-model": "6.1.0",
49-
"@guardian/eslint-config-typescript": "11.0.0",
49+
"@guardian/eslint-config-typescript": "12.0.0",
5050
"@guardian/libs": "22.0.0",
5151
"@guardian/renditions": "0.2.0",
5252
"@guardian/source": "9.0.0",
5353
"@guardian/source-development-kitchen": "17.0.0",
5454
"@smithy/property-provider": "2.0.16",
55-
"@storybook/addon-essentials": "8.6.14",
55+
"@storybook/addon-docs": "9.1.13",
5656
"@storybook/addon-webpack5-compiler-babel": "3.0.6",
57-
"@storybook/components": "8.6.14",
58-
"@storybook/core-events": "8.6.14",
59-
"@storybook/manager-api": "8.6.14",
60-
"@storybook/preview-api": "8.6.14",
61-
"@storybook/react": "8.6.14",
62-
"@storybook/react-webpack5": "8.6.14",
63-
"@storybook/theming": "8.6.14",
57+
"@storybook/react-webpack5": "9.1.13",
6458
"@types/clean-css": "4.2.11",
6559
"@types/compression": "1.8.1",
6660
"@types/express": "5.0.1",
@@ -81,7 +75,7 @@
8175
"compression": "1.8.0",
8276
"constructs": "10.4.2",
8377
"core-js": "3.33.3",
84-
"eslint": "8.56.0",
78+
"eslint": "8.57.1",
8579
"eslint-plugin-jsx-a11y": "6.7.1",
8680
"eslint-plugin-react": "7.33.2",
8781
"express": "5.1.0",
@@ -95,7 +89,7 @@
9589
"react-dom": "18.3.1",
9690
"react-test-renderer": "18.3.1",
9791
"require-from-string": "2.0.2",
98-
"storybook": "8.6.14",
92+
"storybook": "9.1.13",
9993
"thrift": "0.20.0",
10094
"ts-jest": "29.1.2",
10195
"ts-loader": "9.5.4",

apps-rendering/src/components/Layout/Layout.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { Edition } from '@guardian/apps-rendering-api-models/edition';
44
import { ArticleSpecial, formatToString } from '../../articleFormat';
55
import { breakpoints } from '@guardian/source/foundations';
6-
import type { StoryFn } from '@storybook/react';
6+
import type { StoryFn } from '@storybook/react-webpack5';
77
import {
88
analysis,
99
article,

apps-rendering/src/components/Pagination/Pagination.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
formatToString,
55
} from '../../articleFormat';
66
import { breakpoints } from '@guardian/source/foundations';
7-
import type { StoryFn } from '@storybook/react';
7+
import type { StoryFn } from '@storybook/react-webpack5';
88
import { getAllThemes } from 'fixtures/article';
99
import { Pagination } from '.';
1010

apps-rendering/src/server/decoders.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const decodeContent =
3333

3434
return decoder.read(protocol);
3535
} else {
36+
/* eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors --
37+
* Part of an upgrade to get this rule enabled. */
3638
return Promise.reject('Invalid request');
3739
}
3840
};

dotcom-rendering/.eslintrc.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ module.exports = {
6363
'eslint:recommended',
6464
'@guardian/eslint-config-typescript',
6565
'plugin:jsx-a11y/recommended',
66+
'plugin:ssr-friendly/recommended',
67+
'plugin:storybook/recommended',
6668
// eslint-config-prettier disables formatting rules that conflict with prettier
6769
// needs to go last so it can override other configuration. See https://github.com/prettier/eslint-config-prettier#installation
6870
'prettier',
69-
'plugin:ssr-friendly/recommended',
7071
],
7172
parser: '@typescript-eslint/parser',
7273
parserOptions: {
@@ -211,7 +212,7 @@ module.exports = {
211212
files: ['**/**.js'],
212213
rules: {
213214
'global-require': 'off',
214-
'@typescript-eslint/no-var-requires': 'off',
215+
'@typescript-eslint/no-require-imports': 'off',
215216
'@typescript-eslint/no-unsafe-member-access': 'off',
216217
'@typescript-eslint/no-misused-promises': 'off',
217218
},
@@ -244,7 +245,7 @@ module.exports = {
244245
{
245246
files: ['**/**.tsx'],
246247
rules: {
247-
'@typescript-eslint/ban-types': [
248+
'@typescript-eslint/no-restricted-types': [
248249
'warn',
249250
{
250251
types: {
@@ -258,7 +259,7 @@ module.exports = {
258259
},
259260
},
260261
],
261-
'@typescript-eslint/ban-types': [
262+
'@typescript-eslint/no-restricted-types': [
262263
'error',
263264
{
264265
types: {
@@ -273,7 +274,6 @@ module.exports = {
273274
'React.FC':
274275
'Please use const MyThing = ({foo, bar}: Props) instead',
275276
},
276-
extendDefaults: true,
277277
},
278278
],
279279
},

dotcom-rendering/.storybook/decorators/configContextDecorator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { ConfigProvider } from '../../src/components/ConfigContext';
3-
import type { Decorator } from '@storybook/react';
3+
import type { Decorator } from '@storybook/react-webpack5';
44
import { Config } from '../../src/types/configContext';
55

66
const defaultConfig = {

0 commit comments

Comments
 (0)