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

WSTEAM1-1453 Update imports to resolve all import/no-relative-packages errors #12224

Merged
merged 72 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
39b8824
test a path to see github tests
Louis-Matsika Dec 4, 2024
7170c6d
getBrandedImage
Louis-Matsika Dec 5, 2024
650f736
fix: getLiveBlogPostingSchema
Louis-Matsika Dec 5, 2024
714ef1e
getLiveBlogPostingSchema/index.ts
Louis-Matsika Dec 5, 2024
2754151
revert path quick fix
Louis-Matsika Dec 6, 2024
d32b4ab
getInitialData
Louis-Matsika Dec 6, 2024
bc8303d
getInitialData.test.ts
Louis-Matsika Dec 6, 2024
99589b9
lint code
Louis-Matsika Dec 6, 2024
baad471
article index.tsx
Louis-Matsika Dec 6, 2024
e64ad47
getOnwardsData.test.ts
Louis-Matsika Dec 6, 2024
ef29d33
getOnwardsData.ts
Louis-Matsika Dec 6, 2024
ac8a987
try fix github tests
Louis-Matsika Dec 6, 2024
78748e2
Merge branch 'latest' into 1453-update-imports
Louis-Matsika Dec 6, 2024
85a534e
revert to last passing commit
Louis-Matsika Dec 9, 2024
893bff1
Merge branch '1453-update-imports' of https://github.com/bbc/simorgh …
Louis-Matsika Dec 9, 2024
929ec60
getOnwardsData.ts - SECONDARY_DATA_TIMEOUT
Louis-Matsika Dec 9, 2024
198c0d0
getInitialData - index.ts
Louis-Matsika Dec 9, 2024
e46b843
revert '.' path cchange - (not needed)
Louis-Matsika Dec 9, 2024
c7a0e06
getInitialData - nodeLogger
Louis-Matsika Dec 9, 2024
11f2aa2
getOnwardsData - fetchPageData
Louis-Matsika Dec 9, 2024
b1d460e
frontPage getInitialData.js
Louis-Matsika Dec 9, 2024
58537e4
frontPage getInitialData.test.js
Louis-Matsika Dec 9, 2024
bd58a4c
homePage getInitialData.js
Louis-Matsika Dec 9, 2024
4110e80
homePage getInitialData.test.js
Louis-Matsika Dec 9, 2024
0090c2b
fecthDataFromBFF
Louis-Matsika Dec 9, 2024
f158449
fecthDataFromBFF.test.ts
Louis-Matsika Dec 9, 2024
13f9ec0
revert to last passing commit
Louis-Matsika Dec 9, 2024
5f1b96c
fecthDataFromBBF/index.ts - constructPageFetchUrl
Louis-Matsika Dec 9, 2024
2bd2bf9
fecthDataFromBBF/index.ts - getEnvironment
Louis-Matsika Dec 9, 2024
ed6fd62
fecthDataFromBBF/index.ts - #models
Louis-Matsika Dec 9, 2024
586b946
fecthDataFromBBF/index.ts - fetchPageData
Louis-Matsika Dec 9, 2024
a1d55f6
fecthDataFromBBF/index.ts - fetchPageData
Louis-Matsika Dec 9, 2024
9b20191
fecthDataFromBBF/index.ts - more #model imports
Louis-Matsika Dec 9, 2024
d237688
fecthDataFromBBF/index.ts - nodeLogger
Louis-Matsika Dec 9, 2024
0189555
fecthDataFromBBF/index.ts - certs
Louis-Matsika Dec 9, 2024
77417f1
fecthDataFromBBF/index.test.ts - pageTypes
Louis-Matsika Dec 9, 2024
10244e6
fecthDataFromBBF/index.test.ts - fetchPageData
Louis-Matsika Dec 9, 2024
624e883
revert to last passing commit
Louis-Matsika Dec 10, 2024
1369cac
add new src/ alias
Louis-Matsika Dec 10, 2024
0f9036a
fix jest src/ path to match others
Louis-Matsika Dec 10, 2024
d4ed461
fecthDataFromBBF/index.test.ts - fetchPageData
Louis-Matsika Dec 10, 2024
17b8753
app/routes/index.test.jsx - react-testing-library-with-providers
Louis-Matsika Dec 10, 2024
4d7598b
app/routes/index.test.jsx - suppressPropWarnings
Louis-Matsika Dec 10, 2024
58a7929
add new #utils alias
Louis-Matsika Dec 10, 2024
0bf102b
fix missing import
Louis-Matsika Dec 10, 2024
5bec3c4
lint new alias
Louis-Matsika Dec 10, 2024
291af81
revert to last passing commit
Louis-Matsika Dec 10, 2024
cd34f26
move import to bottom
Louis-Matsika Dec 10, 2024
3342439
app/routes/index.test.jsx - gahuzaOnDemandAudio
Louis-Matsika Dec 10, 2024
08cb4f2
app/routes/index.test.jsx - suppressPropWarnings
Louis-Matsika Dec 10, 2024
307488d
revert to last passing commit
Louis-Matsika Dec 10, 2024
6ae40a7
revert to last actual passing commit
Louis-Matsika Dec 10, 2024
cd771d1
liveRadio/getInitailData.js - getErrorStatusCode
Louis-Matsika Dec 10, 2024
323e90e
updates relative import to alias - fallbackServiceParam/index.js
Isabella-Mitchell Dec 11, 2024
ee3e118
Updates relative import to alias: routes/topic/getInitialData/index.t…
Isabella-Mitchell Dec 11, 2024
888f4ec
Updates relative import to alias - routes/topic/getInitialData/index.js
Isabella-Mitchell Dec 11, 2024
0a44bdf
Updates relative import to alias - app/routes/onDemandAudio/getInitia…
Isabella-Mitchell Dec 11, 2024
6dd81db
Updates relative import to alias - app/routes/mostRead/getInitialData…
Isabella-Mitchell Dec 11, 2024
b520aa9
Updates relative import to alias - app/routes/mostRead/getInitialData…
Isabella-Mitchell Dec 11, 2024
9b6d3db
Updates relative import to alias - app/routes/liveRadio/getInitialData
Isabella-Mitchell Dec 11, 2024
31b7c53
Updates relative import to alias - src/app/routes/index.test.jsx
Isabella-Mitchell Dec 11, 2024
69c40cd
add alias that covers nextjs app dir
Louis-Matsika Dec 11, 2024
97ee62b
Merge branch '1453-update-imports' of https://github.com/bbc/simorgh …
Louis-Matsika Dec 11, 2024
4b031e7
getLiveBlogPostingSchema.test.ts
Louis-Matsika Dec 11, 2024
f2efd2d
getInitialData.test.js - nodeLogger
Louis-Matsika Dec 11, 2024
e10ee36
app/routes/index.test.jsx
Louis-Matsika Dec 11, 2024
2c1f3c3
try // eslint-disable-next-line import/order
Louis-Matsika Dec 11, 2024
2916aa4
Merge branch 'latest' into 1453-update-imports
Louis-Matsika Dec 11, 2024
374e0da
TEMP (please revert after lint checks have run on PR): Upgrade eslint…
karinathomasbbc Dec 11, 2024
f942c50
Update src/app/lib/utilities/getBrandedImage/index.js
Louis-Matsika Dec 11, 2024
be0515a
Merge branches '1453-update-imports' and '1453-update-imports' of git…
karinathomasbbc Dec 11, 2024
3f7a211
Revert "TEMP (please revert after lint checks have run on PR): Upgrad…
karinathomasbbc Dec 11, 2024
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
6 changes: 6 additions & 0 deletions dirAlias.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const resolvePath = relativePath => path.resolve(appDirectory, relativePath);
module.exports = {
webpackDirAlias: {
'#app': resolvePath('src/app'),
'#src': resolvePath('src'),
'#nextjs': resolvePath('ws-nextjs-app/'),
'#contexts': resolvePath('src/app/contexts'),
'#components': resolvePath('src/app/legacy/components'),
'#containers': resolvePath('src/app/legacy/containers'),
Expand All @@ -23,6 +25,8 @@ module.exports = {
},
jestDirAlias: {
'^#app(.*)$': '<rootDir>/src/app$1',
'^#src(.*)$': '<rootDir>/src$1',
'^#nextjs(.*)$': '<rootDir>/ws-nextjs-app$1',
'^#contexts(.*)$': '<rootDir>/src/app/contexts$1',
'^#components(.*)$': '<rootDir>/src/app/legacy/components$1',
'^#containers(.*)$': '<rootDir>/src/app/legacy/containers$1',
Expand All @@ -39,6 +43,8 @@ module.exports = {
eslintDirAlias: {
map: [
['#app', './src/app'],
['#src', './src'],
['#nextjs', './ws-nextjs-app'],
['#contexts', './src/app/contexts'],
['#components', './src/app/legacy/components'],
['#containers', './src/app/legacy/containers'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Post } from '../../../../../ws-nextjs-app/pages/[service]/live/[id]/Post/types';
import { Post } from '#nextjs/pages/[service]/live/[id]/Post/types';
import { samplePost, twitterSamplePost, videoSamplePost } from './fixtures';
import getLiveBlogPostingSchema from '.';

Expand Down
2 changes: 1 addition & 1 deletion src/app/lib/seoUtils/getLiveBlogPostingSchema/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import buildIChefURL from '#app/lib/utilities/ichefURL';
import { OptimoBlock } from '#app/models/types/optimo';
import { Post } from '../../../../../ws-nextjs-app/pages/[service]/live/[id]/Post/types';
import { Post } from '#nextjs/pages/[service]/live/[id]/Post/types';

export default ({
posts,
Expand Down
2 changes: 1 addition & 1 deletion src/app/lib/utilities/getBrandedImage/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getEnvConfig } from '../getEnvConfig';
import { getEnvConfig } from '#app/lib/utilities/getEnvConfig';

const getBrandedImage = (locator, service) =>
`${
Expand Down
13 changes: 7 additions & 6 deletions src/app/routes/article/getInitialData/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Agent } from 'undici';
import * as getOnwardsPageData from '../utils/getOnwardsData';
import * as fetchPageData from '../../utils/fetchPageData';
import nodeLogger from '../../../../testHelpers/loggerMock';
import { BFF_FETCH_ERROR } from '../../../lib/logger.const';
import * as getOnwardsPageData from '#app/routes/article/utils/getOnwardsData';
import * as fetchPageData from '#app/routes/utils/fetchPageData';
import { BFF_FETCH_ERROR } from '#lib/logger.const';
import pidginArticleWithLatestMedia from '#data/pidgin/articles/cw0x29n2pvqo.json';
import { ARTICLE_PAGE } from '#app/routes/utils/pageTypes';
import nodeLogger from '#src/testHelpers/loggerMock';

import getInitialData from '.';
import pidginArticleWithLatestMedia from '../../../../../data/pidgin/articles/cw0x29n2pvqo.json';
import { ARTICLE_PAGE } from '../../utils/pageTypes';

process.env.BFF_PATH = 'https://mock-bff-path';

Expand Down
25 changes: 14 additions & 11 deletions src/app/routes/article/getInitialData/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import pipe from 'ramda/src/pipe';
import nodeLogger from '../../../lib/logger.node';
import { Services, Toggles, Variants } from '../../../models/types/global';
import getOnwardsPageData from '../utils/getOnwardsData';
import addAnalyticsCounterName from '../utils/addAnalyticsCounterName';
import augmentWithDisclaimer from '../utils/augmentWithDisclaimer';
import { advertisingAllowed, isSfv } from '../utils/paramChecks';
import { FetchError, GetAgent } from '../../../models/types/fetch';
import handleError from '../../utils/handleError';
import fetchDataFromBFF from '../../utils/fetchDataFromBFF';
import { BFF_FETCH_ERROR } from '../../../lib/logger.const';
import certsRequired from '../../utils/certsRequired';
import nodeLogger from '#lib/logger.node';
import { Services, Toggles, Variants } from '#models/types/global';
import getOnwardsPageData from '#app/routes/article/utils/getOnwardsData';
import addAnalyticsCounterName from '#app/routes/article/utils/addAnalyticsCounterName';
import augmentWithDisclaimer from '#app/routes/article/utils/augmentWithDisclaimer';
import {
advertisingAllowed,
isSfv,
} from '#app/routes/article/utils/paramChecks';
import { FetchError, GetAgent } from '#models/types/fetch';
import handleError from '#app/routes/utils/handleError';
import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF';
import { BFF_FETCH_ERROR } from '#lib/logger.const';
import certsRequired from '#app/routes/utils/certsRequired';

const logger = nodeLogger(__filename);

Expand Down
2 changes: 1 addition & 1 deletion src/app/routes/article/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
FEATURE_INDEX_PAGE,
} from '#app/routes/utils/pageTypes';
import { Article } from '#app/models/types/optimo';
import getInitialData from './getInitialData';
import getInitialData from '#app/routes/article/getInitialData';

type SupportedPageTypes =
| typeof ARTICLE_PAGE
Expand Down
2 changes: 1 addition & 1 deletion src/app/routes/article/utils/getOnwardsData.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Agent } from 'undici';
import recommendationsJson from '#data/mundo/recommendations/index.json';
import * as fetchPageData from '#app/routes/utils/fetchPageData';
import hasArticleRecommendations from './hasArticleRecommendations';
import getOnwardsPageData from './getOnwardsData';
import * as fetchPageData from '../../utils/fetchPageData';

jest.mock('./hasArticleRecommendations', () => jest.fn());

Expand Down
4 changes: 2 additions & 2 deletions src/app/routes/article/utils/getOnwardsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import isEmpty from 'ramda/src/isEmpty';
import { DATA_FETCH_ERROR } from '#lib/logger.const';
import getRecommendationsUrl from '#app/lib/utilities/getUrlHelpers/getRecommendationsUrl';
import { SECONDARY_DATA_TIMEOUT } from '#app/lib/utilities/getFetchTimeouts';
import fetchPageData from '../../utils/fetchPageData';
import nodeLogger from '../../../lib/logger.node';
import fetchPageData from '#app/routes/utils/fetchPageData';
import nodeLogger from '#app/lib/logger.node';
import hasArticleRecommendations from './hasArticleRecommendations';

const logger = nodeLogger(__filename);
Expand Down
8 changes: 4 additions & 4 deletions src/app/routes/frontPage/getInitialData/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import addIdsToGroups from '#app/routes/utils/sharedDataTransformers/addIdsToGro
import filterGroupsWithoutStraplines from '#app/routes/utils/sharedDataTransformers/filterGroupsWithoutStraplines';
import handleError from '#app/routes/utils/handleError';
import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF';
import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode';
import { CPS_ASSET } from '../../utils/pageTypes';
import nodeLogger from '../../../lib/logger.node';
import { BFF_FETCH_ERROR } from '../../../lib/logger.const';
import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode';
import { CPS_ASSET } from '#app/routes/utils/pageTypes';
import nodeLogger from '#app/lib/logger.node';
import { BFF_FETCH_ERROR } from '#app/lib/logger.const';

const logger = nodeLogger(__filename);

Expand Down
8 changes: 4 additions & 4 deletions src/app/routes/frontPage/getInitialData/index.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import frontPageJsonSerbian from '#data/serbian/frontpage/lat.json';
import radioScheduleJson from '#data/hausa/bbc_hausa_radio/schedule.json';
import { CPS_ASSET as pageType } from '../../utils/pageTypes';
import * as fetchPageData from '../../utils/fetchPageData';
import nodeLogger from '../../../../testHelpers/loggerMock';
import { BFF_FETCH_ERROR } from '../../../lib/logger.const';
import { CPS_ASSET as pageType } from '#app/routes/utils/pageTypes';
import * as fetchPageData from '#app/routes/utils/fetchPageData';
import { BFF_FETCH_ERROR } from '#app/lib/logger.const';
import nodeLogger from '#src/testHelpers/loggerMock';
import getInitialData from '.';

jest.mock('#app/lib/utilities/onClient', () =>
Expand Down
4 changes: 2 additions & 2 deletions src/app/routes/homePage/getInitialData/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Agent } from 'undici';
import KyrgyzHomeFixture from '#data/kyrgyz/homePage/index.json';
import * as fetchPageData from '../../utils/fetchPageData';
import * as fetchPageData from '#app/routes/utils/fetchPageData';
import { HOME_PAGE } from '#app/routes/utils/pageTypes';
import getInitialData from '.';
import { HOME_PAGE } from '../../utils/pageTypes';

process.env.BFF_PATH = 'https://mock-bff-path';

Expand Down
10 changes: 5 additions & 5 deletions src/app/routes/homePage/getInitialData/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { InitialDataProps } from '#app/models/types/initialData';
import nodeLogger from '../../../lib/logger.node';
import { BFF_FETCH_ERROR } from '../../../lib/logger.const';
import { FetchError } from '../../../models/types/fetch';
import fetchDataFromBFF from '../../utils/fetchDataFromBFF';
import { HOME_PAGE } from '../../utils/pageTypes';
import nodeLogger from '#app/lib/logger.node';
import { BFF_FETCH_ERROR } from '#app/lib/logger.const';
import { FetchError } from '#app/models/types/fetch';
import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF';
import { HOME_PAGE } from '#app/routes/utils/pageTypes';

const logger = nodeLogger(__filename);

Expand Down
7 changes: 4 additions & 3 deletions src/app/routes/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ import sportArticlePageJson from '#data/sport/judo/articles/cj80n66ddnko.json';
import mediaAssetPageJson from '#data/yoruba/cpsAssets/media-23256797.json';

import { ERROR_PAGE, FRONT_PAGE } from '#app/routes/utils/pageTypes';
import * as fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF';
import gahuzaOnDemandAudio from '#data/gahuza/bbc_gahuza_radio/p02pcb5c.json';
// eslint-disable-next-line import/order
karinathomasbbc marked this conversation as resolved.
Show resolved Hide resolved
import routes from '.';
import {
act,
render,
screen,
} from '../components/react-testing-library-with-providers';
import { suppressPropWarnings } from '../legacy/psammead/psammead-test-helpers/src';
import * as fetchDataFromBFF from './utils/fetchDataFromBFF';
} from '#app/components/react-testing-library-with-providers';
import { suppressPropWarnings } from '#psammead/psammead-test-helpers/src';

global.performance.getEntriesByName = jest.fn(() => []);

Expand Down
10 changes: 5 additions & 5 deletions src/app/routes/liveRadio/getInitialData/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import path from 'ramda/src/path';
import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode';
import { LIVE_RADIO_PAGE } from '../../utils/pageTypes';
import fetchDataFromBFF from '../../utils/fetchDataFromBFF';
import { BFF_FETCH_ERROR } from '../../../lib/logger.const';
import nodeLogger from '../../../lib/logger.node';
import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode';
import { LIVE_RADIO_PAGE } from '#app/routes/utils/pageTypes';
import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF';
import { BFF_FETCH_ERROR } from '#lib/logger.const';
import nodeLogger from '#lib/logger.node';

const logger = nodeLogger(__filename);
const getScheduleToggle = path(['liveRadioSchedule', 'enabled']);
Expand Down
2 changes: 1 addition & 1 deletion src/app/routes/liveRadio/getInitialData/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import liveRadioJson from '#data/korean/bbc_korean_radio/liveradio.json';
import { LIVE_RADIO_PAGE } from '#app/routes/utils/pageTypes';
import * as fetchPageData from '#app/routes/utils/fetchPageData';
import getInitialData from '.';
import * as fetchPageData from '../../utils/fetchPageData';

fetch.mockResponse(JSON.stringify(liveRadioJson));

Expand Down
12 changes: 6 additions & 6 deletions src/app/routes/mostRead/getInitialData/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode';
import { MOST_READ_PAGE } from '../../utils/pageTypes';
import handleError from '../../utils/handleError';
import fetchDataFromBFF from '../../utils/fetchDataFromBFF';
import { BFF_FETCH_ERROR } from '../../../lib/logger.const';
import nodeLogger from '../../../lib/logger.node';
import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode';
import { MOST_READ_PAGE } from '#app/routes/utils/pageTypes';
import handleError from '#app/routes/utils/handleError';
import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF';
import { BFF_FETCH_ERROR } from '#lib/logger.const';
import nodeLogger from '#lib/logger.node';

const logger = nodeLogger(__filename);

Expand Down
4 changes: 2 additions & 2 deletions src/app/routes/mostRead/getInitialData/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MOST_READ_PAGE } from '#app/routes/utils/pageTypes';
import * as fetchPageData from '../../utils/fetchPageData';
import mostReadJson from '../../../../../data/pidgin/mostRead/index.json';
import * as fetchPageData from '#app/routes/utils/fetchPageData';
import mostReadJson from '#data/pidgin/mostRead/index.json';
import getInitialData from '.';

process.env.BFF_PATH = 'https://mock-bff-path';
Expand Down
6 changes: 3 additions & 3 deletions src/app/routes/onDemandAudio/getInitialData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { InitialDataProps } from '#app/models/types/initialData';
import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF';
import overrideRendererOnTest from '#app/routes/utils/overrideRendererOnTest';
import isTest from '#app/lib/utilities/isTest';
import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode';
import { getPodcastExternalLinks } from '../tempData/podcastExternalLinks';
import nodeLogger from '../../../lib/logger.node';
import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode';
import { getPodcastExternalLinks } from '#app/routes/onDemandAudio/tempData/podcastExternalLinks';
import nodeLogger from '#lib/logger.node';

const logger = nodeLogger(__filename);
const getScheduleToggle = path(['onDemandRadioSchedule', 'enabled']);
Expand Down
12 changes: 6 additions & 6 deletions src/app/routes/topic/getInitialData/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Url from 'url-parse';
import { BFF_FETCH_ERROR } from '../../../lib/logger.const';
import nodeLogger from '../../../lib/logger.node';
import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode';
import fetchDataFromBFF from '../../utils/fetchDataFromBFF';
import { TOPIC_PAGE } from '../../utils/pageTypes';
import isTest from '../../../lib/utilities/isTest';
import { BFF_FETCH_ERROR } from '#lib/logger.const';
import nodeLogger from '#lib/logger.node';
import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode';
import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF';
import { TOPIC_PAGE } from '#app/routes/utils/pageTypes';
import isTest from '#lib/utilities/isTest';

const logger = nodeLogger(__filename);

Expand Down
4 changes: 2 additions & 2 deletions src/app/routes/topic/getInitialData/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assocPath from 'ramda/src/assocPath';
import * as fetchPageData from '../../utils/fetchPageData';
import * as fetchPageData from '#app/routes/utils/fetchPageData';
import { TOPIC_PAGE } from '#app/routes/utils/pageTypes';
import getInitialData from '.';
import { TOPIC_PAGE } from '../../utils/pageTypes';

process.env.BFF_PATH = 'https://mock-bff-path';

Expand Down
6 changes: 3 additions & 3 deletions src/app/routes/utils/fetchDataFromBFF/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Agent } from 'undici';
import fetchDataFromBFF from '.';
import {
ARTICLE_PAGE,
CPS_ASSET,
HOME_PAGE,
MOST_READ_PAGE,
TOPIC_PAGE,
} from '../pageTypes';
import * as fetchPageData from '../fetchPageData';
} from '#app/routes/utils/pageTypes';
import * as fetchPageData from '#app/routes/utils/fetchPageData';
import fetchDataFromBFF from '.';

jest.mock('../fetchPageData', () =>
jest.fn().mockImplementation(() => {
Expand Down
18 changes: 9 additions & 9 deletions src/app/routes/utils/fetchDataFromBFF/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import constructPageFetchUrl from '../constructPageFetchUrl';
import getEnvironment from '../getEnvironment';
import { Services, Variants, PageTypes } from '../../../models/types/global';
import fetchPageData from '../fetchPageData';
import getErrorStatusCode from '../fetchPageData/utils/getErrorStatusCode';
import { BFF_FETCH_ERROR } from '../../../lib/logger.const';
import { FetchError, GetAgent } from '../../../models/types/fetch';
import nodeLogger from '../../../lib/logger.node';
import certsRequired from '../certsRequired';
import constructPageFetchUrl from '#app/routes/utils/constructPageFetchUrl';
import getEnvironment from '#app/routes/utils/getEnvironment';
import { Services, Variants, PageTypes } from '#models/types/global';
import fetchPageData from '#app/routes/utils/fetchPageData';
import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode';
import { BFF_FETCH_ERROR } from '#lib/logger.const';
import { FetchError, GetAgent } from '#models/types/fetch';
import nodeLogger from '#lib/logger.node';
import certsRequired from '#app/routes/utils/certsRequired';

const logger = nodeLogger(__filename);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import services from '../../../../../../lib/config/services/loadableConfig';
import services from '#lib/config/services/loadableConfig';

export default url => {
const [service] = url.split('/').filter(Boolean);
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"noFallthroughCasesInSwitch": true,
"paths": {
"#app/*": ["src/app/*"],
"#src/*": ["src/*"],
"#nextjs/*": ["ws-nextjs-app/*"],
"#contexts/*": ["src/app/contexts/*"],
"#components/*": ["src/app/legacy/components/*"],
"#containers/*": ["src/app/legacy/containers/*"],
Expand Down
Loading