@mongodb-js/mongodb-constants
Advanced tools
Comparing version 0.7.2 to 0.8.0
@@ -43,2 +43,6 @@ "use strict"; | ||
} | ||
function satisfiesVersion(v1, v2) { | ||
const isGTECheck = /^\d+?\.\d+?\.\d+?$/.test(v2); | ||
return (0, semver_1.satisfies)(v1, isGTECheck ? `>=${v2}` : v2); | ||
} | ||
function createConstantFilter({ meta: filterMeta, serverVersion = DEFAULT_SERVER_VERSION, stage: filterStage = {}, } = {}) { | ||
@@ -48,3 +52,3 @@ const currentServerVersion = /^(?<version>\d+?\.\d+?\.\d+?)/.exec(serverVersion)?.groups?.version ?? | ||
return ({ version: minServerVersion, meta, env, namespace, apiVersions }) => { | ||
return ((0, semver_1.gte)(currentServerVersion, minServerVersion) && | ||
return (satisfiesVersion(currentServerVersion, minServerVersion) && | ||
isIn(filterStage.env, env) && | ||
@@ -51,0 +55,0 @@ isIn(filterStage.namespace, namespace) && |
@@ -443,3 +443,3 @@ declare const STAGE_OPERATORS: readonly [{ | ||
readonly meta: "stage"; | ||
readonly version: "7.0.2"; | ||
readonly version: ">=6.0.10 <7.0.0 || >=7.0.2"; | ||
readonly apiVersions: readonly []; | ||
@@ -800,3 +800,3 @@ readonly namespaces: readonly ["coll"]; | ||
readonly meta: "stage"; | ||
readonly version: "7.0.2"; | ||
readonly version: ">=6.0.10 <7.0.0 || >=7.0.2"; | ||
readonly apiVersions: readonly []; | ||
@@ -803,0 +803,0 @@ readonly namespaces: readonly ["coll"]; |
@@ -776,3 +776,3 @@ "use strict"; | ||
meta: 'stage', | ||
version: '7.0.2', | ||
version: '>=6.0.10 <7.0.0 || >=7.0.2', | ||
apiVersions: [], | ||
@@ -779,0 +779,0 @@ namespaces: [ns_1.COLLECTION], |
@@ -16,3 +16,3 @@ { | ||
"homepage": "https://github.com/mongodb-js/devtools-shared", | ||
"version": "0.7.2", | ||
"version": "0.8.0", | ||
"repository": { | ||
@@ -73,3 +73,3 @@ "type": "git", | ||
}, | ||
"gitHead": "665d291d3d63746a5d9d13f951f6229fe9f308dc" | ||
"gitHead": "c40d82c6b0217aaf6b0695652186f26c0113a41b" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
351371
8328