From c59b253d5b3f7bd02d4670e0f38226556e95c299 Mon Sep 17 00:00:00 2001 From: Max Duval Date: Fri, 15 Dec 2023 11:57:36 +0000 Subject: [PATCH] feat(node-int64): from thrift (#9916) --- apps-rendering/package.json | 3 +-- apps-rendering/src/atoms.test.ts | 2 +- apps-rendering/src/atoms.ts | 2 +- apps-rendering/src/campaign.test.ts | 2 +- apps-rendering/src/item.test.ts | 2 +- yarn.lock | 9 ++++----- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/apps-rendering/package.json b/apps-rendering/package.json index bdd6df1720a..fa0569099ce 100644 --- a/apps-rendering/package.json +++ b/apps-rendering/package.json @@ -71,10 +71,10 @@ "@types/jest": "28.1.8", "@types/jsdom": "16.2.15", "@types/node": "18.18.14", - "@types/node-int64": "0.4.32", "@types/react": "18.2.45", "@types/react-dom": "18.2.17", "@types/react-test-renderer": "18.0.0", + "@types/thrift": "0.10.17", "@types/uuid": "9.0.7", "@types/webpack": "5.28.5", "aws-cdk": "2.90.0", @@ -97,7 +97,6 @@ "jsdom": "16.7.0", "lodash.debounce": "4.0.6", "mockdate": "3.0.5", - "node-int64": "0.4.0", "react": "18.2.0", "react-dom": "18.2.0", "react-test-renderer": "18.2.0", diff --git a/apps-rendering/src/atoms.test.ts b/apps-rendering/src/atoms.test.ts index e1a32d5d547..95aecf86dcd 100644 --- a/apps-rendering/src/atoms.test.ts +++ b/apps-rendering/src/atoms.test.ts @@ -27,7 +27,7 @@ import { TimelineItem } from '@guardian/content-atom-model/timeline/timelineItem import { fromNullable, some } from '../vendor/@guardian/types/index'; import { ElementKind } from 'bodyElement'; import { atomScript } from 'components/InteractiveAtom'; -import Int64 from 'node-int64'; +import { Int64 } from 'thrift'; import { DocParser } from 'parserContext'; import { Result } from 'result'; import { formatOptionalDate, parseAtom } from './atoms'; diff --git a/apps-rendering/src/atoms.ts b/apps-rendering/src/atoms.ts index 8d3cf8cc2f3..09e306a6bb3 100644 --- a/apps-rendering/src/atoms.ts +++ b/apps-rendering/src/atoms.ts @@ -5,7 +5,7 @@ import type { BodyElement } from 'bodyElement'; import { ElementKind } from 'bodyElement'; import { atomScript } from 'components/InteractiveAtom'; import { isValidDate } from 'date'; -import type Int64 from 'node-int64'; +import type { Int64 } from 'thrift'; import type { DocParser } from 'parserContext'; import { Result } from 'result'; diff --git a/apps-rendering/src/campaign.test.ts b/apps-rendering/src/campaign.test.ts index 012b9381805..80a386287b5 100644 --- a/apps-rendering/src/campaign.test.ts +++ b/apps-rendering/src/campaign.test.ts @@ -4,7 +4,7 @@ import { Campaign } from '@guardian/apps-rendering-api-models/campaign'; import { CampaignFields } from '@guardian/apps-rendering-api-models/campaignFields'; import { ParticipationFields } from '@guardian/apps-rendering-api-models/participationFields'; import { ArticleSpecial } from '@guardian/libs'; -import Int64 from 'node-int64'; +import { Int64 } from 'thrift'; import { getCallout, getReport } from 'campaign'; // ----- Mocks ----- // diff --git a/apps-rendering/src/item.test.ts b/apps-rendering/src/item.test.ts index b2ee5550ade..9e5e927a8b4 100644 --- a/apps-rendering/src/item.test.ts +++ b/apps-rendering/src/item.test.ts @@ -1,4 +1,4 @@ -import Int64 from 'node-int64'; +import { Int64 } from 'thrift'; import { ContentType } from '@guardian/content-api-models/v1/contentType'; import { Tag } from '@guardian/content-api-models/v1/tag'; import { TagType } from '@guardian/content-api-models/v1/tagType'; diff --git a/yarn.lock b/yarn.lock index b4e702a3a17..b5add1cfa45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9217,7 +9217,7 @@ __metadata: languageName: node linkType: hard -"@types/node-int64@npm:*, @types/node-int64@npm:0.4.32, @types/node-int64@npm:^0.4.29": +"@types/node-int64@npm:*, @types/node-int64@npm:^0.4.29": version: 0.4.32 resolution: "@types/node-int64@npm:0.4.32" dependencies: @@ -9540,7 +9540,7 @@ __metadata: languageName: node linkType: hard -"@types/thrift@npm:^0.10.11": +"@types/thrift@npm:0.10.17, @types/thrift@npm:^0.10.11": version: 0.10.17 resolution: "@types/thrift@npm:0.10.17" dependencies: @@ -10901,10 +10901,10 @@ __metadata: "@types/jest": "npm:28.1.8" "@types/jsdom": "npm:16.2.15" "@types/node": "npm:18.18.14" - "@types/node-int64": "npm:0.4.32" "@types/react": "npm:18.2.45" "@types/react-dom": "npm:18.2.17" "@types/react-test-renderer": "npm:18.0.0" + "@types/thrift": "npm:0.10.17" "@types/uuid": "npm:9.0.7" "@types/webpack": "npm:5.28.5" aws-cdk: "npm:2.90.0" @@ -10927,7 +10927,6 @@ __metadata: jsdom: "npm:16.7.0" lodash.debounce: "npm:4.0.6" mockdate: "npm:3.0.5" - node-int64: "npm:0.4.0" react: "npm:18.2.0" react-dom: "npm:18.2.0" react-test-renderer: "npm:18.2.0" @@ -21274,7 +21273,7 @@ __metadata: languageName: node linkType: hard -"node-int64@npm:0.4.0, node-int64@npm:^0.4.0": +"node-int64@npm:^0.4.0": version: 0.4.0 resolution: "node-int64@npm:0.4.0" checksum: a6a4d8369e2f2720e9c645255ffde909c0fbd41c92ea92a5607fc17055955daac99c1ff589d421eee12a0d24e99f7bfc2aabfeb1a4c14742f6c099a51863f31a