From 2ffd12a87bbb8fc6944fe83fd3b6ab418c783a57 Mon Sep 17 00:00:00 2001 From: Teppo Kurki Date: Wed, 3 Jan 2024 18:05:31 +0200 Subject: [PATCH] fix: keyswithmetadata require Remove the duplicate require & exports line and change the remaining import to include .json in the file reference. This makes the require Webpack-friendly and allows usage in browser environment. --- src/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 286ff937..25d24244 100644 --- a/src/index.js +++ b/src/index.js @@ -317,13 +317,12 @@ module.exports.chaiModule = chaiAsPromised; module.exports.getTv4 = getTv4; module.exports.subSchemas = subSchemas; module.exports.units = require('../schemas/definitions').definitions.units; -module.exports.metadata = require('./keyswithmetadata'); +module.exports.metadata = require('./keyswithmetadata.json'); module.exports.FullSignalK = FullSignalK; module.exports.fakeMmsiId = "urn:mrn:imo:mmsi:230099999"; module.exports.getSourceId = getSourceId; module.exports.keyForSourceIdPath = keyForSourceIdPath; -module.exports.metadata = require('./keyswithmetadata'); var metadataByRegex = [] _.forIn(module.exports.metadata, (value, key) => {