From 9ae56ec27942a7be8fdce3daa7aca3dba57a6c22 Mon Sep 17 00:00:00 2001 From: Colin Gale <64557383+CocoisBuggy@users.noreply.github.com> Date: Fri, 9 May 2025 09:09:23 +0200 Subject: [PATCH] Revert "Assert json types is long since deprecated" --- src/__tests__/bulkImport.test.ts | 2 +- src/db/import/usa/AreaTransformer.ts | 2 +- src/db/utils/jobs/AddCountriesJob.ts | 2 +- src/model/MutableAreaDataSource.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/__tests__/bulkImport.test.ts b/src/__tests__/bulkImport.test.ts index 96548c94..be8a54c3 100644 --- a/src/__tests__/bulkImport.test.ts +++ b/src/__tests__/bulkImport.test.ts @@ -4,7 +4,7 @@ import express from "express"; import {InMemoryDB} from "../utils/inMemoryDB.js"; import {queryAPI, setUpServer} from "../utils/testUtils.js"; import {muuidToString} from "../utils/helpers.js"; -import exampleImportData from './import-example.json' +import exampleImportData from './import-example.json' assert {type: 'json'}; import {AreaType} from "../db/AreaTypes.js"; import {BulkImportResultType} from "../db/BulkImportTypes.js"; import MutableClimbDataSource from "../model/MutableClimbDataSource.js"; diff --git a/src/db/import/usa/AreaTransformer.ts b/src/db/import/usa/AreaTransformer.ts index 45031358..4b3815d5 100644 --- a/src/db/import/usa/AreaTransformer.ts +++ b/src/db/import/usa/AreaTransformer.ts @@ -1,7 +1,7 @@ import mongoose from 'mongoose' import { geometry, Point } from '@turf/helpers' import isoCountries from 'i18n-iso-countries' -import enJson from 'i18n-iso-countries/langs/en.json' +import enJson from 'i18n-iso-countries/langs/en.json' assert { type: 'json' } import { getAreaModel } from '../../AreaSchema.js' import { AreaType } from '../../AreaTypes' diff --git a/src/db/utils/jobs/AddCountriesJob.ts b/src/db/utils/jobs/AddCountriesJob.ts index 0a891dff..0234c307 100644 --- a/src/db/utils/jobs/AddCountriesJob.ts +++ b/src/db/utils/jobs/AddCountriesJob.ts @@ -1,4 +1,4 @@ -import enJson from 'i18n-iso-countries/langs/en.json' +import enJson from 'i18n-iso-countries/langs/en.json' assert { type: 'json' } import { connectDB, gracefulExit } from '../../index.js' import MutableAreaDataSource from '../../../model/MutableAreaDataSource.js' diff --git a/src/model/MutableAreaDataSource.ts b/src/model/MutableAreaDataSource.ts index 076ab61d..0ba2dec2 100644 --- a/src/model/MutableAreaDataSource.ts +++ b/src/model/MutableAreaDataSource.ts @@ -3,14 +3,14 @@ import { geometry, Point } from '@turf/helpers' import { GraphQLError } from 'graphql' import { ApolloServerErrorCode } from '@apollo/server/errors' import isoCountries from 'i18n-iso-countries' -import enJson from 'i18n-iso-countries/langs/en.json' +import enJson from 'i18n-iso-countries/langs/en.json' assert {type: 'json'} import { produce } from 'immer' import mongoose, { ClientSession } from 'mongoose' import { NIL, v5 as uuidv5 } from 'uuid' import muuid, { MUUID } from 'uuid-mongodb' import { GradeContexts } from '../GradeUtils.js' -import CountriesLngLat from '../data/countries-with-lnglat.json' +import CountriesLngLat from '../data/countries-with-lnglat.json' assert {type: 'json'} import { AreaDocumnent, AreaEditableFieldsType,