@newskit-render/core 2.23.0 → 2.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +1 -1
- package/CHANGELOG.md +8 -0
- package/__tests__/pages/__snapshots__/[articleSlug].test.tsx.snap +1 -1
- package/components/article/__tests__/__snapshots__/index.test.tsx.snap +1 -1
- package/components/header/index.tsx +1 -1
- package/components/layout/MainGrid.tsx +2 -2
- package/components/section/CollectionBlock.tsx +0 -1
- package/package.json +26 -25
- package/pages/[section]/[articleId]/[articleSlug].tsx +2 -3
- package/pages/_document.tsx +1 -0
- package/pages/api/account/mutate/index.ts +3 -1
- package/pages/api/account/query/index.ts +2 -1
- package/pages/api/auth/[...nextauth].ts +2 -1
- package/temp/_document.tsx +1 -0
package/.eslintrc
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"plugins": ["prettier", "@typescript-eslint", "cypress"],
|
|
3
|
-
"extends": ["airbnb-typescript", "react-app", "prettier", "plugin:cypress/recommended"],
|
|
3
|
+
"extends": ["airbnb-typescript", "react-app", "prettier", "plugin:cypress/recommended","plugin:@next/next/recommended"],
|
|
4
4
|
"parser": "@typescript-eslint/parser",
|
|
5
5
|
"parserOptions": {
|
|
6
6
|
"project": "./tsconfig.json"
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.23.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@2.23.0-alpha.0...@newskit-render/core@2.23.0) (2022-11-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [2.22.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@2.22.1-alpha.0...@newskit-render/core@2.22.1) (2022-11-23)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -35,7 +35,7 @@ const Header: React.FC<{ user: UserData }> = ({ user }) => {
|
|
|
35
35
|
|
|
36
36
|
const { theme, setTheme } = useContext(AppContext)
|
|
37
37
|
const themeDropdownObject = createThemeDropdownObject(setTheme)
|
|
38
|
-
const {
|
|
38
|
+
const { ...restThemes } = themeDropdownObject.options
|
|
39
39
|
|
|
40
40
|
const themeDropdownObjectUpdated = {
|
|
41
41
|
...themeDropdownObject,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from 'newskit'
|
|
10
10
|
import { LayoutProps } from './layoutTypes'
|
|
11
11
|
|
|
12
|
-
type
|
|
12
|
+
type StyledGridProps = GridProps & {
|
|
13
13
|
backgroundColor?: string
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
const StyledGrid = styled(Grid)<
|
|
16
|
+
const StyledGrid = styled(Grid)<StyledGridProps>`
|
|
17
17
|
${({ backgroundColor, theme }) =>
|
|
18
18
|
`${getColorCssFromTheme(
|
|
19
19
|
'backgroundColor',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.0",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
"@emotion-icons/material-outlined": "3.14.0",
|
|
39
39
|
"@emotion/react": "11.10.4",
|
|
40
40
|
"@emotion/styled": "11.10.4",
|
|
41
|
-
"@newskit-render/api": "^1.
|
|
42
|
-
"@newskit-render/auth": "^1.
|
|
43
|
-
"@newskit-render/checkout": "^1.
|
|
44
|
-
"@newskit-render/feature-flags": "^1.
|
|
45
|
-
"@newskit-render/feed": "^1.
|
|
46
|
-
"@newskit-render/my-account": "^3.
|
|
47
|
-
"@newskit-render/shared-components": "^1.
|
|
48
|
-
"@newskit-render/standalone-components": "^1.
|
|
49
|
-
"@newskit-render/validation": "^1.
|
|
41
|
+
"@newskit-render/api": "^1.4.0",
|
|
42
|
+
"@newskit-render/auth": "^1.2.0",
|
|
43
|
+
"@newskit-render/checkout": "^1.7.0",
|
|
44
|
+
"@newskit-render/feature-flags": "^1.3.0",
|
|
45
|
+
"@newskit-render/feed": "^1.3.0",
|
|
46
|
+
"@newskit-render/my-account": "^3.19.0",
|
|
47
|
+
"@newskit-render/shared-components": "^1.19.0",
|
|
48
|
+
"@newskit-render/standalone-components": "^1.12.0",
|
|
49
|
+
"@newskit-render/validation": "^1.4.0",
|
|
50
50
|
"cross-fetch": "3.1.5",
|
|
51
51
|
"graphql": "15.6.0",
|
|
52
52
|
"lodash.get": "4.4.2",
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"@applitools/eyes-cypress": "3.23.2",
|
|
64
64
|
"@emotion/jest": "11.3.0",
|
|
65
65
|
"@next/bundle-analyzer": "12.0.8",
|
|
66
|
+
"@next/eslint-plugin-next": "13.0.5",
|
|
66
67
|
"@pact-foundation/pact": "9.12.1",
|
|
67
68
|
"@testing-library/jest-dom": "5.16.5",
|
|
68
69
|
"@testing-library/react": "13.4.0",
|
|
@@ -70,26 +71,26 @@
|
|
|
70
71
|
"@types/react": "18.0.19",
|
|
71
72
|
"@types/react-dom": "18.0.6",
|
|
72
73
|
"@types/react-helmet": "6.1.0",
|
|
73
|
-
"@typescript-eslint/eslint-plugin": "
|
|
74
|
-
"@typescript-eslint/parser": "
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "5.44.0",
|
|
75
|
+
"@typescript-eslint/parser": "5.44.0",
|
|
75
76
|
"axe-core": "4.3.4",
|
|
76
77
|
"babel-jest": "26.3.0",
|
|
77
78
|
"cypress": "9.0.0",
|
|
78
79
|
"cypress-axe": "0.13.0",
|
|
79
|
-
"eslint": "
|
|
80
|
-
"eslint-config-airbnb": "
|
|
81
|
-
"eslint-config-airbnb-typescript": "
|
|
82
|
-
"eslint-config-prettier": "
|
|
83
|
-
"eslint-config-react-app": "
|
|
84
|
-
"eslint-import-resolver-typescript": "
|
|
80
|
+
"eslint": "8.27.0",
|
|
81
|
+
"eslint-config-airbnb": "19.0.4",
|
|
82
|
+
"eslint-config-airbnb-typescript": "17.0.0",
|
|
83
|
+
"eslint-config-prettier": "8.5.0",
|
|
84
|
+
"eslint-config-react-app": "7.0.1",
|
|
85
|
+
"eslint-import-resolver-typescript": "3.5.2",
|
|
85
86
|
"eslint-loader": "4.0.2",
|
|
86
|
-
"eslint-plugin-cypress": "2.
|
|
87
|
-
"eslint-plugin-flowtype": "
|
|
88
|
-
"eslint-plugin-import": "2.
|
|
89
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
90
|
-
"eslint-plugin-prettier": "
|
|
91
|
-
"eslint-plugin-react": "7.
|
|
92
|
-
"eslint-plugin-react-hooks": "
|
|
87
|
+
"eslint-plugin-cypress": "2.12.1",
|
|
88
|
+
"eslint-plugin-flowtype": "8.0.3",
|
|
89
|
+
"eslint-plugin-import": "2.26.0",
|
|
90
|
+
"eslint-plugin-jsx-a11y": "6.6.1",
|
|
91
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
92
|
+
"eslint-plugin-react": "7.31.10",
|
|
93
|
+
"eslint-plugin-react-hooks": "4.6.0",
|
|
93
94
|
"jest": "27.4.7",
|
|
94
95
|
"jest-junit": "12.0.0",
|
|
95
96
|
"jest-watch-typeahead": "0.6.3",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import useSWR from 'swr'
|
|
3
2
|
import newrelic from 'newrelic'
|
|
4
3
|
import {
|
|
5
4
|
createApolloClient,
|
|
@@ -35,7 +34,7 @@ export type ArticleSlug = {
|
|
|
35
34
|
config: Config
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
const
|
|
37
|
+
const ArticleSlugPage: React.FC<ArticleSlug> = ({
|
|
39
38
|
universalArticle,
|
|
40
39
|
articleURL,
|
|
41
40
|
twitterUsername,
|
|
@@ -100,4 +99,4 @@ export async function getServerSideProps(context) {
|
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
101
|
|
|
103
|
-
export default
|
|
102
|
+
export default ArticleSlugPage
|
package/pages/_document.tsx
CHANGED
|
@@ -2,5 +2,7 @@ import { NextApiRequest, NextApiResponse } from 'next'
|
|
|
2
2
|
import { mutateHandler } from '@newskit-render/my-account'
|
|
3
3
|
import validation from '../../../../validation'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const handler = (req: NextApiRequest, res: NextApiResponse) =>
|
|
6
6
|
mutateHandler(req, res, validation)
|
|
7
|
+
|
|
8
|
+
export default handler
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NextApiRequest, NextApiResponse } from 'next'
|
|
2
2
|
import { queryHandler } from '@newskit-render/my-account'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const handler = (req: NextApiRequest, res: NextApiResponse) =>
|
|
5
5
|
queryHandler(req, res)
|
|
6
|
+
export default handler
|
|
@@ -2,9 +2,10 @@ import createAuthRoute from '@newskit-render/auth/providers'
|
|
|
2
2
|
import { NextApiRequest, NextApiResponse } from 'next'
|
|
3
3
|
import { oktaClientId, oktaClientSecret, oktaDomain } from '../../../config'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const router = (req: NextApiRequest, res: NextApiResponse) =>
|
|
6
6
|
createAuthRoute(req, res, {
|
|
7
7
|
clientId: oktaClientId,
|
|
8
8
|
clientSecret: oktaClientSecret,
|
|
9
9
|
issuer: oktaDomain,
|
|
10
10
|
})
|
|
11
|
+
export default router
|