mongodb-memory-server-core
Advanced tools
Comparing version 9.2.1-beta.1 to 9.2.1-beta.2
@@ -185,2 +185,7 @@ "use strict"; | ||
} | ||
const configPackagePath = (0, resolveConfig_1.packageJsonPath)(); | ||
// use the same "node_modules/.cache" as the package.json that was found for config options, if available | ||
if (configPackagePath && (await (0, utils_1.pathExists)(path.resolve(configPackagePath, 'node_modules')))) { | ||
nodeModulesDLDir = configPackagePath; | ||
} | ||
const tmpModulesCache = (0, find_cache_dir_1.default)({ | ||
@@ -187,0 +192,0 @@ name: 'mongodb-memory-server', |
@@ -62,2 +62,7 @@ /** Enum of all possible config options */ | ||
export declare function resolveConfig(variableName: ResolveConfigVariables): string | undefined; | ||
/** | ||
* Get the directory path of the `package.json` with config options, if available | ||
* @returns The directory of the `package.json`, otherwise `undefined` | ||
*/ | ||
export declare function packageJsonPath(): string | undefined; | ||
export default resolveConfig; | ||
@@ -64,0 +69,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.envToBool = exports.envName = exports.resolveConfig = exports.processConfigOption = exports.findPackageJson = exports.setDefaultValue = exports.defaultValues = exports.DEFAULT_VERSION = exports.ENV_CONFIG_PREFIX = exports.ResolveConfigVariables = void 0; | ||
exports.envToBool = exports.envName = exports.packageJsonPath = exports.resolveConfig = exports.processConfigOption = exports.findPackageJson = exports.setDefaultValue = exports.defaultValues = exports.DEFAULT_VERSION = exports.ENV_CONFIG_PREFIX = exports.ResolveConfigVariables = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -125,2 +125,10 @@ const camelcase_1 = tslib_1.__importDefault(require("camelcase")); | ||
exports.resolveConfig = resolveConfig; | ||
/** | ||
* Get the directory path of the `package.json` with config options, if available | ||
* @returns The directory of the `package.json`, otherwise `undefined` | ||
*/ | ||
function packageJsonPath() { | ||
return packagejson?.filePath; | ||
} | ||
exports.packageJsonPath = packageJsonPath; | ||
exports.default = resolveConfig; | ||
@@ -127,0 +135,0 @@ /** |
{ | ||
"name": "mongodb-memory-server-core", | ||
"version": "9.2.1-beta.1", | ||
"version": "9.2.1-beta.2", | ||
"description": "MongoDB Server for testing (core package, without autodownload). The server will allow you to connect your favourite ODM or client library to the MongoDB Server and run parallel integration tests isolated from each other.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
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
388055
5704