From 67c1317fbdcb238f63b467bba6d15ef670c1f2a1 Mon Sep 17 00:00:00 2001 From: Akinsola Lawanson Date: Mon, 11 Aug 2025 15:48:35 +0100 Subject: [PATCH 1/4] Bump libs to use beta --- dotcom-rendering/package.json | 2 +- dotcom-rendering/src/client/bootCmp.ts | 9 ++++ pnpm-lock.yaml | 66 +++++++++++++------------- 3 files changed, 43 insertions(+), 34 deletions(-) diff --git a/dotcom-rendering/package.json b/dotcom-rendering/package.json index 4d344c4d27d..e83d62c0120 100644 --- a/dotcom-rendering/package.json +++ b/dotcom-rendering/package.json @@ -37,7 +37,7 @@ "@guardian/eslint-config-typescript": "9.0.1", "@guardian/identity-auth": "6.0.1", "@guardian/identity-auth-frontend": "8.1.0", - "@guardian/libs": "25.2.0", + "@guardian/libs": "0.0.0-canary-20250811142319", "@guardian/ophan-tracker-js": "2.3.2", "@guardian/react-crossword": "6.3.0", "@guardian/shimport": "1.0.2", diff --git a/dotcom-rendering/src/client/bootCmp.ts b/dotcom-rendering/src/client/bootCmp.ts index 983f0cf1558..382a4af0c34 100644 --- a/dotcom-rendering/src/client/bootCmp.ts +++ b/dotcom-rendering/src/client/bootCmp.ts @@ -65,6 +65,14 @@ const initialiseCmp = async () => { // If user has the "reject all" benefit then show the reduced, "non-advertised" list const useNonAdvertisedList = allowRejectAll(isUserSignedIn); + const isInSourcepointGeolocationTestCookie = getCookie({ + name: 'X-GU-Experiment-0perc-B', + }); // Get cookie + const isInSourcepointGeolocationTest = + isInSourcepointGeolocationTestCookie !== null + ? Boolean(isInSourcepointGeolocationTestCookie) + : undefined; + const country = code ?? undefined; cmp.init({ pubData: { @@ -76,6 +84,7 @@ const initialiseCmp = async () => { country, useNonAdvertisedList, isUserSignedIn, + isInSourcepointGeolocationTest, }); log('dotcom', 'CMP initialised'); }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d2ee511961..0aabb146c50 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -297,7 +297,7 @@ importers: version: 8.0.0(tslib@2.6.2)(typescript@5.5.3) '@guardian/braze-components': specifier: 22.2.0 - version: 22.2.0(@emotion/react@11.14.0)(@guardian/libs@25.2.0)(@guardian/source@10.2.0)(react@18.3.1) + version: 22.2.0(@emotion/react@11.14.0)(@guardian/libs@0.0.0-canary-20250811142319)(@guardian/source@10.2.0)(react@18.3.1) '@guardian/bridget': specifier: 8.6.0 version: 8.6.0 @@ -309,10 +309,10 @@ importers: version: 61.4.0(aws-cdk-lib@2.189.0)(aws-cdk@2.1007.0)(constructs@10.4.2) '@guardian/commercial-core': specifier: 27.1.0 - version: 27.1.0(@guardian/ab-core@8.0.0)(@guardian/libs@25.2.0) + version: 27.1.0(@guardian/ab-core@8.0.0)(@guardian/libs@0.0.0-canary-20250811142319) '@guardian/core-web-vitals': specifier: 7.0.0 - version: 7.0.0(@guardian/libs@25.2.0)(tslib@2.6.2)(typescript@5.5.3)(web-vitals@4.2.3) + version: 7.0.0(@guardian/libs@0.0.0-canary-20250811142319)(tslib@2.6.2)(typescript@5.5.3)(web-vitals@4.2.3) '@guardian/eslint-config': specifier: 7.0.1 version: 7.0.1(@typescript-eslint/parser@5.62.0)(eslint@8.56.0)(tslib@2.6.2) @@ -321,19 +321,19 @@ importers: version: 9.0.1(eslint@8.56.0)(tslib@2.6.2)(typescript@5.5.3) '@guardian/identity-auth': specifier: 6.0.1 - version: 6.0.1(@guardian/libs@25.2.0)(tslib@2.6.2)(typescript@5.5.3) + version: 6.0.1(@guardian/libs@0.0.0-canary-20250811142319)(tslib@2.6.2)(typescript@5.5.3) '@guardian/identity-auth-frontend': specifier: 8.1.0 - version: 8.1.0(@guardian/identity-auth@6.0.1)(@guardian/libs@25.2.0)(tslib@2.6.2)(typescript@5.5.3) + version: 8.1.0(@guardian/identity-auth@6.0.1)(@guardian/libs@0.0.0-canary-20250811142319)(tslib@2.6.2)(typescript@5.5.3) '@guardian/libs': - specifier: 25.2.0 - version: 25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) + specifier: 0.0.0-canary-20250811142319 + version: 0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) '@guardian/ophan-tracker-js': specifier: 2.3.2 version: 2.3.2 '@guardian/react-crossword': specifier: 6.3.0 - version: 6.3.0(@emotion/react@11.14.0)(@guardian/libs@25.2.0)(@guardian/source@10.2.0)(@types/react@18.3.1)(react-dom@18.3.1)(react@18.3.1)(typescript@5.5.3) + version: 6.3.0(@emotion/react@11.14.0)(@guardian/libs@0.0.0-canary-20250811142319)(@guardian/source@10.2.0)(@types/react@18.3.1)(react-dom@18.3.1)(react@18.3.1)(typescript@5.5.3) '@guardian/shimport': specifier: 1.0.2 version: 1.0.2 @@ -342,10 +342,10 @@ importers: version: 10.2.0(@emotion/react@11.14.0)(@types/react@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.5.3) '@guardian/source-development-kitchen': specifier: 18.1.1 - version: 18.1.1(@emotion/react@11.14.0)(@guardian/libs@25.2.0)(@guardian/source@10.2.0)(@types/react@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.5.3) + version: 18.1.1(@emotion/react@11.14.0)(@guardian/libs@0.0.0-canary-20250811142319)(@guardian/source@10.2.0)(@types/react@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.5.3) '@guardian/support-dotcom-components': specifier: 7.7.0 - version: 7.7.0(@guardian/libs@25.2.0)(zod@3.22.4) + version: 7.7.0(@guardian/libs@0.0.0-canary-20250811142319)(zod@3.22.4) '@guardian/tsconfig': specifier: 0.2.0 version: 0.2.0 @@ -4712,7 +4712,7 @@ packages: - utf-8-validate dev: false - /@guardian/braze-components@22.2.0(@emotion/react@11.14.0)(@guardian/libs@25.2.0)(@guardian/source@10.2.0)(react@18.3.1): + /@guardian/braze-components@22.2.0(@emotion/react@11.14.0)(@guardian/libs@0.0.0-canary-20250811142319)(@guardian/source@10.2.0)(react@18.3.1): resolution: {integrity: sha512-uSkHd6mBVTAD+BrvJZNt+oSipYHQXBdVt9Pu/VTvkliXHzT8OUsep7ObIWM1lkf3znWbqLDhoXtwS5apX2AEWQ==} engines: {node: ^18.15 || ^20.8} peerDependencies: @@ -4722,7 +4722,7 @@ packages: react: 17.0.2 || 18.2.0 dependencies: '@emotion/react': 11.14.0(@types/react@18.3.1)(react@18.3.1) - '@guardian/libs': 25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) + '@guardian/libs': 0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) '@guardian/source': 10.2.0(@emotion/react@11.14.0)(@types/react@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.5.3) react: 18.3.1 dev: false @@ -4769,14 +4769,14 @@ packages: yargs: 17.7.2 dev: false - /@guardian/commercial-core@27.1.0(@guardian/ab-core@8.0.0)(@guardian/libs@25.2.0): + /@guardian/commercial-core@27.1.0(@guardian/ab-core@8.0.0)(@guardian/libs@0.0.0-canary-20250811142319): resolution: {integrity: sha512-uA7bA1YzvjgbyO5qkwKzuxgYZqw0PjqCz4YYsOeDj7Zq2Xeehrjwz30m8sJurA6pQmap7C4ZJIY62pJP+W7KEw==} peerDependencies: '@guardian/ab-core': 8.0.1 '@guardian/libs': 22.5.0 dependencies: '@guardian/ab-core': 8.0.0(tslib@2.6.2)(typescript@5.5.3) - '@guardian/libs': 25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) + '@guardian/libs': 0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) '@types/googletag': 3.3.0 dev: false @@ -4845,7 +4845,7 @@ packages: - utf-8-validate dev: false - /@guardian/core-web-vitals@7.0.0(@guardian/libs@25.2.0)(tslib@2.6.2)(typescript@5.5.3)(web-vitals@4.2.3): + /@guardian/core-web-vitals@7.0.0(@guardian/libs@0.0.0-canary-20250811142319)(tslib@2.6.2)(typescript@5.5.3)(web-vitals@4.2.3): resolution: {integrity: sha512-1JLUQjkLY8SXYJqcy0TiE9/9hCcmyIlmMpRoW8Ygn/qGtyNxG+zzwkwsgtJIP+B0ZjtDqfukra2IV9l7wX5A0g==} peerDependencies: '@guardian/libs': ^18.0.0 @@ -4856,7 +4856,7 @@ packages: typescript: optional: true dependencies: - '@guardian/libs': 25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) + '@guardian/libs': 0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) tslib: 2.6.2 typescript: 5.5.3 web-vitals: 4.2.3 @@ -4937,7 +4937,7 @@ packages: - supports-color dev: false - /@guardian/identity-auth-frontend@8.1.0(@guardian/identity-auth@6.0.1)(@guardian/libs@25.2.0)(tslib@2.6.2)(typescript@5.5.3): + /@guardian/identity-auth-frontend@8.1.0(@guardian/identity-auth@6.0.1)(@guardian/libs@0.0.0-canary-20250811142319)(tslib@2.6.2)(typescript@5.5.3): resolution: {integrity: sha512-2GzIsUBp8uiP+fRsKUpMrqJYSqokUCDo4q9WByi143CN0LRRWj2tVt23Y/+cZxWUuwDfRBxp1qbRnsy4QSMVLQ==} peerDependencies: '@guardian/identity-auth': ^6.0.0 @@ -4948,13 +4948,13 @@ packages: typescript: optional: true dependencies: - '@guardian/identity-auth': 6.0.1(@guardian/libs@25.2.0)(tslib@2.6.2)(typescript@5.5.3) - '@guardian/libs': 25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) + '@guardian/identity-auth': 6.0.1(@guardian/libs@0.0.0-canary-20250811142319)(tslib@2.6.2)(typescript@5.5.3) + '@guardian/libs': 0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) tslib: 2.6.2 typescript: 5.5.3 dev: false - /@guardian/identity-auth@6.0.1(@guardian/libs@25.2.0)(tslib@2.6.2)(typescript@5.5.3): + /@guardian/identity-auth@6.0.1(@guardian/libs@0.0.0-canary-20250811142319)(tslib@2.6.2)(typescript@5.5.3): resolution: {integrity: sha512-x6X7/+0w2ZLYZERUbkO69AjHJ7Jq2IDA5UJP8SrQPhJoTlSxKAl+13w77TcVX75IK7L8KldZscHMfOW1tSnq9g==} peerDependencies: '@guardian/libs': ^21.0.0 @@ -4964,35 +4964,35 @@ packages: typescript: optional: true dependencies: - '@guardian/libs': 25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) + '@guardian/libs': 0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) tslib: 2.6.2 typescript: 5.5.3 dev: false - /@guardian/libs@22.0.0(tslib@2.6.2)(typescript@5.5.3): - resolution: {integrity: sha512-qAQ8hQcRaL0H3h5vR6QXv6wtHu+XCfK6jM28QNz0d94EyHfiS01i4AMv8JlX1a3efehfoh00WVg/LzjsGRoJJw==} + /@guardian/libs@0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3): + resolution: {integrity: sha512-yUD+fWYukrT6dE5UHpHldVFM6Knx5yhcRHNIV5WCrA/Zc/rx7CplUDBt9uVpI5+IX9XYqevEZurN1wUz3XCNIQ==} peerDependencies: + '@guardian/ophan-tracker-js': ^2.2.10 tslib: ^2.6.2 typescript: ~5.5.2 peerDependenciesMeta: typescript: optional: true dependencies: + '@guardian/ophan-tracker-js': 2.3.2 tslib: 2.6.2 typescript: 5.5.3 dev: false - /@guardian/libs@25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3): - resolution: {integrity: sha512-1zwsHKRB/DjwnRyKZK6TY/r9GfZf/qK1VzUwb6EFe4CG0r94Qnz3zdEHIfF4nC8eMaua2RoCmF27b/tTEHbi5A==} + /@guardian/libs@22.0.0(tslib@2.6.2)(typescript@5.5.3): + resolution: {integrity: sha512-qAQ8hQcRaL0H3h5vR6QXv6wtHu+XCfK6jM28QNz0d94EyHfiS01i4AMv8JlX1a3efehfoh00WVg/LzjsGRoJJw==} peerDependencies: - '@guardian/ophan-tracker-js': ^2.2.10 tslib: ^2.6.2 typescript: ~5.5.2 peerDependenciesMeta: typescript: optional: true dependencies: - '@guardian/ophan-tracker-js': 2.3.2 tslib: 2.6.2 typescript: 5.5.3 dev: false @@ -5021,7 +5021,7 @@ packages: tslib: 2.6.2 dev: false - /@guardian/react-crossword@6.3.0(@emotion/react@11.14.0)(@guardian/libs@25.2.0)(@guardian/source@10.2.0)(@types/react@18.3.1)(react-dom@18.3.1)(react@18.3.1)(typescript@5.5.3): + /@guardian/react-crossword@6.3.0(@emotion/react@11.14.0)(@guardian/libs@0.0.0-canary-20250811142319)(@guardian/source@10.2.0)(@types/react@18.3.1)(react-dom@18.3.1)(react@18.3.1)(typescript@5.5.3): resolution: {integrity: sha512-6CVNzY+yZrrUYOLpaAu7KSlyU23LBiZTFNJACI935iyjYuWEtyROoOwza82h1XconuqyEd9S8iG8CjtLb+j9Ig==} peerDependencies: '@emotion/react': ^11.11.3 @@ -5037,7 +5037,7 @@ packages: optional: true dependencies: '@emotion/react': 11.14.0(@types/react@18.3.1)(react@18.3.1) - '@guardian/libs': 25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) + '@guardian/libs': 0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) '@guardian/source': 10.2.0(@emotion/react@11.14.0)(@types/react@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.5.3) '@types/react': 18.3.1 react: 18.3.1 @@ -5089,7 +5089,7 @@ packages: typescript: 5.5.3 dev: false - /@guardian/source-development-kitchen@18.1.1(@emotion/react@11.14.0)(@guardian/libs@25.2.0)(@guardian/source@10.2.0)(@types/react@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.5.3): + /@guardian/source-development-kitchen@18.1.1(@emotion/react@11.14.0)(@guardian/libs@0.0.0-canary-20250811142319)(@guardian/source@10.2.0)(@types/react@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.5.3): resolution: {integrity: sha512-wuMULnVjValyEz6YjrOPt054tXJkutkAbPdeV/KQHoSCSjAJnd0Cp3SZeoVog77HE/iZ0mnKaiVkK+QXpRVtCQ==} peerDependencies: '@emotion/react': ^11.11.4 @@ -5110,7 +5110,7 @@ packages: optional: true dependencies: '@emotion/react': 11.14.0(@types/react@18.3.1)(react@18.3.1) - '@guardian/libs': 25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) + '@guardian/libs': 0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) '@guardian/source': 10.2.0(@emotion/react@11.14.0)(@types/react@18.3.1)(react@18.3.1)(tslib@2.6.2)(typescript@5.5.3) '@types/react': 18.3.1 react: 18.3.1 @@ -5182,7 +5182,7 @@ packages: - utf-8-validate dev: false - /@guardian/support-dotcom-components@7.7.0(@guardian/libs@25.2.0)(zod@3.22.4): + /@guardian/support-dotcom-components@7.7.0(@guardian/libs@0.0.0-canary-20250811142319)(zod@3.22.4): resolution: {integrity: sha512-yVDJ//dFSIZtU8vuR07iHhco8+cCp6ClYUHBIPpXgljXUBhkURcLIEYgccUssKylrWu5HfbzWuEGH5hOi1eXDw==} peerDependencies: '@guardian/libs': ^22.0.0 @@ -5194,7 +5194,7 @@ packages: '@aws-sdk/client-ssm': 3.840.0 '@aws-sdk/credential-providers': 3.840.0 '@aws-sdk/lib-dynamodb': 3.840.0(@aws-sdk/client-dynamodb@3.840.0) - '@guardian/libs': 25.2.0(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) + '@guardian/libs': 0.0.0-canary-20250811142319(@guardian/ophan-tracker-js@2.3.2)(tslib@2.6.2)(typescript@5.5.3) '@guardian/ophan-tracker-js': 2.3.1 compression: 1.7.4 cors: 2.8.5 From 2be493112bb73a6cdb070ae083a29aa4c8ae05bd Mon Sep 17 00:00:00 2001 From: Akinsola Lawanson Date: Wed, 13 Aug 2025 10:11:25 +0100 Subject: [PATCH 2/4] Update bootCmp.ts --- dotcom-rendering/src/client/bootCmp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotcom-rendering/src/client/bootCmp.ts b/dotcom-rendering/src/client/bootCmp.ts index 382a4af0c34..ecf34088a59 100644 --- a/dotcom-rendering/src/client/bootCmp.ts +++ b/dotcom-rendering/src/client/bootCmp.ts @@ -71,7 +71,7 @@ const initialiseCmp = async () => { const isInSourcepointGeolocationTest = isInSourcepointGeolocationTestCookie !== null ? Boolean(isInSourcepointGeolocationTestCookie) - : undefined; + : false; const country = code ?? undefined; cmp.init({ From b6342e13370bced8e6ab5e8c7554c9174af8fe29 Mon Sep 17 00:00:00 2001 From: Akinsola Lawanson Date: Fri, 15 Aug 2025 15:46:23 +0100 Subject: [PATCH 3/4] Update bootCmp.ts --- dotcom-rendering/src/client/bootCmp.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dotcom-rendering/src/client/bootCmp.ts b/dotcom-rendering/src/client/bootCmp.ts index ecf34088a59..137d55174c6 100644 --- a/dotcom-rendering/src/client/bootCmp.ts +++ b/dotcom-rendering/src/client/bootCmp.ts @@ -65,13 +65,9 @@ const initialiseCmp = async () => { // If user has the "reject all" benefit then show the reduced, "non-advertised" list const useNonAdvertisedList = allowRejectAll(isUserSignedIn); - const isInSourcepointGeolocationTestCookie = getCookie({ - name: 'X-GU-Experiment-0perc-B', - }); // Get cookie const isInSourcepointGeolocationTest = - isInSourcepointGeolocationTestCookie !== null - ? Boolean(isInSourcepointGeolocationTestCookie) - : false; + window.guardian.config.tests['consentGeolocationTestVariant'] === + 'variant'; const country = code ?? undefined; cmp.init({ From 51412f643a7d75aa4da37d73692b9f22dec8190a Mon Sep 17 00:00:00 2001 From: Akinsola Lawanson Date: Mon, 18 Aug 2025 11:05:23 +0100 Subject: [PATCH 4/4] Update affiliate-links.e2e.spec.ts --- dotcom-rendering/playwright/tests/affiliate-links.e2e.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotcom-rendering/playwright/tests/affiliate-links.e2e.spec.ts b/dotcom-rendering/playwright/tests/affiliate-links.e2e.spec.ts index 224d95a498c..8df8a47267e 100644 --- a/dotcom-rendering/playwright/tests/affiliate-links.e2e.spec.ts +++ b/dotcom-rendering/playwright/tests/affiliate-links.e2e.spec.ts @@ -34,7 +34,7 @@ test.describe('Affiliate links', () => { const skimlinkLocator = page.locator(skimlinkSelector).first(); const skimlinkRelAttribute = await skimlinkLocator.getAttribute('rel'); - expect(skimlinkRelAttribute).toBe('sponsored'); + expect(skimlinkRelAttribute).toContain('sponsored'); }); test('skimlinks should contain the xcust URL parameter', async ({