diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index 5172deec0..4631cf305 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -6,6 +6,7 @@ "lib": ["ES2024", "DOM"], "module": "ESNext", "moduleResolution": "Bundler", + "allowArbitraryExtensions": true, "outDir": "./dist" }, "include": ["src", "../../integrations/*/index.ts"] diff --git a/integrations/geocoding/package.json b/integrations/geocoding/package.json index 93de57eea..b89f2640c 100644 --- a/integrations/geocoding/package.json +++ b/integrations/geocoding/package.json @@ -37,6 +37,6 @@ "@openmapx/core": "workspace:^", "@openmapx/integration-framework": "workspace:^", "@openmapx/place-ids": "workspace:^", - "@openstreetmap/id-tagging-schema": "^6.18.0" + "@openstreetmap/id-tagging-schema": "^7.0.1" } } diff --git a/packages/core/package.json b/packages/core/package.json index 49d1e4e5c..b88f56e5d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -69,7 +69,7 @@ }, "dependencies": { "@better-auth/passkey": "^1.6.18", - "@openstreetmap/id-tagging-schema": "^6.18.0", + "@openstreetmap/id-tagging-schema": "^7.0.1", "@tanstack/react-query": "^5.101.0", "@turf/helpers": "^7.3.5", "@turf/nearest-point-on-line": "^7.3.5", diff --git a/packages/presets/package.json b/packages/presets/package.json index 29122091d..a99066c0d 100644 --- a/packages/presets/package.json +++ b/packages/presets/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@openmapx/core": "workspace:^", - "@openstreetmap/id-tagging-schema": "^6.18.0" + "@openstreetmap/id-tagging-schema": "^7.0.1" }, "devDependencies": { "@types/node": "^24.13.2", diff --git a/packages/presets/src/loader.ts b/packages/presets/src/loader.ts index cc125c569..8ff11a633 100644 --- a/packages/presets/src/loader.ts +++ b/packages/presets/src/loader.ts @@ -25,12 +25,10 @@ function tokenizeAliases(aliases: string[] | string | undefined): string[] { return list.flatMap((a) => normalize(a).split(/\s+/)).filter(Boolean); } -function tokenizeTerms(terms: string | undefined): string[] { +function tokenizeTerms(terms: string[] | string | undefined): string[] { if (!terms) return []; - return terms - .split(",") - .map((t) => normalize(t)) - .filter(Boolean); + const list = Array.isArray(terms) ? terms : terms.split(","); + return list.map((t) => normalize(t)).filter(Boolean); } let cachedRawPresets: Record | undefined; diff --git a/packages/presets/src/types.ts b/packages/presets/src/types.ts index 29b7ef31a..ac2c5f07b 100644 --- a/packages/presets/src/types.ts +++ b/packages/presets/src/types.ts @@ -17,8 +17,8 @@ export interface RawPreset { /** Raw translation entry from `dist/translations/.json` at path `.presets.presets[]`. */ export interface RawTranslation { name?: string; - /** Comma-separated. */ - terms?: string; + /** Comma-separated in older schema releases; an array in schema v7. */ + terms?: string[] | string; /** * Rare; treated as optional. In practice the iD schema stores this as a * newline-separated string, but older spec docs describe it as an array, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 92cdca70b..8c12491ac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -551,8 +551,8 @@ importers: specifier: workspace:^ version: link:../../packages/place-ids '@openstreetmap/id-tagging-schema': - specifier: ^6.18.0 - version: 6.18.0 + specifier: ^7.0.1 + version: 7.0.1 integrations/geocoding-db-ris: dependencies: @@ -1703,8 +1703,8 @@ importers: specifier: ^1.6.18 version: 1.6.25(@better-auth/core@1.6.25(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.7(zod@4.4.3))(jose@6.2.4)(kysely@0.29.4)(nanostores@1.4.1))(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-auth@1.6.25(@opentelemetry/api@1.9.1)(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@opentelemetry/api@1.9.1)(kysely@0.29.4)(postgres@3.4.9))(next@16.2.12(@opentelemetry/api@1.9.1)(react-dom@19.2.7(react@19.2.7))(react@19.2.7))(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(vitest@4.1.10)(vue@3.5.40(typescript@6.0.3)))(better-call@1.3.7(zod@4.4.3))(nanostores@1.4.1) '@openstreetmap/id-tagging-schema': - specifier: ^6.18.0 - version: 6.18.0 + specifier: ^7.0.1 + version: 7.0.1 '@tanstack/react-query': specifier: ^5.91.3 version: 5.101.2(react@19.2.7) @@ -2157,8 +2157,8 @@ importers: specifier: workspace:^ version: link:../core '@openstreetmap/id-tagging-schema': - specifier: ^6.18.0 - version: 6.18.0 + specifier: ^7.0.1 + version: 7.0.1 devDependencies: '@types/node': specifier: ^24.13.2 @@ -2845,11 +2845,11 @@ packages: '@esbuild-kit/core-utils@3.3.2': resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==} - deprecated: 'Merged into tsx: https://tsx.is' + deprecated: 'Merged into tsx: https://tsx.hirok.io' '@esbuild-kit/esm-loader@2.6.5': resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} - deprecated: 'Merged into tsx: https://tsx.is' + deprecated: 'Merged into tsx: https://tsx.hirok.io' '@esbuild/aix-ppc64@0.28.1': resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==} @@ -3590,8 +3590,8 @@ packages: ai: ^7.0.0 zod: ^3.25.76 || ^4.1.8 - '@openstreetmap/id-tagging-schema@6.18.0': - resolution: {integrity: sha512-6jVWksw0QsocUdcwc/OdyDnRNd9aR42BaBehmBnMu1EEeBt3ZneUunQf0i/LhIXZwGhAOvyteunNVL/uGB4U2Q==} + '@openstreetmap/id-tagging-schema@7.0.1': + resolution: {integrity: sha512-y58T1905O3SJZlf3SLjhKkxxLsZAvYRNpmjE8zsag39lHh23f0IC20wNRDGrl9iUcBdD8zNs5Z/DxEDa3+Fbcg==} '@opentelemetry/api@1.9.1': resolution: {integrity: sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==} @@ -9245,7 +9245,7 @@ snapshots: ai: 7.0.37(zod@4.4.3) zod: 4.4.3 - '@openstreetmap/id-tagging-schema@6.18.0': {} + '@openstreetmap/id-tagging-schema@7.0.1': {} '@opentelemetry/api@1.9.1': {}