Releases: typegoose/mongodb-memory-server
Releases · typegoose/mongodb-memory-server
v7.0.0-beta.11
7.0.0-beta.11 (2020-11-11)
Features
- remove cross-spawn (c67ee8f)
Style
- MongoInstance: _launchKiller: remove commented-out code (132917f)
v7.0.0-beta.10
7.0.0-beta.10 (2020-11-06)
⚠ BREAKING CHANGES
- MongoBinary: remove function "MongoBinary.getCachePath", replace with "MongoBinary.cache.get"
- MongoBinaryDownload: remove "MongoBinaryDownload.locationExists", replace with "utils.pathExists"
- MongoBinary: remove value "LATEST_VERSION" in favor of using resolveConfig Value "VERSION"
- resolveConfig: removing alias "reInitializePackageJson", replace with "findPackageJson"
Features
- MongoBinary: remove function "getCachePath" (af164c1)
- MongoBinary: remove value "LATEST_VERSION" (22c6dfd)
- MongoBinaryDownload: remove function "locationExists" (0ba071a)
- MongoBinaryDownload: startDownload: add check that the downloadDir has sufficient permissions (310cdae)
- MongoInstance: run: add check that the mongoBinary has sufficient permissions (d9c1019)
- resolveConfig: add enum for all resolveConfig Variables (7bd9160)
- resolveConfig: remove alias "reInitializePackageJson" (acc4b0a)
- utils: add function "pathExists" (4114d27)
Refactor
- getos: replace "promisify" with "fs.promises" (60e184b)
- MongoBinary: replace "promisify" with "fs.promises" (5a769f3)
- MongoBinaryDownload: replace "existsSync" with "utils.pathExists" (d8de1cc)
- MongoBinaryDownload: replace "promisify" with "fs.promises" (911a922)
- resolveConfig: remove unnecessary optional chain (1c6578d)
- utils: assertion: remove error code from default error (bbad7c4)
Fixes
- getos: replace "not undefined" with "envToBool" (7fde8be)
- MongoBinary: getSystemPath: also check for execute permission (a501842)
Style
- README: environment variables: add legend for booleans (17b1937)
- rename import "promises" (from fs) to "fspromises" everywhere (f876670)
- eslintrc: add environment "node" (8f3ed19)
- eslintrc: add rule "padding-line-between-statements" for "function" & "class" (6a0ebd4)
- eslintrc: add rule "padding-line-between-statements" for "if" (3efdb47)
- eslintrc: add rule "padding-line-between-statements" for "import" (3bfc4ef)
- eslintrc: add rule "padding-line-between-statements" for "return" (05b02d2)
- eslintrc: comma-dangle: change "functions" to "never" (0bf9c3e)
- eslintrc: set rule "no-else-return" to "warn" (cb242e9)
- eslintrc: set rule "no-unused-expressions" to warn (d08b293)
- MongoBinaryDownload: makeMD5check: add more tsdoc (911a09a)
- README: fix missing "MONGOMS_" on "SKIP_OS_RELEASE" (e352495)
- utils: add more tsdoc to "statPath" & "pathExists" (3b36143)
v7.0.0-beta.9
7.0.0-beta.9 (2020-11-02)
Dependencies
- upgrade subdependencies (yarn upgrade) (b7030ae)
- eslint-config-prettier: upgrade to 6.15.0 (7bbcc33)
- lint-staged: upgrade to 10.5.1 (6339aaa)
- semantic-release: upgrade to 17.2.2 (1cb1fec)
- allow "^" range for all type packages (37c01d8)
- pin all non-types devDependencies (b647153)
- remove devDependency "mongodb" (dbd82a7)
v7.0.0-beta.8
7.0.0-beta.8 (2020-11-01)
Features
Style
- README: update "packages/*/README.md" to new bages (3acd086)
Fixes
- MongoBinaryDownloadUrl: add case for Linux Mint 20 (01a6bc6)
- MongoBinaryDownloadUrl: detect "linuxmint" and "linux mint" as linux mint (fda4f72), closes #403
- MongoBinaryDownloadUrl: fix win32 download generation (d62b489), closes #399
- MongoBinaryDownloadUrl: getArchiveName: throw error if platform is unkown (9fc358b)
- MongoInstance: handle code "12" on windows (718aed7), closes #411
Refactor
- MongoBinaryDownloadUrl: minify "getUbuntuVersionString" (04b0ee9)
- MongoBinaryDownloadUrl: remove "async" where not needed (7970fbb)
- MongoBinaryDownloadUrl: translatePlatform: change default error (61685e0)
- MongoMemoryReplSet: rename "MongoMemoryReplSetEventEnum" to "MongoMemoryReplSetEvents" (bfd5441)
- MongoMemoryReplSet: rename "MongoMemoryReplSetStateEnum" to "MongoMemoryReplSetStates" (c02e21d)
- MongoMemoryReplSet: setup proper events (644a335)
- MongoMemoryServer: rename "MongoMemoryServerEventEnum" to "MongoMemoryServerEvents" (251c7ed)
- MongoMemoryServer: rename "MongoMemoryServerStateEnum" to "MongoMemoryServerStates" (139d3fd)
v7.0.0-beta.7
v7.0.0-beta.6
7.0.0-beta.6 (2020-10-27)
⚠ BREAKING CHANGES
- MongoMemoryReplSet: not resetting "servers" after calling "stop" on an replSet can be breaking for some cases
- MongoMemoryServer: allow the re-use of instances & dbPath's meant to change some things internally, which could be breaking
Features
- db_util: rename function "getUriBase" to "uriTemplate" (c888b95), closes #404
- MongoMemoryReplSet: add basic "createAuth" support (6c118a9)
- MongoMemoryReplSet: allow re-use of instances & dbPath (3d64705)
- MongoMemoryReplSet: getUri: allow executing while state is "init" (b3ebac2)
- MongoMemoryServer: add (protected) function "getNewPort" (662a69b)
- MongoMemoryServer: add ability to automatically create auth (d5bf77a), closes #299
- MongoMemoryServer: add ability to force same port on restart (18c77e2)
- MongoMemoryServer: add function "getStartOptions" (f057ea7)
- MongoMemoryServer: allow re-use of instances & dbPath (e2ae879)
Fixes
- MongoInstance: kill: ensure only error ignored is the actual error to be ignored (5e377fa)
- MongoInstance: run: reset all booleans on (188d333)
- MongoMemoryReplSet: _waitForPrimary: check if instance is already primary (8f65696)
- MongoMemoryReplSet: initAllServers: execute "stateChange" with "init" (28bcf5b)
- utils: killProcess: check if the childProcess PID is still alive (96c30de)
Refactor
- MongoMemoryReplSet: _initReplSet: reassign "adminDb" (19ae688)
- MongoMemoryServer: ensureInstance: move "return instanceInfo" into case "running" (4214aa5)
- MongoMemoryServer: remove destructuring of "promises" (a828506)
- MongoMemoryServer: start: check "state" instead of "instanceInfo" (4fd1ede)
- remove file "types.ts" (23cdc65), closes #406
- rename "-test.ts" to ".test.ts" (deb0098)
- rename file "db_util" to "utils" (f3df9c8)
- rename file "postinstall-helper" to "postinstallHelper" (fdf2d09)
- rename file "resolve-config" to "resolveConfig" (7ee646c)
- db_util: uriTemplate: change "query" to be an string-array (8dffa64)
- unify interface names (remove "T") (78a78cd), closes #395
- MongoBinary: change "cache" to be an Map (74d30a0), closes #374
Style
- MongoBinaryDownload: rename interface "DownloadProgress" to "MongoBinaryDownloadProgress" (2bad87c)
- MongoInstance: add TODO comments (5e320ca)
- MongoMemoryReplSet: _initReplSet: change logs to be more clear (561c883)
- MongoMemoryReplSet: _initReplSet: remove "await" from non-Promise functions (846f969)
v7.0.0-beta.5
7.0.0-beta.5 (2020-10-12)
⚠ BREAKING CHANGES
- MongoMemoryReplSet: change "getUri" to be sync (dosnt wait until running anymore)
- MongoMemoryReplSet: remove option "oplogSize", replace with ".replSetOpts.args.push('--oplogSize', '1')"
- MongoMemoryReplSet: remove function "getDbName", replace with ".opts.replSet.dbName"
- MongoMemoryReplSet: removing function "getConnectionString" could break some code
- MongoMemoryReplSet: removing "async" / modifing return type "Promise" can break code
Features
- change package "mongodb" to be non-optional (2b14552)
- db_util: add function "ensureAsync" (971b02d)
- MongoInstance: add value "isReplSet" (3ba31e2)
- MongoInstance: graceful ReplSet shutdown (017239c)
- MongoMemoryReplSet: add error if replSet count is 0 or lower (0202e8f)
- MongoMemoryReplSet: add getter "state" (65135a8)
- MongoMemoryReplSet: remove function "getConnectionString" (dbe844e)
- MongoMemoryReplSet: remove function "getDbName" (6ebafbd)
- MongoMemoryReplSet: remove option "autoStart" (90ed578)
- MongoMemoryReplSet: remove option "oplogSize" (07937e2)
- MongoMemoryReplSet: rename "opts.*" to "*Opts" & add getters & setters (c701f09)
- MongoMemoryServer: add function "create" (6dcb12a)
Style
- MongoMemoryReplSet: add more tsdoc (6b60a71)
- remove "uri" value when only used once (150494e)
- db_util: add link on why "ensureAsync" is needed (412e615)
- MongoMemoryReplSet: add log to "stop" (d3dff26)
- MongoMemoryReplSet: add more logs (a3a911f)
- MongoMemoryReplSet: replace templating string with normal (9add2bc)
Dependencies
- uuid: add "^" (e12396e)
Refactor
- MongoMemoryReplSet: _initReplSet: directly use db "admin" (a335500)
- MongoMemoryReplSet: _initReplSet: remove redundant object assignment (8e6e312)
- MongoMemoryReplSet: _initReplSet: rename "conn" to "con" (335780e)
- MongoMemoryReplSet: _waitForPrimary: remove value "timeoutPromise" (18b9a58)
- MongoMemoryReplSet: add function "stateChange" (3c3d6fb)
- MongoMemoryReplSet: change "_initReplSet" to be "protected" (f46d113)
- MongoMemoryReplSet: change "_initServer" to be "protected" (4c32f45)
- MongoMemoryReplSet: change "_state" to be "protected" (415fc8f)
- MongoMemoryReplSet: change "_waitForPrimary" to be "protected" (d0d62e2)
- MongoMemoryReplSet: change "getInstanceOpts" to be "protected" (e954806)
- MongoMemoryReplSet: change "getUri" to be sync (13f3f1d)
- MongoMemoryReplSet: change "if not state 'stopped'" to switch (df1af0c)
- MongoMemoryReplSet: change if-error to "assertion" (179bdbb)
- MongoMemoryReplSet: improve "start" (c2311cb)
- MongoMemoryReplSet: refactor "_state" into an enum (e3d4678)
- MongoMemoryReplSet: refactor multiple "if" into one switch (8b8a609)
- MongoMemoryReplSet: remove "?" from "MongoMemoryReplSetOptsT" (138e21d)
- MongoMemoryReplSet: remove "async" from "getDbName" (2775b4f)
- MongoMemoryReplSet: remove commented out HACK (1ad5bdc)
- MongoMemoryReplSet: remove dynamic import "mongodb" (fb958ae)
- MongoMemoryReplSet: shorten constructor (e17762d)
- MongoMemoryReplSet: small improvements (9b17925)
- MongoMemoryReplSet: waitUntilRunning: shorten function (0fc27d6)
- replset-single: shorten "state errors" (2559117)
Fixes
- MongoMemoryReplSet: _initReplSet: throw error if "this.servers.length" is "<= 0" (019b118)
- MongoMemoryReplSet: "getUri" now uses "waitUntilRunning" (18428d5)
- MongoMemoryReplSet: change "_waitForPrimary" timout message to be an error (89c8af6)
- MongoMemoryReplSet: ensure "start" is async (765b5b1)
- MongoMemoryReplSet: move "removeListener" before "_state" check (60646eb)
- MongoMemoryReplSet: register listener for event "beforeExit" inside "start" (7859d6c)
- MongoMemoryReplSet: throw error if state is not "running" or "init" (27f6215)
v7.0.0-beta.4
7.0.0-beta.4 (2020-10-12)
Fixes
- -global: change "mongodb_version" to latest patch version (adcbdcf)
- MongoBinary: change "LATEST_VERSION" to latest patch version "4.0.20" (23e6eaa)
- MongoMemoryReplSet: _initReplSet: check if there is already an PRIMARY (a1c9264)
Refactor
v6.9.2
v7.0.0-beta.3
7.0.0-beta.3 (2020-10-08)
⚠ BREAKING CHANGES
- MongoMemoryServer: remove function "getDbName", can be replaced with "instanceInfo.dbName"
- MongoMemoryServer: remove function "getDbPath", can be replaced with "instanceInfo.dbPath"
- MongoMemoryServer: remove function "getPort", can be replaced with "instanceInfo.port"
- MongoInstance: change "start" to not reset "port" to "undefined"
- MongoInstance: change "instanceOpts" to be readonly and Readonly
change "binaryOpts" to be readonly and Readonly
change "spawnOpts" to be readonly and Readonly - MongoMemoryServer: removing ".uri" because of function "getUri"
- MongoMemoryServer: removing ".childProcess" because it is an alias for ".instance.childProcess"
- MongoMemoryServer: remove option "autoStart"
change "MongoMemoryServer.create" to always call "MongoMemoryServer.start" - MongoMemoryServer: change "MongoMemoryServer.getInstanceInfo" to return "undefined" instead of "false"
- MongoMemoryServer: change "MongoMemoryServer.getUri" to be sync
- MongoMemoryServer: remove deprecated function "getConnectionString" (replace with "getUri")
- MongoMemoryServer: change "MongoMemoryServer.getDbName" to be sync
- MongoMemoryServer: change "MongoMemoryServer.getDbPath" to be sync
- MongoMemoryServer: change "MongoMemoryServer.getPort" to be sync
- MongoMemoryServer: change "MongoMemoryServer.runningInstance" to be "undefined" instead of "null"
change "MongoMemoryServer.instanceInfoSync" to be "undefined" instead of "null"
Features
- MongoInstance: change options to be readonly (e599372)
- MongoMemoryServer: add getter function "state" (c19493f)
- MongoMemoryServer: extend EventEmitter (04ca3d7)
- MongoMemoryServer: remove "MongoInstanceDataT.childProcess" (c71d8d4)
- MongoMemoryServer: remove "StartupInstanceData.uri" (dec17a4)
- MongoMemoryServer: remove deprecated function "getConnectionString" (198f4c0)
- MongoMemoryServer: remove function "getDbName" (e2fc23f)
- MongoMemoryServer: remove function "getDbPath" (2343771)
- MongoMemoryServer: remove function "getPort" (5eb7017)
- MongoMemoryServer: remove option "autoStart" (347085f)
- MongoMemoryServer: rename function "getInstanceInfo" into "get instanceInfo" (ae8a9f8)
Reverts
- "chore: remove unused file "tsconfig.test"" (cc053c7)
Style
- MongoMemoryServer: remove comment & change log (b098941)
Fixes
- db_util: killProcess: fix "SIGINT"-"SIGKILL" warn condition (4113d94)
- MongoInstance: remove resetting "port" inside "start" (7861a6f), closes #393
Refactor
- MongoMemoryReplSet: stop: reset "servers" after stopping them (0aa2293)
- MongoMemoryServer: add sanity check to "stop" (8aff4ef)
- MongoMemoryServer: always reset "port" to "undefined" (8ca0729)
- MongoMemoryServer: change "_state" to be "protected" (b716c2c)
- MongoMemoryServer: change "getDbName" to be sync (85a97e0)
- MongoMemoryServer: change "getDbPath" to be sync (281fa1c)
- MongoMemoryServer: change "getInstanceInfo" to return undefined (27349a3)
- MongoMemoryServer: change "getPort" to be sync (e849f2c)
- MongoMemoryServer: change "getUri" to be sync (5b53f03)
- MongoMemoryServer: change "instanceInfo" to be "protected" (7390eee)
- MongoMemoryServer: merge "runningInstance" and "instanceInfoSync" into "instanceInfo" (7642c75)
- MongoMemoryServer: refactor "start" to be more readable (7fb31c1)
- MongoMemoryServer: remove "await" from "getUriBase" call (ca536b6)
- MongoMemoryServer: remove "null" use "undefined" (086abef)
- MongoMemoryServer: remove call to "ensureInstance" inside "stop" (57801cf)
- MongoMemoryServer: rename "instanceInfo" to "_instanceInfo" (d3ddcb4)
- MongoMemoryServer: rename function "assertionInstanceInfoSync" to "assertionInstanceInfo" (03c8343)
- MongoMemoryServer: shorten "getUri" (f1024e5)
- MongoMemoryServer: start: remove first ".catch" (fafaa29)