Skip to content

Commit 46ccefb

Browse files
committed
Delete automat
1 parent 906b0f2 commit 46ccefb

File tree

7 files changed

+4
-40
lines changed

7 files changed

+4
-40
lines changed

dotcom-rendering/scripts/jest/setup.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ const windowGuardian = {
4848
functions: {
4949
import: (url: string) => import(url),
5050
},
51-
automat: {
52-
react: undefined,
53-
preact: undefined,
54-
emotion: undefined,
55-
emotionCore: undefined,
56-
emotionTheming: undefined,
57-
},
5851
readerRevenue: {
5952
changeGeolocation: () => {},
6053
showMeTheEpic: () => {},

dotcom-rendering/src/components/SlotBodyEnd/ReaderRevenueEpic.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import {
2626
} from '../../lib/contributions';
2727
import { lazyFetchEmailWithTimeout } from '../../lib/fetchEmail';
2828
import type { CanShowResult } from '../../lib/messagePicker';
29-
import { setAutomat } from '../../lib/setAutomat';
3029
import type { RenderingTarget } from '../../types/renderingTarget';
3130
import type { TagType } from '../../types/tag';
3231

@@ -161,8 +160,6 @@ export const ReaderRevenueEpic = ({ props }: ModuleData<EpicProps>) => {
161160
const [Epic, setEpic] = useState<React.ElementType | null>(null);
162161

163162
useEffect(() => {
164-
setAutomat();
165-
166163
const { endPerformanceMeasure } = startPerformanceMeasure(
167164
'supporterRevenue',
168165
'contributions-epic-module',

dotcom-rendering/src/components/StickyBottomBanner/ReaderRevenueBanner.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import { getToday } from '../../lib/dailyArticleCount';
3131
import { lazyFetchEmailWithTimeout } from '../../lib/fetchEmail';
3232
import { getZIndex } from '../../lib/getZIndex';
3333
import type { CanShowResult } from '../../lib/messagePicker';
34-
import { setAutomat } from '../../lib/setAutomat';
3534
import type { RenderingTarget } from '../../types/renderingTarget';
3635
import type { TagType } from '../../types/tag';
3736

@@ -305,8 +304,6 @@ export const ReaderRevenueBanner = ({
305304
const [Banner, setBanner] = useState<React.ElementType | null>(null);
306305

307306
useEffect(() => {
308-
setAutomat();
309-
310307
(name === 'SignInPromptBanner'
311308
? /* webpackChunkName: "sign-in-prompt-banner" */
312309
import(`../marketing/banners/signInPrompt/SignInPromptBanner`)

dotcom-rendering/src/components/TopBarSupport.importable.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
getPurchaseInfo,
2222
shouldHideSupportMessaging,
2323
} from '../lib/contributions';
24-
import { setAutomat } from '../lib/setAutomat';
2524
import { useIsSignedIn } from '../lib/useAuthStatus';
2625
import { useCountryCode } from '../lib/useCountryCode';
2726
import { usePageViewId } from '../lib/usePageViewId';
@@ -72,8 +71,6 @@ const ReaderRevenueLinksRemote = ({
7271
return;
7372
}
7473

75-
setAutomat();
76-
7774
const requestData: HeaderPayload = {
7875
targeting: {
7976
showSupportMessaging: !hideSupportMessagingForUser,

dotcom-rendering/src/lib/setAutomat.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

dotcom-rendering/webpack/webpack.config.client.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,12 @@ module.exports = ({ build }) => ({
149149
});
150150

151151
module.exports.transpileExclude = {
152+
// Exclude node_modules from transpilation
152153
and: [/node_modules/],
154+
// Do not exclude i.e. include
153155
not: [
154-
// Include all @guardian modules, except automat-modules
155-
/@guardian\/(?!(automat-modules))/,
156+
// Include all @guardian modules
157+
/@guardian\//,
156158
// Include the dynamic-import-polyfill
157159
/dynamic-import-polyfill/,
158160
/valibot/,

dotcom-rendering/window.guardian.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ declare global {
3636
// by having multiple entrypoints in webpack, meaning we can't guarantee singleton behavior
3737
emotionCache?: EmotionCache;
3838
ophan?: typeof ophan;
39-
// TODO expose as type from Automat client lib
40-
automat: {
41-
react: any;
42-
emotionReact: any;
43-
emotionReactJsxRuntime: any;
44-
};
4539
readerRevenue: ReaderRevenueDevUtils;
4640
weeklyArticleCount: WeeklyArticleHistory | undefined;
4741
dailyArticleCount: DailyArticleHistory | undefined;

0 commit comments

Comments
 (0)