Skip to content
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

replaces ramda with rambda #12065

Draft
wants to merge 2 commits into
base: latest
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"morgan": "1.10.0",
"path-to-regexp": "6.3.0",
"polyfill-crypto.getrandomvalues": "1.0.0",
"rambda": "^9.3.0",
"ramda": "0.30.1",
"react": "18.3.1",
"react-dom": "18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Ad/Amp/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { jsx } from '@emotion/react';
import React, { useContext } from 'react';
import { Helmet } from 'react-helmet';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import { RequestContext } from '#contexts/RequestContext';
import {
AMP_ACCESS_JS,
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Ad/Canonical/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { jsx } from '@emotion/react';
import React, { useEffect, useContext } from 'react';
import { Helmet } from 'react-helmet';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import useLocation from '#hooks/useLocation';
import isLive from '../../../lib/utilities/isLive';
import useOperaMiniDetection from '../../../hooks/useOperaMiniDetection';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Byline/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';
import React, { useContext, PropsWithChildren } from 'react';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import { OptimoBylineBlock } from '#app/models/types/optimo';
import { ServiceContext } from '../../contexts/ServiceContext';
import VisuallyHiddenText from '../VisuallyHiddenText';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
OptimoBylineContributorBlock,
OptimoBylineContributorMetadataBlock,
} from '#app/models/types/optimo';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import buildIChefURL from '../../../../lib/utilities/ichefURL';

const pathOrZeroIndexModelBlocks = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clone from 'ramda/src/clone';
import { clone } from 'rambda';
import categoryName from '.';
import {
passportTaggings,
Expand Down
3 changes: 1 addition & 2 deletions src/app/components/Byline/utilities/categoryName/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pathOr from 'ramda/src/pathOr';
import isEmpty from 'ramda/src/isEmpty';
import { pathOr, isEmpty } from 'rambda';
import {
MetadataFormats,
MetadataTaggings,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pathOr from 'ramda/src/pathOr';
import isEmpty from 'ramda/src/isEmpty';
import { pathOr, isEmpty } from 'rambda';

const getAuthorTwitterHandle = articleContentBlocks => {
const [firstByline, ...otherBylines] = articleContentBlocks.filter(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import getAuthorTwitterHandle from '.';
import {
contentBlockWithByline,
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Caption/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';
import { useContext } from 'react';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import { ServiceContext } from '#app/contexts/ServiceContext';
import Blocks from '#app/legacy/containers/Blocks';
import { OptimoBlock } from '#app/models/types/optimo';
Expand Down
4 changes: 1 addition & 3 deletions src/app/components/ChartbeatAnalytics/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Cookie from 'js-cookie';
import find from 'ramda/src/find';
import propSatisfies from 'ramda/src/propSatisfies';
import includes from 'ramda/src/includes';
import { find, propSatisfies, includes } from 'rambda';
import onClient from '../../../lib/utilities/onClient';
import { getReferrer } from '../../../lib/analyticsUtils';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Curation/CurationPromo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable jsx-a11y/aria-role */
import React, { useContext } from 'react';
import moment from 'moment';
import path from 'ramda/src/path';
import { path } from 'rambda';
import formatDuration from '#app/lib/utilities/formatDuration';
import Promo from '#components/Promo';
import { Summary } from '#app/models/types/curationData';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Curation/HierarchicalGrid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useContext } from 'react';
import { css, jsx, Theme } from '@emotion/react';
import moment from 'moment';
import path from 'ramda/src/path';
import { path } from 'rambda';
import VisuallyHiddenText from '../../VisuallyHiddenText';
import formatDuration from '../../../lib/utilities/formatDuration';
import Promo from '../../../legacy/components/Promo';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/DecoratedInlineLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { jsx } from '@emotion/react';
import React, { useContext } from 'react';
import { ServiceContext } from '#app/contexts/ServiceContext';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import Blocks from '#app/legacy/containers/Blocks';
import makeRelativeUrlPath from '#app/lib/utilities/makeRelativeUrlPath';
import { OptimoBlock } from '#app/models/types/optimo';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Disclaimer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';
import { useContext, PropsWithChildren } from 'react';
import isEmpty from 'ramda/src/isEmpty';
import { isEmpty } from 'rambda';
import { GridItemLarge } from '../../legacy/components/Grid';
import { ServiceContext } from '../../contexts/ServiceContext';
import { RequestContext } from '../../contexts/RequestContext';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/EmbedConsentBanner/ConsentBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';
import { useContext, MouseEvent } from 'react';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';

import { RequestContext } from '#app/contexts/RequestContext';
import { LIVE_PAGE } from '#app/routes/utils/pageTypes';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Embeds/OEmbed/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';
import { useContext } from 'react';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import { RequestContext } from '../../../contexts/RequestContext';
import { ServiceContext } from '../../../contexts/ServiceContext';
import EmbedHtml from '../EmbedHtml';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Embeds/UnsupportedEmbed/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';
import { useContext } from 'react';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import { RequestContext } from '../../../contexts/RequestContext';
import { ServiceContext } from '../../../contexts/ServiceContext';
import EmbedError from '../EmbedError';
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/Embeds/Uploader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsx jsx */
import { useContext } from 'react';
import path from 'ramda/src/path';
import pathOr from 'ramda/src/pathOr';
import { path } from 'rambda';
import { pathOr } from 'rambda';
import { jsx } from '@emotion/react';
import { ServiceContext } from '../../../contexts/ServiceContext';
import Paragraph from '../../Paragraph';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/FrostedGlassPromo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';
import React, { PropsWithChildren, useContext } from 'react';
import pick from 'ramda/src/pick';
import { pick } from 'rambda';
import Lazyload from 'react-lazyload';

import IMAGE from '../Image';
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/FrostedGlassPromo/withData.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';
import { PropsWithChildren, useContext } from 'react';
import path from 'ramda/src/path';
import pathOr from 'ramda/src/pathOr';
import pick from 'ramda/src/pick';
import { path } from 'rambda';
import { pathOr } from 'rambda';
import { pick } from 'rambda';

import PromoTimestamp from '../../legacy/components/Promo/timestamp';
import getOriginCode from '../../lib/utilities/imageSrcHelpers/originCode';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Header/ScriptLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useContext } from 'react';
import { jsx } from '@emotion/react';
import { compile } from 'path-to-regexp';
import clone from 'ramda/src/clone';
import { clone } from 'rambda';
import { useRouteMatch } from 'react-router-dom';
import useToggle from '#hooks/useToggle';
import { Services, Variants } from '#app/models/types/global';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/LinkedData/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactNode } from 'react';
import Helmet from 'react-helmet';
import assocPath from 'ramda/src/assocPath';
import { assocPath } from 'rambda';
import { RequestContextProvider } from '#contexts/RequestContext';
import { ARTICLE_PAGE } from '#app/routes/utils/pageTypes';
import { ServiceContextProvider } from '../../contexts/ServiceContext';
Expand Down Expand Up @@ -209,7 +209,7 @@
it('should exclude author from article when false', () => {
render(
<Context>
<LinkedData {...articleProps} />

Check failure on line 212 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (18.x)

Type 'unknown' is not assignable to type 'IntrinsicAttributes & LinkedDataProps'.

Check failure on line 212 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (18.x)

Spread types may only be created from object types.

Check failure on line 212 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Type 'unknown' is not assignable to type 'IntrinsicAttributes & LinkedDataProps'.

Check failure on line 212 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Spread types may only be created from object types.

Check failure on line 212 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Type 'unknown' is not assignable to type 'IntrinsicAttributes & LinkedDataProps'.

Check failure on line 212 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Spread types may only be created from object types.
</Context>,
);

Expand Down Expand Up @@ -237,7 +237,7 @@
it('should change author contents and locationCreated when byline is present', () => {
render(
<Context>
<LinkedData {...articleProps} />

Check failure on line 240 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (18.x)

Type 'unknown' is not assignable to type 'IntrinsicAttributes & LinkedDataProps'.

Check failure on line 240 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (18.x)

Spread types may only be created from object types.

Check failure on line 240 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Type 'unknown' is not assignable to type 'IntrinsicAttributes & LinkedDataProps'.

Check failure on line 240 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Spread types may only be created from object types.

Check failure on line 240 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Type 'unknown' is not assignable to type 'IntrinsicAttributes & LinkedDataProps'.

Check failure on line 240 in src/app/components/LinkedData/index.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Spread types may only be created from object types.
</Context>,
);

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/MostRead/Amp/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
AMP_MUSTACHE_JS,
AMP_SCRIPT_JS,
} from '#psammead/psammead-assets/src/amp-boilerplate';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import { ServiceContext } from '../../../contexts/ServiceContext';
import { MostReadItemWrapper, MostReadLink } from '../Canonical/Item';
import MostReadRank from '../Canonical/Rank';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/OptimizelyRecommendations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import CpsRecommendations from '#containers/CpsRecommendations';
import { OptimizelyExperiment } from '@optimizely/react-sdk';
import OPTIMIZELY_CONFIG from '#lib/config/optimizely';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import { Article } from '#app/models/types/optimo';

// 005_brasil_recommendations_experiment
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/PageLayoutWrapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import React, { PropsWithChildren, useContext } from 'react';
import { jsx } from '@emotion/react';
import { Helmet } from 'react-helmet';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';

import GlobalStyles from '#psammead/psammead-styles/src/global-styles';
import { PageTypes } from '#app/models/types/global';
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/Pagination/buildBlocks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pipe from 'ramda/src/pipe';
import clone from 'ramda/src/clone';
import { pipe } from 'rambda';
import { clone } from 'rambda';
import findNClosestIndices from '#lib/utilities/findNClosestIndicies';

export const VISIBILITY = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

import { jsx } from '@emotion/react';
import { forwardRef } from 'react';
import path from 'ramda/src/path';
import pathOr from 'ramda/src/pathOr';
import { path } from 'rambda';
import { pathOr, isEmpty } from 'rambda';
import { createSrcsets } from '#lib/utilities/srcSet';
import buildIChefURL from '#app/lib/utilities/ichefURL';
import Promo from '#components/OptimoPromos';
import isEmpty from 'ramda/src/isEmpty';
import styles from './index.styles';
import { EventTrackingBlock } from '../../../models/types/eventTracking';

Expand Down
24 changes: 13 additions & 11 deletions src/app/components/RelatedContentSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
import { useContext } from 'react';
import { jsx, useTheme } from '@emotion/react';
import SectionLabel from '#psammead/psammead-section-label/src';
import pathOr from 'ramda/src/pathOr';
import pathEq from 'ramda/src/pathEq';
import path from 'ramda/src/path';
import tail from 'ramda/src/tail';
import slice from 'ramda/src/slice';
import identity from 'ramda/src/identity';
import last from 'ramda/src/last';
import filter from 'ramda/src/filter';
import pipe from 'ramda/src/pipe';
import {
pathOr,
path,
pathEq,
tail,
slice,
identity,
last,
filter,
pipe,
} from 'rambda';

import useViewTracker from '#hooks/useViewTracker';
import { ServiceContext } from '../../contexts/ServiceContext';
Expand All @@ -26,7 +28,7 @@
const BLOCKS_TO_IGNORE = ['wsoj', 'mpu'];

const removeCustomBlocks = pipe(
filter((block: OptimoBlock) => !BLOCKS_TO_IGNORE.includes(block.type)),

Check failure on line 31 in src/app/components/RelatedContentSection/index.tsx

View workflow job for this annotation

GitHub Actions / cypress-run (18.x)

Argument of type '(input: OptimoBlock[]) => OptimoBlock[]' is not assignable to parameter of type '(input: OptimoBlock[]) => string'.

Check failure on line 31 in src/app/components/RelatedContentSection/index.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type '(input: OptimoBlock[]) => OptimoBlock[]' is not assignable to parameter of type '(input: OptimoBlock[]) => string'.

Check failure on line 31 in src/app/components/RelatedContentSection/index.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type '(input: OptimoBlock[]) => OptimoBlock[]' is not assignable to parameter of type '(input: OptimoBlock[]) => string'.
last,
);

Expand Down Expand Up @@ -108,15 +110,15 @@
const eventTrackingDataSend = path<object>(['block'], eventTrackingData);
const viewRef = useViewTracker(eventTrackingDataSend);

if (!pathEq('relatedContent', ['type'], blocks)) return null;
if (!pathEq(['type'], 'relatedContent', blocks)) return null;

if (!blocks) return null;

const items = pathOr([], ['model', 'blocks'], blocks);
const LABEL_ID = 'related-content-heading';

const customTitle =
pathEq('title', [0, 'type'], items) &&
pathEq([0, 'type'], 'title', items) &&
pathOr(
[],
[0, 'model', 'blocks', 0, 'model', 'blocks', 0, 'model', 'text'],
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/ThemeProvider/themes/serbian/cyr.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mergeDeepLeft } from 'ramda';
import { mergeDeepLeft } from 'rambda';
import cyrillicScript from '../../fontScripts/cyrillic';
import withThemeProvider from '../../withThemeProvider';
import baseSerbianTheme from './base';
Expand All @@ -12,4 +12,4 @@
baseSerbianTheme,
);

export default withThemeProvider(serbianCyrillicTheme);

Check failure on line 15 in src/app/components/ThemeProvider/themes/serbian/cyr.ts

View workflow job for this annotation

GitHub Actions / cypress-run (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.

Check failure on line 15 in src/app/components/ThemeProvider/themes/serbian/cyr.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.

Check failure on line 15 in src/app/components/ThemeProvider/themes/serbian/cyr.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.
2 changes: 1 addition & 1 deletion src/app/components/ThemeProvider/themes/serbian/lat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mergeDeepLeft } from 'ramda';
import { mergeDeepLeft } from 'rambda';
import latinWithDiacriticsScript from '../../fontScripts/latinWithDiacritics';
import withThemeProvider from '../../withThemeProvider';
import baseSerbianTheme from './base';
Expand All @@ -12,4 +12,4 @@
baseSerbianTheme,
);

export default withThemeProvider(serbianLatinTheme);

Check failure on line 15 in src/app/components/ThemeProvider/themes/serbian/lat.ts

View workflow job for this annotation

GitHub Actions / cypress-run (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.

Check failure on line 15 in src/app/components/ThemeProvider/themes/serbian/lat.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.

Check failure on line 15 in src/app/components/ThemeProvider/themes/serbian/lat.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.
2 changes: 1 addition & 1 deletion src/app/components/ThemeProvider/themes/uzbek/cyr.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mergeDeepLeft } from 'ramda';
import { mergeDeepLeft } from 'rambda';
import cyrillicScript from '../../fontScripts/cyrillic';
import withThemeProvider from '../../withThemeProvider';
import baseUzbekTheme from './base';
Expand All @@ -12,4 +12,4 @@
baseUzbekTheme,
);

export default withThemeProvider(uzbekCyrillicTheme);

Check failure on line 15 in src/app/components/ThemeProvider/themes/uzbek/cyr.ts

View workflow job for this annotation

GitHub Actions / cypress-run (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.

Check failure on line 15 in src/app/components/ThemeProvider/themes/uzbek/cyr.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.

Check failure on line 15 in src/app/components/ThemeProvider/themes/uzbek/cyr.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.
2 changes: 1 addition & 1 deletion src/app/components/ThemeProvider/themes/uzbek/lat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mergeDeepLeft } from 'ramda';
import { mergeDeepLeft } from 'rambda';
import latinWithDiacriticsScript from '../../fontScripts/latinWithDiacritics';
import withThemeProvider from '../../withThemeProvider';
import baseUzbekTheme from './base';
Expand All @@ -12,4 +12,4 @@
baseUzbekTheme,
);

export default withThemeProvider(uzbekLatinTheme);

Check failure on line 15 in src/app/components/ThemeProvider/themes/uzbek/lat.ts

View workflow job for this annotation

GitHub Actions / cypress-run (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.

Check failure on line 15 in src/app/components/ThemeProvider/themes/uzbek/lat.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.

Check failure on line 15 in src/app/components/ThemeProvider/themes/uzbek/lat.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Argument of type 'unknown' is not assignable to parameter of type '{ palette: BrandPalette; typography: Typography; brandSVG: BrandSVG; }'.
2 changes: 1 addition & 1 deletion src/app/contexts/ToggleContext/reducer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Toggles } from '#app/models/types/global';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';

type ReducerProps = {
toggleState: Toggles;
Expand Down
3 changes: 1 addition & 2 deletions src/app/hooks/useClickTrackerHandler/clickTypes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pathSatisfies from 'ramda/src/pathSatisfies';
import startsWith from 'ramda/src/startsWith';
import { pathSatisfies, startsWith } from 'rambda';

const isLeftClick = button => button === 0;
const isMiddleClick = button => button === 1 || button === 4; // middle click for IE is 4
Expand Down
4 changes: 2 additions & 2 deletions src/app/hooks/useClickTrackerHandler/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-console */
import { useContext, useCallback, useState } from 'react';
import path from 'ramda/src/path';
import pathOr from 'ramda/src/pathOr';
import { path } from 'rambda';
import { pathOr } from 'rambda';

import { EventTrackingContext } from '../../contexts/EventTrackingContext';
import useTrackingToggle from '../useTrackingToggle';
Expand Down
2 changes: 1 addition & 1 deletion src/app/hooks/useImageColour/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import is from 'ramda/src/is';
import { is } from 'rambda';

// https://stackoverflow.com/a/5624139
export const hexToRgb = hex => {
Expand Down
4 changes: 1 addition & 3 deletions src/app/hooks/useViewTracker/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { useContext, useEffect, useState, useRef } from 'react';
import path from 'ramda/src/path';
import pathOr from 'ramda/src/pathOr';
import prop from 'ramda/src/prop';
import { path, pathOr, prop } from 'rambda';

import { sendEventBeacon } from '../../components/ATIAnalytics/beacon';
import { EventTrackingContext } from '../../contexts/EventTrackingContext';
Expand Down
4 changes: 2 additions & 2 deletions src/app/legacy/components/Promo/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useContext, useMemo } from 'react';
import styled from '@emotion/styled';
import partition from 'ramda/src/partition';
import { partition } from 'rambda';

import { ServiceContext } from '../../../contexts/ServiceContext';

import Image from './image';
import Image from './image'
import MediaIcon, { TYPES } from './media-icon';
import Heading from './heading';
import Body from './body';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext } from 'react';
import styled from '@emotion/styled';
import pathOr from 'ramda/src/pathOr';
import { pathOr } from 'rambda';
import { formatUnixTimestamp } from '#psammead/psammead-timestamp-container/src/utilities';
import detokenise from '#psammead/psammead-detokeniser/src';
import LiveLabel from '#app/components/LiveLabel';
Expand Down
4 changes: 2 additions & 2 deletions src/app/legacy/components/ScrollablePromo/Promo/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useContext } from 'react';
import styled from '@emotion/styled';
import path from 'ramda/src/path';
import pathOr from 'ramda/src/pathOr';
import { path } from 'rambda';
import { pathOr } from 'rambda';
import { getPica } from '#psammead/gel-foundations/src/typography';
import { getSerifBold } from '#psammead/psammead-styles/src/font-styles';
import { Link } from '#psammead/psammead-story-promo/src';
Expand Down
Loading
Loading