diff --git a/.versions b/.versions index f7f1e5e..759aa72 100644 --- a/.versions +++ b/.versions @@ -37,7 +37,7 @@ socket-stream-client@0.5.3 tracker@1.3.4 typescript@5.4.3 underscore@1.6.4 -universe:i18n@3.0.0 +universe:i18n@3.0.1 webapp@2.0.0 webapp-hashing@1.1.2 zodern:types@1.0.13 diff --git a/package-lock.json b/package-lock.json index 36c5896..6e2e570 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,15 +5,11 @@ "packages": { "": { "devDependencies": { - "@types/chai": "4.3.0", - "@types/fibers": "3.1.1", "@types/js-yaml": "4.0.5", "@types/meteor": "1.4.76", "@types/mocha": "9.1.0", "@types/node": "16.4.10", "@types/react": "17.0.15", - "@types/sinon": "10.0.11", - "@types/sinon-chai": "3.2.8", "@types/strip-json-comments": "3.0.0", "eslint-config-vazco": "7.0.0", "typescript": "4.8.4" @@ -748,12 +744,6 @@ "bson": "*" } }, - "node_modules/@types/chai": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.0.tgz", - "integrity": "sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==", - "dev": true - }, "node_modules/@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -763,12 +753,6 @@ "@types/node": "*" } }, - "node_modules/@types/fibers": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@types/fibers/-/fibers-3.1.1.tgz", - "integrity": "sha512-yHoUi46uika0snoTpNcVqUSvgbRndaIps4TUCotrXjtc0DHDoPQckmyXEZ2bX3e4mpJmyEW3hRhCwQa/ISCPaA==", - "dev": true - }, "node_modules/@types/jquery": { "version": "3.5.14", "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.14.tgz", @@ -863,31 +847,6 @@ "dev": true, "peer": true }, - "node_modules/@types/sinon": { - "version": "10.0.11", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", - "integrity": "sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g==", - "dev": true, - "dependencies": { - "@types/sinonjs__fake-timers": "*" - } - }, - "node_modules/@types/sinon-chai": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", - "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", - "dev": true, - "dependencies": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", - "dev": true - }, "node_modules/@types/sizzle": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", @@ -1455,14 +1414,20 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "peer": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1606,13 +1571,32 @@ "dev": true, "peer": true }, - "node_modules/define-properties": { + "node_modules/define-data-property": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, "peer": true, "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "peer": true, + "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -1702,6 +1686,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-shim-unscopables": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", @@ -2516,11 +2523,14 @@ "peer": true }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, - "peer": true + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.5", @@ -2562,15 +2572,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "peer": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2658,6 +2673,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/grapheme-splitter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", @@ -2699,13 +2727,26 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "peer": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2725,13 +2766,13 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "peer": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -2740,6 +2781,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "peer": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -3760,6 +3814,24 @@ "semver": "bin/semver.js" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "peer": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4707,12 +4779,6 @@ "bson": "*" } }, - "@types/chai": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.0.tgz", - "integrity": "sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==", - "dev": true - }, "@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -4722,12 +4788,6 @@ "@types/node": "*" } }, - "@types/fibers": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@types/fibers/-/fibers-3.1.1.tgz", - "integrity": "sha512-yHoUi46uika0snoTpNcVqUSvgbRndaIps4TUCotrXjtc0DHDoPQckmyXEZ2bX3e4mpJmyEW3hRhCwQa/ISCPaA==", - "dev": true - }, "@types/jquery": { "version": "3.5.14", "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.14.tgz", @@ -4822,31 +4882,6 @@ "dev": true, "peer": true }, - "@types/sinon": { - "version": "10.0.11", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", - "integrity": "sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g==", - "dev": true, - "requires": { - "@types/sinonjs__fake-timers": "*" - } - }, - "@types/sinon-chai": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.8.tgz", - "integrity": "sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g==", - "dev": true, - "requires": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", - "dev": true - }, "@types/sizzle": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", @@ -5216,14 +5251,17 @@ } }, "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "peer": true, "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" } }, "callsites": { @@ -5332,13 +5370,26 @@ "dev": true, "peer": true }, - "define-properties": { + "define-data-property": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "peer": true, + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } + }, + "define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "peer": true, "requires": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } @@ -5410,6 +5461,23 @@ "unbox-primitive": "^1.0.2" } }, + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "peer": true, + "requires": { + "get-intrinsic": "^1.2.4" + } + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "peer": true + }, "es-shim-unscopables": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", @@ -6021,9 +6089,9 @@ "peer": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, "peer": true }, @@ -6055,15 +6123,17 @@ "peer": true }, "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "peer": true, "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" } }, "get-symbol-description": { @@ -6124,6 +6194,16 @@ "slash": "^3.0.0" } }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "peer": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "grapheme-splitter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", @@ -6156,15 +6236,22 @@ "peer": true }, "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "peer": true, "requires": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" } }, + "has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "peer": true + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -6173,13 +6260,23 @@ "peer": true }, "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "peer": true, "requires": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" + } + }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "peer": true, + "requires": { + "function-bind": "^1.1.2" } }, "ieee754": { @@ -6907,6 +7004,21 @@ "dev": true, "peer": true }, + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "peer": true, + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/package.js b/package.js index ba32458..13bf027 100644 --- a/package.js +++ b/package.js @@ -43,3 +43,20 @@ Package.onUse(function (api) { api.mainModule('source/server.ts', 'server'); api.export(['i18n', '_i18n']); }); + +Package.onTest(function (api) { + api.use(['meteortesting:mocha', 'typescript', 'universe:i18n']); + + api.addFiles([ + 'tests/data/de/ch.i18n.yml', + 'tests/data/en_gb.i18n.json', + 'tests/data/es-es.i18n.json', + 'tests/data/fr.i18n.yml', + 'tests/data/it-it.i18n.yml', + 'tests/data/nest/el/y.i18n.yml', + 'tests/data/pl-pl/x.i18n.yml', + 'tests/data/z.i18n.yml', + ]); + api.addFiles(['tests/client.ts', 'tests/common.ts'], 'client'); + api.addFiles(['tests/server.ts', 'tests/common.ts'], 'server'); +}); diff --git a/package.json b/package.json index 19e774c..e254c35 100644 --- a/package.json +++ b/package.json @@ -8,15 +8,11 @@ "test:CI": "./tests/tests.bash" }, "devDependencies": { - "@types/chai": "4.3.0", - "@types/fibers": "3.1.1", "@types/js-yaml": "4.0.5", "@types/meteor": "1.4.76", "@types/mocha": "9.1.0", "@types/node": "16.4.10", "@types/react": "17.0.15", - "@types/sinon": "10.0.11", - "@types/sinon-chai": "3.2.8", "@types/strip-json-comments": "3.0.0", "eslint-config-vazco": "7.0.0", "typescript": "4.8.4" diff --git a/tests/client.ts b/tests/client.ts index c52b0be..1e286b0 100644 --- a/tests/client.ts +++ b/tests/client.ts @@ -1,21 +1,21 @@ import { i18n } from '../source/client'; - -const expect = chai.expect; +import assert from 'assert'; describe('universe-i18n - client', () => { it('should load translations incrementally', async () => { const locale = 'it-IT'; - expect(i18n.isLoaded(locale)).to.not.be.true; + assert.notEqual(i18n.isLoaded(locale), true); await i18n.setLocale(locale); - expect(i18n.isLoaded(locale)).to.be.true; - expect(i18n.getLocale()).to.equal(locale); + assert.equal(i18n.isLoaded(locale), true); + assert.equal(i18n.getLocale(), locale); }); it('should list only available languages', async () => { const locale = 'zh-CN'; - expect(i18n.isLoaded(locale)).to.not.be.true; + assert.notEqual(i18n.isLoaded(locale), true); await i18n.setLocale(locale); - expect(i18n.isLoaded(locale)).to.be.true; - expect(i18n.getLocale()).to.equal(locale); + assert.equal(i18n.isLoaded(locale), true); + assert.equal(i18n.getLocale(), locale); + assert.strictEqual(!i18n.getLocales().includes(i18n.getLocale()), true); }); }); diff --git a/tests/common.ts b/tests/common.ts index b4aee04..5f7556f 100644 --- a/tests/common.ts +++ b/tests/common.ts @@ -1,20 +1,15 @@ -/// - -import { sinon } from 'meteor/practicalmeteor:sinon'; - import { i18n } from '../source/common'; - -const expect = chai.expect; +import assert from 'assert'; describe('universe-i18n', () => { it('should support YAML files', async () => { await i18n.setLocale('fr-FR'); - expect(i18n.__('common.name')).to.equal('yml-fr'); + assert.equal(i18n.__('common.name'), 'yml-fr'); }); it('should support JSON files', async () => { await i18n.setLocale('es-ES'); - expect(i18n.__('common.name')).to.equal('json-es-es'); + assert.equal(i18n.__('common.name'), 'json-es-es'); }); it('should support all kinds of translations files', async () => { @@ -28,76 +23,62 @@ describe('universe-i18n', () => { ['pl-PL', 'yml-pl-pl'], ['tr', 'yml-tr'], ]; - for (const [locale, name] of cases) { await i18n.setLocale(locale); - expect(i18n.__('common.name')).to.equal(name); + assert.equal(i18n.__('common.name'), name); } }); it('should be able to set locale', async () => { await i18n.setLocale('de-DE'); - expect(i18n.getLocale()).to.equal('de-DE'); - expect(i18n.setLocale('pl-PL')).to.be.ok; - expect(i18n.getLocale()).to.equal('pl-PL'); + assert.equal(i18n.getLocale(), 'de-DE'); + assert.ok(i18n.setLocale('pl-PL')); + assert.equal(i18n.getLocale(), 'pl-PL'); }); it('should be able to set/get translations', async () => { await i18n.setLocale('en-US'); - expect(i18n.addTranslation('en-US', 'common', 'yes', 'Yes')).to.be.ok; - expect(i18n.__('common.yes')).to.equal('Yes'); - - expect(i18n.addTranslation('en-US', 'common.no', 'No')).to.be.ok; - expect(i18n.__('common.no')).to.equal('No'); - - expect(i18n.addTranslation('en-US', 'common.ok', 'Ok')).to.be.ok; - expect(i18n.__('common.ok')).to.equal('Ok'); - + assert.ok(i18n.addTranslation('en-US', 'common', 'yes', 'Yes')); + assert.equal(i18n.__('common.yes'), 'Yes'); + assert.ok(i18n.addTranslation('en-US', 'common.no', 'No')); + assert.equal(i18n.__('common.no'), 'No'); + assert.ok(i18n.addTranslation('en-US', 'common.ok', 'Ok')); + assert.equal(i18n.__('common.ok'), 'Ok'); const params = { common: { hello: 'Hello {$name}', }, }; - expect(i18n.addTranslations('en-US', params)).to.be.ok; - expect(i18n.getTranslation('common', 'hello', { name: 'World' })).to.equal( + assert.ok(i18n.addTranslations('en-US', params)); + assert.equal( + i18n.getTranslation('common', 'hello', { name: 'World' }), 'Hello World', ); - - expect( + assert.ok( i18n.addTranslation( 'en-US', 'common', 'firstAndThird', 'First: {$0}, Third: {$2}', ), - ).to.be.ok; - expect(i18n.__('common', 'firstAndThird', ['a', 'b', 'c'])).to.equal( + ); + assert.equal( + i18n.__('common', 'firstAndThird', ['a', 'b', 'c']), 'First: a, Third: c', ); }); - it('should be able to listen on locale change', async () => { - const callback = sinon.spy(); - - expect(i18n.onceChangeLocale(callback)).to.equal(undefined); - - await i18n.setLocale('pl-PL'); - - expect(callback).to.have.been.calledOnce; - expect(callback).to.have.been.calledWith('pl-PL'); - }); - it('should be able to set options', async () => { await i18n.setLocale('en-US'); i18n.setOptions({ open: '{{', close: '}}' }); - const params = { common: { hello: 'Hello {{name}}', }, }; - expect(i18n.addTranslations('en-US', params)).to.be.ok; - expect(i18n.getTranslation('common', 'hello', { name: 'World' })).to.equal( + assert.ok(i18n.addTranslations('en-US', params)); + assert.equal( + i18n.getTranslation('common', 'hello', { name: 'World' }), 'Hello World', ); i18n.setOptions({ open: '{$', close: '}' }); diff --git a/tests/meteor_practicalmeteor_sinon.d.ts b/tests/meteor_practicalmeteor_sinon.d.ts deleted file mode 100644 index f2b4606..0000000 --- a/tests/meteor_practicalmeteor_sinon.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module 'meteor/practicalmeteor:sinon'; diff --git a/tests/server.ts b/tests/server.ts index 4eed706..4370ac0 100644 --- a/tests/server.ts +++ b/tests/server.ts @@ -1,25 +1,24 @@ import { i18n } from '../source/server'; - -const expect = chai.expect; +import assert from 'assert'; describe('universe-i18n - server', () => { it('should return object from getCache', () => { - expect(i18n.getCache()).to.be.an('object'); - expect(i18n.getCache('en-US')).to.be.an('object'); - expect(i18n.getCache('it-IT')).to.be.an('object'); + assert.equal(typeof i18n.getCache(), 'object'); + assert.equal(typeof i18n.getCache('en-US'), 'object'); + assert.equal(typeof i18n.getCache('it-IT'), 'object'); }); it('should be able to call getYML', () => { const cache = i18n.getCache('it-IT'); - expect(cache).to.be.an('object'); - expect(cache.getYML('it-IT')).to.be.a('string'); - expect(cache.getYML('it-IT', 'common')).to.be.a('string'); + assert.equal(typeof cache, 'object'); + assert.equal(typeof cache.getYML('it-IT'), 'string'); + assert.equal(typeof cache.getYML('it-IT', 'common'), 'string'); }); it('should be able to call getJSON', () => { const cache = i18n.getCache('es-ES'); - expect(cache).to.be.an('object'); - expect(cache.getJSON('es-ES')).to.be.a('string'); - expect(cache.getJSON('es-ES', 'common')).to.be.a('string'); + assert.equal(typeof cache, 'object'); + assert.equal(typeof cache.getYML('es-ES'), 'string'); + assert.equal(typeof cache.getYML('es-ES', 'common'), 'string'); }); });