-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: status command table output and other minor improvements deps (#96)
* fix status command table output format * upgrade mongodb to version ^5.8.1 and remove deprecated types * add missing await in down cmd * add missing async in some functions * add test for isTsNode func * replace any from MigrationInterface by void
- Loading branch information
1 parent
c813985
commit ba6684b
Showing
9 changed files
with
44 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { isTsNode } from '../lib/utils/isTsNode'; | ||
|
||
describe('isTsNode', () => { | ||
beforeEach(() => { | ||
delete process.env.TS_NODE_DEV; | ||
}); | ||
it('should return true when process.env.TS_NODE_DEV is true', () => { | ||
process.env.TS_NODE_DEV = 'true'; | ||
expect(isTsNode()).toBeTruthy(); | ||
}); | ||
it('should return false when process.env.TS_NODE_DEV is false', () => { | ||
expect(isTsNode()).toBeFalsy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { Db, MongoClient } from 'mongodb'; | ||
|
||
export interface MigrationInterface { | ||
up(db: Db, client: MongoClient): Promise<any>; | ||
down(db: Db, client: MongoClient): Promise<any>; | ||
up(db: Db, client: MongoClient): Promise<void>; | ||
down(db: Db, client: MongoClient): Promise<void>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -733,6 +733,13 @@ | |
"@jridgewell/resolve-uri" "3.1.0" | ||
"@jridgewell/sourcemap-codec" "1.4.14" | ||
|
||
"@mongodb-js/saslprep@^1.1.0": | ||
version "1.1.0" | ||
resolved "https://registry.yarnpkg.com/@mongodb-js/saslprep/-/saslprep-1.1.0.tgz#022fa36620a7287d17acd05c4aae1e5f390d250d" | ||
integrity sha512-Xfijy7HvfzzqiOAhAepF4SGN5e9leLkMvg/OPOF97XemjfVCYN/oWa75wnkc6mltMSTwY+XlbhWgUOJmkFspSw== | ||
dependencies: | ||
sparse-bitfield "^3.0.3" | ||
|
||
"@nodelib/[email protected]": | ||
version "2.1.5" | ||
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" | ||
|
@@ -1355,13 +1362,6 @@ | |
resolved "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz" | ||
integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== | ||
|
||
"@types/mongodb@^4.0.7": | ||
version "4.0.7" | ||
resolved "https://registry.npmjs.org/@types/mongodb/-/mongodb-4.0.7.tgz" | ||
integrity sha512-lPUYPpzA43baXqnd36cZ9xxorprybxXDzteVKCPAdp14ppHtFJHnXYvNpmBvtMUTb5fKXVv6sVbzo1LHkWhJlw== | ||
dependencies: | ||
mongodb "*" | ||
|
||
"@types/node@*", "@types/node@^17.0.13": | ||
version "17.0.45" | ||
resolved "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz" | ||
|
@@ -1900,10 +1900,10 @@ [email protected]: | |
dependencies: | ||
node-int64 "^0.4.0" | ||
|
||
bson@^5.4.0: | ||
version "5.4.0" | ||
resolved "https://registry.npmjs.org/bson/-/bson-5.4.0.tgz" | ||
integrity sha512-WRZ5SQI5GfUuKnPTNmAYPiKIof3ORXAF4IRU5UcgmivNIon01rWQlw5RUH954dpu8yGL8T59YShVddIPaU/gFA== | ||
bson@^5.5.0: | ||
version "5.5.0" | ||
resolved "https://registry.yarnpkg.com/bson/-/bson-5.5.0.tgz#a419cc69f368d2def3b8b22ea03ed1c9be40e53f" | ||
integrity sha512-B+QB4YmDx9RStKv8LLSl/aVIEV3nYJc3cJNNTK2Cd1TL+7P+cNpw9mAPeCgc5K+j01Dv6sxUzcITXDx7ZU3F0w== | ||
|
||
buffer-from@^1.0.0: | ||
version "1.1.2" | ||
|
@@ -4689,16 +4689,16 @@ mongodb-connection-string-url@^2.6.0: | |
"@types/whatwg-url" "^8.2.1" | ||
whatwg-url "^11.0.0" | ||
|
||
mongodb@*, mongodb@^5.7.0: | ||
version "5.7.0" | ||
resolved "https://registry.npmjs.org/mongodb/-/mongodb-5.7.0.tgz" | ||
integrity sha512-zm82Bq33QbqtxDf58fLWBwTjARK3NSvKYjyz997KSy6hpat0prjeX/kxjbPVyZY60XYPDNETaHkHJI2UCzSLuw== | ||
mongodb@^5.8.1: | ||
version "5.9.0" | ||
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-5.9.0.tgz#5a22065fa8cfaf1d58bf2e3c451cd2c4bfa983a2" | ||
integrity sha512-g+GCMHN1CoRUA+wb1Agv0TI4YTSiWr42B5ulkiAfLLHitGK1R+PkSAf3Lr5rPZwi/3F04LiaZEW0Kxro9Fi2TA== | ||
dependencies: | ||
bson "^5.4.0" | ||
bson "^5.5.0" | ||
mongodb-connection-string-url "^2.6.0" | ||
socks "^2.7.1" | ||
optionalDependencies: | ||
saslprep "^1.0.3" | ||
"@mongodb-js/saslprep" "^1.1.0" | ||
|
||
[email protected]: | ||
version "2.1.2" | ||
|
@@ -5833,13 +5833,6 @@ safe-buffer@~5.2.0: | |
resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" | ||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== | ||
|
||
saslprep@^1.0.3: | ||
version "1.0.3" | ||
resolved "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz" | ||
integrity sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag== | ||
dependencies: | ||
sparse-bitfield "^3.0.3" | ||
|
||
semantic-release@^21.0.7: | ||
version "21.0.7" | ||
resolved "https://registry.npmjs.org/semantic-release/-/semantic-release-21.0.7.tgz" | ||
|