diff --git a/lib/file_tree.js b/lib/file_tree.js index fdd5b247afb..a84150ae292 100644 --- a/lib/file_tree.js +++ b/lib/file_tree.js @@ -13,9 +13,9 @@ import { sortObject } from './sort_object.js'; import { validate } from './validate.js'; // JSON -import treesJSON from '../config/trees.json' assert {type: "json"}; -const trees = treesJSON.trees -import categoriesSchemaJSON from '../schema/categories.json' assert {type: "json"}; +import treesJSON from '../config/trees.json'; +const trees = treesJSON.trees; +import categoriesSchemaJSON from '../schema/categories.json'; // The code in here diff --git a/lib/matcher.js b/lib/matcher.js index 79601aa5366..1a04c4e3a08 100644 --- a/lib/matcher.js +++ b/lib/matcher.js @@ -5,9 +5,9 @@ import whichPolygon from 'which-polygon'; import { simplify } from './simplify.js'; // JSON -import matchGroupsJSON from '../config/matchGroups.json' assert {type: "json"}; -import genericWordsJSON from '../config/genericWords.json' assert {type: "json"}; -import treesJSON from '../config/trees.json' assert {type: "json"}; +import matchGroupsJSON from '../config/matchGroups.json'; +import genericWordsJSON from '../config/genericWords.json'; +import treesJSON from '../config/trees.json'; const matchGroups = matchGroupsJSON.matchGroups; const trees = treesJSON.trees; diff --git a/lib/write_file_with_meta.js b/lib/write_file_with_meta.js index b22dac27aaf..51607c4e8d9 100644 --- a/lib/write_file_with_meta.js +++ b/lib/write_file_with_meta.js @@ -4,7 +4,7 @@ import fs from 'node:fs'; import JSON5 from 'json5'; // JSON -import packageJSON from '../package.json' assert {type: "json"}; +import packageJSON from '../package.json'; const URLRoot = 'https://raw.githubusercontent.com/osmlab/name-suggestion-index/main'; diff --git a/scripts/build_features.js b/scripts/build_features.js index 454e399537e..b1fe482781b 100644 --- a/scripts/build_features.js +++ b/scripts/build_features.js @@ -15,8 +15,8 @@ import stringify from '@aitodotai/json-stringify-pretty-compact'; import { writeFileWithMeta } from '../lib/write_file_with_meta.js'; // JSON -import geojsonSchemaJSON from '../schema/geojson.json' assert {type: "json"}; -import featureSchemaJSON from '../schema/feature.json' assert {type: "json"}; +import geojsonSchemaJSON from '../schema/geojson.json'; +import featureSchemaJSON from '../schema/feature.json'; const Validator = jsonschema.Validator; let v = new Validator(); diff --git a/scripts/build_index.js b/scripts/build_index.js index 802cee40e13..c6e035831a6 100644 --- a/scripts/build_index.js +++ b/scripts/build_index.js @@ -20,11 +20,11 @@ import { writeFileWithMeta } from '../lib/write_file_with_meta.js'; const matcher = new Matcher(); // JSON -import treesJSON from '../config/trees.json' assert {type: "json"}; +import treesJSON from '../config/trees.json'; const trees = treesJSON.trees; // We use LocationConflation for validating and processing the locationSets -import featureCollectionJSON from '../dist/featureCollection.json' assert {type: "json"}; +import featureCollectionJSON from '../dist/featureCollection.json'; const loco = new LocationConflation(featureCollectionJSON); console.log(colors.blue('-'.repeat(70)));