From b70129221ec91e859fb406570c304d80d9ccc09d Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Thu, 25 Mar 2021 14:49:40 -0400 Subject: [PATCH 01/15] feat(NODE-3115): Add generic parameterization MongoClient, Db, Collection, and Cursors can now accept generic parameters to type check the usage of the various API methods on each class. Using generics is kept optional. --- .gitignore | 2 + CONTRIBUTORS.md | 149 +- package-lock.json | 4350 +++++++++++----------- package.json | 28 +- src/bson.ts | 3 +- src/bulk/common.ts | 29 +- src/change_stream.ts | 67 +- src/collection.ts | 437 ++- src/cursor/abstract_cursor.ts | 73 +- src/cursor/aggregation_cursor.ts | 4 +- src/cursor/find_cursor.ts | 4 +- src/db.ts | 103 +- src/dynamic_loaders.ts | 38 - src/gridfs-stream/download.ts | 2 +- src/gridfs-stream/index.ts | 45 +- src/gridfs-stream/upload.ts | 22 +- src/index.ts | 24 +- src/mongo_client.ts | 13 +- src/mongo_types.ts | 74 + src/operations/collections.ts | 6 +- src/operations/create_collection.ts | 6 +- src/operations/find.ts | 5 +- src/operations/insert.ts | 11 +- src/operations/map_reduce.ts | 20 +- src/operations/rename.ts | 4 +- src/sessions.ts | 14 +- test/unit/type_check.test.ts | 12 + test/unit/types/basic_schema.test-d.ts | 34 + test/unit/types/distinct.test-d.ts | 12 + test/unit/types/example_schemas.ts | 31 + test/unit/types/indexed_schema.test-d.ts | 40 + test/unit/types/mongodb.test-d.ts | 18 + test/unit/types/union_schema.test-d.ts | 44 + 33 files changed, 3169 insertions(+), 2555 deletions(-) delete mode 100644 src/dynamic_loaders.ts create mode 100644 src/mongo_types.ts create mode 100644 test/unit/type_check.test.ts create mode 100644 test/unit/types/basic_schema.test-d.ts create mode 100644 test/unit/types/distinct.test-d.ts create mode 100644 test/unit/types/example_schemas.ts create mode 100644 test/unit/types/indexed_schema.test-d.ts create mode 100644 test/unit/types/mongodb.test-d.ts create mode 100644 test/unit/types/union_schema.test-d.ts diff --git a/.gitignore b/.gitignore index 817b4eb3bb6..c0bbaac5f19 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,8 @@ yarn.lock lib/ *.tgz *.d.ts +# type definition tests +!test/unit/types .vscode output diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d0d09bf33a3..c82f453d2be 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,53 +1,100 @@ # Contributors - - Christian Kvalheim - - Matt Broadstone <> - - Dan Aprahamian <> - - Katherine Walker <> - - Aaron Heckmann - - Christoph Pojer - - Pau Ramon Revilla - - Nathan White - - Emmerman - - Seth LaForge - - Boris Filipov - - Stefan Schärmeli - - Tedde Lundgren - - renctan - - Sergey Ukustov - - Ciaran Jessup - - kuno - - srimonti - - Erik Abele - - Pratik Daga - - Slobodan Utvic - - Kristina Chodorow - - Yonathan Randolph - - Brian Noguchi - - Sam Epstein - - James Harrison Fisher - - Vladimir Dronnikov - - Ben Hockey - - Henrik Johansson - - Simon Weare - - Alex Gorbatchev - - Shimon Doodkin - - Kyle Mueller - - Eran Hammer-Lahav - - Marcin Ciszak - - François de Metz - - Vinay Pulim - - nstielau - - Adam Wiggins - - entrinzikyl - - Jeremy Selier - - Ian Millington - - Public Keating - - andrewjstone - - Christopher Stott - - Corey Jewett - - brettkiefer - - Rob Holland - - Senmiao Liu - - heroic - - gitfy +- Christian Kvalheim +- Matt Broadstone +- Dan Aprahamian +- Katherine Walker +- Aaron Heckmann +- Christoph Pojer +- Pau Ramon Revilla +- Nathan White +- Emmerman +- Seth LaForge +- Boris Filipov +- Stefan Schärmeli +- Tedde Lundgren +- renctan +- Sergey Ukustov +- Ciaran Jessup +- kuno +- srimonti +- Erik Abele +- Pratik Daga +- Slobodan Utvic +- Kristina Chodorow +- Yonathan Randolph +- Brian Noguchi +- Sam Epstein +- James Harrison Fisher +- Vladimir Dronnikov +- Ben Hockey +- Henrik Johansson +- Simon Weare +- Alex Gorbatchev +- Shimon Doodkin +- Kyle Mueller +- Eran Hammer-Lahav +- Marcin Ciszak +- François de Metz +- Vinay Pulim +- nstielau +- Adam Wiggins +- entrinzikyl +- Jeremy Selier +- Ian Millington +- Public Keating +- andrewjstone +- Christopher Stott +- Corey Jewett +- brettkiefer +- Rob Holland +- Senmiao Liu +- heroic +- gitfy + +## Maintainers + +- Neal Beeken <> +- Eric Adum <> +- Durran Jordan <> + +## Community Types + +This release of the driver draws inspiration from the community contributed types to reduce upgrade friction as much as possible. +We thank those listed below who contributed to the open source types, still available at `@types/mongodb` for versions prior to v4. + +**Thank you!** + +- Federico Caselli +- Alan Marcell +- Gaurav Lahoti +- Mariano Cortesi +- Enrico Picci +- Alexander Christie +- Julien Chaumond +- Dan Aprahamian +- Denys Bushulyak +- Bastien Arata +- Wan Bachtiar +- Geraldine Lemeur +- Dominik Heigl +- Angela-1 +- Hector Ribes +- Florian Richter +- Erik Christensen +- Nick Zahn +- Jarom Loveridge +- Luis Pais +- Hossein Saniei +- Alberto Silva +- Piotr Błażejewicz +- Linus Unnebäck +- Richard Bateman +- Igor Strebezhev +- Valentin Agachi +- HitkoDev +- TJT +- Julien TASSIN +- Anna Henningsen +- Emmanuel Gautier +- Wyatt Johnson diff --git a/package-lock.json b/package-lock.json index 750083837a8..4c1c65c3b8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,38 +5,59 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { "@babel/highlight": "^7.10.4" } }, + "@babel/compat-data": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", + "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", + "dev": true + }, "@babel/core": { - "version": "7.11.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.4.tgz", - "integrity": "sha512-5deljj5HlqRXN+5oJTY7Zs37iH3z3b++KjiKtIsJy1NrjOOVSEaJHEetLBhyu0aQOSNNZ/0IuEAan9GzRuDXHg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.4", - "@babel/helper-module-transforms": "^7.11.0", - "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.11.4", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.11.0", - "@babel/types": "^7.11.0", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.10.tgz", + "integrity": "sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.9", + "@babel/helper-compilation-targets": "^7.13.10", + "@babel/helper-module-transforms": "^7.13.0", + "@babel/helpers": "^7.13.10", + "@babel/parser": "^7.13.10", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", + "gensync": "^1.0.0-beta.2", "json5": "^2.1.2", "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", + "semver": "^6.3.0", "source-map": "^0.5.0" }, "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -46,12 +67,12 @@ } }, "@babel/generator": { - "version": "7.11.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.4.tgz", - "integrity": "sha512-Rn26vueFx0eOoz7iifCN2UHT6rGtnkSGWSoDRIy8jZN3B91PzeSULbswfLoOWuTuAcNwpG/mxy+uCTDnZ9Mp1g==", + "version": "7.13.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", + "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", "dev": true, "requires": { - "@babel/types": "^7.11.0", + "@babel/types": "^7.13.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -64,127 +85,162 @@ } } }, + "@babel/helper-compilation-targets": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz", + "integrity": "sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.8", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "@babel/helper-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", - "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" } }, "@babel/helper-get-function-arity": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", - "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.13" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz", - "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", "dev": true, "requires": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.13.12" } }, "@babel/helper-module-imports": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", - "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.13.12" } }, "@babel/helper-module-transforms": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz", - "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.12.tgz", + "integrity": "sha512-7zVQqMO3V+K4JOOj40kxiCrMf6xlQAkewBB0eu2b03OO/Q21ZutOzjpfD79A5gtE/2OWi1nv625MrDlGlkbknQ==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", - "@babel/helper-simple-access": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/template": "^7.10.4", - "@babel/types": "^7.11.0", - "lodash": "^4.17.19" + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" } }, "@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.13" } }, "@babel/helper-replace-supers": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", - "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.4", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/helper-member-expression-to-functions": "^7.13.12", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" } }, "@babel/helper-simple-access": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", - "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", "dev": true, "requires": { - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/types": "^7.13.12" } }, "@babel/helper-split-export-declaration": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", - "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", "dev": true, "requires": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.12.13" } }, "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", + "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", "dev": true }, "@babel/helpers": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", - "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", + "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", "dev": true, "requires": { - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0" } }, "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.4", + "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -195,43 +251,93 @@ "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, "@babel/parser": { - "version": "7.11.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.4.tgz", - "integrity": "sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.12.tgz", + "integrity": "sha512-4T7Pb244rxH24yR116LAuJ+adxXXnHhZaLJjegJVKSdoNCe4x1eDBaud5YIcQFcqzsaD5BHvJw5BQ0AZapdCRw==", "dev": true }, "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + } } }, "@babel/traverse": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz", - "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", + "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.0", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.11.0", - "@babel/types": "^7.11.0", + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.0", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.13.0", + "@babel/types": "^7.13.0", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" }, "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -241,20 +347,20 @@ } }, "@babel/types": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz", - "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==", + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.12.tgz", + "integrity": "sha512-K4nY2xFN4QMvQwkQ+zmBDp6ANMbVNw6BbxWmYA4qNjhR9W+Lj/8ky5MEY2Me5r+B2c6/v6F53oMndG+f9s3IiA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.4", + "@babel/helper-validator-identifier": "^7.12.11", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, "@eslint/eslintrc": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", - "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -264,9 +370,25 @@ "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", - "lodash": "^4.17.20", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + } } }, "@istanbuljs/load-nyc-config": { @@ -301,15 +423,6 @@ "p-locate": "^4.1.0" } }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, "p-locate": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", @@ -319,6 +432,12 @@ "p-limit": "^2.2.0" } }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -337,21 +456,21 @@ } }, "@istanbuljs/schema": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", - "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, "@microsoft/api-extractor": { - "version": "7.13.1", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.13.1.tgz", - "integrity": "sha512-mnWb5Vuyn/JnjC359HfsRmLDM4/vzyKcJuxQr5Cg/apbkMHuTB1hQrqA8zBda4N+MJZ5ET2BPsrKaUX1qhz8jw==", + "version": "7.13.2", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.13.2.tgz", + "integrity": "sha512-2fD0c8OxZW+e6NTaxbtrdNxXVuX7aqil3+cqig3pKsHymvUuRJVCEAcAJmZrJ/ENqYXNiB265EyqOT6VxbMysw==", "dev": true, "requires": { "@microsoft/api-extractor-model": "7.12.2", "@microsoft/tsdoc": "0.12.24", "@rushstack/node-core-library": "3.36.0", - "@rushstack/rig-package": "0.2.9", + "@rushstack/rig-package": "0.2.10", "@rushstack/ts-command-line": "4.7.8", "colors": "~1.2.1", "lodash": "~4.17.15", @@ -362,13 +481,19 @@ }, "dependencies": { "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" } + }, + "typescript": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz", + "integrity": "sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==", + "dev": true } } }, @@ -406,18 +531,6 @@ "integrity": "sha512-/8J+4DdvexBH1Qh1yR8VZ6bPay2DL/TDdmSIypAa3dAghJzsdaiZG8COvzpYIML6HV2UVN0g4qbuqzjG4YKgWg==", "dev": true }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "resolve": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", @@ -480,9 +593,9 @@ "dev": true }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -491,22 +604,13 @@ } }, "@rushstack/rig-package": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.2.9.tgz", - "integrity": "sha512-4tqsZ/m+BjeNAGeAJYzPF53CT96TsAYeZ3Pq3T4tb1pGGM3d3TWfkmALZdKNhpRlAeShKUrb/o/f/0sAuK/1VQ==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.2.10.tgz", + "integrity": "sha512-WXYerEJEPf8bS3ruqfM57NnwXtA7ehn8VJjLjrjls6eSduE5CRydcob/oBTzlHKsQ7N196XKlqQl9P6qIyYG2A==", "dev": true, "requires": { - "@types/node": "10.17.13", "resolve": "~1.17.0", "strip-json-comments": "~3.1.1" - }, - "dependencies": { - "@types/node": { - "version": "10.17.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.13.tgz", - "integrity": "sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg==", - "dev": true - } } }, "@rushstack/ts-command-line": { @@ -521,10 +625,16 @@ "string-argv": "~0.3.1" } }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, "@sinonjs/commons": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", - "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", + "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -556,6 +666,15 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, "@types/argparse": { "version": "1.0.38", "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", @@ -578,9 +697,9 @@ } }, "@types/chai": { - "version": "4.2.14", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.14.tgz", - "integrity": "sha512-G+ITQPXkwTrslfG5L/BksmbLUA0M1iybEsmCWPqzSxsRRhJZimBKJkoMi8fr/CPygPTj4zO5pJH7I2/cm9M7SQ==", + "version": "4.2.15", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.15.tgz", + "integrity": "sha512-rYff6FI+ZTKAPkJUoyz7Udq3GaoDZnxYDEvdEdFZASiA7PoErltHezDishqQiSDWrGxvxmplH304jyzQmjp0AQ==", "dev": true }, "@types/chai-subset": { @@ -592,12 +711,6 @@ "@types/chai": "*" } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, "@types/json-schema": { "version": "7.0.7", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", @@ -617,15 +730,15 @@ "dev": true }, "@types/mocha": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.0.tgz", - "integrity": "sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", + "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", "dev": true }, "@types/node": { - "version": "14.14.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", - "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==", + "version": "14.14.36", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.36.tgz", + "integrity": "sha512-kjivUwDJfIjngzbhooRnOLhGYz6oRFi+L+EpMjxroDYXwDw9lHrJJ43E+dJ6KAd3V3WxWAJ/qZE9XKYHhjPOFQ==", "dev": true }, "@types/normalize-package-data": { @@ -647,13 +760,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.1.tgz", - "integrity": "sha512-yW2epMYZSpNJXZy22Biu+fLdTG8Mn6b22kR3TqblVk50HGNV8Zya15WAXuQCr8tKw4Qf1BL4QtI6kv6PCkLoJw==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.19.0.tgz", + "integrity": "sha512-CRQNQ0mC2Pa7VLwKFbrGVTArfdVDdefS+gTw0oC98vSI98IX5A8EVH4BzJ2FOB0YlCmm8Im36Elad/Jgtvveaw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.15.1", - "@typescript-eslint/scope-manager": "4.15.1", + "@typescript-eslint/experimental-utils": "4.19.0", + "@typescript-eslint/scope-manager": "4.19.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -663,9 +776,9 @@ }, "dependencies": { "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -674,55 +787,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.1.tgz", - "integrity": "sha512-9LQRmOzBRI1iOdJorr4jEnQhadxK4c9R2aEAsm7WE/7dq8wkKD1suaV0S/JucTL8QlYUPU1y2yjqg+aGC0IQBQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.19.0.tgz", + "integrity": "sha512-9/23F1nnyzbHKuoTqFN1iXwN3bvOm/PRIXSBR3qFAYotK/0LveEOHr5JT1WZSzcD6BESl8kPOG3OoDRKO84bHA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.15.1", - "@typescript-eslint/types": "4.15.1", - "@typescript-eslint/typescript-estree": "4.15.1", + "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/typescript-estree": "4.19.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.15.1.tgz", - "integrity": "sha512-V8eXYxNJ9QmXi5ETDguB7O9diAXlIyS+e3xzLoP/oVE4WCAjssxLIa0mqCLsCGXulYJUfT+GV70Jv1vHsdKwtA==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.19.0.tgz", + "integrity": "sha512-/uabZjo2ZZhm66rdAu21HA8nQebl3lAIDcybUoOxoI7VbZBYavLIwtOOmykKCJy+Xq6Vw6ugkiwn8Js7D6wieA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.15.1", - "@typescript-eslint/types": "4.15.1", - "@typescript-eslint/typescript-estree": "4.15.1", + "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/typescript-estree": "4.19.0", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.15.1.tgz", - "integrity": "sha512-ibQrTFcAm7yG4C1iwpIYK7vDnFg+fKaZVfvyOm3sNsGAerKfwPVFtYft5EbjzByDJ4dj1WD8/34REJfw/9wdVA==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.19.0.tgz", + "integrity": "sha512-GGy4Ba/hLXwJXygkXqMzduqOMc+Na6LrJTZXJWVhRrSuZeXmu8TAnniQVKgj8uTRKe4igO2ysYzH+Np879G75g==", "dev": true, "requires": { - "@typescript-eslint/types": "4.15.1", - "@typescript-eslint/visitor-keys": "4.15.1" + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/visitor-keys": "4.19.0" } }, "@typescript-eslint/types": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.15.1.tgz", - "integrity": "sha512-iGsaUyWFyLz0mHfXhX4zO6P7O3sExQpBJ2dgXB0G5g/8PRVfBBsmQIc3r83ranEQTALLR3Vko/fnCIVqmH+mPw==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.19.0.tgz", + "integrity": "sha512-A4iAlexVvd4IBsSTNxdvdepW0D4uR/fwxDrKUa+iEY9UWvGREu2ZyB8ylTENM1SH8F7bVC9ac9+si3LWNxcBuA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.1.tgz", - "integrity": "sha512-z8MN3CicTEumrWAEB2e2CcoZa3KP9+SMYLIA2aM49XW3cWIaiVSOAGq30ffR5XHxRirqE90fgLw3e6WmNx5uNw==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.19.0.tgz", + "integrity": "sha512-3xqArJ/A62smaQYRv2ZFyTA+XxGGWmlDYrsfZG68zJeNbeqRScnhf81rUVa6QG4UgzHnXw5VnMT5cg75dQGDkA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.15.1", - "@typescript-eslint/visitor-keys": "4.15.1", + "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/visitor-keys": "4.19.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -731,9 +844,9 @@ }, "dependencies": { "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -742,21 +855,13 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.1.tgz", - "integrity": "sha512-tYzaTP9plooRJY8eNlpAewTOqtWW/4ff/5wBjNVaJ0S0wC4Gpq/zDVRTJa5bq2v1pCNQ08xxMCndcvR+h7lMww==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.19.0.tgz", + "integrity": "sha512-aGPS6kz//j7XLSlgpzU2SeTqHPsmRYxFztj2vPuMMFJXZudpRSehE3WCV+BaxwZFvfAqMoSd86TEuM0PQ59E/A==", "dev": true, "requires": { - "@typescript-eslint/types": "4.15.1", + "@typescript-eslint/types": "4.19.0", "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "dev": true - } } }, "JSONStream": { @@ -798,9 +903,9 @@ } }, "ajv": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", - "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -809,12 +914,78 @@ "uri-js": "^4.2.2" } }, + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "dev": true, + "requires": { + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + } + } + }, "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", @@ -822,12 +993,12 @@ "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "anymatch": { @@ -875,6 +1046,38 @@ "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "arg": { @@ -944,9 +1147,9 @@ "dev": true }, "ast-module-types": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-2.6.0.tgz", - "integrity": "sha512-zXSoVaMrf2R+r+ISid5/9a8SXm1LLdkhHzh6pSRhj9jklzruOOl1hva1YmFT33wAstg/f9ZndJAlq1BSrFLSGA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-2.7.1.tgz", + "integrity": "sha512-Rnnx/4Dus6fn7fTqdeLEAn5vUll5w7/vts0RN608yFa6si/rDOUonlIIiwugHBFWjylHjxm9owoSZn71KwG4gw==", "dev": true }, "astral-regex": { @@ -974,9 +1177,9 @@ "dev": true }, "aws4": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", - "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, "balanced-match": { @@ -1000,9 +1203,9 @@ } }, "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, "bindings": { @@ -1014,12 +1217,51 @@ "file-uri-to-path": "1.0.0" } }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, + "boxen": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1045,10 +1287,23 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "browserslist": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + } + }, "bson": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.2.2.tgz", - "integrity": "sha512-9fX257PVHAUpiRGmY3356RVWKQxLA73BgjA/x5MGuJkTEMeG7yzjuBrsiFB67EXRJnFVKrbJY9t/M+oElKYktQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.2.3.tgz", + "integrity": "sha512-3ztgjpKp0itFxGqzrLMHWqyZH5oMOIRWsjeY61yNVzrDGB/KxtgD6djFlz9n3vx7lLr2r6bkHagBCgyk1ZjETA==", "requires": { "buffer": "^5.6.0" } @@ -1090,43 +1345,68 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", "dev": true, "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" }, "dependencies": { - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { - "semver": "^6.0.0" + "pump": "^3.0.0" } }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } } } }, - "call-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", - "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", - "dev": true, + "caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "requires": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, "requires": { "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.0" + "get-intrinsic": "^1.0.2" } }, "callsites": { @@ -1152,6 +1432,12 @@ "quick-lru": "^4.0.1" } }, + "caniuse-lite": { + "version": "1.0.30001204", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz", + "integrity": "sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ==", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -1168,16 +1454,16 @@ } }, "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", "dev": true, "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", "deep-eql": "^3.0.1", "get-func-name": "^2.0.0", - "pathval": "^1.1.0", + "pathval": "^1.1.1", "type-detect": "^4.0.5" } }, @@ -1195,47 +1481,6 @@ "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "check-error": { @@ -1266,12 +1511,24 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true + }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -1282,9 +1539,9 @@ } }, "cli-spinners": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.4.0.tgz", - "integrity": "sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", + "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==", "dev": true }, "cliui": { @@ -1298,6 +1555,12 @@ "wrap-ansi": "^5.1.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -1320,6 +1583,15 @@ "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.1.0" } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } } } }, @@ -1329,6 +1601,15 @@ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", "dev": true }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1342,18 +1623,24 @@ "dev": true }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", "dev": true }, "colors": { @@ -1415,19 +1702,20 @@ "inherits": "^2.0.3", "readable-stream": "^3.0.2", "typedarray": "^0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } + } + }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" } }, "console-control-strings": { @@ -1437,21 +1725,21 @@ "dev": true }, "conventional-changelog": { - "version": "3.1.21", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.21.tgz", - "integrity": "sha512-ZGecVZPEo3aC75VVE4nu85589dDhpMyqfqgUM5Myq6wfKWiNqhDJLSDMsc8qKXshZoY7dqs1hR0H/15kI/G2jQ==", - "dev": true, - "requires": { - "conventional-changelog-angular": "^5.0.10", - "conventional-changelog-atom": "^2.0.7", - "conventional-changelog-codemirror": "^2.0.7", - "conventional-changelog-conventionalcommits": "^4.3.0", - "conventional-changelog-core": "^4.1.7", - "conventional-changelog-ember": "^2.0.8", - "conventional-changelog-eslint": "^3.0.8", - "conventional-changelog-express": "^2.0.5", - "conventional-changelog-jquery": "^3.0.10", - "conventional-changelog-jshint": "^2.0.7", + "version": "3.1.24", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.24.tgz", + "integrity": "sha512-ed6k8PO00UVvhExYohroVPXcOJ/K1N0/drJHx/faTH37OIZthlecuLIRX/T6uOp682CAoVoFpu+sSEaeuH6Asg==", + "dev": true, + "requires": { + "conventional-changelog-angular": "^5.0.12", + "conventional-changelog-atom": "^2.0.8", + "conventional-changelog-codemirror": "^2.0.8", + "conventional-changelog-conventionalcommits": "^4.5.0", + "conventional-changelog-core": "^4.2.1", + "conventional-changelog-ember": "^2.0.9", + "conventional-changelog-eslint": "^3.0.9", + "conventional-changelog-express": "^2.0.6", + "conventional-changelog-jquery": "^3.0.11", + "conventional-changelog-jshint": "^2.0.9", "conventional-changelog-preset-loader": "^2.3.4" } }, @@ -1490,35 +1778,14 @@ "dev": true }, "conventional-changelog-conventionalcommits": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.3.0.tgz", - "integrity": "sha512-oYHydvZKU+bS8LnGqTMlNrrd7769EsuEHKy4fh1oMdvvDi7fem8U+nvfresJ1IDB8K00Mn4LpiA/lR+7Gs6rgg==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz", + "integrity": "sha512-buge9xDvjjOxJlyxUnar/+6i/aVEVGA7EEh4OafBCXPlLUQPGbRUBhBUveWRxzvR8TEjhKEP4BdepnpG2FSZXw==", "dev": true, "requires": { - "compare-func": "^1.3.1", + "compare-func": "^2.0.0", "lodash": "^4.17.15", "q": "^1.5.1" - }, - "dependencies": { - "compare-func": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.4.tgz", - "integrity": "sha512-sq2sWtrqKPkEXAC8tEJA1+BqAH9GbFkGBtUOqrUX57VSfwp8xyktctk+uLoRy5eccTdxzDcVIztlYDpKs3Jv1Q==", - "dev": true, - "requires": { - "array-ify": "^1.0.0", - "dot-prop": "^3.0.0" - } - }, - "dot-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", - "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - } } }, "conventional-changelog-core": { @@ -1544,17 +1811,6 @@ "through2": "^4.0.0" }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, "through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", @@ -1636,17 +1892,6 @@ "through2": "^4.0.0" }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -1675,31 +1920,20 @@ } }, "conventional-commits-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.0.tgz", - "integrity": "sha512-XmJiXPxsF0JhAKyfA2Nn+rZwYKJ60nanlbSWwwkGwLQFbugsc0gv1rzc7VbbUWAzJfR1qR87/pNgv9NgmxtBMQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.1.tgz", + "integrity": "sha512-OG9kQtmMZBJD/32NEw5IhN5+HnBqVjy03eC+I71I0oQRFA5rOgA4OtPOYG7mz1GkCfCNxn3gKIX8EiHJYuf1cA==", "dev": true, "requires": { "JSONStream": "^1.0.4", "is-text-path": "^1.0.1", "lodash": "^4.17.15", "meow": "^8.0.0", - "split2": "^2.0.0", + "split2": "^3.0.0", "through2": "^4.0.0", "trim-off-newlines": "^1.0.0" }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, "through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", @@ -1712,340 +1946,19 @@ } }, "conventional-recommended-bump": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.0.9.tgz", - "integrity": "sha512-DpRmW1k8CpRrcsXHOPGgHgOd4BMGiq2gtXAveGM8B9pSd9b4r4WKnqp1Fd0vkDtk8l973mIk8KKKUYnKRr9SFw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz", + "integrity": "sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw==", "dev": true, "requires": { "concat-stream": "^2.0.0", "conventional-changelog-preset-loader": "^2.3.4", - "conventional-commits-filter": "^2.0.6", - "conventional-commits-parser": "^3.1.0", - "git-raw-commits": "2.0.0", - "git-semver-tags": "^4.0.0", - "meow": "^7.0.0", + "conventional-commits-filter": "^2.0.7", + "conventional-commits-parser": "^3.2.0", + "git-raw-commits": "^2.0.8", + "git-semver-tags": "^4.1.1", + "meow": "^8.0.0", "q": "^1.5.1" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" - } - }, - "dargs": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", - "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "git-raw-commits": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.0.tgz", - "integrity": "sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg==", - "dev": true, - "requires": { - "dargs": "^4.0.1", - "lodash.template": "^4.0.2", - "meow": "^4.0.0", - "split2": "^2.0.0", - "through2": "^2.0.0" - }, - "dependencies": { - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" - } - } - } - }, - "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", - "dev": true - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", - "dev": true - }, - "meow": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-7.1.1.tgz", - "integrity": "sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA==", - "dev": true, - "requires": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^2.5.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.13.1", - "yargs-parser": "^18.1.3" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - } - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "map-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz", - "integrity": "sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==", - "dev": true - }, - "minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - } - }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } - } - }, - "redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "requires": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - } - }, - "strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "requires": { - "min-indent": "^1.0.0" - } - }, - "trim-newlines": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz", - "integrity": "sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==", - "dev": true - } - } - }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", - "dev": true - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } - } - }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "dev": true, - "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" - } - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", - "dev": true - }, - "type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } - } } }, "convert-source-map": { @@ -2099,19 +2012,14 @@ "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" - }, - "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } } }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -2143,12 +2051,12 @@ "dev": true }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "decamelize": { @@ -2176,9 +2084,9 @@ } }, "decomment": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/decomment/-/decomment-0.9.3.tgz", - "integrity": "sha512-5skH5BfUL3n09RDmMVaHS1QGCiZRnl2nArUwmsE9JRY93Ueh3tihYl5wIrDdAuXnoFhxVis/DmRWREO2c6DG3w==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/decomment/-/decomment-0.9.4.tgz", + "integrity": "sha512-8eNlhyI5cSU4UbBlrtagWpR03dqXcE5IR9zpe7PnO6UzReXDskucsD8usgrzUmQ6qJ3N82aws/p/mu/jqbURWw==", "dev": true, "requires": { "esprima": "4.0.1" @@ -2232,6 +2140,12 @@ "clone": "^1.0.2" } }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2254,27 +2168,27 @@ "dev": true }, "denque": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", - "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", + "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" }, "dependency-tree": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/dependency-tree/-/dependency-tree-7.2.1.tgz", - "integrity": "sha512-nBxnjkqDW4LqAzBazy60V4lE0mAtIQ+oers/GIIvVvGYVdCD9+RNNd4G9jjstyz7ZFVg/j/OiYCvK5MjoVqA2w==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/dependency-tree/-/dependency-tree-8.0.0.tgz", + "integrity": "sha512-zagnV3jgizudEWY3FIFkGCrRr3+GukSMLlw1snIWAOL2beceC22hBXdeNjCnnfPZvbHIPB9DvacSCfD+IoOG3w==", "dev": true, "requires": { - "commander": "^2.19.0", - "debug": "^4.1.1", - "filing-cabinet": "^2.5.1", - "precinct": "^6.2.0", - "typescript": "^3.7.5" + "commander": "^2.20.3", + "debug": "^4.3.1", + "filing-cabinet": "^3.0.0", + "precinct": "^7.0.0", + "typescript": "^3.9.7" }, "dependencies": { "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", "dev": true } } @@ -2298,13 +2212,13 @@ "dev": true }, "detective-amd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/detective-amd/-/detective-amd-3.0.0.tgz", - "integrity": "sha512-kOpKHyabdSKF9kj7PqYHLeHPw+TJT8q2u48tZYMkIcas28el1CYeLEJ42Nm+563/Fq060T5WknfwDhdX9+kkBQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detective-amd/-/detective-amd-3.1.0.tgz", + "integrity": "sha512-G7wGWT6f0VErjUkE2utCm7IUshT7nBh7aBBH2VBOiY9Dqy2DMens5iiOvYCuhstoIxRKLrnOvVAz4/EyPIAjnw==", "dev": true, "requires": { - "ast-module-types": "^2.3.1", - "escodegen": "^1.8.0", + "ast-module-types": "^2.7.0", + "escodegen": "^2.0.0", "get-amd-module-type": "^3.0.0", "node-source-walk": "^4.0.0" } @@ -2340,15 +2254,15 @@ } }, "detective-postcss": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/detective-postcss/-/detective-postcss-3.0.1.tgz", - "integrity": "sha512-tfTS2GdpUal5NY0aCqI4dpEy8Xfr88AehYKB0iBIZvo8y2g3UsrcDnrp9PR2FbzoW7xD5Rip3NJW7eCSvtqdUw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detective-postcss/-/detective-postcss-4.0.0.tgz", + "integrity": "sha512-Fwc/g9VcrowODIAeKRWZfVA/EufxYL7XfuqJQFroBKGikKX83d2G7NFw6kDlSYGG3LNQIyVa+eWv1mqre+v4+A==", "dev": true, "requires": { "debug": "^4.1.1", "is-url": "^1.2.4", - "postcss": "^7.0.2", - "postcss-values-parser": "^1.5.0" + "postcss": "^8.1.7", + "postcss-values-parser": "^2.0.1" } }, "detective-sass": { @@ -2380,50 +2294,29 @@ "dev": true }, "detective-typescript": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-5.8.0.tgz", - "integrity": "sha512-SrsUCfCaDTF64QVMHMidRal+kmkbIc5zP8cxxZPsomWx9vuEUjBlSJNhf7/ypE5cLdJJDI4qzKDmyzqQ+iz/xg==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-7.0.0.tgz", + "integrity": "sha512-y/Ev98AleGvl43YKTNcA2Q+lyFmsmCfTTNWy4cjEJxoLkbobcXtRS0Kvx06daCgr2GdtlwLfNzL553BkktfJoA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "^2.29.0", - "ast-module-types": "^2.6.0", + "@typescript-eslint/typescript-estree": "^4.8.2", + "ast-module-types": "^2.7.1", "node-source-walk": "^4.2.0", - "typescript": "^3.8.3" + "typescript": "^3.9.7" }, "dependencies": { - "@typescript-eslint/typescript-estree": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz", - "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - } - }, - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true - }, "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", "dev": true } } }, "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, "dir-glob": { @@ -2433,14 +2326,6 @@ "dev": true, "requires": { "path-type": "^4.0.0" - }, - "dependencies": { - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - } } }, "doctrine": { @@ -2479,6 +2364,12 @@ "minimatch": "^3.0.4" } }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -2489,6 +2380,12 @@ "safer-buffer": "^2.1.0" } }, + "electron-to-chromium": { + "version": "1.3.699", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.699.tgz", + "integrity": "sha512-fjt43CPXdPYwD9ybmKbNeLwZBmCVdLY2J5fGZub7/eMPuiqQznOGNXv/wurnpXIlE7ScHnvG9Zi+H4/i6uMKmw==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2505,14 +2402,13 @@ } }, "enhanced-resolve": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz", - "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz", + "integrity": "sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" } }, "enquirer": { @@ -2522,14 +2418,6 @@ "dev": true, "requires": { "ansi-colors": "^4.1.1" - }, - "dependencies": { - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - } } }, "entities": { @@ -2539,9 +2427,9 @@ "dev": true }, "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "dev": true, "requires": { "prr": "~1.0.1" @@ -2557,23 +2445,27 @@ } }, "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.2", + "is-string": "^1.0.5", + "object-inspect": "^1.9.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.0" }, "dependencies": { "object.assign": { @@ -2607,6 +2499,18 @@ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -2614,26 +2518,73 @@ "dev": true }, "escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, "requires": { "esprima": "^4.0.1", - "estraverse": "^4.2.0", + "estraverse": "^5.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1", "source-map": "~0.6.1" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + } } }, "eslint": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.20.0.tgz", - "integrity": "sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==", + "version": "7.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz", + "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.3.0", + "@eslint/eslintrc": "^0.4.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -2646,177 +2597,102 @@ "espree": "^7.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^6.0.0", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash": "^4.17.20", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.4", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "dev": true - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } } } }, "eslint-config-prettier": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", - "integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", + "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", "dev": true, "requires": { "get-stdin": "^6.0.0" } }, + "eslint-formatter-pretty": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-4.0.0.tgz", + "integrity": "sha512-QgdeZxQwWcN0TcXXNZJiS6BizhAANFhCzkE7Yl9HKB7WjElzwED6+FbbZB2gji8ofgJTGPqKm6VRCNT3OGCeEw==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "eslint-rule-docs": "^1.1.5", + "log-symbols": "^4.0.0", + "plur": "^4.0.0", + "string-width": "^4.2.0", + "supports-hyperlinks": "^2.0.0" + } + }, "eslint-plugin-jsdoc": { - "version": "30.7.8", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.7.8.tgz", - "integrity": "sha512-OWm2AYvXjCl7nRbpcw5xisfSVkpVAyp4lGqL9T+DeK4kaPm6ecnmTc/G5s1PtcRrwbaI8bIWGzwScqv5CdGyxA==", + "version": "30.7.13", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.7.13.tgz", + "integrity": "sha512-YM4WIsmurrp0rHX6XiXQppqKB8Ne5ATiZLJe2+/fkp9l9ExXFr43BbAbjZaVrpCT+tuPYOZ8k1MICARHnURUNQ==", "dev": true, "requires": { "comment-parser": "^0.7.6", - "debug": "^4.2.0", + "debug": "^4.3.1", "jsdoctypeparser": "^9.0.0", "lodash": "^4.17.20", "regextras": "^0.7.1", - "semver": "^7.3.2", + "semver": "^7.3.4", "spdx-expression-parse": "^3.0.1" }, "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { - "ms": "2.1.2" + "lru-cache": "^6.0.0" } - }, - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true } } }, "eslint-plugin-prettier": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz", - "integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz", + "integrity": "sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" @@ -2840,13 +2716,19 @@ } } }, + "eslint-rule-docs": { + "version": "1.1.223", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.223.tgz", + "integrity": "sha512-6HU1vH6b3QBI2RiFyNE1cQWr2pQ+op1zqZRsVXBZsLngF5ePBGDbkwFtr1Ye4Yq1DBKc499TMEkIzx25xVetuw==", + "dev": true + }, "eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, @@ -2857,12 +2739,20 @@ "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true }, "espree": { @@ -2874,6 +2764,14 @@ "acorn": "^7.4.0", "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "esprima": { @@ -2900,12 +2798,20 @@ } }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "estraverse": { @@ -2977,9 +2883,9 @@ "dev": true }, "fastq": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.10.1.tgz", - "integrity": "sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -2995,20 +2901,14 @@ } }, "file-entry-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", - "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { "flat-cache": "^3.0.4" } }, - "file-exists-dazinatorfork": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/file-exists-dazinatorfork/-/file-exists-dazinatorfork-1.0.2.tgz", - "integrity": "sha512-r70c72ln2YHzQINNfxDp02hAhbGkt1HffZ+Du8oetWDLjDtFja/Lm10lUaSh9e+wD+7VDvPee0b0C9SAy8pWZg==", - "dev": true - }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -3016,30 +2916,40 @@ "dev": true }, "filing-cabinet": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/filing-cabinet/-/filing-cabinet-2.5.1.tgz", - "integrity": "sha512-GWOdObzou2L0HrJUk8MpJa01q0ZOwuTwTssM2+P+ABJWEGlVWd6ueEatANFdin94/3rdkVSdqpH14VqCNqp3RA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/filing-cabinet/-/filing-cabinet-3.0.0.tgz", + "integrity": "sha512-o8Qac5qxZ1uVidR4Sd7ZQbbqObFZlqXU4xu1suAYg9PQPcQFNTzOmxQa/MehIDMgIvXHTb42mWPNV9l3eHBPSw==", "dev": true, "requires": { "app-module-path": "^2.2.0", - "commander": "^2.13.0", - "debug": "^4.1.1", - "decomment": "^0.9.2", - "enhanced-resolve": "^4.1.0", + "commander": "^2.20.3", + "debug": "^4.3.1", + "decomment": "^0.9.3", + "enhanced-resolve": "^5.3.2", "is-relative-path": "^1.0.2", - "module-definition": "^3.0.0", - "module-lookup-amd": "^6.1.0", - "resolve": "^1.11.1", + "module-definition": "^3.3.1", + "module-lookup-amd": "^7.0.0", + "resolve": "^1.19.0", "resolve-dependency-path": "^2.0.0", "sass-lookup": "^3.0.0", "stylus-lookup": "^3.0.1", - "typescript": "^3.0.3" + "typescript": "^3.9.7" }, "dependencies": { + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", "dev": true } } @@ -3053,15 +2963,6 @@ "to-regex-range": "^5.0.1" } }, - "find": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find/-/find-0.3.0.tgz", - "integrity": "sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw==", - "dev": true, - "requires": { - "traverse-chain": "~0.1.0" - } - }, "find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -3071,23 +2972,6 @@ "commondir": "^1.0.1", "make-dir": "^3.0.2", "pkg-dir": "^4.1.0" - }, - "dependencies": { - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "find-up": { @@ -3138,49 +3022,6 @@ "requires": { "cross-spawn": "^7.0.0", "signal-exit": "^3.0.2" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } } }, "forever-agent": { @@ -3201,9 +3042,9 @@ } }, "fromentries": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.1.tgz", - "integrity": "sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", "dev": true }, "fs-access": { @@ -3311,9 +3152,9 @@ } }, "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, "get-amd-module-type": { @@ -3339,9 +3180,9 @@ "dev": true }, "get-intrinsic": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", - "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, "requires": { "function-bind": "^1.1.1", @@ -3466,6 +3307,17 @@ "pinkie-promise": "^2.0.0" } }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -3487,6 +3339,21 @@ "read-pkg": "^1.0.0" } }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, "redent": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", @@ -3497,6 +3364,21 @@ "strip-indent": "^1.0.1" } }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "strip-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", @@ -3530,6 +3412,27 @@ "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", "dev": true }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + }, + "dependencies": { + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -3552,26 +3455,6 @@ "through2": "^4.0.0" }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "split2": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", - "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", - "dev": true, - "requires": { - "readable-stream": "^3.0.0" - } - }, "through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", @@ -3591,14 +3474,6 @@ "requires": { "gitconfiglocal": "^1.0.0", "pify": "^2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } } }, "git-semver-tags": { @@ -3649,27 +3524,52 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" } }, + "global-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", + "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", + "dev": true, + "requires": { + "ini": "1.3.7" + }, + "dependencies": { + "ini": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "dev": true + } + } + }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", + "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" + }, + "dependencies": { + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } } }, "globby": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", - "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", + "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", "dev": true, "requires": { "array-union": "^2.1.0", @@ -3678,14 +3578,6 @@ "ignore": "^5.1.4", "merge2": "^1.3.0", "slash": "^3.0.0" - }, - "dependencies": { - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - } } }, "gonzales-pe": { @@ -3697,10 +3589,29 @@ "minimist": "^1.2.5" } }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, "graphviz": { @@ -3719,9 +3630,9 @@ "dev": true }, "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "dev": true, "requires": { "minimist": "^1.2.5", @@ -3762,16 +3673,22 @@ "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, "has-unicode": { @@ -3780,10 +3697,16 @@ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, "hasha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", - "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, "requires": { "is-stream": "^2.0.0", @@ -3797,9 +3720,9 @@ "dev": true }, "hosted-git-info": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", - "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", + "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -3811,6 +3734,12 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -3828,9 +3757,9 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", "dev": true }, "import-fresh": { @@ -3884,9 +3813,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "interpret": { @@ -3895,12 +3824,24 @@ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, + "irregular-plurals": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.2.0.tgz", + "integrity": "sha512-YqTdPLfwP7YFN0SsD3QUVCkm9ZG2VzOXv3DOrw5G5mkMbVwptTwVcFv7/C0vOpBmgTxAeTG19XpUs1E522LW9Q==", + "dev": true + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "dev": true + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -3910,6 +3851,15 @@ "binary-extensions": "^2.0.0" } }, + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, "is-buffer": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", @@ -3917,11 +3867,20 @@ "dev": true }, "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", "dev": true }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, "is-core-module": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", @@ -3964,6 +3923,16 @@ "is-extglob": "^2.1.1" } }, + "is-installed-globally": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "dev": true, + "requires": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + } + }, "is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", @@ -3971,9 +3940,15 @@ "dev": true }, "is-negative-zero": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", - "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "is-npm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", "dev": true }, "is-number": { @@ -3982,12 +3957,24 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true + }, "is-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -3995,11 +3982,12 @@ "dev": true }, "is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", - "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", "dev": true, "requires": { + "call-bind": "^1.0.2", "has-symbols": "^1.0.1" } }, @@ -4021,6 +4009,12 @@ "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, "is-symbol": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", @@ -4045,6 +4039,12 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, "is-url": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", @@ -4063,6 +4063,12 @@ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -4129,64 +4135,6 @@ "p-map": "^3.0.0", "rimraf": "^3.0.0", "uuid": "^3.3.3" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } } }, "istanbul-lib-report": { @@ -4198,38 +4146,6 @@ "istanbul-lib-coverage": "^3.0.0", "make-dir": "^3.0.0", "supports-color": "^7.1.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "istanbul-lib-source-maps": { @@ -4266,9 +4182,9 @@ "dev": true }, "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -4291,9 +4207,9 @@ "dev": true }, "jsdoc": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.5.tgz", - "integrity": "sha512-SbY+i9ONuxSK35cgVHaI8O9senTE4CDYAmGSDJ5l3+sfe62Ff4gy96osy6OW84t4K4A8iGnMrlRrsSItSNp3RQ==", + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.6.tgz", + "integrity": "sha512-znR99e1BHeyEkSvgDDpX0sTiTu+8aQyDl9DawrkOGZTTW8hv0deIFXx87114zJ7gRaDZKVQD/4tr1ifmJp9xhQ==", "dev": true, "requires": { "@babel/parser": "^7.9.4", @@ -4317,12 +4233,6 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true } } }, @@ -4338,6 +4248,12 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -4375,9 +4291,9 @@ "dev": true }, "json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "dev": true, "requires": { "minimist": "^1.2.5" @@ -4411,11 +4327,20 @@ } }, "just-extend": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", - "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.1.tgz", + "integrity": "sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA==", "dev": true }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4431,6 +4356,15 @@ "graceful-fs": "^4.1.9" } }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, "lcov-parse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", @@ -4438,13 +4372,13 @@ "dev": true }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "lines-and-columns": { @@ -4484,12 +4418,6 @@ "error-ex": "^1.2.0" } }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, "strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", @@ -4509,26 +4437,12 @@ "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash.camelcase": { @@ -4561,25 +4475,6 @@ "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=", "dev": true }, - "lodash.template": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", - "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.templatesettings": "^4.0.0" - } - }, - "lodash.templatesettings": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", - "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0" - } - }, "log-driver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", @@ -4587,25 +4482,13 @@ "dev": true }, "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "chalk": "^2.4.2" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, "lolex": { @@ -4624,6 +4507,12 @@ "signal-exit": "^3.0.0" } }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -4640,114 +4529,62 @@ "dev": true }, "madge": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/madge/-/madge-3.9.2.tgz", - "integrity": "sha512-6ZvyKinAOOzcRpvpm1iyOuds+LvWIq3o3GmUYAHMJdIpDAgVY3mphxVzeWNo3agIOv0X0T/zbLycXQm9Rn19nA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/madge/-/madge-4.0.2.tgz", + "integrity": "sha512-l5bnA2dvyk0azLKDbOTCI+wDZ6nB007PhvPdmiYlPmqwVi49JPbhQrH/t4u8E6Akp3gwji1GZuA+v/F5q6yoWQ==", "dev": true, "requires": { "chalk": "^4.1.0", - "commander": "^5.1.0", + "commander": "^6.2.1", "commondir": "^1.0.1", "debug": "^4.0.1", - "dependency-tree": "^7.2.1", - "detective-amd": "^3.0.0", + "dependency-tree": "^8.0.0", + "detective-amd": "^3.0.1", "detective-cjs": "^3.1.1", "detective-es6": "^2.1.0", "detective-less": "^1.0.2", - "detective-postcss": "^3.0.1", + "detective-postcss": "^4.0.0", "detective-sass": "^3.0.1", "detective-scss": "^2.0.1", "detective-stylus": "^1.0.0", - "detective-typescript": "^5.8.0", + "detective-typescript": "^7.0.0", "graphviz": "0.0.9", - "ora": "^4.0.4", - "pify": "^5.0.0", + "ora": "^5.1.0", "pluralize": "^8.0.0", - "precinct": "^6.3.1", + "precinct": "^7.0.0", "pretty-ms": "^7.0.0", "rc": "^1.2.7", "typescript": "^3.9.5", "walkdir": "^0.4.1" }, "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", "dev": true } } }, "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" + "semver": "^6.0.0" }, "dependencies": { - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } @@ -4759,9 +4596,9 @@ "dev": true }, "map-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz", - "integrity": "sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.0.tgz", + "integrity": "sha512-NAq0fCmZYGz9UFEQyndp7sisrow4GroyGeKluyKC/chuITZsPyOyC1UJZPJlVFImhXdROIP5xqouRLThT3BbpQ==", "dev": true }, "markdown-it": { @@ -4795,16 +4632,6 @@ "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", "dev": true }, - "memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, "memory-pager": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", @@ -4864,6 +4691,12 @@ "p-limit": "^2.2.0" } }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -4922,9 +4755,9 @@ "dev": true }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", "dev": true } } @@ -4946,18 +4779,18 @@ } }, "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", + "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", "dev": true }, "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "version": "2.1.29", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", + "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", "dev": true, "requires": { - "mime-db": "1.44.0" + "mime-db": "1.46.0" } }, "mimic-fn": { @@ -5005,18 +4838,15 @@ } }, "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true }, "mocha": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz", - "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -5032,7 +4862,7 @@ "js-yaml": "3.13.1", "log-symbols": "3.0.0", "minimatch": "3.0.4", - "mkdirp": "0.5.3", + "mkdirp": "0.5.5", "ms": "2.1.1", "node-environment-flags": "1.0.6", "object.assign": "4.1.0", @@ -5045,6 +4875,64 @@ "yargs-unparser": "1.6.0" }, "dependencies": { + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", @@ -5054,12 +4942,6 @@ "ms": "^2.1.1" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -5080,6 +4962,12 @@ "path-is-absolute": "^1.0.0" } }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -5096,10 +4984,19 @@ "esprima": "^4.0.0" } }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, "mkdirp": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", - "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { "minimist": "^1.2.5" @@ -5122,6 +5019,15 @@ "strip-ansi": "^5.1.0" } }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -5134,7 +5040,16 @@ "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" } }, "yargs": { @@ -5170,27 +5085,26 @@ "dev": true }, "module-definition": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/module-definition/-/module-definition-3.3.0.tgz", - "integrity": "sha512-HTplA9xwDzH67XJFC1YvZMUElWJD28DV0dUq7lhTs+JKJamUOWA/CcYWSlhW5amJO66uWtY7XdltT+LfX0wIVg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/module-definition/-/module-definition-3.3.1.tgz", + "integrity": "sha512-kLidGPwQ2yq484nSD+D3JoJp4Etc0Ox9P0L34Pu/cU4X4HcG7k7p62XI5BBuvURWMRX3RPyuhOcBHbKus+UH4A==", "dev": true, "requires": { - "ast-module-types": "^2.6.0", + "ast-module-types": "^2.7.1", "node-source-walk": "^4.0.0" } }, "module-lookup-amd": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/module-lookup-amd/-/module-lookup-amd-6.2.0.tgz", - "integrity": "sha512-uxHCj5Pw9psZiC1znjU2qPsubt6haCSsN9m7xmIdoTciEgfxUkE1vhtDvjHPuOXEZrVJhjKgkmkP+w73rRuelQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/module-lookup-amd/-/module-lookup-amd-7.0.1.tgz", + "integrity": "sha512-w9mCNlj0S8qviuHzpakaLVc+/7q50jl9a/kmJ/n8bmXQZgDPkQHnPBb8MUOYh3WpAYkXuNc2c+khsozhIp/amQ==", "dev": true, "requires": { "commander": "^2.8.1", "debug": "^4.1.0", - "file-exists-dazinatorfork": "^1.0.2", - "find": "^0.3.0", + "glob": "^7.1.6", "requirejs": "^2.3.5", - "requirejs-config-file": "^3.1.1" + "requirejs-config-file": "^4.0.0" } }, "mongodb-mock-server": { @@ -5209,16 +5123,16 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", "dev": true }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "nanoid": { + "version": "3.1.22", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.22.tgz", + "integrity": "sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==", "dev": true }, "napi-build-utils": { @@ -5274,9 +5188,9 @@ } }, "node-abi": { - "version": "2.19.1", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.1.tgz", - "integrity": "sha512-HbtmIuByq44yhAzK7b9j/FelKlHYISKQn0mtvcBrU5QBkhoCMp5bu8Hv5AI34DcKfOAcJBcOEMwLlwO62FFu9A==", + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.21.0.tgz", + "integrity": "sha512-smhrivuPqEM3H5LmnY3KU6HfYv0u4QklgAxfFyRNujKUzbUcYZ+Jc2EhukB9SRcD2VpqhxM7n/MIcp1Ua1/JMg==", "dev": true, "requires": { "semver": "^5.4.1" @@ -5301,6 +5215,12 @@ "process-on-spawn": "^1.0.0" } }, + "node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, "node-source-walk": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-4.2.0.tgz", @@ -5317,21 +5237,31 @@ "dev": true }, "normalize-package-data": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.0.tgz", - "integrity": "sha512-6lUjEI0d3v6kFrtgA/lOx4zHCWULXsFNIjHolnZCKCTLA6m/G625cdn3O7eNmT0iD3jfo6HZ9cdImGZwf21prw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", + "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", "dev": true, "requires": { - "hosted-git-info": "^3.0.6", - "resolve": "^1.17.0", - "semver": "^7.3.2", + "hosted-git-info": "^4.0.1", + "resolve": "^1.20.0", + "semver": "^7.3.4", "validate-npm-package-license": "^3.0.1" }, "dependencies": { + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -5345,6 +5275,12 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true + }, "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", @@ -5404,16 +5340,6 @@ "yargs": "^15.0.2" }, "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -5425,21 +5351,6 @@ "wrap-ansi": "^6.2.0" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -5459,24 +5370,6 @@ "p-locate": "^4.1.0" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, "p-locate": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", @@ -5486,27 +5379,18 @@ "p-limit": "^2.2.0" } }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -5562,9 +5446,9 @@ "dev": true }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, "object-keys": { @@ -5586,14 +5470,14 @@ } }, "object.getownpropertydescriptors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz", - "integrity": "sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" + "es-abstract": "^1.18.0-next.2" } }, "once": { @@ -5641,94 +5525,34 @@ } }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "ora": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-4.1.1.tgz", - "integrity": "sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.0.tgz", + "integrity": "sha512-1StwyXQGoU6gdjYkyVcqOLnVlbKj+6yPNNOxJVgpt9t4eksKjiriiHuxktLYkgllwk+D6MbC4ihH84L1udRXPg==", "dev": true, "requires": { - "chalk": "^3.0.0", + "bl": "^4.1.0", + "chalk": "^4.1.0", "cli-cursor": "^3.1.0", - "cli-spinners": "^2.2.0", + "cli-spinners": "^2.5.0", "is-interactive": "^1.0.0", - "log-symbols": "^3.0.0", - "mute-stream": "0.0.8", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "os-homedir": { @@ -5737,6 +5561,12 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -5782,6 +5612,26 @@ "release-zalgo": "^1.0.0" } }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5816,9 +5666,9 @@ "dev": true }, "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, "path-is-absolute": { @@ -5857,28 +5707,15 @@ } }, "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true }, "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, "performance-now": { @@ -5894,9 +5731,9 @@ "dev": true }, "pify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", - "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, "pinkie": { @@ -5942,15 +5779,6 @@ "p-locate": "^4.1.0" } }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, "p-locate": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", @@ -5959,9 +5787,24 @@ "requires": { "p-limit": "^2.2.0" } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true } } }, + "plur": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", + "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", + "dev": true, + "requires": { + "irregular-plurals": "^3.2.0" + } + }, "pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -5969,53 +5812,20 @@ "dev": true }, "postcss": { - "version": "7.0.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", - "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", + "version": "8.2.8", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.8.tgz", + "integrity": "sha512-1F0Xb2T21xET7oQV9eKuctbM9S7BC0fetoHCc4H13z0PT6haiRLP4T0ZY4XWh7iLP0usgqykT6p9B2RtOf4FPw==", "dev": true, "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "colorette": "^1.2.2", + "nanoid": "^3.1.20", + "source-map": "^0.6.1" } }, "postcss-values-parser": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-1.5.0.tgz", - "integrity": "sha512-3M3p+2gMp0AH3da530TlX8kiO1nxdTnc3C6vr8dMxRLIlh8UYkz0/wcwptSXjhtx2Fr0TySI7a+BHDQ8NL7LaQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz", + "integrity": "sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg==", "dev": true, "requires": { "flatten": "^1.0.2", @@ -6045,39 +5855,76 @@ "tar-fs": "^1.13.0", "tunnel-agent": "^0.6.0", "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + } } }, "precinct": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/precinct/-/precinct-6.3.1.tgz", - "integrity": "sha512-JAwyLCgTylWminoD7V0VJwMElWmwrVSR6r9HaPWCoswkB4iFzX7aNtO7VBfAVPy+NhmjKb8IF8UmlWJXzUkOIQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/precinct/-/precinct-7.1.0.tgz", + "integrity": "sha512-I1RkW5PX51/q6Xl39//D7x9NgaKNGHpR5DCNaoxP/b2+KbzzXDNhauJUMV17KSYkJA41CSpwYUPRtRoNxbshWA==", "dev": true, "requires": { "commander": "^2.20.3", - "debug": "^4.1.1", - "detective-amd": "^3.0.0", + "debug": "^4.3.1", + "detective-amd": "^3.0.1", "detective-cjs": "^3.1.1", - "detective-es6": "^2.1.0", + "detective-es6": "^2.2.0", "detective-less": "^1.0.2", - "detective-postcss": "^3.0.1", + "detective-postcss": "^4.0.0", "detective-sass": "^3.0.1", "detective-scss": "^2.0.1", "detective-stylus": "^1.0.0", - "detective-typescript": "^5.8.0", - "module-definition": "^3.3.0", + "detective-typescript": "^6.0.0", + "module-definition": "^3.3.1", "node-source-walk": "^4.2.0" + }, + "dependencies": { + "detective-typescript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-6.0.0.tgz", + "integrity": "sha512-vTidcSDK3QostdbrH2Rwf9FhvrgJ4oIaVw5jbolgruTejexk6nNa9DShGpuS8CFVDb1IP86jct5BaZt1wSxpkA==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "^4.8.2", + "ast-module-types": "^2.7.1", + "node-source-walk": "^4.2.0", + "typescript": "^3.9.7" + } + }, + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true + } } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, "prettier": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz", - "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true }, "prettier-linter-helpers": { @@ -6090,9 +5937,9 @@ } }, "pretty-ms": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.0.tgz", - "integrity": "sha512-J3aPWiC5e9ZeZFuSeBraGxSkGMOvulSWsxDByOcbD1Pr75YL3LSNIKIb52WXbCLE1sS5s4inBBbryjF4Y05Ceg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", + "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", "dev": true, "requires": { "parse-ms": "^2.1.0" @@ -6147,6 +5994,15 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -6160,9 +6016,9 @@ "dev": true }, "queue-microtask": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", - "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "quick-lru": { @@ -6317,36 +6173,18 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true } } }, "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } }, "readdirp": { @@ -6389,6 +6227,24 @@ "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", "dev": true }, + "registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, "release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", @@ -6460,13 +6316,12 @@ "dev": true }, "requirejs-config-file": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/requirejs-config-file/-/requirejs-config-file-3.1.2.tgz", - "integrity": "sha512-sdLWywcDuNz7EIOhenSbRfT4YF84nItDv90coN2htbokjmU2QeyQuSBZILQUKNksepl8UPVU+hgYySFaDxbJPQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/requirejs-config-file/-/requirejs-config-file-4.0.0.tgz", + "integrity": "sha512-jnIre8cbWOyvr8a5F2KuqBnY+SDA4NXr/hzEZJG79Mxm2WiFQz2dzhC8ibtPJS7zkmBEl1mxSwp5HhC1W4qpxw==", "dev": true, "requires": { "esprima": "^4.0.0", - "make-dir": "^2.1.0", "stringify-object": "^3.2.1" } }, @@ -6500,6 +6355,15 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -6582,6 +6446,23 @@ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -6615,9 +6496,9 @@ } }, "shiki": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.2.tgz", - "integrity": "sha512-BjUCxVbxMnvjs8jC4b+BQ808vwjJ9Q8NtLqPwXShZ307HdXiDFYP968ORSVfaTNNSWYDBYdMnVKJ0fYNsoZUBA==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.3.tgz", + "integrity": "sha512-NEjg1mVbAUrzRv2eIcUt3TG7X9svX7l3n3F5/3OdFq+/BxUdmBOeKGiH4icZJBLHy354Shnj6sfBTemea2e7XA==", "dev": true, "requires": { "onigasm": "^2.2.5", @@ -6662,18 +6543,27 @@ "type-detect": "^4.0.5" }, "dependencies": { - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, "sinon-chai": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.5.0.tgz", - "integrity": "sha512-IifbusYiQBpUxxFJkR3wTU68xzBN0+bxCScEaKMjBvAQERg6FnTTc1F17rseLb1tjmkJ23730AXpFI0c47FgAg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.6.0.tgz", + "integrity": "sha512-bk2h+0xyKnmvazAnc7HE5esttqmCerSMcBtuB2PS2T4tG6x8woXAxZeJaOJWD+8reXHngnXn0RtIbfEW9OTHFg==", "dev": true }, "slash": { @@ -6691,38 +6581,12 @@ "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } } }, "snappy": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/snappy/-/snappy-6.3.4.tgz", - "integrity": "sha512-DcpD17vdvHk0jUIZ3wkhoxyLiMjM7ZuOc3M5h2qpiZdTLbRorUJdOtB166m+lkoffByg2dkX0CGffYP2PTLoGw==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/snappy/-/snappy-6.3.5.tgz", + "integrity": "sha512-lonrUtdp1b1uDn1dbwgQbBsb5BbaiLeKq+AGwOk2No+en+VvJThwmtztwulEQsLinRF681pBqib0NUZaizKLIA==", "dev": true, "requires": { "bindings": "^1.3.1", @@ -6767,32 +6631,6 @@ "rimraf": "^3.0.0", "signal-exit": "^3.0.2", "which": "^2.0.1" - }, - "dependencies": { - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } } }, "spdx-correct": { @@ -6822,9 +6660,9 @@ } }, "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", "dev": true }, "split": { @@ -6837,24 +6675,12 @@ } }, "split2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", "dev": true, "requires": { - "through2": "^2.0.2" - }, - "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } + "readable-stream": "^3.0.0" } }, "sprintf-js": { @@ -6881,28 +6707,37 @@ } }, "standard-version": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-8.0.2.tgz", - "integrity": "sha512-L8X9KFq2SmVmaeZgUmWHFJMOsEWpjgFAwqic6yIIoveM1kdw1vH4Io03WWxUDjypjGqGU6qUtcJoR8UvOv5w3g==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-9.1.1.tgz", + "integrity": "sha512-PF9JnRauBwH7DAkmefYu1mB2Kx0MVG13udqDTFmDUiogbyikBAHBdMrVuauxtAb2YIkyZ3FMYCNv0hqUKMOPww==", "dev": true, "requires": { "chalk": "^2.4.2", - "conventional-changelog": "3.1.21", + "conventional-changelog": "3.1.24", "conventional-changelog-config-spec": "2.1.0", - "conventional-changelog-conventionalcommits": "4.3.0", - "conventional-recommended-bump": "6.0.9", + "conventional-changelog-conventionalcommits": "4.5.0", + "conventional-recommended-bump": "6.1.0", "detect-indent": "^6.0.0", "detect-newline": "^3.1.0", "dotgitignore": "^2.1.0", "figures": "^3.1.0", - "find-up": "^4.1.0", + "find-up": "^5.0.0", "fs-access": "^1.0.1", "git-semver-tags": "^4.0.0", "semver": "^7.1.1", "stringify-package": "^1.0.1", - "yargs": "^15.3.1" + "yargs": "^16.0.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -6915,81 +6750,102 @@ } }, "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "wrap-ansi": "^7.0.0" } }, "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { - "color-name": "~1.1.4" + "color-name": "1.1.3" } }, "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { - "locate-path": "^5.0.0", + "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { - "p-locate": "^4.1.0" + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" } }, "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { - "p-limit": "^2.2.0" + "p-limit": "^3.0.2" } }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "has-flag": "^3.0.0" } }, "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -7005,37 +6861,50 @@ "requires": { "color-convert": "^2.0.1" } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true } } }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true + }, "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" } }, "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "dev": true } } }, @@ -7046,62 +6915,43 @@ "dev": true }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } } }, "string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", "dev": true, "requires": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3" } }, "string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", "dev": true, "requires": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3" } }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "safe-buffer": "~5.2.0" } }, "stringify-object": { @@ -7122,20 +6972,12 @@ "dev": true }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - } + "ansi-regex": "^5.0.0" } }, "strip-bom": { @@ -7170,12 +7012,22 @@ } }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-hyperlinks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz", + "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" } }, "table": { @@ -7191,9 +7043,9 @@ }, "dependencies": { "ajv": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.0.tgz", - "integrity": "sha512-svS9uILze/cXbH0z2myCK2Brqprx/+JJYK5pHicT/GQiBfzzhUVAIT6MwqJg8y4xV/zoGsUeuPuwtoiKSGE15g==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz", + "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -7217,9 +7069,9 @@ "dev": true }, "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", "dev": true }, "tar-fs": { @@ -7234,6 +7086,15 @@ "tar-stream": "^1.1.2" }, "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "pump": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", @@ -7262,14 +7123,54 @@ }, "dependencies": { "bl": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", "dev": true, "requires": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } } } }, @@ -7279,6 +7180,12 @@ "integrity": "sha1-ZxrWPVe+D+nXKUZks/xABjZnimA=", "dev": true }, + "term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true + }, "test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -7336,6 +7243,12 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7355,12 +7268,6 @@ "punycode": "^2.1.1" } }, - "traverse-chain": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz", - "integrity": "sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE=", - "dev": true - }, "trim-newlines": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz", @@ -7385,18 +7292,168 @@ "make-error": "^1.1.1", "source-map-support": "^0.5.17", "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } + } + }, + "tsd": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.14.0.tgz", + "integrity": "sha512-fl1gS5orAwqIb0P2xMdppgCrwv1BfCJn67wBzRBCV9OUaWHVXHqiIqL6yX/519xFgT1ZOaLMhr5W9XDo8kuuRA==", + "dev": true, + "requires": { + "eslint-formatter-pretty": "^4.0.0", + "globby": "^11.0.1", + "meow": "^7.0.1", + "path-exists": "^4.0.0", + "read-pkg-up": "^7.0.0", + "update-notifier": "^4.1.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "meow": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-7.1.1.tgz", + "integrity": "sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA==", + "dev": true, + "requires": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^2.5.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.13.1", + "yargs-parser": "^18.1.3" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "dev": true + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } } }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "tsutils": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", - "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "requires": { "tslib": "^1.8.1" @@ -7418,12 +7475,12 @@ "dev": true }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { @@ -7454,22 +7511,22 @@ } }, "typedoc": { - "version": "0.20.25", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.25.tgz", - "integrity": "sha512-ZQZnjJPrt0rjp216gp6FQC1QC4ojcoKikhfOJ/51CqaJunVDilRLlIO5tCGWj1tzlYYT9eOGhJv7MF3t7rxSmw==", + "version": "0.20.34", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.34.tgz", + "integrity": "sha512-es+N/KyGPcHl9cAuYh1Z5m7HzwcmfNLghkmb2pzGz7HRDS5GS2uA3hu/c2cv4gCxDsw8pPUPCOvww+Hzf48Kug==", "dev": true, "requires": { "colors": "^1.4.0", "fs-extra": "^9.1.0", - "handlebars": "^4.7.6", - "lodash": "^4.17.20", + "handlebars": "^4.7.7", + "lodash": "^4.17.21", "lunr": "^2.3.9", - "marked": "^2.0.0", + "marked": "^2.0.1", "minimatch": "^3.0.0", "progress": "^2.0.3", "shelljs": "^0.8.4", - "shiki": "^0.9.2", - "typedoc-default-themes": "^0.12.7" + "shiki": "^0.9.3", + "typedoc-default-themes": "^0.12.9" }, "dependencies": { "colors": { @@ -7501,9 +7558,9 @@ } }, "marked": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.0.tgz", - "integrity": "sha512-NqRSh2+LlN2NInpqTQnS614Y/3NkVMFFU6sJlRFEpxJ/LHuK/qJECH7/fXZjk4VZstPW/Pevjil/VtSONsLc7Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.1.tgz", + "integrity": "sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw==", "dev": true }, "universalify": { @@ -7515,15 +7572,15 @@ } }, "typedoc-default-themes": { - "version": "0.12.7", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.7.tgz", - "integrity": "sha512-0XAuGEqID+gon1+fhi4LycOEFM+5Mvm2PjwaiVZNAzU7pn3G2DEpsoXnFOPlLDnHY6ZW0BY0nO7ur9fHOFkBLQ==", + "version": "0.12.9", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.9.tgz", + "integrity": "sha512-Jd5fYTiqzinZdoIY382W7tQXTwAzWRdg8KbHfaxmb78m1/3jL9riXtk23oBOKwhi8GFVykCOdPzEJKY87/D0LQ==", "dev": true }, "typescript": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz", - "integrity": "sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", + "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", "dev": true }, "typescript-cached-transpile": { @@ -7538,9 +7595,9 @@ }, "dependencies": { "@types/node": { - "version": "12.12.54", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.54.tgz", - "integrity": "sha512-ge4xZ3vSBornVYlDnk7yZ0gK6ChHf/CHB7Gl1I0Jhah8DDnEQqBzgohYG4FX4p81TNirSETOiSyn+y1r9/IR6w==", + "version": "12.20.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.6.tgz", + "integrity": "sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA==", "dev": true }, "fs-extra": { @@ -7563,12 +7620,24 @@ "dev": true }, "uglify-js": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.2.tgz", - "integrity": "sha512-GXCYNwqoo0MbLARghYjxVBxDCnU0tLqN7IPLdHHbibCb1NI5zBkU2EPcy/GaVxc0BtTjqyGXJCINe6JMR2Dpow==", + "version": "3.13.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.2.tgz", + "integrity": "sha512-SbMu4D2Vo95LMC/MetNaso1194M1htEA+JrqE9Hk+G2DhI+itfS9TRu9ZKeCahLDNa/J3n4MqUJ/fOHMzQpRWw==", "dev": true, "optional": true }, + "unbox-primitive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz", + "integrity": "sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.0", + "has-symbols": "^1.0.0", + "which-boxed-primitive": "^1.0.1" + } + }, "underscore": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", @@ -7581,21 +7650,78 @@ "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", "dev": true }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "requires": { + "crypto-random-string": "^2.0.0" + } + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "update-notifier": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", + "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", + "dev": true, + "requires": { + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + } + } + }, "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" } }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -7609,9 +7735,9 @@ "dev": true }, "v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, "validate-npm-package-license": { @@ -7642,9 +7768,9 @@ } }, "vscode-textmate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", - "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.3.1.tgz", + "integrity": "sha512-X4E7iPJzmMsL9AY4MyZrxUt0Dm/kGWreJEGdQgAHXHQrRGDdlwAu9X1LCsQ0VKUCg5wjwSS1LPpy1BOfxIw4Tw==", "dev": true }, "walkdir": { @@ -7663,14 +7789,27 @@ } }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", @@ -7725,6 +7864,15 @@ } } }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -7757,6 +7905,36 @@ "strip-ansi": "^5.0.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -7779,6 +7957,15 @@ "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^5.1.0" } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } } } }, @@ -7801,9 +7988,15 @@ } }, "wtfnode": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/wtfnode/-/wtfnode-0.8.2.tgz", - "integrity": "sha512-x9R+x7wX8uZUnP2i5VjyEkOc410zXHY5gp+Ipsc13MFjqEobis+VSO3GDbiUdbtmc+TVyy7ZeUthSv0tLLWV/A==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/wtfnode/-/wtfnode-0.8.4.tgz", + "integrity": "sha512-64GEKtMt/MUBuAm+8kHqP74ojjafzu00aT0JKsmkIwYmjRQ/odO0yhbzKLm+Z9v1gMla+8dwITRKzTAlHsB+Og==", + "dev": true + }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, "xml2js": { @@ -7835,9 +8028,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yallist": { @@ -7865,61 +8058,24 @@ "yargs-parser": "^15.0.1" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -7931,6 +8087,15 @@ "strip-ansi": "^5.1.0" } }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, "yargs-parser": { "version": "15.0.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", @@ -7964,6 +8129,12 @@ "yargs": "^13.3.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -7987,6 +8158,15 @@ "strip-ansi": "^5.1.0" } }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, "yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", @@ -8013,6 +8193,12 @@ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + }, "z-schema": { "version": "3.18.4", "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-3.18.4.tgz", diff --git a/package.json b/package.json index d5b714256a3..ea555b230b1 100644 --- a/package.json +++ b/package.json @@ -26,12 +26,12 @@ "bson-ext": "^2.0.0" }, "dependencies": { - "bson": "^4.2.2", + "bson": "^4.2.3", "denque": "^1.4.1" }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.1", - "@microsoft/api-extractor": "^7.13.1", + "@microsoft/api-extractor": "^7.13.2", "@microsoft/tsdoc-config": "^0.14.0", "@types/aws4": "^1.5.1", "@types/bl": "^2.1.0", @@ -39,11 +39,11 @@ "@types/chai-subset": "^1.3.3", "@types/kerberos": "^1.1.0", "@types/mocha": "^8.2.0", - "@types/node": "^14.14.31", + "@types/node": "^14.14.36", "@types/saslprep": "^1.0.0", "@types/semver": "^7.3.4", - "@typescript-eslint/eslint-plugin": "^4.15.1", - "@typescript-eslint/parser": "^4.15.1", + "@typescript-eslint/eslint-plugin": "^4.19.0", + "@typescript-eslint/parser": "^4.19.0", "chai": "^4.2.0", "chai-subset": "^1.6.0", "chalk": "^4.1.0", @@ -57,7 +57,7 @@ "js-yaml": "^3.14.0", "jsdoc": "^3.6.4", "lodash.camelcase": "^4.3.0", - "madge": "^3.9.0", + "madge": "^4.0.2", "mocha": "^7.1.1", "mocha-sinon": "^2.1.0", "mongodb-mock-server": "^2.0.1", @@ -69,11 +69,12 @@ "sinon-chai": "^3.2.0", "snappy": "^6.3.0", "source-map-support": "^0.5.19", - "standard-version": "^8.0.2", + "standard-version": "^9.1.1", "through2": "^3.0.1", "ts-node": "^9.1.1", - "typedoc": "^0.20.25", - "typescript": "^4.1.5", + "tsd": "^0.14.0", + "typedoc": "^0.20.34", + "typescript": "^4.2.3", "typescript-cached-transpile": "^0.0.6", "worker-farm": "^1.5.0", "wtfnode": "^0.8.2", @@ -87,6 +88,10 @@ "bugs": { "url": "https://github.com/mongodb/node-mongodb-native/issues" }, + "homepage": "https://github.com/mongodb/node-mongodb-native", + "optionalDependencies": { + "saslprep": "^1.0.0" + }, "scripts": { "build:evergreen": "node .evergreen/generate_evergreen_tasks.js", "build:ts": "rimraf lib && tsc", @@ -109,8 +114,7 @@ "release": "standard-version -i HISTORY.md", "test": "npm run check:lint && npm run check:test" }, - "homepage": "https://github.com/mongodb/node-mongodb-native", - "optionalDependencies": { - "saslprep": "^1.0.0" + "tsd": { + "directory": "test/unit/types" } } diff --git a/src/bson.ts b/src/bson.ts index 03266cbfaeb..1d0ce701ab0 100644 --- a/src/bson.ts +++ b/src/bson.ts @@ -1,4 +1,3 @@ -import type { OperationParent } from './operations/command'; // import type * as _BSON from 'bson'; // let BSON: typeof _BSON = require('bson'); // try { @@ -86,7 +85,7 @@ export function pluckBSONSerializeOptions(options: BSONSerializeOptions): BSONSe */ export function resolveBSONOptions( options?: BSONSerializeOptions, - parent?: OperationParent + parent?: { bsonOptions?: BSONSerializeOptions } ): BSONSerializeOptions { const parentOptions = parent?.bsonOptions; return { diff --git a/src/bulk/common.ts b/src/bulk/common.ts index 4afcecf20c2..bff50cc31bc 100644 --- a/src/bulk/common.ts +++ b/src/bulk/common.ts @@ -19,6 +19,7 @@ import type { Collection } from '../collection'; import type { Topology } from '../sdam/topology'; import type { CommandOperationOptions, CollationOptions } from '../operations/command'; import type { Hint } from '../operations/operation'; +import type { Query } from '../mongo_types'; /** @public */ export const BatchType = { @@ -31,15 +32,15 @@ export const BatchType = { export type BatchTypeId = typeof BatchType[keyof typeof BatchType]; /** @public */ -export interface InsertOneModel { +export interface InsertOneModel { /** The document to insert. */ - document: Document; + document: TSchema; } /** @public */ -export interface DeleteOneModel { +export interface DeleteOneModel { /** The filter to limit the deleted documents. */ - filter: Document; + filter: Query; /** Specifies a collation. */ collation?: CollationOptions; /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ @@ -47,9 +48,9 @@ export interface DeleteOneModel { } /** @public */ -export interface DeleteManyModel { +export interface DeleteManyModel { /** The filter to limit the deleted documents. */ - filter: Document; + filter: Query; /** Specifies a collation. */ collation?: CollationOptions; /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ @@ -57,11 +58,11 @@ export interface DeleteManyModel { } /** @public */ -export interface ReplaceOneModel { +export interface ReplaceOneModel { /** The filter to limit the replaced document. */ - filter: Document; + filter: Query; /** The document with which to replace the matched document. */ - replacement: Document; + replacement: TSchema; /** Specifies a collation. */ collation?: CollationOptions; /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ @@ -103,13 +104,13 @@ export interface UpdateManyModel { } /** @public */ -export type AnyBulkWriteOperation = - | { insertOne: InsertOneModel } - | { replaceOne: ReplaceOneModel } +export type AnyBulkWriteOperation = + | { insertOne: InsertOneModel } + | { replaceOne: ReplaceOneModel } | { updateOne: UpdateOneModel } | { updateMany: UpdateManyModel } - | { deleteOne: DeleteOneModel } - | { deleteMany: DeleteManyModel }; + | { deleteOne: DeleteOneModel } + | { deleteMany: DeleteManyModel }; /** @public */ export interface BulkResult { diff --git a/src/change_stream.ts b/src/change_stream.ts index ae3ec6ff570..18424f35c66 100644 --- a/src/change_stream.ts +++ b/src/change_stream.ts @@ -27,6 +27,7 @@ import { } from './cursor/abstract_cursor'; import type { ClientSession } from './sessions'; import { executeOperation, ExecutionResult } from './operations/execute_operation'; +import type { InferIdType, Nullable } from './mongo_types'; const kResumeQueue = Symbol('resumeQueue'); const kCursorStream = Symbol('cursorStream'); @@ -96,7 +97,8 @@ export interface ChangeStreamOptions extends AggregateOptions { batchSize?: number; } -interface ChangeStreamDocument { +/** @public */ +export interface ChangeStreamDocument { /** * The id functions as an opaque token for use when resuming an interrupted * change stream. @@ -131,7 +133,7 @@ interface ChangeStreamDocument { * this will contain all the components of the shard key in order, * followed by the _id if the _id isn’t part of the shard key. */ - documentKey?: Document; + documentKey?: InferIdType; /** * Only present for ops of type ‘update’. @@ -154,10 +156,11 @@ interface ChangeStreamDocument { * version of the document from some point after the update occurred. If the * document was deleted since the updated happened, it will be null. */ - fullDocument?: Document; + fullDocument?: TSchema; } -interface UpdateDescription { +/** @public */ +export interface UpdateDescription { /** * A document containing key:value pairs of names of the fields that were * changed, and the new value for those fields. @@ -174,14 +177,14 @@ interface UpdateDescription { * Creates a new Change Stream instance. Normally created using {@link Collection#watch|Collection.watch()}. * @public */ -export class ChangeStream extends EventEmitter { +export class ChangeStream extends EventEmitter { pipeline: Document[]; options: ChangeStreamOptions; parent: MongoClient | Db | Collection; namespace: MongoDBNamespace; type: symbol; /** @internal */ - cursor?: ChangeStreamCursor; + cursor?: ChangeStreamCursor; streamOptions?: CursorStreamOptions; /** @internal */ [kResumeQueue]: Denque; @@ -285,7 +288,11 @@ export class ChangeStream extends EventEmitter { } /** Get the next available document from the Change Stream. */ - next(callback?: Callback): Promise | void { + next(): Promise>; + next(callback: Callback>): void; + next( + callback?: Callback> + ): Promise> | void { return maybePromise(callback, cb => { getCursor(this, (err, cursor) => { if (err || !cursor) return cb(err); // failed to resume, raise an error @@ -295,7 +302,7 @@ export class ChangeStream extends EventEmitter { processError(this, error, cb); return; } - processNewChange(this, change as ChangeStreamDocument, cb); + processNewChange(this, change, cb); }); }); }); @@ -357,7 +364,9 @@ export interface ChangeStreamCursorOptions extends AbstractCursorOptions { } /** @internal */ -export class ChangeStreamCursor extends AbstractCursor { +export class ChangeStreamCursor extends AbstractCursor< + ChangeStreamDocument +> { _resumeToken: ResumeToken; startAtOperationTime?: OperationTime; hasReceived?: boolean; @@ -442,7 +451,7 @@ export class ChangeStreamCursor extends AbstractCursor { } } - clone(): ChangeStreamCursor { + clone(): AbstractCursor> { return new ChangeStreamCursor(this.topology, this.namespace, this.pipeline, { ...this.cursorOptions }); @@ -503,10 +512,10 @@ export class ChangeStreamCursor extends AbstractCursor { * Create a new change stream cursor based on self's configuration * @internal */ -function createChangeStreamCursor( - changeStream: ChangeStream, +function createChangeStreamCursor( + changeStream: ChangeStream, options: ChangeStreamOptions -): ChangeStreamCursor { +): ChangeStreamCursor { const changeStreamStageOptions: Document = { fullDocument: options.fullDocument || 'default' }; applyKnownOptions(changeStreamStageOptions, options, CHANGE_STREAM_OPTIONS); if (changeStream.type === CHANGE_DOMAIN_TYPES.CLUSTER) { @@ -518,7 +527,7 @@ function createChangeStreamCursor( ); const cursorOptions = applyKnownOptions({}, options, CURSOR_OPTIONS); - const changeStreamCursor = new ChangeStreamCursor( + const changeStreamCursor = new ChangeStreamCursor( getTopology(changeStream.parent), changeStream.namespace, pipeline, @@ -575,7 +584,11 @@ function waitForTopologyConnected( }, 500); // this is an arbitrary wait time to allow SDAM to transition } -function closeWithError(changeStream: ChangeStream, error: AnyError, callback?: Callback): void { +function closeWithError( + changeStream: ChangeStream, + error: AnyError, + callback?: Callback +): void { if (!callback) { changeStream.emit(ChangeStream.ERROR, error); } @@ -583,14 +596,17 @@ function closeWithError(changeStream: ChangeStream, error: AnyError, callback?: changeStream.close(() => callback && callback(error)); } -function streamEvents(changeStream: ChangeStream, cursor: ChangeStreamCursor): void { +function streamEvents( + changeStream: ChangeStream, + cursor: ChangeStreamCursor +): void { const stream = changeStream[kCursorStream] || cursor.stream(); changeStream[kCursorStream] = stream; stream.on('data', change => processNewChange(changeStream, change)); stream.on('error', error => processError(changeStream, error)); } -function endStream(changeStream: ChangeStream): void { +function endStream(changeStream: ChangeStream): void { const cursorStream = changeStream[kCursorStream]; if (cursorStream) { ['data', 'close', 'end', 'error'].forEach(event => cursorStream.removeAllListeners(event)); @@ -600,10 +616,10 @@ function endStream(changeStream: ChangeStream): void { changeStream[kCursorStream] = undefined; } -function processNewChange( - changeStream: ChangeStream, - change: ChangeStreamDocument, - callback?: Callback +function processNewChange( + changeStream: ChangeStream, + change: Nullable>, + callback?: Callback> ) { if (changeStream[kClosed]) { if (callback) callback(CHANGESTREAM_CLOSED_ERROR); @@ -631,7 +647,7 @@ function processNewChange( return callback(undefined, change); } -function processError(changeStream: ChangeStream, error: AnyError, callback?: Callback) { +function processError(changeStream: ChangeStream, error: AnyError, callback?: Callback) { const cursor = changeStream.cursor; // If the change stream has been closed explicitly, do not process error. @@ -694,7 +710,10 @@ function processError(changeStream: ChangeStream, error: AnyError, callback?: Ca * * @param changeStream - the parent ChangeStream */ -function getCursor(changeStream: ChangeStream, callback: Callback) { +function getCursor( + changeStream: ChangeStream, + callback: Callback> +) { if (changeStream[kClosed]) { callback(CHANGESTREAM_CLOSED_ERROR); return; @@ -716,7 +735,7 @@ function getCursor(changeStream: ChangeStream, callback: Callback(changeStream: ChangeStream, err?: Error) { while (changeStream[kResumeQueue].length) { const request = changeStream[kResumeQueue].pop(); if (!err) { diff --git a/src/collection.ts b/src/collection.ts index 8b1f172d2c1..1c0e8fcd5ad 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -89,6 +89,14 @@ import type { PkFactory } from './mongo_client'; import type { Logger, LoggerOptions } from './logger'; import { FindCursor } from './cursor/find_cursor'; import type { CountOptions } from './operations/count'; +import type { Query, TODO_NODE_2648, UpdateQuery, WithId, OptionalId } from './mongo_types'; + +/** @public */ +export interface ModifyResult { + value?: TSchema; + lastErrorObject?: Document; + ok: 0 | 1; +} /** @public */ export interface CollectionOptions @@ -146,7 +154,7 @@ export interface CollectionPrivate { * }); * ``` */ -export class Collection { +export class Collection { /** @internal */ s: CollectionPrivate; @@ -249,15 +257,19 @@ export class Collection { * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - insertOne(doc: Document): Promise; - insertOne(doc: Document, callback: Callback): void; - insertOne(doc: Document, options: InsertOneOptions): Promise; - insertOne(doc: Document, options: InsertOneOptions, callback: Callback): void; + insertOne(doc: OptionalId): Promise>; + insertOne(doc: OptionalId, callback: Callback>): void; + insertOne(doc: OptionalId, options: InsertOneOptions): Promise>; insertOne( - doc: Document, - options?: InsertOneOptions | Callback, - callback?: Callback - ): Promise | void { + doc: OptionalId, + options: InsertOneOptions, + callback: Callback> + ): void; + insertOne( + doc: OptionalId, + options?: InsertOneOptions | Callback>, + callback?: Callback> + ): Promise> | void { if (typeof options === 'function') { callback = options; options = {}; @@ -271,7 +283,7 @@ export class Collection { return executeOperation( getTopology(this), - new InsertOneOperation(this, doc, resolveOptions(this, options)), + new InsertOneOperation(this, doc, resolveOptions(this, options)) as TODO_NODE_2648, callback ); } @@ -285,25 +297,25 @@ export class Collection { * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - insertMany(docs: Document[]): Promise; - insertMany(docs: Document[], callback: Callback): void; - insertMany(docs: Document[], options: BulkWriteOptions): Promise; + insertMany(docs: TSchema[]): Promise>; + insertMany(docs: TSchema[], callback: Callback>): void; + insertMany(docs: TSchema[], options: BulkWriteOptions): Promise>; insertMany( - docs: Document[], + docs: TSchema[], options: BulkWriteOptions, - callback: Callback + callback: Callback> ): void; insertMany( - docs: Document[], - options?: BulkWriteOptions | Callback, - callback?: Callback - ): Promise | void { + docs: TSchema[], + options?: BulkWriteOptions | Callback>, + callback?: Callback> + ): Promise> | void { if (typeof options === 'function') (callback = options), (options = {}); options = options ? Object.assign({}, options) : { ordered: true }; return executeOperation( getTopology(this), - new InsertManyOperation(this, docs, resolveOptions(this, options)), + new InsertManyOperation(this, docs, resolveOptions(this, options)) as any, callback ); } @@ -339,19 +351,22 @@ export class Collection { * @param callback - An optional callback, a Promise will be returned if none is provided * @throws MongoError if operations is not an array */ - bulkWrite(operations: AnyBulkWriteOperation[]): Promise; - bulkWrite(operations: AnyBulkWriteOperation[], callback: Callback): void; + bulkWrite(operations: AnyBulkWriteOperation[]): Promise; bulkWrite( - operations: AnyBulkWriteOperation[], + operations: AnyBulkWriteOperation[], + callback: Callback + ): void; + bulkWrite( + operations: AnyBulkWriteOperation[], options: BulkWriteOptions ): Promise; bulkWrite( - operations: AnyBulkWriteOperation[], + operations: AnyBulkWriteOperation[], options: BulkWriteOptions, callback: Callback ): void; bulkWrite( - operations: AnyBulkWriteOperation[], + operations: AnyBulkWriteOperation[], options?: BulkWriteOptions | Callback, callback?: Callback ): Promise | void { @@ -372,27 +387,34 @@ export class Collection { /** * Update a single document in a collection * - * @param filter - The Filter used to select the document to update + * @param query - The query used to select the document to update * @param update - The update operations to be applied to the document * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - updateOne(filter: Document, update: Document): Promise; - updateOne(filter: Document, update: Document, callback: Callback): void; updateOne( - filter: Document, - update: Document, + query: Query, + update: UpdateQuery | Partial + ): Promise; + updateOne( + query: Query, + update: UpdateQuery | Partial, + callback: Callback + ): void; + updateOne( + query: Query, + update: UpdateQuery | Partial, options: UpdateOptions ): Promise; updateOne( - filter: Document, - update: Document, + query: Query, + update: UpdateQuery | Partial, options: UpdateOptions, callback: Callback ): void; updateOne( - filter: Document, - update: Document, + query: Query, + update: UpdateQuery | Partial, options?: UpdateOptions | Callback, callback?: Callback ): Promise | void { @@ -400,7 +422,7 @@ export class Collection { return executeOperation( getTopology(this), - new UpdateOneOperation(this, filter, update, resolveOptions(this, options)), + new UpdateOneOperation(this, query, update, resolveOptions(this, options)), callback ); } @@ -408,31 +430,31 @@ export class Collection { /** * Replace a document in a collection with another document * - * @param filter - The Filter used to select the document to replace + * @param query - The query used to select the document to replace * @param replacement - The Document that replaces the matching document * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - replaceOne(filter: Document, replacement: Document): Promise; + replaceOne(query: Query, replacement: TSchema): Promise; replaceOne( - filter: Document, - replacement: Document, + query: Query, + replacement: TSchema, callback: Callback ): void; replaceOne( - filter: Document, - replacement: Document, + query: Query, + replacement: TSchema, options: ReplaceOptions ): Promise; replaceOne( - filter: Document, - replacement: Document, + query: Query, + replacement: TSchema, options: ReplaceOptions, callback: Callback ): void; replaceOne( - filter: Document, - replacement: Document, + query: Query, + replacement: TSchema, options?: ReplaceOptions | Callback, callback?: Callback ): Promise | void { @@ -440,7 +462,7 @@ export class Collection { return executeOperation( getTopology(this), - new ReplaceOneOperation(this, filter, replacement, resolveOptions(this, options)), + new ReplaceOneOperation(this, query, replacement, resolveOptions(this, options)), callback ); } @@ -448,27 +470,31 @@ export class Collection { /** * Update multiple documents in a collection * - * @param filter - The Filter used to select the documents to update + * @param query - The query used to select the documents to update * @param update - The update operations to be applied to the documents * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - updateMany(filter: Document, update: Document): Promise; - updateMany(filter: Document, update: Document, callback: Callback): void; + updateMany(query: Query, update: UpdateQuery): Promise; + updateMany( + query: Query, + update: UpdateQuery, + callback: Callback + ): void; updateMany( - filter: Document, - update: Document, + query: Query, + update: UpdateQuery, options: UpdateOptions ): Promise; updateMany( - filter: Document, - update: Document, + query: Query, + update: UpdateQuery, options: UpdateOptions, callback: Callback ): void; updateMany( - filter: Document, - update: Document, + query: Query, + update: UpdateQuery, options?: UpdateOptions | Callback, callback?: Callback ): Promise | void { @@ -476,7 +502,7 @@ export class Collection { return executeOperation( getTopology(this), - new UpdateManyOperation(this, filter, update, resolveOptions(this, options)), + new UpdateManyOperation(this, query, update, resolveOptions(this, options)), callback ); } @@ -484,16 +510,16 @@ export class Collection { /** * Delete a document from a collection * - * @param filter - The Filter used to select the document to remove + * @param query - The query used to select the document to remove * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - deleteOne(filter: Document): Promise; - deleteOne(filter: Document, callback: Callback): void; - deleteOne(filter: Document, options: DeleteOptions): Promise; - deleteOne(filter: Document, options: DeleteOptions, callback?: Callback): void; + deleteOne(query: Query): Promise; + deleteOne(query: Query, callback: Callback): void; + deleteOne(query: Query, options: DeleteOptions): Promise; + deleteOne(query: Query, options: DeleteOptions, callback?: Callback): void; deleteOne( - filter: Document, + query: Query, options?: DeleteOptions | Callback, callback?: Callback ): Promise | void { @@ -501,7 +527,7 @@ export class Collection { return executeOperation( getTopology(this), - new DeleteOneOperation(this, filter, resolveOptions(this, options)), + new DeleteOneOperation(this, query, resolveOptions(this, options)), callback ); } @@ -509,26 +535,26 @@ export class Collection { /** * Delete multiple documents from a collection * - * @param filter - The Filter used to select the documents to remove + * @param query - The query used to select the documents to remove * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - deleteMany(filter: Document): Promise; - deleteMany(filter: Document, callback: Callback): void; - deleteMany(filter: Document, options: DeleteOptions): Promise; - deleteMany(filter: Document, options: DeleteOptions, callback: Callback): void; + deleteMany(query: Query): Promise; + deleteMany(query: Query, callback: Callback): void; + deleteMany(query: Query, options: DeleteOptions): Promise; + deleteMany(query: Query, options: DeleteOptions, callback: Callback): void; deleteMany( - filter: Document, + query: Query, options?: DeleteOptions | Callback, callback?: Callback ): Promise | void { - if (filter == null) { - filter = {}; + if (query == null) { + query = {}; options = {}; callback = undefined; - } else if (typeof filter === 'function') { - callback = filter as Callback; - filter = {}; + } else if (typeof query === 'function') { + callback = query as Callback; + query = {}; options = {}; } else if (typeof options === 'function') { callback = options; @@ -537,7 +563,7 @@ export class Collection { return executeOperation( getTopology(this), - new DeleteManyOperation(this, filter, resolveOptions(this, options)), + new DeleteManyOperation(this, query, resolveOptions(this, options)), callback ); } @@ -602,17 +628,17 @@ export class Collection { * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - findOne(): Promise; - findOne(callback: Callback): void; - findOne(query: Document): Promise; - findOne(query: Document, callback?: Callback): void; - findOne(query: Document, options: FindOptions): Promise; - findOne(query: Document, options: FindOptions, callback: Callback): void; + findOne(): Promise; + findOne(callback: Callback): void; + findOne(query: Query): Promise; + findOne(query: Query, callback?: Callback): void; + findOne(query: Query, options: FindOptions): Promise; + findOne(query: Query, options: FindOptions, callback: Callback): void; findOne( - query?: Document | Callback, - options?: FindOptions | Callback, - callback?: Callback - ): Promise | void { + query?: Query | Callback, + options?: FindOptions | Callback, + callback?: Callback + ): Promise | void { if (callback !== undefined && typeof callback !== 'function') { throw new TypeError('Third parameter to `findOne()` must be a callback or undefined'); } @@ -624,7 +650,7 @@ export class Collection { return executeOperation( getTopology(this), - new FindOneOperation(this, query, resolveOptions(this, options)), + new FindOneOperation(this, query, resolveOptions(this, options)) as TODO_NODE_2648, callback ); } @@ -632,12 +658,12 @@ export class Collection { /** * Creates a cursor for a query that can be used to iterate over results from MongoDB * - * @param filter - The query predicate. If unspecified, then all documents in the collection will match the predicate + * @param query - The query predicate. If unspecified, then all documents in the collection will match the predicate */ - find(): FindCursor; - find(filter: Document): FindCursor; - find(filter: Document, options: FindOptions): FindCursor; - find(filter?: Document, options?: FindOptions): FindCursor { + find(): FindCursor; + find(query: Query): FindCursor; + find(query: Query, options: FindOptions): FindCursor; + find(query?: Query, options?: FindOptions): FindCursor { if (arguments.length > 2) { throw new TypeError('Third parameter to `collection.find()` must be undefined'); } @@ -645,10 +671,10 @@ export class Collection { throw new TypeError('`options` parameter must not be function'); } - return new FindCursor( + return new FindCursor( getTopology(this), this.s.namespace, - filter, + query, resolveOptions(this, options) ); } @@ -974,10 +1000,14 @@ export class Collection { */ countDocuments(): Promise; countDocuments(callback: Callback): void; - countDocuments(query: Document): Promise; + countDocuments(query: Query): Promise; countDocuments(callback: Callback): void; - countDocuments(query: Document, options: CountDocumentsOptions): Promise; - countDocuments(query: Document, options: CountDocumentsOptions, callback: Callback): void; + countDocuments(query: Query, options: CountDocumentsOptions): Promise; + countDocuments( + query: Query, + options: CountDocumentsOptions, + callback: Callback + ): void; countDocuments( query?: Document | CountDocumentsOptions | Callback, options?: CountDocumentsOptions | Callback, @@ -993,7 +1023,7 @@ export class Collection { } } - query = query || {}; + query ??= {}; return executeOperation( getTopology(this), new CountDocumentsOperation( @@ -1013,15 +1043,28 @@ export class Collection { * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - distinct(key: string): Promise; - distinct(key: string, callback: Callback): void; - distinct(key: string, query: Document): Promise; - distinct(key: string, query: Document, callback: Callback): void; - distinct(key: string, query: Document, options: DistinctOptions): Promise; - distinct(key: string, query: Document, options: DistinctOptions, callback: Callback): void; - distinct( - key: string, - query?: Document | DistinctOptions | Callback, + distinct>(key: Key): Promise; + distinct>(key: Key, callback: Callback): void; + distinct>(key: Key, query: Query): Promise; + distinct>( + key: Key, + query: Query, + callback: Callback + ): void; + distinct>( + key: Key, + query: Query, + options: DistinctOptions + ): Promise; + distinct>( + key: Key, + query: Query, + options: DistinctOptions, + callback: Callback + ): void; + distinct>( + key: Key, + query?: Query | DistinctOptions | Callback, options?: DistinctOptions | Callback, callback?: Callback ): Promise | void { @@ -1033,13 +1076,13 @@ export class Collection { } } - query = query || {}; + query ??= {}; return executeOperation( getTopology(this), new DistinctOperation( this, - key, - query as Document, + key as TODO_NODE_2648, + query, resolveOptions(this, options as DistinctOptions) ), callback @@ -1092,28 +1135,31 @@ export class Collection { /** * Find a document and delete it in one atomic operation. Requires a write lock for the duration of the operation. * - * @param filter - The Filter used to select the document to remove + * @param query - The query used to select the document to remove * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - findOneAndDelete(filter: Document): Promise; - findOneAndDelete(filter: Document, callback: Callback): void; - findOneAndDelete(filter: Document, options: FindOneAndDeleteOptions): Promise; + findOneAndDelete(query: Query): Promise>; + findOneAndDelete(query: Query, callback: Callback>): void; + findOneAndDelete( + query: Query, + options: FindOneAndDeleteOptions + ): Promise>; findOneAndDelete( - filter: Document, + query: Query, options: FindOneAndDeleteOptions, - callback: Callback + callback: Callback> ): void; findOneAndDelete( - filter: Document, - options?: FindOneAndDeleteOptions | Callback, - callback?: Callback + query: Query, + options?: FindOneAndDeleteOptions | Callback>, + callback?: Callback> ): Promise | void { if (typeof options === 'function') (callback = options), (options = {}); return executeOperation( getTopology(this), - new FindOneAndDeleteOperation(this, filter, resolveOptions(this, options)), + new FindOneAndDeleteOperation(this, query, resolveOptions(this, options)) as TODO_NODE_2648, callback ); } @@ -1121,35 +1167,44 @@ export class Collection { /** * Find a document and replace it in one atomic operation. Requires a write lock for the duration of the operation. * - * @param filter - The Filter used to select the document to replace + * @param query - The query used to select the document to replace * @param replacement - The Document that replaces the matching document * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - findOneAndReplace(filter: Document, replacement: Document): Promise; - findOneAndReplace(filter: Document, replacement: Document, callback: Callback): void; + findOneAndReplace(query: Query, replacement: Document): Promise>; + findOneAndReplace( + query: Query, + replacement: Document, + callback: Callback> + ): void; findOneAndReplace( - filter: Document, + query: Query, replacement: Document, options: FindOneAndReplaceOptions - ): Promise; + ): Promise>; findOneAndReplace( - filter: Document, + query: Query, replacement: Document, options: FindOneAndReplaceOptions, - callback: Callback + callback: Callback> ): void; findOneAndReplace( - filter: Document, + query: Query, replacement: Document, - options?: FindOneAndReplaceOptions | Callback, - callback?: Callback - ): Promise | void { + options?: FindOneAndReplaceOptions | Callback>, + callback?: Callback> + ): Promise> | void { if (typeof options === 'function') (callback = options), (options = {}); return executeOperation( getTopology(this), - new FindOneAndReplaceOperation(this, filter, replacement, resolveOptions(this, options)), + new FindOneAndReplaceOperation( + this, + query, + replacement, + resolveOptions(this, options) + ) as TODO_NODE_2648, callback ); } @@ -1157,35 +1212,47 @@ export class Collection { /** * Find a document and update it in one atomic operation. Requires a write lock for the duration of the operation. * - * @param filter - The Filter used to select the document to update + * @param query - The query used to select the document to update * @param update - Update operations to be performed on the document * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - findOneAndUpdate(filter: Document, update: Document): Promise; - findOneAndUpdate(filter: Document, update: Document, callback: Callback): void; findOneAndUpdate( - filter: Document, - update: Document, + query: Query, + update: UpdateQuery + ): Promise>; + findOneAndUpdate( + query: Query, + update: UpdateQuery, + callback: Callback> + ): void; + findOneAndUpdate( + query: Query, + update: UpdateQuery, options: FindOneAndUpdateOptions - ): Promise; + ): Promise>; findOneAndUpdate( - filter: Document, - update: Document, + query: Query, + update: UpdateQuery, options: FindOneAndUpdateOptions, - callback: Callback + callback: Callback> ): void; findOneAndUpdate( - filter: Document, - update: Document, - options?: FindOneAndUpdateOptions | Callback, - callback?: Callback - ): Promise | void { + query: Query, + update: UpdateQuery, + options?: FindOneAndUpdateOptions | Callback>, + callback?: Callback> + ): Promise> | void { if (typeof options === 'function') (callback = options), (options = {}); return executeOperation( getTopology(this), - new FindOneAndUpdateOperation(this, filter, update, resolveOptions(this, options)), + new FindOneAndUpdateOperation( + this, + query, + update, + resolveOptions(this, options) + ) as TODO_NODE_2648, callback ); } @@ -1196,7 +1263,10 @@ export class Collection { * @param pipeline - An array of aggregation pipelines to execute * @param options - Optional settings for the command */ - aggregate(pipeline: Document[] = [], options?: AggregateOptions): AggregationCursor { + aggregate( + pipeline: Document[] = [], + options?: AggregateOptions + ): AggregationCursor { if (arguments.length > 2) { throw new TypeError('Third parameter to `collection.aggregate()` must be undefined'); } @@ -1223,8 +1293,11 @@ export class Collection { * @param pipeline - An array of {@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. * @param options - Optional settings for the command */ - watch(pipeline?: Document[], options?: ChangeStreamOptions): ChangeStream { - pipeline = pipeline || []; + watch( + pipeline: Document[] = [], + options: ChangeStreamOptions = {} + ): ChangeStream { + pipeline = pipeline ?? []; options = options ?? {}; // Allow optionally not specifying a pipeline @@ -1233,7 +1306,7 @@ export class Collection { pipeline = []; } - return new ChangeStream(this, pipeline, resolveOptions(this, options)); + return new ChangeStream(this, pipeline, resolveOptions(this, options)); } /** @@ -1244,30 +1317,30 @@ export class Collection { * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - mapReduce( - map: string | MapFunction, - reduce: string | ReduceFunction + mapReduce( + map: string | MapFunction, + reduce: string | ReduceFunction ): Promise; - mapReduce( - map: string | MapFunction, - reduce: string | ReduceFunction, + mapReduce( + map: string | MapFunction, + reduce: string | ReduceFunction, callback: Callback ): void; - mapReduce( - map: string | MapFunction, - reduce: string | ReduceFunction, - options: MapReduceOptions + mapReduce( + map: string | MapFunction, + reduce: string | ReduceFunction, + options: MapReduceOptions ): Promise; - mapReduce( - map: string | MapFunction, - reduce: string | ReduceFunction, - options: MapReduceOptions, + mapReduce( + map: string | MapFunction, + reduce: string | ReduceFunction, + options: MapReduceOptions, callback: Callback ): void; - mapReduce( - map: string | MapFunction, - reduce: string | ReduceFunction, - options?: MapReduceOptions | Callback, + mapReduce( + map: string | MapFunction, + reduce: string | ReduceFunction, + options?: MapReduceOptions | Callback, callback?: Callback ): Promise | void { if ('function' === typeof options) (callback = options), (options = {}); @@ -1292,7 +1365,7 @@ export class Collection { return executeOperation( getTopology(this), - new MapReduceOperation(this, map, reduce, resolveOptions(this, options)), + new MapReduceOperation(this, map, reduce, resolveOptions(this, options) as TODO_NODE_2648), callback ); } @@ -1327,10 +1400,10 @@ export class Collection { * @param callback - An optional callback, a Promise will be returned if none is provided */ insert( - docs: Document[], + docs: TSchema[], options: BulkWriteOptions, - callback: Callback - ): Promise | void { + callback: Callback> + ): Promise> | void { emitWarningOnce( 'collection.insert is deprecated. Use insertOne, insertMany or bulkWrite instead.' ); @@ -1355,8 +1428,8 @@ export class Collection { * @param callback - An optional callback, a Promise will be returned if none is provided */ update( - selector: Document, - update: Document, + selector: Query, + update: UpdateQuery, options: UpdateOptions, callback: Callback ): Promise | void { @@ -1378,7 +1451,7 @@ export class Collection { * @param callback - An optional callback, a Promise will be returned if none is provided */ remove( - selector: Document, + selector: Query, options: DeleteOptions, callback: Callback ): Promise | void { @@ -1406,12 +1479,16 @@ export class Collection { */ count(): Promise; count(callback: Callback): void; - count(query: Document): Promise; - count(query: Document, callback: Callback): void; - count(query: Document, options: CountOptions): Promise; - count(query: Document, options: CountOptions, callback: Callback): Promise | void; + count(query: Query): Promise; + count(query: Query, callback: Callback): void; + count(query: Query, options: CountOptions): Promise; + count( + query: Query, + options: CountOptions, + callback: Callback + ): Promise | void; count( - query?: Document | CountOptions | Callback, + query?: Query | CountOptions | Callback, options?: CountOptions | Callback, callback?: Callback ): Promise | void { diff --git a/src/cursor/abstract_cursor.ts b/src/cursor/abstract_cursor.ts index d8166ed6728..1833e55cc82 100644 --- a/src/cursor/abstract_cursor.ts +++ b/src/cursor/abstract_cursor.ts @@ -9,6 +9,7 @@ import { Readable, Transform } from 'stream'; import { EventEmitter } from 'events'; import type { ExecutionResult } from '../operations/execute_operation'; import { ReadConcern, ReadConcernLike } from '../read_concern'; +import type { TODO_NODE_2648 } from '../mongo_types'; const kId = Symbol('id'); const kDocuments = Symbol('documents'); @@ -73,7 +74,7 @@ export type InternalAbstractCursorOptions = Omit extends EventEmitter { /** @internal */ [kId]?: Long; /** @internal */ @@ -83,11 +84,11 @@ export abstract class AbstractCursor extends EventEmitter { /** @internal */ [kNamespace]: MongoDBNamespace; /** @internal */ - [kDocuments]: Document[]; + [kDocuments]: TSchema[]; /** @internal */ [kTopology]: Topology; /** @internal */ - [kTransform]?: (doc: Document) => Document; + [kTransform]?: (doc: TSchema) => Document; /** @internal */ [kInitialized]: boolean; /** @internal */ @@ -190,11 +191,11 @@ export abstract class AbstractCursor extends EventEmitter { } /** Returns current buffered documents */ - readBufferedDocuments(number?: number): Document[] { + readBufferedDocuments(number?: number): TSchema[] { return this[kDocuments].splice(0, number ?? this[kDocuments].length); } - [Symbol.asyncIterator](): AsyncIterator { + [Symbol.asyncIterator](): AsyncIterator { return { next: () => this.next().then(value => ({ value, done: value === null })) }; @@ -251,9 +252,9 @@ export abstract class AbstractCursor extends EventEmitter { } /** Get the next available document from the cursor, returns null if no more documents are available. */ - next(): Promise; - next(callback: Callback): void; - next(callback?: Callback): Promise | void { + next(): Promise; + next(callback: Callback): void; + next(callback?: Callback): Promise | void { return maybePromise(callback, done => { if (this[kId] === Long.ZERO) { return done(new MongoError('Cursor is exhausted')); @@ -266,9 +267,9 @@ export abstract class AbstractCursor extends EventEmitter { /** * Try to get the next available document from the cursor or `null` if an empty batch is returned */ - tryNext(): Promise; - tryNext(callback: Callback): void; - tryNext(callback?: Callback): Promise | void { + tryNext(): Promise; + tryNext(callback: Callback): void; + tryNext(callback?: Callback): Promise | void { return maybePromise(callback, done => { if (this[kId] === Long.ZERO) { return done(new MongoError('Cursor is exhausted')); @@ -284,10 +285,10 @@ export abstract class AbstractCursor extends EventEmitter { * @param iterator - The iteration callback. * @param callback - The end callback. */ - forEach(iterator: (doc: Document) => boolean | void): Promise; - forEach(iterator: (doc: Document) => boolean | void, callback: Callback): void; + forEach(iterator: (doc: TSchema) => boolean | void): Promise; + forEach(iterator: (doc: TSchema) => boolean | void, callback: Callback): void; forEach( - iterator: (doc: Document) => boolean | void, + iterator: (doc: TSchema) => boolean | void, callback?: Callback ): Promise | void { if (typeof iterator !== 'function') { @@ -302,14 +303,16 @@ export abstract class AbstractCursor extends EventEmitter { if (doc == null) return done(); // NOTE: no need to transform because `next` will do this automatically - let result = iterator(doc); + let result = iterator(doc as TSchema); // TODO_OPERATIONS_LAYER - We need to work with the transform return type somehow if (result === false) return done(); // these do need to be transformed since they are copying the rest of the batch const internalDocs = this[kDocuments].splice(0, this[kDocuments].length); if (internalDocs) { for (let i = 0; i < internalDocs.length; ++i) { - result = iterator(transform ? transform(internalDocs[i]) : internalDocs[i]); + result = iterator( + (transform ? transform(internalDocs[i]) : internalDocs[i]) as TSchema // TODO_OPERATIONS_LAYER - We need to work with the transform return type somehow + ); if (result === false) return done(); } } @@ -380,11 +383,11 @@ export abstract class AbstractCursor extends EventEmitter { * * @param callback - The result callback. */ - toArray(): Promise; - toArray(callback: Callback): void; - toArray(callback?: Callback): Promise | void { + toArray(): Promise; + toArray(callback: Callback): void; + toArray(callback?: Callback): Promise | void { return maybePromise(callback, done => { - const docs: Document[] = []; + const docs: TSchema[] = []; const transform = this[kTransform]; const fetchDocs = () => { // NOTE: if we add a `nextBatch` then we should use it here @@ -393,12 +396,12 @@ export abstract class AbstractCursor extends EventEmitter { if (doc == null) return done(undefined, docs); // NOTE: no need to transform because `next` will do this automatically - docs.push(doc); + docs.push(doc as TSchema); // these do need to be transformed since they are copying the rest of the batch - const internalDocs = transform + const internalDocs = (transform ? this[kDocuments].splice(0, this[kDocuments].length).map(transform) - : this[kDocuments].splice(0, this[kDocuments].length); + : this[kDocuments].splice(0, this[kDocuments].length)) as TSchema[]; // TODO_OPERATIONS_LAYER - We need to work with the transform return type somehow if (internalDocs) { docs.push(...internalDocs); @@ -434,12 +437,14 @@ export abstract class AbstractCursor extends EventEmitter { /** * Map all documents using the provided function + * If there is a transform set on the cursor, that will be called first and the result passed to + * this function's transform. * * @param transform - The mapping transformation method. */ - map(transform: (doc: Document) => Document): this { + map(transform: (doc: TSchema) => TResult): this { assertUninitialized(this); - const oldTransform = this[kTransform]; + const oldTransform = this[kTransform] as (doc: TSchema) => TSchema; // TODO_OPERATIONS_LAYER - We need to work with the transform return type somehow if (oldTransform) { this[kTransform] = doc => { return transform(oldTransform(doc)); @@ -548,7 +553,7 @@ export abstract class AbstractCursor extends EventEmitter { /** * Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance */ - abstract clone(): AbstractCursor; + abstract clone(): AbstractCursor; /** @internal */ abstract _initialize( @@ -585,7 +590,9 @@ export abstract class AbstractCursor extends EventEmitter { } } -function nextDocument(cursor: AbstractCursor): Document | null | undefined { +function nextDocument( + cursor: AbstractCursor +): TSchema | null | undefined { if (cursor[kDocuments] == null || !cursor[kDocuments].length) { return null; } @@ -594,7 +601,7 @@ function nextDocument(cursor: AbstractCursor): Document | null | undefined { if (doc) { const transform = cursor[kTransform]; if (transform) { - return transform(doc); + return transform(doc) as TSchema; // TODO: How can user's parameterize this } return doc; @@ -603,10 +610,10 @@ function nextDocument(cursor: AbstractCursor): Document | null | undefined { return null; } -function next( - cursor: AbstractCursor, +function next( + cursor: AbstractCursor, blocking: boolean, - callback: Callback + callback: Callback ): void { const cursorId = cursor[kId]; if (cursor.closed) { @@ -655,7 +662,7 @@ function next( // for example if (cursor[kId] == null) { cursor[kId] = Long.ZERO; - cursor[kDocuments] = [state.response]; + cursor[kDocuments] = [state.response as TODO_NODE_2648]; } } @@ -727,7 +734,7 @@ export function assertUninitialized(cursor: AbstractCursor): void { } } -function makeCursorStream(cursor: AbstractCursor) { +function makeCursorStream(cursor: AbstractCursor) { const readable = new Readable({ objectMode: true, autoDestroy: false, diff --git a/src/cursor/aggregation_cursor.ts b/src/cursor/aggregation_cursor.ts index 706299eb95e..182410fa9e8 100644 --- a/src/cursor/aggregation_cursor.ts +++ b/src/cursor/aggregation_cursor.ts @@ -25,7 +25,7 @@ const kOptions = Symbol('options'); * or higher stream * @public */ -export class AggregationCursor extends AbstractCursor { +export class AggregationCursor extends AbstractCursor { /** @internal */ [kParent]: OperationParent; // TODO: NODE-2883 /** @internal */ @@ -52,7 +52,7 @@ export class AggregationCursor extends AbstractCursor { return this[kPipeline]; } - clone(): AggregationCursor { + clone(): AggregationCursor { const clonedOptions = mergeOptions({}, this[kOptions]); delete clonedOptions.session; return new AggregationCursor(this[kParent], this.topology, this.namespace, this[kPipeline], { diff --git a/src/cursor/find_cursor.ts b/src/cursor/find_cursor.ts index 9b225fbf737..a1266d4e22f 100644 --- a/src/cursor/find_cursor.ts +++ b/src/cursor/find_cursor.ts @@ -28,7 +28,7 @@ export const FLAGS = [ ] as const; /** @public */ -export class FindCursor extends AbstractCursor { +export class FindCursor extends AbstractCursor { /** @internal */ [kFilter]: Document; /** @internal */ @@ -52,7 +52,7 @@ export class FindCursor extends AbstractCursor { } } - clone(): FindCursor { + clone(): FindCursor { const clonedOptions = mergeOptions({}, this[kBuiltOptions]); delete clonedOptions.session; return new FindCursor(this.topology, this.namespace, this[kFilter], { diff --git a/src/db.ts b/src/db.ts index 1403fb07c11..c9a0df18da6 100644 --- a/src/db.ts +++ b/src/db.ts @@ -6,7 +6,6 @@ import { getTopology, DEFAULT_PK_FACTORY } from './utils'; -import { loadAdmin } from './dynamic_loaders'; import { AggregationCursor } from './cursor/aggregation_cursor'; import { Document, BSONSerializeOptions, resolveBSONOptions } from './bson'; import { ReadPreference, ReadPreferenceLike } from './read_preference'; @@ -47,7 +46,8 @@ import { import { executeOperation } from './operations/execute_operation'; import type { IndexInformationOptions } from './operations/common_functions'; import type { MongoClient, PkFactory } from './mongo_client'; -import type { Admin } from './admin'; +import { Admin } from './admin'; +import type { TODO_NODE_2648 } from './mongo_types'; // Allowed parameters const DB_OPTIONS_ALLOW_LIST = [ @@ -222,26 +222,32 @@ export class Db { * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - createCollection(name: string): Promise; - createCollection(name: string, callback: Callback): void; - createCollection(name: string, options: CreateCollectionOptions): Promise; - createCollection( + createCollection(name: string): Promise>; + createCollection( + name: string, + callback: Callback> + ): void; + createCollection( + name: string, + options: CreateCollectionOptions + ): Promise>; + createCollection( name: string, options: CreateCollectionOptions, - callback: Callback + callback: Callback> ): void; - createCollection( + createCollection( name: string, options?: CreateCollectionOptions | Callback, callback?: Callback - ): Promise | void { + ): Promise> | void { if (typeof options === 'function') (callback = options), (options = {}); return executeOperation( getTopology(this), - new CreateCollectionOperation(this, name, resolveOptions(this, options)), + new CreateCollectionOperation(this, name, resolveOptions(this, options)) as TODO_NODE_2648, callback - ); + ) as TODO_NODE_2648; } /** @@ -301,8 +307,7 @@ export class Db { /** Return the Admin db instance */ admin(): Admin { - const AdminClass = loadAdmin(); - return new AdminClass(this); + return new Admin(this); } /** @@ -312,22 +317,32 @@ export class Db { * @param name - the collection name we wish to access. * @returns return the new Collection instance if not in strict mode */ - collection(name: string): Collection; - collection(name: string, options: CollectionOptions): Collection; - collection(name: string, callback: Callback): void; - collection(name: string, options: CollectionOptions, callback: Callback): void; - collection( + collection(name: string): Collection; + collection( name: string, - options?: CollectionOptions | Callback, - callback?: Callback - ): Collection | void { + options: CollectionOptions + ): Collection; + collection( + name: string, + callback: Callback> + ): void; + collection( + name: string, + options: CollectionOptions, + callback: Callback> + ): void; + collection( + name: string, + options?: CollectionOptions | Callback>, + callback?: Callback> + ): Collection | void { if (typeof options === 'function') (callback = options), (options = {}); const finalOptions = resolveOptions(this, options); // Execute if (!finalOptions.strict) { try { - const collection = new Collection(this, name, finalOptions); + const collection = new Collection(this, name, finalOptions); if (callback) callback(undefined, collection); return collection; } catch (err) { @@ -412,29 +427,32 @@ export class Db { * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - renameCollection(fromCollection: string, toCollection: string): Promise; - renameCollection( + renameCollection( + fromCollection: string, + toCollection: string + ): Promise>; + renameCollection( fromCollection: string, toCollection: string, - callback: Callback + callback: Callback> ): void; - renameCollection( + renameCollection( fromCollection: string, toCollection: string, options: RenameOptions - ): Promise; - renameCollection( + ): Promise>; + renameCollection( fromCollection: string, toCollection: string, options: RenameOptions, - callback: Callback + callback: Callback> ): void; - renameCollection( + renameCollection( fromCollection: string, toCollection: string, - options?: RenameOptions | Callback, - callback?: Callback - ): Promise | void { + options?: RenameOptions | Callback>, + callback?: Callback> + ): Promise> | void { if (typeof options === 'function') (callback = options), (options = {}); // Intentionally, we do not inherit options from parent for this operation. @@ -445,7 +463,11 @@ export class Db { return executeOperation( getTopology(this), - new RenameOperation(this.collection(fromCollection), toCollection, options), + new RenameOperation( + this.collection(fromCollection), + toCollection, + options + ) as TODO_NODE_2648, callback ); } @@ -725,10 +747,13 @@ export class Db { * @param pipeline - An array of {@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. * @param options - Optional settings for the command */ - watch(): ChangeStream; - watch(pipeline?: Document[]): ChangeStream; - watch(pipeline?: Document[], options?: ChangeStreamOptions): ChangeStream { - pipeline = pipeline || []; + watch(): ChangeStream; + watch(pipeline?: Document[]): ChangeStream; + watch( + pipeline?: Document[], + options?: ChangeStreamOptions + ): ChangeStream { + pipeline = pipeline ?? []; options = options ?? {}; // Allow optionally not specifying a pipeline @@ -737,7 +762,7 @@ export class Db { pipeline = []; } - return new ChangeStream(this, pipeline, resolveOptions(this, options)); + return new ChangeStream(this, pipeline, resolveOptions(this, options)); } /** Return the db logger */ diff --git a/src/dynamic_loaders.ts b/src/dynamic_loaders.ts deleted file mode 100644 index 62cbc9b97fe..00000000000 --- a/src/dynamic_loaders.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -import type { Admin } from './admin'; -import type { Collection } from './collection'; -import type { Db } from './db'; -import type { MongoClient } from './mongo_client'; - -let collection: typeof Collection; -let db: typeof Db; -let client: typeof MongoClient; -let admin: typeof Admin; - -export function loadCollection(): typeof Collection { - if (!collection) { - collection = require('./collection').Collection; - } - return collection; -} - -export function loadDb(): typeof Db { - if (!db) { - db = require('./db').Db; - } - return db; -} - -export function loadMongoClient(): typeof MongoClient { - if (!client) { - client = require('./mongo_client').MongoClient; - } - return client; -} - -export function loadAdmin(): typeof Admin { - if (!admin) { - admin = require('./admin').Admin; - } - return admin; -} diff --git a/src/gridfs-stream/download.ts b/src/gridfs-stream/download.ts index 72e3a095077..988d4f78916 100644 --- a/src/gridfs-stream/download.ts +++ b/src/gridfs-stream/download.ts @@ -32,7 +32,7 @@ export interface GridFSFile { _id: GridFSBucketWriteStream['id']; length: GridFSBucketWriteStream['length']; chunkSize: GridFSBucketWriteStream['chunkSizeBytes']; - md5?: boolean | string; + md5?: string; filename: GridFSBucketWriteStream['filename']; contentType?: GridFSBucketWriteStream['options']['contentType']; aliases?: GridFSBucketWriteStream['options']['aliases']; diff --git a/src/gridfs-stream/index.ts b/src/gridfs-stream/index.ts index c67130857f4..edb4396debe 100644 --- a/src/gridfs-stream/index.ts +++ b/src/gridfs-stream/index.ts @@ -3,12 +3,13 @@ import { EventEmitter } from 'events'; import { GridFSBucketReadStream, GridFSBucketReadStreamOptions, - GridFSBucketReadStreamOptionsWithRevision + GridFSBucketReadStreamOptionsWithRevision, + GridFSFile } from './download'; -import { GridFSBucketWriteStream, GridFSBucketWriteStreamOptions, TFileId } from './upload'; +import { GridFSBucketWriteStream, GridFSBucketWriteStreamOptions, GridFSChunk } from './upload'; import { executeLegacyOperation, Callback, getTopology } from '../utils'; import { WriteConcernOptions, WriteConcern } from '../write_concern'; -import type { Document } from '../bson'; +import type { Document, ObjectId } from '../bson'; import type { Db } from '../db'; import type { ReadPreference } from '../read_preference'; import type { Collection } from '../collection'; @@ -16,6 +17,7 @@ import type { FindOptions } from './../operations/find'; import type { Sort } from '../sort'; import type { Logger } from '../logger'; import type { FindCursor } from '../cursor/find_cursor'; +import type { Query } from '../mongo_types'; const DEFAULT_GRIDFS_BUCKET_OPTIONS: { bucketName: string; @@ -44,8 +46,8 @@ export interface GridFSBucketPrivate { readPreference?: ReadPreference; writeConcern: WriteConcern | undefined; }; - _chunksCollection: Collection; - _filesCollection: Collection; + _chunksCollection: Collection; + _filesCollection: Collection; checkedIndexes: boolean; calledOpenUploadStream: boolean; } @@ -79,8 +81,8 @@ export class GridFSBucket extends EventEmitter { this.s = { db, options: privateOptions, - _chunksCollection: db.collection(privateOptions.bucketName + '.chunks'), - _filesCollection: db.collection(privateOptions.bucketName + '.files'), + _chunksCollection: db.collection(privateOptions.bucketName + '.chunks'), + _filesCollection: db.collection(privateOptions.bucketName + '.files'), checkedIndexes: false, calledOpenUploadStream: false }; @@ -108,7 +110,7 @@ export class GridFSBucket extends EventEmitter { * file's id. */ openUploadStreamWithId( - id: TFileId, + id: ObjectId, filename: string, options?: GridFSBucketWriteStreamOptions ): GridFSBucketWriteStream { @@ -116,7 +118,10 @@ export class GridFSBucket extends EventEmitter { } /** Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS. */ - openDownloadStream(id: TFileId, options?: GridFSBucketReadStreamOptions): GridFSBucketReadStream { + openDownloadStream( + id: ObjectId, + options?: GridFSBucketReadStreamOptions + ): GridFSBucketReadStream { return new GridFSBucketReadStream( this.s._chunksCollection, this.s._filesCollection, @@ -131,19 +136,19 @@ export class GridFSBucket extends EventEmitter { * * @param id - The id of the file doc */ - delete(id: TFileId): Promise; - delete(id: TFileId, callback: Callback): void; - delete(id: TFileId, callback?: Callback): Promise | void { + delete(id: ObjectId): Promise; + delete(id: ObjectId, callback: Callback): void; + delete(id: ObjectId, callback?: Callback): Promise | void { return executeLegacyOperation(getTopology(this.s.db), _delete, [this, id, callback], { skipSessions: true }); } /** Convenience wrapper around find on the files collection */ - find(filter: Document, options?: FindOptions): FindCursor { - filter = filter || {}; + find(query?: Query, options?: FindOptions): FindCursor { + query = query ?? {}; options = options ?? {}; - return this.s._filesCollection.find(filter, options); + return this.s._filesCollection.find(query, options); } /** @@ -182,9 +187,9 @@ export class GridFSBucket extends EventEmitter { * @param id - the id of the file to rename * @param filename - new name for the file */ - rename(id: TFileId, filename: string): Promise; - rename(id: TFileId, filename: string, callback: Callback): void; - rename(id: TFileId, filename: string, callback?: Callback): Promise | void { + rename(id: ObjectId, filename: string): Promise; + rename(id: ObjectId, filename: string, callback: Callback): void; + rename(id: ObjectId, filename: string, callback?: Callback): Promise | void { return executeLegacyOperation(getTopology(this.s.db), _rename, [this, id, filename, callback], { skipSessions: true }); @@ -205,7 +210,7 @@ export class GridFSBucket extends EventEmitter { } } -function _delete(bucket: GridFSBucket, id: TFileId, callback: Callback): void { +function _delete(bucket: GridFSBucket, id: ObjectId, callback: Callback): void { return bucket.s._filesCollection.deleteOne({ _id: id }, (error, res) => { if (error) { return callback(error); @@ -229,7 +234,7 @@ function _delete(bucket: GridFSBucket, id: TFileId, callback: Callback): v function _rename( bucket: GridFSBucket, - id: TFileId, + id: ObjectId, filename: string, callback: Callback ): void { diff --git a/src/gridfs-stream/upload.ts b/src/gridfs-stream/upload.ts index cadca413ed2..3497b9b5d3a 100644 --- a/src/gridfs-stream/upload.ts +++ b/src/gridfs-stream/upload.ts @@ -5,18 +5,16 @@ import { WriteConcern } from './../write_concern'; import { PromiseProvider } from '../promise_provider'; import { ObjectId } from '../bson'; import type { Callback } from '../utils'; -import type { Collection } from '../collection'; import type { Document } from '../bson'; import type { GridFSBucket } from './index'; import type { GridFSFile } from './download'; import type { WriteConcernOptions } from '../write_concern'; +import type { Collection } from '../collection'; /** @public */ -export type TFileId = string | number | Document | ObjectId; - -export interface ChunkDoc { +export interface GridFSChunk { _id: ObjectId; - files_id: TFileId; + files_id: ObjectId; n: number; data: Buffer; } @@ -26,7 +24,7 @@ export interface GridFSBucketWriteStreamOptions extends WriteConcernOptions { /** Overwrite this bucket's chunkSizeBytes for this file */ chunkSizeBytes?: number; /** Custom file id for the GridFS file. */ - id?: TFileId; + id?: ObjectId; /** Object to store in the file document's `metadata` field */ metadata?: Document; /** String to store in the file document's `contentType` field */ @@ -45,12 +43,12 @@ export interface GridFSBucketWriteStreamOptions extends WriteConcernOptions { */ export class GridFSBucketWriteStream extends Writable { bucket: GridFSBucket; - chunks: Collection; + chunks: Collection; filename: string; - files: Collection; + files: Collection; options: GridFSBucketWriteStreamOptions; done: boolean; - id: TFileId; + id: ObjectId; chunkSizeBytes: number; bufToStore: Buffer; length: number; @@ -240,7 +238,7 @@ function __handleError( stream.emit(GridFSBucketWriteStream.ERROR, error); } -function createChunkDoc(filesId: TFileId, n: number, data: Buffer): ChunkDoc { +function createChunkDoc(filesId: ObjectId, n: number, data: Buffer): GridFSChunk { return { _id: new ObjectId(), files_id: filesId, @@ -309,7 +307,7 @@ function checkDone(stream: GridFSBucketWriteStream, callback?: Callback): boolea stream.id, stream.length, stream.chunkSizeBytes, - stream.md5 && stream.md5.digest('hex'), + stream.md5 ? stream.md5.digest('hex') : undefined, stream.filename, stream.options.contentType, stream.options.aliases, @@ -472,7 +470,7 @@ function doWrite( inputBuf.copy(stream.bufToStore, stream.pos, inputBufPos, inputBufPos + numToCopy); stream.pos += numToCopy; spaceRemaining -= numToCopy; - let doc: ChunkDoc; + let doc: GridFSChunk; if (spaceRemaining === 0) { if (stream.md5) { stream.md5.update(stream.bufToStore); diff --git a/src/index.ts b/src/index.ts index de21cdc6b46..871f45bb4f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -119,6 +119,8 @@ export type { } from './bulk/common'; export type { ChangeStream, + ChangeStreamDocument, + UpdateDescription, ChangeStreamOptions, ChangeStreamCursor, ResumeToken, @@ -131,7 +133,7 @@ export type { AuthMechanismId } from './cmap/auth/defaultAuthProviders'; export type { MongoCredentials, MongoCredentialsOptions } from './cmap/auth/mongo_credentials'; export type { WriteProtocolMessageType, - Query, + Query as __InternalQuery, GetMore, Msg, KillCursor, @@ -161,7 +163,7 @@ export type { } from './cmap/message_stream'; export type { StreamDescription, StreamDescriptionOptions } from './cmap/stream_description'; export type { CompressorName } from './cmap/wire_protocol/compression'; -export type { CollectionPrivate, CollectionOptions } from './collection'; +export type { CollectionPrivate, CollectionOptions, ModifyResult } from './collection'; export type { AggregationCursorOptions } from './cursor/aggregation_cursor'; export type { CursorCloseOptions, @@ -183,8 +185,8 @@ export type { export type { GridFSBucketOptions, GridFSBucketPrivate } from './gridfs-stream/index'; export type { GridFSBucketWriteStreamOptions, - TFileId, - GridFSBucketWriteStream + GridFSBucketWriteStream, + GridFSChunk } from './gridfs-stream/upload'; export type { LoggerOptions, LoggerFunction, LoggerLevelId } from './logger'; export type { @@ -329,3 +331,17 @@ export type { export type { OrderedBulkOperation } from './bulk/ordered'; export type { UnorderedBulkOperation } from './bulk/unordered'; export type { Encrypter, EncrypterOptions } from './encrypter'; +export type { + EnhancedOmit, + WithId, + OptionalId, + WithoutId, + UpdateQuery, + Query, + Projection, + InferIdType, + WithId as ObjectWithId, + ProjectionOperators, + MetaProjectionOperators, + MetaSortOperators +} from './mongo_types'; diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 34f0a72e7cb..3d949c914b1 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -583,10 +583,13 @@ export class MongoClient extends EventEmitter { * @param pipeline - An array of {@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. * @param options - Optional settings for the command */ - watch(): ChangeStream; - watch(pipeline?: Document[]): ChangeStream; - watch(pipeline?: Document[], options?: ChangeStreamOptions): ChangeStream { - pipeline = pipeline || []; + watch(): ChangeStream; + watch(pipeline?: Document[]): ChangeStream; + watch( + pipeline: Document[] = [], + options: ChangeStreamOptions = {} + ): ChangeStream { + pipeline = pipeline ?? []; options = options ?? {}; // Allow optionally not specifying a pipeline @@ -595,7 +598,7 @@ export class MongoClient extends EventEmitter { pipeline = []; } - return new ChangeStream(this, pipeline, resolveOptions(this, options)); + return new ChangeStream(this, pipeline, resolveOptions(this, options)); } /** Return the mongo client logger */ diff --git a/src/mongo_types.ts b/src/mongo_types.ts new file mode 100644 index 00000000000..e4e9774ef62 --- /dev/null +++ b/src/mongo_types.ts @@ -0,0 +1,74 @@ +/* eslint-disable @typescript-eslint/ban-types */ +import type { Document, ObjectId } from './bson'; + +/** @internal */ +export type TODO_NODE_2648 = any; + +/** Given an object shaped type, return the type of the _id field or default to ObjectId @public */ +export type InferIdType = TSchema extends { _id: infer IdType } // user has defined a type for _id + ? {} extends IdType + ? Exclude + : unknown extends IdType + ? ObjectId + : IdType + : ObjectId; // user has not defined _id on schema + +/** Add an _id field to an object shaped type @public */ +export type WithId = EnhancedOmit & { _id: InferIdType }; + +/** + * Add an optional _id field to an object shaped type + * @public + * + * @privateRemarks + * `ObjectId extends TSchema['_id']` is a confusing ordering at first glance. Rather than ask + * `TSchema['_id'] extends ObjectId` which translated to "Is the _id property ObjectId?" + * we instead ask "Does ObjectId look like (have the same shape) as the _id?" + */ +export type OptionalId = ObjectId extends TSchema['_id'] + ? // a Schema with ObjectId _id type or "any" or "indexed type" provided + EnhancedOmit & { _id?: InferIdType } + : // a Schema provided but _id type is not ObjectId + WithId; + +/** TypeScript Omit (Exclude to be specific) does not work for objects with an "any" indexed type, and breaks discriminated unions @public */ +export type EnhancedOmit = string extends keyof TRecordOrUnion + ? TRecordOrUnion // TRecordOrUnion has indexed type e.g. { _id: string; [k: string]: any; } or it is "any" + : TRecordOrUnion extends any + ? Pick> // discriminated unions + : never; + +/** Remove the _id field from an object shaped type @public */ +export type WithoutId = Omit; + +/** A MongoDB filter can be some portion of the schema or a set of operators @public */ +export type Query = Partial & Document; + +/** A MongoDB UpdateQuery is set of operators @public */ +export type UpdateQuery = Document; // TODO + +/** @see https://docs.mongodb.com/manual/reference/operator/aggregation/meta/#proj._S_meta @public */ +export type MetaSortOperators = 'textScore' | 'indexKey'; + +/** @public */ +export type MetaProjectionOperators = + | MetaSortOperators + /** Only for Atlas Search https://docs.atlas.mongodb.com/reference/atlas-search/scoring/ */ + | 'searchScore' + /** Only for Atlas Search https://docs.atlas.mongodb.com/reference/atlas-search/highlighting/ */ + | 'searchHighlights'; + +/** @public */ +export interface ProjectionOperators { + $elemMatch?: Document; + $slice?: number | [number, number]; + $meta?: MetaProjectionOperators; +} + +/** @public */ +export type Projection = { + [Key in keyof TSchema]?: ProjectionOperators | 0 | 1 | boolean; +}; + +/** @public */ +export type Nullable = AnyType | null | undefined; diff --git a/src/operations/collections.ts b/src/operations/collections.ts index ea67bd97061..fbdf4175126 100644 --- a/src/operations/collections.ts +++ b/src/operations/collections.ts @@ -1,10 +1,7 @@ import { AbstractOperation, OperationOptions } from './operation'; -import { loadCollection } from '../dynamic_loaders'; +import { Collection } from '../collection'; import type { Callback } from '../utils'; import type { Db } from '../db'; - -// eslint-disable-next-line -import type { Collection } from '../collection'; import type { Server } from '../sdam/server'; import type { ClientSession } from '../sessions'; @@ -25,7 +22,6 @@ export class CollectionsOperation extends AbstractOperation { execute(server: Server, session: ClientSession, callback: Callback): void { const db = this.db; - const Collection = loadCollection(); // Let's get the collection names db.listCollections( diff --git a/src/operations/create_collection.ts b/src/operations/create_collection.ts index 1d7cf6d06a4..064dd3fe43e 100644 --- a/src/operations/create_collection.ts +++ b/src/operations/create_collection.ts @@ -1,14 +1,11 @@ import { CommandOperation, CommandOperationOptions } from './command'; import { Aspect, defineAspects } from './operation'; -import { loadCollection } from '../dynamic_loaders'; +import { Collection } from '../collection'; import type { Callback } from '../utils'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; import type { Db } from '../db'; import type { PkFactory } from '../mongo_client'; - -// eslint-disable-next-line -import type { Collection } from '../collection'; import type { ClientSession } from '../sessions'; const ILLEGAL_COMMAND_FIELDS = new Set([ @@ -82,7 +79,6 @@ export class CreateCollectionOperation extends CommandOperation { const db = this.db; const name = this.name; const options = this.options; - const Collection = loadCollection(); const done: Callback = err => { if (err) { diff --git a/src/operations/find.ts b/src/operations/find.ts index 93864c89488..20f6277ca75 100644 --- a/src/operations/find.ts +++ b/src/operations/find.ts @@ -15,15 +15,16 @@ import { Sort, formatSort } from '../sort'; import { isSharded } from '../cmap/wire_protocol/shared'; import { ReadConcern } from '../read_concern'; import type { ClientSession } from '../sessions'; +import type { Projection } from '../mongo_types'; /** @public */ -export interface FindOptions extends CommandOperationOptions { +export interface FindOptions extends CommandOperationOptions { /** Sets the limit of documents returned in the query. */ limit?: number; /** Set to sort the documents coming back from the query. Array of indexes, `[['a', 1]]` etc. */ sort?: Sort; /** The fields to return in the query. Object of fields to either include or exclude (one of, not both), `{'a':1, 'b': 1}` **or** `{'a': 0, 'b': 0}` */ - projection?: Document; + projection?: Projection; /** Set to skip N documents ahead in your query (useful for pagination). */ skip?: number; /** Tell the query to use specific indexes in the query. Object of indexes to use, `{'_id':1}` */ diff --git a/src/operations/insert.ts b/src/operations/insert.ts index 6a786240980..e1bd1e00b0d 100644 --- a/src/operations/insert.ts +++ b/src/operations/insert.ts @@ -5,11 +5,12 @@ import { prepareDocs } from './common_functions'; import type { Callback, MongoDBNamespace } from '../utils'; import type { Server } from '../sdam/server'; import type { Collection } from '../collection'; -import type { ObjectId, Document, BSONSerializeOptions } from '../bson'; +import type { Document, BSONSerializeOptions } from '../bson'; import type { BulkWriteOptions } from '../bulk/common'; import { WriteConcern, WriteConcernOptions } from '../write_concern'; import type { ClientSession } from '../sessions'; import { BulkWriteOperation } from './bulk_write'; +import type { InferIdType } from '../mongo_types'; /** @internal */ export class InsertOperation extends CommandOperation { @@ -53,11 +54,11 @@ export interface InsertOneOptions extends BSONSerializeOptions, WriteConcernOpti } /** @public */ -export interface InsertOneResult { +export interface InsertOneResult { /** Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined */ acknowledged: boolean; /** The identifier that was inserted. If the server generated the identifier, this value will be null as the driver does not have access to that data */ - insertedId: ObjectId; + insertedId: InferIdType; } export class InsertOneOperation extends InsertOperation { @@ -80,13 +81,13 @@ export class InsertOneOperation extends InsertOperation { } /** @public */ -export interface InsertManyResult { +export interface InsertManyResult { /** Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined */ acknowledged: boolean; /** The number of inserted documents for this operations */ insertedCount: number; /** Map of the index of the inserted document to the id of the inserted document */ - insertedIds: { [key: number]: ObjectId }; + insertedIds: { [key: number]: InferIdType }; } /** @internal */ diff --git a/src/operations/map_reduce.ts b/src/operations/map_reduce.ts index 5ad1c6c7d1d..5f91f9a7c0f 100644 --- a/src/operations/map_reduce.ts +++ b/src/operations/map_reduce.ts @@ -1,5 +1,4 @@ import { Code, Document } from '../bson'; -import { loadDb } from '../dynamic_loaders'; import { applyWriteConcern, decorateWithCollation, @@ -17,6 +16,7 @@ import { MongoError } from '../error'; import type { ObjectId } from '../bson'; import { Aspect, defineAspects } from './operation'; import type { ClientSession } from '../sessions'; +import { Db } from '../db'; const exclusionList = [ 'explain', @@ -36,14 +36,21 @@ const exclusionList = [ ]; /** @public */ -export type MapFunction = () => void; +export type MapFunction = (this: TSchema) => void; /** @public */ -export type ReduceFunction = (key: string, values: Document[]) => Document; +export type ReduceFunction = ( + key: TKey, + values: TValue[] +) => TValue; /** @public */ -export type FinalizeFunction = (key: string, reducedValue: Document) => Document; +export type FinalizeFunction = ( + key: TKey, + reducedValue: TValue +) => TValue; /** @public */ -export interface MapReduceOptions extends CommandOperationOptions { +export interface MapReduceOptions + extends CommandOperationOptions { /** Sets the output target for the map reduce job. */ out?: 'inline' | { inline: 1 } | { replace: string } | { merge: string } | { reduce: string }; /** Query filter object. */ @@ -55,7 +62,7 @@ export interface MapReduceOptions extends CommandOperationOptions { /** Keep temporary data. */ keeptemp?: boolean; /** Finalize function. */ - finalize?: FinalizeFunction | string; + finalize?: FinalizeFunction | string; /** Can pass in variables that can be access from map/reduce/finalize. */ scope?: Document; /** It is possible to make the execution stay in JS. Provided in MongoDB \> 2.0.X. */ @@ -198,7 +205,6 @@ export class MapReduceOperation extends CommandOperation if (result.result != null && typeof result.result === 'object') { const doc = result.result; // Return a collection from another db - const Db = loadDb(); collection = new Db(coll.s.db.s.client, doc.db, coll.s.db.s.options).collection( doc.collection ); diff --git a/src/operations/rename.ts b/src/operations/rename.ts index 390813aeb5a..a8ff93fbb9f 100644 --- a/src/operations/rename.ts +++ b/src/operations/rename.ts @@ -1,9 +1,8 @@ import { checkCollectionName, Callback } from '../utils'; -import { loadCollection } from '../dynamic_loaders'; import { RunAdminCommandOperation } from './run_command'; import { defineAspects, Aspect } from './operation'; import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; +import { Collection } from '../collection'; import type { CommandOperationOptions } from './command'; import { MongoError } from '../error'; import type { ClientSession } from '../sessions'; @@ -39,7 +38,6 @@ export class RenameOperation extends RunAdminCommandOperation { } execute(server: Server, session: ClientSession, callback: Callback): void { - const Collection = loadCollection(); const coll = this.collection; super.execute(server, session, (err, doc) => { diff --git a/src/sessions.ts b/src/sessions.ts index 08c057d30a2..208f265fa25 100644 --- a/src/sessions.ts +++ b/src/sessions.ts @@ -67,7 +67,7 @@ export interface ClientSessionOptions { } /** @public */ -export type WithTransactionCallback = (session: ClientSession) => Promise | void; +export type WithTransactionCallback = (session: ClientSession) => Promise | void; const kServerSession = Symbol('serverSession'); @@ -328,7 +328,7 @@ class ClientSession extends EventEmitter { * @param fn - A lambda to run within a transaction * @param options - Optional settings for the transaction */ - withTransaction(fn: WithTransactionCallback, options?: TransactionOptions): Promise { + withTransaction(fn: WithTransactionCallback, options?: TransactionOptions): Promise { const startTime = now(); return attemptTransaction(this, startTime, fn, options); } @@ -368,12 +368,12 @@ function isMaxTimeMSExpiredError(err: MongoError) { ); } -function attemptTransactionCommit( +function attemptTransactionCommit( session: ClientSession, startTime: number, - fn: WithTransactionCallback, + fn: WithTransactionCallback, options?: TransactionOptions -): Promise { +): Promise { return session.commitTransaction().catch((err: MongoError) => { if ( err instanceof MongoError && @@ -403,10 +403,10 @@ function userExplicitlyEndedTransaction(session: ClientSession) { return USER_EXPLICIT_TXN_END_STATES.has(session.transaction.state); } -function attemptTransaction( +function attemptTransaction( session: ClientSession, startTime: number, - fn: WithTransactionCallback, + fn: WithTransactionCallback, options?: TransactionOptions ): Promise { const Promise = PromiseProvider.get(); diff --git a/test/unit/type_check.test.ts b/test/unit/type_check.test.ts new file mode 100644 index 00000000000..ae5cf1ffc3c --- /dev/null +++ b/test/unit/type_check.test.ts @@ -0,0 +1,12 @@ +import tsd from 'tsd'; +import { expect } from 'chai' + +describe('Exported Types', () => { + it('should be as expected', async () => { + const diagnostics = await tsd(); + if (diagnostics.length !== 0) { + const messages = diagnostics.map(d => `${d.fileName}:${d.line}:${d.column} - [${d.severity}]: ${d.message}`).join('\n') + expect.fail('\n' + messages) + } + }) +}) diff --git a/test/unit/types/basic_schema.test-d.ts b/test/unit/types/basic_schema.test-d.ts new file mode 100644 index 00000000000..1d80590205f --- /dev/null +++ b/test/unit/types/basic_schema.test-d.ts @@ -0,0 +1,34 @@ +import { expectType } from 'tsd'; + +import { Collection } from '../../.../../../src/collection'; +import type { ObjectId } from '../../../src/bson'; +import { Db } from '../../../src/db'; +import { MongoClient } from '../../../src/mongo_client'; +import type { InferIdType } from '../../../src/mongo_types'; + +const db = new Db(new MongoClient(''), ''); + +type InsertRes = Promise<{ acknowledged: boolean; insertedId: TId }>; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Can defined Schema without _id +expectType>(new Collection<{ a: number }>(db, '')); + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Simple Schema +const simpleC = new Collection<{ a: number; _id: ObjectId }>(db, ''); +expectType(simpleC.insertOne({ a: 2 })); + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// CustomType _id Schema +class MyId { + uuid!: number; +} +interface CustomIdType { + a: number; + _id: MyId; +} +const customIdTypeC = new Collection(db, ''); +type IdType = InferIdType; +expectType(new MyId()); +expectType>(customIdTypeC.insertOne({ a: 2, _id: new MyId() })); diff --git a/test/unit/types/distinct.test-d.ts b/test/unit/types/distinct.test-d.ts new file mode 100644 index 00000000000..c9b0cf2b5b1 --- /dev/null +++ b/test/unit/types/distinct.test-d.ts @@ -0,0 +1,12 @@ +import { expectType, expectError, expectNotType } from 'tsd'; + +import { Db } from '../../../src/db'; +import { MongoClient } from '../../../src/mongo_client'; +import { Movie } from './example_schemas'; + +const db = new Db(new MongoClient(''), ''); +const collection = db.collection(''); + +// Ensure distinct takes all keys of the schema plus '_id' +let x = null as Parameters[0] +expectType<'_id' | keyof Movie>(x) diff --git a/test/unit/types/example_schemas.ts b/test/unit/types/example_schemas.ts new file mode 100644 index 00000000000..ec0f89945e5 --- /dev/null +++ b/test/unit/types/example_schemas.ts @@ -0,0 +1,31 @@ +import { Double, Int32 } from '../../../src/bson'; + +export type MediaType = 'movie' | 'tv' | 'web series'; + +export interface Movie { + title: string; + year: Int32; + runtime: number; + released: Date; + poster: string; + plot: string; + fullPlot: string; + lastUpdated: Date; + type: MediaType; + directors: string[]; + imdb: { + rating: Double; + votes: number; + id: number; + }; + countries: string[]; + genres: string[]; + tomatoes: { + viewer: { + rating: number; + numReviews: number; + }; + lastUpdated: Date; + }; + num_mflix_comments: number; +} diff --git a/test/unit/types/indexed_schema.test-d.ts b/test/unit/types/indexed_schema.test-d.ts new file mode 100644 index 00000000000..39297b8130e --- /dev/null +++ b/test/unit/types/indexed_schema.test-d.ts @@ -0,0 +1,40 @@ +import { expectDeprecated, expectType, expectNotType, expectError, expectAssignable } from 'tsd'; + +import { Collection } from '../../.../../../src/collection'; +import { ObjectId } from '../../../src/bson'; +import { Db } from '../../../src/db'; +import { MongoClient } from '../../../src/mongo_client'; +import type { InferIdType } from '../../../src/mongo_types'; + +expectDeprecated(Collection.prototype.insert); +expectDeprecated(Collection.prototype.update); +expectDeprecated(Collection.prototype.remove); + +const db = new Db(new MongoClient(''), ''); + +type InsertRes = Promise<{ acknowledged: boolean; insertedId: TId }>; + +interface RandomKeysToNumberIncludingId { + _id: number; + a: number; + [extraKeys: string]: number; +} +const randomKeysIncludeIdC = new Collection(db, ''); +expectType>(randomKeysIncludeIdC.insertOne({ a: 2, randomKey: 23, _id: 23 })); +expectError(randomKeysIncludeIdC.insertOne({ a: 2, randomKey: 23 })); + +let arg1: Parameters[0] = null as any; +expectAssignable>(arg1); + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +interface RandomKeysToNumber { + a: number; + [extraKeys: string]: number | ObjectId; // if you omit _id, it still needs to be accounted for +} +const randomKeysC = new Collection(db, ''); +expectType(randomKeysC.insertOne({ a: 2, randomKey: 23, _id: new ObjectId() })); +expectType(randomKeysC.insertOne({ a: 2, randomKey: 23 })); +expectNotType>( + randomKeysC.insertOne({ a: 2, randomKey: 23, _id: new ObjectId() }) +); // You cannot implicitly have an _id of an unusual type diff --git a/test/unit/types/mongodb.test-d.ts b/test/unit/types/mongodb.test-d.ts new file mode 100644 index 00000000000..446b0f04d0b --- /dev/null +++ b/test/unit/types/mongodb.test-d.ts @@ -0,0 +1,18 @@ +import { expectDeprecated, expectType, expectNotType, expectError, expectAssignable } from 'tsd'; + +import { Collection } from '../../.../../../src/collection'; +import { AggregationCursor } from '../../../src/cursor/aggregation_cursor'; +import { Db } from '../../../src/db'; +import { MongoError } from '../../../src/error'; +import { MongoClient } from '../../../src/mongo_client'; + +expectDeprecated(Collection.prototype.insert); +expectDeprecated(Collection.prototype.update); +expectDeprecated(Collection.prototype.remove); +expectDeprecated(Collection.prototype.count); +expectDeprecated(MongoError.create); +expectDeprecated(AggregationCursor.prototype.geoNear); + +const db = new Db(new MongoClient(''), ''); + +expectType>(db.collection<{ a: number }>('')); diff --git a/test/unit/types/union_schema.test-d.ts b/test/unit/types/union_schema.test-d.ts new file mode 100644 index 00000000000..88783007cca --- /dev/null +++ b/test/unit/types/union_schema.test-d.ts @@ -0,0 +1,44 @@ +import { expectType, expectError, expectNotType } from 'tsd'; + +import { Collection } from '../../.../../../src/collection'; +import { ObjectId } from '../../../src/bson'; +import { Db } from '../../../src/db'; +import { MongoClient } from '../../../src/mongo_client'; + +type InsertRes = Promise<{ acknowledged: boolean; insertedId: TId }>; + +const db = new Db(new MongoClient(''), ''); + +interface Circle { + _id: ObjectId; + radius: number; +} +interface Rectangle { + _id: ObjectId; + height: number; + width: number; +} +type Shape = Circle | Rectangle; + +type c = Collection; +type i = Parameters[0]; + +const shapesC = new Collection(db, ''); +expectType(shapesC.insertOne({ radius: 4 })); +expectError( + shapesC.insertOne({ radius: 4, extraKey: 'I should not be allowed', _id: new ObjectId() }) +); +expectType(shapesC.insertOne({ height: 4, width: 4 })); +expectType>(shapesC.findOne({ height: 4, width: 4 })); +expectNotType>(shapesC.findOne({ height: 4, width: 4 })); // collection API can only respect TSchema given + +interface A { + _id: number; +} +interface B { + _id: string; +} +type Data = A | B; +const dataC = db.collection(''); +expectType>(dataC.insertOne({ _id: 2 })); +expectType>(dataC.insertOne({ _id: 'hi' })); From 1f193e355f68442d9db2eaf6802dff7b31b726af Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Thu, 25 Mar 2021 15:57:40 -0400 Subject: [PATCH 02/15] fix: move tests to another directory to prevent mocha discovery and remove abstract cursor generic constraint --- .gitignore | 2 +- package.json | 2 +- src/cursor/abstract_cursor.ts | 12 ++++++------ src/index.ts | 1 - test/{unit => }/types/basic_schema.test-d.ts | 10 +++++----- test/types/distinct.test-d.ts | 12 ++++++++++++ test/{unit => }/types/example_schemas.ts | 2 +- test/{unit => }/types/indexed_schema.test-d.ts | 15 +++++---------- test/{unit => }/types/mongodb.test-d.ts | 10 +++++----- test/{unit => }/types/union_schema.test-d.ts | 8 ++++---- test/unit/types/distinct.test-d.ts | 12 ------------ 11 files changed, 40 insertions(+), 46 deletions(-) rename test/{unit => }/types/basic_schema.test-d.ts (79%) create mode 100644 test/types/distinct.test-d.ts rename test/{unit => }/types/example_schemas.ts (90%) rename test/{unit => }/types/indexed_schema.test-d.ts (71%) rename test/{unit => }/types/mongodb.test-d.ts (63%) rename test/{unit => }/types/union_schema.test-d.ts (85%) delete mode 100644 test/unit/types/distinct.test-d.ts diff --git a/.gitignore b/.gitignore index c0bbaac5f19..3f1ca6aec56 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,7 @@ lib/ *.tgz *.d.ts # type definition tests -!test/unit/types +!test/types .vscode output diff --git a/package.json b/package.json index ea555b230b1..8a3309e2da1 100644 --- a/package.json +++ b/package.json @@ -115,6 +115,6 @@ "test": "npm run check:lint && npm run check:test" }, "tsd": { - "directory": "test/unit/types" + "directory": "test/types" } } diff --git a/src/cursor/abstract_cursor.ts b/src/cursor/abstract_cursor.ts index 1833e55cc82..a56224a71bb 100644 --- a/src/cursor/abstract_cursor.ts +++ b/src/cursor/abstract_cursor.ts @@ -74,7 +74,7 @@ export type InternalAbstractCursorOptions = Omit extends EventEmitter { +export abstract class AbstractCursor extends EventEmitter { /** @internal */ [kId]?: Long; /** @internal */ @@ -303,7 +303,7 @@ export abstract class AbstractCursor extends Eve if (doc == null) return done(); // NOTE: no need to transform because `next` will do this automatically - let result = iterator(doc as TSchema); // TODO_OPERATIONS_LAYER - We need to work with the transform return type somehow + let result = iterator(doc as TSchema); // TODO_NODE_2648 - We need to work with the transform return type somehow if (result === false) return done(); // these do need to be transformed since they are copying the rest of the batch @@ -311,7 +311,7 @@ export abstract class AbstractCursor extends Eve if (internalDocs) { for (let i = 0; i < internalDocs.length; ++i) { result = iterator( - (transform ? transform(internalDocs[i]) : internalDocs[i]) as TSchema // TODO_OPERATIONS_LAYER - We need to work with the transform return type somehow + (transform ? transform(internalDocs[i]) : internalDocs[i]) as TSchema // TODO_NODE_2648 - We need to work with the transform return type somehow ); if (result === false) return done(); } @@ -401,7 +401,7 @@ export abstract class AbstractCursor extends Eve // these do need to be transformed since they are copying the rest of the batch const internalDocs = (transform ? this[kDocuments].splice(0, this[kDocuments].length).map(transform) - : this[kDocuments].splice(0, this[kDocuments].length)) as TSchema[]; // TODO_OPERATIONS_LAYER - We need to work with the transform return type somehow + : this[kDocuments].splice(0, this[kDocuments].length)) as TSchema[]; // TODO_NODE_2648 - We need to work with the transform return type somehow if (internalDocs) { docs.push(...internalDocs); @@ -442,9 +442,9 @@ export abstract class AbstractCursor extends Eve * * @param transform - The mapping transformation method. */ - map(transform: (doc: TSchema) => TResult): this { + map(transform: (doc: TSchema) => TResult): this { assertUninitialized(this); - const oldTransform = this[kTransform] as (doc: TSchema) => TSchema; // TODO_OPERATIONS_LAYER - We need to work with the transform return type somehow + const oldTransform = this[kTransform] as (doc: TSchema) => TSchema; // TODO_NODE_2648 - We need to work with the transform return type somehow if (oldTransform) { this[kTransform] = doc => { return transform(oldTransform(doc)); diff --git a/src/index.ts b/src/index.ts index 871f45bb4f8..d7fc7af4fa8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -340,7 +340,6 @@ export type { Query, Projection, InferIdType, - WithId as ObjectWithId, ProjectionOperators, MetaProjectionOperators, MetaSortOperators diff --git a/test/unit/types/basic_schema.test-d.ts b/test/types/basic_schema.test-d.ts similarity index 79% rename from test/unit/types/basic_schema.test-d.ts rename to test/types/basic_schema.test-d.ts index 1d80590205f..61780899981 100644 --- a/test/unit/types/basic_schema.test-d.ts +++ b/test/types/basic_schema.test-d.ts @@ -1,10 +1,10 @@ import { expectType } from 'tsd'; -import { Collection } from '../../.../../../src/collection'; -import type { ObjectId } from '../../../src/bson'; -import { Db } from '../../../src/db'; -import { MongoClient } from '../../../src/mongo_client'; -import type { InferIdType } from '../../../src/mongo_types'; +import { Collection } from '../../src/collection'; +import type { ObjectId } from '../../src/bson'; +import { Db } from '../../src/db'; +import { MongoClient } from '../../src/mongo_client'; +import type { InferIdType } from '../../src/mongo_types'; const db = new Db(new MongoClient(''), ''); diff --git a/test/types/distinct.test-d.ts b/test/types/distinct.test-d.ts new file mode 100644 index 00000000000..77972b0b71d --- /dev/null +++ b/test/types/distinct.test-d.ts @@ -0,0 +1,12 @@ +import { expectType } from 'tsd'; + +import { Db } from '../../src/db'; +import { MongoClient } from '../../src/mongo_client'; +import type { Movie } from './example_schemas'; + +const db = new Db(new MongoClient(''), ''); +const collection = db.collection(''); + +// Ensure distinct takes all keys of the schema plus '_id' +let x = (null as unknown) as Parameters[0]; +expectType<'_id' | keyof Movie>(x); diff --git a/test/unit/types/example_schemas.ts b/test/types/example_schemas.ts similarity index 90% rename from test/unit/types/example_schemas.ts rename to test/types/example_schemas.ts index ec0f89945e5..123bdf07597 100644 --- a/test/unit/types/example_schemas.ts +++ b/test/types/example_schemas.ts @@ -1,4 +1,4 @@ -import { Double, Int32 } from '../../../src/bson'; +import type { Double, Int32 } from '../../src/bson'; export type MediaType = 'movie' | 'tv' | 'web series'; diff --git a/test/unit/types/indexed_schema.test-d.ts b/test/types/indexed_schema.test-d.ts similarity index 71% rename from test/unit/types/indexed_schema.test-d.ts rename to test/types/indexed_schema.test-d.ts index 39297b8130e..43e7724cc20 100644 --- a/test/unit/types/indexed_schema.test-d.ts +++ b/test/types/indexed_schema.test-d.ts @@ -1,14 +1,9 @@ -import { expectDeprecated, expectType, expectNotType, expectError, expectAssignable } from 'tsd'; +import { expectType, expectNotType, expectError, expectAssignable } from 'tsd'; -import { Collection } from '../../.../../../src/collection'; -import { ObjectId } from '../../../src/bson'; -import { Db } from '../../../src/db'; -import { MongoClient } from '../../../src/mongo_client'; -import type { InferIdType } from '../../../src/mongo_types'; - -expectDeprecated(Collection.prototype.insert); -expectDeprecated(Collection.prototype.update); -expectDeprecated(Collection.prototype.remove); +import { Collection } from '../../src/collection'; +import { ObjectId } from '../../src/bson'; +import { Db } from '../../src/db'; +import { MongoClient } from '../../src/mongo_client'; const db = new Db(new MongoClient(''), ''); diff --git a/test/unit/types/mongodb.test-d.ts b/test/types/mongodb.test-d.ts similarity index 63% rename from test/unit/types/mongodb.test-d.ts rename to test/types/mongodb.test-d.ts index 446b0f04d0b..e4d57e9df00 100644 --- a/test/unit/types/mongodb.test-d.ts +++ b/test/types/mongodb.test-d.ts @@ -1,10 +1,10 @@ import { expectDeprecated, expectType, expectNotType, expectError, expectAssignable } from 'tsd'; -import { Collection } from '../../.../../../src/collection'; -import { AggregationCursor } from '../../../src/cursor/aggregation_cursor'; -import { Db } from '../../../src/db'; -import { MongoError } from '../../../src/error'; -import { MongoClient } from '../../../src/mongo_client'; +import { Collection } from '../../src//collection'; +import { AggregationCursor } from '../../src//cursor/aggregation_cursor'; +import { Db } from '../../src//db'; +import { MongoError } from '../../src//error'; +import { MongoClient } from '../../src//mongo_client'; expectDeprecated(Collection.prototype.insert); expectDeprecated(Collection.prototype.update); diff --git a/test/unit/types/union_schema.test-d.ts b/test/types/union_schema.test-d.ts similarity index 85% rename from test/unit/types/union_schema.test-d.ts rename to test/types/union_schema.test-d.ts index 88783007cca..94fed65f23d 100644 --- a/test/unit/types/union_schema.test-d.ts +++ b/test/types/union_schema.test-d.ts @@ -1,9 +1,9 @@ import { expectType, expectError, expectNotType } from 'tsd'; -import { Collection } from '../../.../../../src/collection'; -import { ObjectId } from '../../../src/bson'; -import { Db } from '../../../src/db'; -import { MongoClient } from '../../../src/mongo_client'; +import { Collection } from '../../src/collection'; +import { ObjectId } from '../../src/bson'; +import { Db } from '../../src//db'; +import { MongoClient } from '../../src//mongo_client'; type InsertRes = Promise<{ acknowledged: boolean; insertedId: TId }>; diff --git a/test/unit/types/distinct.test-d.ts b/test/unit/types/distinct.test-d.ts deleted file mode 100644 index c9b0cf2b5b1..00000000000 --- a/test/unit/types/distinct.test-d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { expectType, expectError, expectNotType } from 'tsd'; - -import { Db } from '../../../src/db'; -import { MongoClient } from '../../../src/mongo_client'; -import { Movie } from './example_schemas'; - -const db = new Db(new MongoClient(''), ''); -const collection = db.collection(''); - -// Ensure distinct takes all keys of the schema plus '_id' -let x = null as Parameters[0] -expectType<'_id' | keyof Movie>(x) From 31526e09efcceb4f6b04a2e29f9643000ba4d66c Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Thu, 25 Mar 2021 17:12:09 -0400 Subject: [PATCH 03/15] fix: linter issues --- .eslintrc.json | 4 ++++ package-lock.json | 24 ++++++++++++------------ package.json | 2 +- src/gridfs-stream/index.ts | 2 +- src/mongo_types.ts | 9 ++++----- test/types/.eslintrc.json | 28 ++++++++++++++++++++++++++++ test/types/distinct.test-d.ts | 2 +- test/types/indexed_schema.test-d.ts | 2 +- test/types/mongodb.test-d.ts | 2 +- test/types/union_schema.test-d.ts | 5 +++-- test/unit/type_check.test.js | 16 ++++++++++++++++ test/unit/type_check.test.ts | 12 ------------ 12 files changed, 72 insertions(+), 36 deletions(-) create mode 100644 test/types/.eslintrc.json create mode 100644 test/unit/type_check.test.js delete mode 100644 test/unit/type_check.test.ts diff --git a/.eslintrc.json b/.eslintrc.json index 5bd15af3ce1..c16caa0174d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -51,5 +51,9 @@ "files": ["*.mjs"], "parserOptions": {"sourceType": "module"} + },{ + "files": ["*.ts"], + "parserOptions": {"sourceType": "module"} + }] } diff --git a/package-lock.json b/package-lock.json index 4c1c65c3b8d..7acccba349d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2381,9 +2381,9 @@ } }, "electron-to-chromium": { - "version": "1.3.699", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.699.tgz", - "integrity": "sha512-fjt43CPXdPYwD9ybmKbNeLwZBmCVdLY2J5fGZub7/eMPuiqQznOGNXv/wurnpXIlE7ScHnvG9Zi+H4/i6uMKmw==", + "version": "1.3.700", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.700.tgz", + "integrity": "sha512-wQtaxVZzpOeCjW1CGuC5W3bYjE2jglvk076LcTautBOB9UtHztty7wNzjVsndiMcSsdUsdMy5w76w5J1U7OPTQ==", "dev": true }, "emoji-regex": { @@ -5922,9 +5922,9 @@ "dev": true }, "prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz", + "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==", "dev": true }, "prettier-linter-helpers": { @@ -7627,15 +7627,15 @@ "optional": true }, "unbox-primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.0.tgz", - "integrity": "sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", "dev": true, "requires": { "function-bind": "^1.1.1", - "has-bigints": "^1.0.0", - "has-symbols": "^1.0.0", - "which-boxed-primitive": "^1.0.1" + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" } }, "underscore": { diff --git a/package.json b/package.json index 8a3309e2da1..85ae336c58d 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "mocha-sinon": "^2.1.0", "mongodb-mock-server": "^2.0.1", "nyc": "^15.1.0", - "prettier": "^2.0.5", + "prettier": "2.1.1", "rimraf": "^3.0.2", "semver": "^5.5.0", "sinon": "^4.3.0", diff --git a/src/gridfs-stream/index.ts b/src/gridfs-stream/index.ts index edb4396debe..b34dc289dd2 100644 --- a/src/gridfs-stream/index.ts +++ b/src/gridfs-stream/index.ts @@ -9,7 +9,7 @@ import { import { GridFSBucketWriteStream, GridFSBucketWriteStreamOptions, GridFSChunk } from './upload'; import { executeLegacyOperation, Callback, getTopology } from '../utils'; import { WriteConcernOptions, WriteConcern } from '../write_concern'; -import type { Document, ObjectId } from '../bson'; +import type { ObjectId } from '../bson'; import type { Db } from '../db'; import type { ReadPreference } from '../read_preference'; import type { Collection } from '../collection'; diff --git a/src/mongo_types.ts b/src/mongo_types.ts index e4e9774ef62..fdabd63a208 100644 --- a/src/mongo_types.ts +++ b/src/mongo_types.ts @@ -25,11 +25,9 @@ export type WithId = EnhancedOmit & { _id: InferIdType< * `TSchema['_id'] extends ObjectId` which translated to "Is the _id property ObjectId?" * we instead ask "Does ObjectId look like (have the same shape) as the _id?" */ -export type OptionalId = ObjectId extends TSchema['_id'] - ? // a Schema with ObjectId _id type or "any" or "indexed type" provided - EnhancedOmit & { _id?: InferIdType } - : // a Schema provided but _id type is not ObjectId - WithId; +export type OptionalId = ObjectId extends TSchema['_id'] // a Schema with ObjectId _id type or "any" or "indexed type" provided + ? EnhancedOmit & { _id?: InferIdType } // a Schema provided but _id type is not ObjectId + : WithId; /** TypeScript Omit (Exclude to be specific) does not work for objects with an "any" indexed type, and breaks discriminated unions @public */ export type EnhancedOmit = string extends keyof TRecordOrUnion @@ -45,6 +43,7 @@ export type WithoutId = Omit; export type Query = Partial & Document; /** A MongoDB UpdateQuery is set of operators @public */ +// eslint-disable-next-line @typescript-eslint/no-unused-vars export type UpdateQuery = Document; // TODO /** @see https://docs.mongodb.com/manual/reference/operator/aggregation/meta/#proj._S_meta @public */ diff --git a/test/types/.eslintrc.json b/test/types/.eslintrc.json new file mode 100644 index 00000000000..15cec797940 --- /dev/null +++ b/test/types/.eslintrc.json @@ -0,0 +1,28 @@ +{ + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018 + }, + "plugins": [ + "@typescript-eslint", + "prettier", + "eslint-plugin-tsdoc" + ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "prettier/@typescript-eslint", + "plugin:prettier/recommended" + ], + "env": { + "node": true, + "mocha": false, + "es6": true + }, + "rules": { + "prettier/prettier": "error", + "tsdoc/syntax": "warn", + "typescript-eslint/no-explicit-any": "off" + } +} diff --git a/test/types/distinct.test-d.ts b/test/types/distinct.test-d.ts index 77972b0b71d..0c8c0da9f9e 100644 --- a/test/types/distinct.test-d.ts +++ b/test/types/distinct.test-d.ts @@ -8,5 +8,5 @@ const db = new Db(new MongoClient(''), ''); const collection = db.collection(''); // Ensure distinct takes all keys of the schema plus '_id' -let x = (null as unknown) as Parameters[0]; +const x = (null as unknown) as Parameters[0]; expectType<'_id' | keyof Movie>(x); diff --git a/test/types/indexed_schema.test-d.ts b/test/types/indexed_schema.test-d.ts index 43e7724cc20..038fdecdbd2 100644 --- a/test/types/indexed_schema.test-d.ts +++ b/test/types/indexed_schema.test-d.ts @@ -18,7 +18,7 @@ const randomKeysIncludeIdC = new Collection(db, ' expectType>(randomKeysIncludeIdC.insertOne({ a: 2, randomKey: 23, _id: 23 })); expectError(randomKeysIncludeIdC.insertOne({ a: 2, randomKey: 23 })); -let arg1: Parameters[0] = null as any; +const arg1 = (null as unknown) as Parameters[0]; expectAssignable>(arg1); //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/test/types/mongodb.test-d.ts b/test/types/mongodb.test-d.ts index e4d57e9df00..84722ff30d0 100644 --- a/test/types/mongodb.test-d.ts +++ b/test/types/mongodb.test-d.ts @@ -1,4 +1,4 @@ -import { expectDeprecated, expectType, expectNotType, expectError, expectAssignable } from 'tsd'; +import { expectDeprecated, expectType } from 'tsd'; import { Collection } from '../../src//collection'; import { AggregationCursor } from '../../src//cursor/aggregation_cursor'; diff --git a/test/types/union_schema.test-d.ts b/test/types/union_schema.test-d.ts index 94fed65f23d..a3c4f06c3ed 100644 --- a/test/types/union_schema.test-d.ts +++ b/test/types/union_schema.test-d.ts @@ -1,4 +1,4 @@ -import { expectType, expectError, expectNotType } from 'tsd'; +import { expectType, expectError, expectNotType, expectNotAssignable } from 'tsd'; import { Collection } from '../../src/collection'; import { ObjectId } from '../../src/bson'; @@ -21,7 +21,8 @@ interface Rectangle { type Shape = Circle | Rectangle; type c = Collection; -type i = Parameters[0]; +// should not insert a portion of a type +expectNotAssignable[0]>({ height: 2 }); const shapesC = new Collection(db, ''); expectType(shapesC.insertOne({ radius: 4 })); diff --git a/test/unit/type_check.test.js b/test/unit/type_check.test.js new file mode 100644 index 00000000000..f0ec214af07 --- /dev/null +++ b/test/unit/type_check.test.js @@ -0,0 +1,16 @@ +'use strict'; + +const tsd = require('tsd'); +const { expect } = require('chai'); + +describe('Exported Types', () => { + it('should be as expected', async () => { + const diagnostics = await tsd(); + if (diagnostics.length !== 0) { + const messages = diagnostics + .map(d => `${d.fileName}:${d.line}:${d.column} - [${d.severity}]: ${d.message}`) + .join('\n'); + expect.fail('\n' + messages); + } + }); +}); diff --git a/test/unit/type_check.test.ts b/test/unit/type_check.test.ts deleted file mode 100644 index ae5cf1ffc3c..00000000000 --- a/test/unit/type_check.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import tsd from 'tsd'; -import { expect } from 'chai' - -describe('Exported Types', () => { - it('should be as expected', async () => { - const diagnostics = await tsd(); - if (diagnostics.length !== 0) { - const messages = diagnostics.map(d => `${d.fileName}:${d.line}:${d.column} - [${d.severity}]: ${d.message}`).join('\n') - expect.fail('\n' + messages) - } - }) -}) From 432b98e1be9e2cace3ade72bfbd4604ef716ce5d Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Thu, 25 Mar 2021 17:23:12 -0400 Subject: [PATCH 04/15] fix: tsd import in js --- test/unit/type_check.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/type_check.test.js b/test/unit/type_check.test.js index f0ec214af07..53066f0b6b7 100644 --- a/test/unit/type_check.test.js +++ b/test/unit/type_check.test.js @@ -1,6 +1,6 @@ 'use strict'; -const tsd = require('tsd'); +const tsd = require('tsd').default; const { expect } = require('chai'); describe('Exported Types', () => { From 7f5340d289c9344ec4067fcdc482a40cf061f1f3 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Tue, 20 Apr 2021 13:08:48 -0400 Subject: [PATCH 05/15] test: show internal type usage with additional tests --- CONTRIBUTORS.md | 2 +- test/types/basic_schema.test-d.ts | 53 +++++++++++++++++++++++++------ test/types/distinct.test-d.ts | 8 ++--- test/types/mongodb.test-d.ts | 15 +++------ test/types/union_schema.test-d.ts | 4 +-- 5 files changed, 53 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c82f453d2be..cfc843fbd78 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -56,7 +56,7 @@ - Neal Beeken <> - Eric Adum <> -- Durran Jordan <> +- Durran Jordan <> ## Community Types diff --git a/test/types/basic_schema.test-d.ts b/test/types/basic_schema.test-d.ts index 61780899981..c096970cea9 100644 --- a/test/types/basic_schema.test-d.ts +++ b/test/types/basic_schema.test-d.ts @@ -1,26 +1,43 @@ -import { expectType } from 'tsd'; +import { expectAssignable, expectNotType, expectType } from 'tsd'; import { Collection } from '../../src/collection'; -import type { ObjectId } from '../../src/bson'; +import { ObjectId } from '../../src/bson'; import { Db } from '../../src/db'; import { MongoClient } from '../../src/mongo_client'; import type { InferIdType } from '../../src/mongo_types'; const db = new Db(new MongoClient(''), ''); -type InsertRes = Promise<{ acknowledged: boolean; insertedId: TId }>; +type ACounter = { a: number }; +type ACounterWithId = { a: number; _id: ObjectId }; //////////////////////////////////////////////////////////////////////////////////////////////////// // Can defined Schema without _id -expectType>(new Collection<{ a: number }>(db, '')); +expectType>(new Collection(db, '')); +// Or with one +expectType>(new Collection(db, '')); //////////////////////////////////////////////////////////////////////////////////////////////////// -// Simple Schema -const simpleC = new Collection<{ a: number; _id: ObjectId }>(db, ''); -expectType(simpleC.insertOne({ a: 2 })); +// Simple Schema that does not define an _id +// With _id +type InsertOneArgOf = Parameters['insertOne']>[0]; +expectAssignable>({ _id: new ObjectId(), a: 3 }); +// Without _id +expectAssignable>({ a: 3 }); +// Does not permit extra keys +expectNotType>({ a: 2, b: 34 }); +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Simple Schema that does define an _id +// With _id +expectAssignable>({ _id: new ObjectId(), a: 3 }); +// Without _id +expectAssignable>({ a: 3 }); +// Does not permit extra keys +expectNotType>({ a: 2, b: 34 }); //////////////////////////////////////////////////////////////////////////////////////////////////// -// CustomType _id Schema +// CustomType _id Schema (behavior change) +// _id that is a custom type must be generated client side, so it is required class MyId { uuid!: number; } @@ -28,7 +45,23 @@ interface CustomIdType { a: number; _id: MyId; } -const customIdTypeC = new Collection(db, ''); +type customIdCollection = Collection; +type insertOneArg = Parameters[0]; + +// inferring the _id type is straight forward for a schema like this type IdType = InferIdType; expectType(new MyId()); -expectType>(customIdTypeC.insertOne({ a: 2, _id: new MyId() })); + +// _id is a required field since it isn't an ObjectId +expectAssignable({ a: 2, _id: new MyId() }); +expectNotType({ a: 2 }); + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// InferIdType - +// eslint-disable-next-line @typescript-eslint/ban-types +type Empty = {}; +const a: never = 0 as never; +const oid = new ObjectId(); +expectType>(oid); // Empty schema gets the implicit _id +expectType>(a); // Empty object as an oid resolves to never, while this is a valid _id, it is likely undesirable +expectType>({ a: 3 }); // embedded documents are permitted as _id fields diff --git a/test/types/distinct.test-d.ts b/test/types/distinct.test-d.ts index 0c8c0da9f9e..aeb7d4d5ad9 100644 --- a/test/types/distinct.test-d.ts +++ b/test/types/distinct.test-d.ts @@ -1,12 +1,8 @@ import { expectType } from 'tsd'; -import { Db } from '../../src/db'; -import { MongoClient } from '../../src/mongo_client'; +import type { Collection } from '../../src/collection'; import type { Movie } from './example_schemas'; -const db = new Db(new MongoClient(''), ''); -const collection = db.collection(''); - // Ensure distinct takes all keys of the schema plus '_id' -const x = (null as unknown) as Parameters[0]; +const x = (null as unknown) as Parameters['distinct']>[0]; expectType<'_id' | keyof Movie>(x); diff --git a/test/types/mongodb.test-d.ts b/test/types/mongodb.test-d.ts index 84722ff30d0..8dee493535d 100644 --- a/test/types/mongodb.test-d.ts +++ b/test/types/mongodb.test-d.ts @@ -1,18 +1,13 @@ -import { expectDeprecated, expectType } from 'tsd'; +import { expectDeprecated } from 'tsd'; -import { Collection } from '../../src//collection'; -import { AggregationCursor } from '../../src//cursor/aggregation_cursor'; -import { Db } from '../../src//db'; -import { MongoError } from '../../src//error'; -import { MongoClient } from '../../src//mongo_client'; +import { Collection } from '../../src/collection'; +import { AggregationCursor } from '../../src/cursor/aggregation_cursor'; +import { MongoError } from '../../src/error'; +// We wish to keep these APIs but continue to ensure they are marked as deprecated. expectDeprecated(Collection.prototype.insert); expectDeprecated(Collection.prototype.update); expectDeprecated(Collection.prototype.remove); expectDeprecated(Collection.prototype.count); expectDeprecated(MongoError.create); expectDeprecated(AggregationCursor.prototype.geoNear); - -const db = new Db(new MongoClient(''), ''); - -expectType>(db.collection<{ a: number }>('')); diff --git a/test/types/union_schema.test-d.ts b/test/types/union_schema.test-d.ts index a3c4f06c3ed..6c3efdd0fb0 100644 --- a/test/types/union_schema.test-d.ts +++ b/test/types/union_schema.test-d.ts @@ -2,8 +2,8 @@ import { expectType, expectError, expectNotType, expectNotAssignable } from 'tsd import { Collection } from '../../src/collection'; import { ObjectId } from '../../src/bson'; -import { Db } from '../../src//db'; -import { MongoClient } from '../../src//mongo_client'; +import { Db } from '../../src/db'; +import { MongoClient } from '../../src/mongo_client'; type InsertRes = Promise<{ acknowledged: boolean; insertedId: TId }>; From 2136bdfdeaa5ad7fe799321bc46cd58334e6157f Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Wed, 21 Apr 2021 14:29:34 -0400 Subject: [PATCH 06/15] refactor: use Filter terminology --- package-lock.json | 594 +++++++++++++++++++--------------- src/bulk/common.ts | 8 +- src/collection.ts | 237 +++++++------- src/gridfs-stream/download.ts | 2 +- src/gridfs-stream/index.ts | 8 +- src/index.ts | 4 +- src/mongo_types.ts | 2 +- 7 files changed, 476 insertions(+), 379 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7acccba349d..88e2cc014ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,31 +14,30 @@ } }, "@babel/compat-data": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", - "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.15.tgz", + "integrity": "sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA==", "dev": true }, "@babel/core": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.10.tgz", - "integrity": "sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.16.tgz", + "integrity": "sha512-sXHpixBiWWFti0AV2Zq7avpTasr6sIAu7Y396c608541qAU2ui4a193m0KSQmfPSKFZLnQ3cvlKDOm3XkuXm3Q==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.10", - "@babel/helper-module-transforms": "^7.13.0", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.10", + "@babel/generator": "^7.13.16", + "@babel/helper-compilation-targets": "^7.13.16", + "@babel/helper-module-transforms": "^7.13.14", + "@babel/helpers": "^7.13.16", + "@babel/parser": "^7.13.16", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/traverse": "^7.13.15", + "@babel/types": "^7.13.16", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.1.2", - "lodash": "^4.17.19", "semver": "^6.3.0", "source-map": "^0.5.0" }, @@ -67,12 +66,12 @@ } }, "@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.16.tgz", + "integrity": "sha512-grBBR75UnKOcUWMp8WoDxNsWCFl//XCK6HWTrBQKTr5SV9f5g0pNOjdyzi/DTBv12S9GnYPInIXQBTky7OXEMg==", "dev": true, "requires": { - "@babel/types": "^7.13.0", + "@babel/types": "^7.13.16", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -86,12 +85,12 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz", - "integrity": "sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", + "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", "dev": true, "requires": { - "@babel/compat-data": "^7.13.8", + "@babel/compat-data": "^7.13.15", "@babel/helper-validator-option": "^7.12.17", "browserslist": "^4.14.5", "semver": "^6.3.0" @@ -144,9 +143,9 @@ } }, "@babel/helper-module-transforms": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.12.tgz", - "integrity": "sha512-7zVQqMO3V+K4JOOj40kxiCrMf6xlQAkewBB0eu2b03OO/Q21ZutOzjpfD79A5gtE/2OWi1nv625MrDlGlkbknQ==", + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", + "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.13.12", @@ -155,8 +154,8 @@ "@babel/helper-split-export-declaration": "^7.12.13", "@babel/helper-validator-identifier": "^7.12.11", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.14" } }, "@babel/helper-optimise-call-expression": { @@ -211,14 +210,14 @@ "dev": true }, "@babel/helpers": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", - "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.17.tgz", + "integrity": "sha512-Eal4Gce4kGijo1/TGJdqp3WuhllaMLSrW6XcL0ulyUAQOuxHcCafZE8KHg9857gcTehsm/v7RcOx2+jp0Ryjsg==", "dev": true, "requires": { "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.13.17", + "@babel/types": "^7.13.17" } }, "@babel/highlight": { @@ -285,9 +284,9 @@ } }, "@babel/parser": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.12.tgz", - "integrity": "sha512-4T7Pb244rxH24yR116LAuJ+adxXXnHhZaLJjegJVKSdoNCe4x1eDBaud5YIcQFcqzsaD5BHvJw5BQ0AZapdCRw==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.16.tgz", + "integrity": "sha512-6bAg36mCwuqLO0hbR+z7PHuqWiCeP7Dzg73OpQwsAB1Eb8HnGEz5xYBzCfbu+YjoaJsJs+qheDxVAuqbt3ILEw==", "dev": true }, "@babel/template": { @@ -313,20 +312,19 @@ } }, "@babel/traverse": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", - "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.17.tgz", + "integrity": "sha512-BMnZn0R+X6ayqm3C3To7o1j7Q020gWdqdyP50KEoVqaCO2c/Im7sYZSmVgvefp8TTMQ+9CtwuBp0Z1CZ8V3Pvg==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.0", + "@babel/generator": "^7.13.16", "@babel/helper-function-name": "^7.12.13", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.0", - "@babel/types": "^7.13.0", + "@babel/parser": "^7.13.16", + "@babel/types": "^7.13.17", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" }, "dependencies": { "@babel/code-frame": { @@ -347,13 +345,12 @@ } }, "@babel/types": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.12.tgz", - "integrity": "sha512-K4nY2xFN4QMvQwkQ+zmBDp6ANMbVNw6BbxWmYA4qNjhR9W+Lj/8ky5MEY2Me5r+B2c6/v6F53oMndG+f9s3IiA==", + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.17.tgz", + "integrity": "sha512-RawydLgxbOPDlTLJNtoIypwdmAy//uQIzlKt2+iBiJaRlVuI6QLUxVAyWGNfOzp8Yu4L4lLIacoCyTNtpb4wiA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, @@ -462,16 +459,17 @@ "dev": true }, "@microsoft/api-extractor": { - "version": "7.13.2", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.13.2.tgz", - "integrity": "sha512-2fD0c8OxZW+e6NTaxbtrdNxXVuX7aqil3+cqig3pKsHymvUuRJVCEAcAJmZrJ/ENqYXNiB265EyqOT6VxbMysw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.14.0.tgz", + "integrity": "sha512-R9B0ic8EIcHhwSFQWYTyQX7QDi7kXONeKdIjJI8R+WzVJMA3r0Je9XxSQxxZ9MZIBUxv3fB7pXC2CPIsSkI/BA==", "dev": true, "requires": { - "@microsoft/api-extractor-model": "7.12.2", - "@microsoft/tsdoc": "0.12.24", - "@rushstack/node-core-library": "3.36.0", - "@rushstack/rig-package": "0.2.10", - "@rushstack/ts-command-line": "4.7.8", + "@microsoft/api-extractor-model": "7.13.0", + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.36.2", + "@rushstack/rig-package": "0.2.12", + "@rushstack/ts-command-line": "4.7.10", "colors": "~1.2.1", "lodash": "~4.17.15", "resolve": "~1.17.0", @@ -480,6 +478,30 @@ "typescript": "~4.1.3" }, "dependencies": { + "@microsoft/tsdoc-config": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz", + "integrity": "sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.13.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + }, + "dependencies": { + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + } + } + }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -498,19 +520,44 @@ } }, "@microsoft/api-extractor-model": { - "version": "7.12.2", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.12.2.tgz", - "integrity": "sha512-EU+U09Mj65zUH0qwPF4PFJiL6Y+PQQE/RRGEHEDGJJzab/mRQDpKOyrzSdb00xvcd/URehIHJqC55cY2Y4jGOA==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.13.0.tgz", + "integrity": "sha512-HnIbXpNiF/a+tTnGVJFq4aaxWEGI5XN7vpm1YjNLc+CY5C0s/bdT0LV9o9NzWSpQdHVUaYhQEVLviaDpusu6dg==", "dev": true, "requires": { - "@microsoft/tsdoc": "0.12.24", - "@rushstack/node-core-library": "3.36.0" + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.36.2" + }, + "dependencies": { + "@microsoft/tsdoc-config": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz", + "integrity": "sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.13.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + } + }, + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + } } }, "@microsoft/tsdoc": { - "version": "0.12.24", - "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.12.24.tgz", - "integrity": "sha512-Mfmij13RUTmHEMi9vRUhMXD7rnGR2VvxeNYtaGtaJ4redwwjT4UXYJ+nzmVJF7hhd4pn/Fx5sncDKxMVFJSWPg==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz", + "integrity": "sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==", "dev": true }, "@microsoft/tsdoc-config": { @@ -570,9 +617,9 @@ } }, "@rushstack/node-core-library": { - "version": "3.36.0", - "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.36.0.tgz", - "integrity": "sha512-bID2vzXpg8zweXdXgQkKToEdZwVrVCN9vE9viTRk58gqzYaTlz4fMId6V3ZfpXN6H0d319uGi2KDlm+lUEeqCg==", + "version": "3.36.2", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.36.2.tgz", + "integrity": "sha512-5J8xSY/PuCKR+yfxS497l0PP43kBUeD86S4eS3RzrmMle04J4522MWal8mk1T1EIDpYpgi8qScannU9oVxoStA==", "dev": true, "requires": { "@types/node": "10.17.13", @@ -604,9 +651,9 @@ } }, "@rushstack/rig-package": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.2.10.tgz", - "integrity": "sha512-WXYerEJEPf8bS3ruqfM57NnwXtA7ehn8VJjLjrjls6eSduE5CRydcob/oBTzlHKsQ7N196XKlqQl9P6qIyYG2A==", + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.2.12.tgz", + "integrity": "sha512-nbePcvF8hQwv0ql9aeQxcaMPK/h1OLAC00W7fWCRWIvD2MchZOE8jumIIr66HGrfG2X1sw++m/ZYI4D+BM5ovQ==", "dev": true, "requires": { "resolve": "~1.17.0", @@ -614,9 +661,9 @@ } }, "@rushstack/ts-command-line": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.7.8.tgz", - "integrity": "sha512-8ghIWhkph7NnLCMDJtthpsb7TMOsVGXVDvmxjE/CeklTqjbbUFBjGXizJfpbEkRQTELuZQ2+vGn7sGwIWKN2uA==", + "version": "4.7.10", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.7.10.tgz", + "integrity": "sha512-8t042g8eerypNOEcdpxwRA3uCmz0duMo21rG4Z2mdz7JxJeylDmzjlU3wDdef2t3P1Z61JCdZB6fbm1Mh0zi7w==", "dev": true, "requires": { "@types/argparse": "1.0.38", @@ -632,9 +679,9 @@ "dev": true }, "@sinonjs/commons": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", - "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -697,9 +744,9 @@ } }, "@types/chai": { - "version": "4.2.15", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.15.tgz", - "integrity": "sha512-rYff6FI+ZTKAPkJUoyz7Udq3GaoDZnxYDEvdEdFZASiA7PoErltHezDishqQiSDWrGxvxmplH304jyzQmjp0AQ==", + "version": "4.2.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz", + "integrity": "sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==", "dev": true }, "@types/chai-subset": { @@ -736,9 +783,9 @@ "dev": true }, "@types/node": { - "version": "14.14.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.36.tgz", - "integrity": "sha512-kjivUwDJfIjngzbhooRnOLhGYz6oRFi+L+EpMjxroDYXwDw9lHrJJ43E+dJ6KAd3V3WxWAJ/qZE9XKYHhjPOFQ==", + "version": "14.14.41", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.41.tgz", + "integrity": "sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g==", "dev": true }, "@types/normalize-package-data": { @@ -760,13 +807,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.19.0.tgz", - "integrity": "sha512-CRQNQ0mC2Pa7VLwKFbrGVTArfdVDdefS+gTw0oC98vSI98IX5A8EVH4BzJ2FOB0YlCmm8Im36Elad/Jgtvveaw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", + "integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.19.0", - "@typescript-eslint/scope-manager": "4.19.0", + "@typescript-eslint/experimental-utils": "4.22.0", + "@typescript-eslint/scope-manager": "4.22.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -787,55 +834,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.19.0.tgz", - "integrity": "sha512-9/23F1nnyzbHKuoTqFN1iXwN3bvOm/PRIXSBR3qFAYotK/0LveEOHr5JT1WZSzcD6BESl8kPOG3OoDRKO84bHA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz", + "integrity": "sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.19.0.tgz", - "integrity": "sha512-/uabZjo2ZZhm66rdAu21HA8nQebl3lAIDcybUoOxoI7VbZBYavLIwtOOmykKCJy+Xq6Vw6ugkiwn8Js7D6wieA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.0.tgz", + "integrity": "sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.19.0", - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/typescript-estree": "4.19.0", + "@typescript-eslint/scope-manager": "4.22.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/typescript-estree": "4.22.0", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.19.0.tgz", - "integrity": "sha512-GGy4Ba/hLXwJXygkXqMzduqOMc+Na6LrJTZXJWVhRrSuZeXmu8TAnniQVKgj8uTRKe4igO2ysYzH+Np879G75g==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz", + "integrity": "sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q==", "dev": true, "requires": { - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/visitor-keys": "4.19.0" + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0" } }, "@typescript-eslint/types": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.19.0.tgz", - "integrity": "sha512-A4iAlexVvd4IBsSTNxdvdepW0D4uR/fwxDrKUa+iEY9UWvGREu2ZyB8ylTENM1SH8F7bVC9ac9+si3LWNxcBuA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.0.tgz", + "integrity": "sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.19.0.tgz", - "integrity": "sha512-3xqArJ/A62smaQYRv2ZFyTA+XxGGWmlDYrsfZG68zJeNbeqRScnhf81rUVa6QG4UgzHnXw5VnMT5cg75dQGDkA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz", + "integrity": "sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.19.0", - "@typescript-eslint/visitor-keys": "4.19.0", + "@typescript-eslint/types": "4.22.0", + "@typescript-eslint/visitor-keys": "4.22.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -855,12 +902,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.19.0.tgz", - "integrity": "sha512-aGPS6kz//j7XLSlgpzU2SeTqHPsmRYxFztj2vPuMMFJXZudpRSehE3WCV+BaxwZFvfAqMoSd86TEuM0PQ59E/A==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz", + "integrity": "sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.19.0", + "@typescript-eslint/types": "4.22.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -1002,9 +1049,9 @@ } }, "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -1183,9 +1230,9 @@ "dev": true }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "base64-js": { @@ -1288,22 +1335,22 @@ "dev": true }, "browserslist": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", - "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.4.tgz", + "integrity": "sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001181", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.649", + "caniuse-lite": "^1.0.30001208", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.712", "escalade": "^3.1.1", - "node-releases": "^1.1.70" + "node-releases": "^1.1.71" } }, "bson": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.2.3.tgz", - "integrity": "sha512-3ztgjpKp0itFxGqzrLMHWqyZH5oMOIRWsjeY61yNVzrDGB/KxtgD6djFlz9n3vx7lLr2r6bkHagBCgyk1ZjETA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.3.0.tgz", + "integrity": "sha512-LkKKeFJx5D6RRCRvLE+fDs40M2ZQNuk7W7tFXmKd7OOcQQ+BHdzCgRdL4XEGjc1UEGtiYuMvIVk91Bv8qsI50A==", "requires": { "buffer": "^5.6.0" } @@ -1433,9 +1480,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001204", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz", - "integrity": "sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ==", + "version": "1.0.30001214", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001214.tgz", + "integrity": "sha512-O2/SCpuaU3eASWVaesQirZv1MSjUNOvmugaD8zNSJqw6Vv5SGwoOpA9LJs3pNPfM745nxqPvfZY3MQKY4AKHYg==", "dev": true }, "caseless": { @@ -1474,9 +1521,9 @@ "dev": true }, "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -2173,9 +2220,9 @@ "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" }, "dependency-tree": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/dependency-tree/-/dependency-tree-8.0.0.tgz", - "integrity": "sha512-zagnV3jgizudEWY3FIFkGCrRr3+GukSMLlw1snIWAOL2beceC22hBXdeNjCnnfPZvbHIPB9DvacSCfD+IoOG3w==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/dependency-tree/-/dependency-tree-8.1.0.tgz", + "integrity": "sha512-YKFK+1KXJOqVpsW6MkrIl/DyiW+KVG25V8NfRs27ANe+oSeCkQx2ROW1mBpp1bcm++5zj3Xv8wyFxHgX6TbM1w==", "dev": true, "requires": { "commander": "^2.20.3", @@ -2381,9 +2428,9 @@ } }, "electron-to-chromium": { - "version": "1.3.700", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.700.tgz", - "integrity": "sha512-wQtaxVZzpOeCjW1CGuC5W3bYjE2jglvk076LcTautBOB9UtHztty7wNzjVsndiMcSsdUsdMy5w76w5J1U7OPTQ==", + "version": "1.3.719", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.719.tgz", + "integrity": "sha512-heM78GKSqrIzO9Oz0/y22nTBN7bqSP1Pla2SyU9DiSnQD+Ea9SyyN5RWWlgqsqeBLNDkSlE9J9EHFmdMPzxB/g==", "dev": true }, "emoji-regex": { @@ -2402,9 +2449,9 @@ } }, "enhanced-resolve": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz", - "integrity": "sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.0.tgz", + "integrity": "sha512-Sl3KRpJA8OpprrtaIswVki3cWPiPKxXuFxJXBp+zNb6s6VwNWwFRUdtmzd2ReUut8n+sCPx7QCtQ7w5wfJhSgQ==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -2578,9 +2625,9 @@ } }, "eslint": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz", - "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", + "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", @@ -2690,36 +2737,52 @@ } }, "eslint-plugin-prettier": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz", - "integrity": "sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", + "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" } }, "eslint-plugin-tsdoc": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.11.tgz", - "integrity": "sha512-vEjGANpmBfrvpKj9rwePGhA+gIe1mp+dhDZsrkxlHqPVOZvzVdFSV9fxu/o3eppmxhybI8brD88jOrLEAIB9Gw==", + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.14.tgz", + "integrity": "sha512-fJ3fnZRsdIoBZgzkQjv8vAj6NeeOoFkTfgosj6mKsFjX70QV256sA/wq+y/R2+OL4L8E79VVaVWrPeZnKNe8Ng==", "dev": true, "requires": { - "@microsoft/tsdoc": "0.13.0", - "@microsoft/tsdoc-config": "0.14.0" + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "0.15.2" }, "dependencies": { - "@microsoft/tsdoc": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.13.0.tgz", - "integrity": "sha512-/8J+4DdvexBH1Qh1yR8VZ6bPay2DL/TDdmSIypAa3dAghJzsdaiZG8COvzpYIML6HV2UVN0g4qbuqzjG4YKgWg==", - "dev": true + "@microsoft/tsdoc-config": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz", + "integrity": "sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.13.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + } + }, + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } } } }, "eslint-rule-docs": { - "version": "1.1.223", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.223.tgz", - "integrity": "sha512-6HU1vH6b3QBI2RiFyNE1cQWr2pQ+op1zqZRsVXBZsLngF5ePBGDbkwFtr1Ye4Yq1DBKc499TMEkIzx25xVetuw==", + "version": "1.1.224", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.224.tgz", + "integrity": "sha512-Rq1Hn4dODLewC8HbCGlQL69VW8ifqldCHHdfhKmU+h+C+Q2wR7WeYcVgz/Wh7E5KUWlmUUKWkBfyYq0Ltrtk3g==", "dev": true }, "eslint-scope": { @@ -3248,9 +3311,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "indent-string": { @@ -3550,9 +3613,9 @@ } }, "globals": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", - "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", + "version": "13.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", + "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3825,9 +3888,9 @@ "dev": true }, "irregular-plurals": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.2.0.tgz", - "integrity": "sha512-YqTdPLfwP7YFN0SsD3QUVCkm9ZG2VzOXv3DOrw5G5mkMbVwptTwVcFv7/C0vOpBmgTxAeTG19XpUs1E522LW9Q==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.3.0.tgz", + "integrity": "sha512-MVBLKUTangM3EfRPFROhmWQQKRDsrgI83J8GS3jXy+OwYqiR2/aoWndYQ5416jLE3uaGgLH7ncme3X9y09gZ3g==", "dev": true }, "is-arrayish": { @@ -4327,9 +4390,9 @@ } }, "just-extend": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.1.tgz", - "integrity": "sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", "dev": true }, "keyv": { @@ -4451,6 +4514,18 @@ "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", "dev": true }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -4475,6 +4550,12 @@ "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=", "dev": true }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "log-driver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", @@ -4596,9 +4677,9 @@ "dev": true }, "map-obj": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.0.tgz", - "integrity": "sha512-NAq0fCmZYGz9UFEQyndp7sisrow4GroyGeKluyKC/chuITZsPyOyC1UJZPJlVFImhXdROIP5xqouRLThT3BbpQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", "dev": true }, "markdown-it": { @@ -4668,9 +4749,9 @@ } }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "locate-path": { @@ -4769,28 +4850,28 @@ "dev": true }, "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "requires": { "braces": "^3.0.1", - "picomatch": "^2.0.5" + "picomatch": "^2.2.3" } }, "mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", "dev": true }, "mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", "dev": true, "requires": { - "mime-db": "1.46.0" + "mime-db": "1.47.0" } }, "mimic-fn": { @@ -5188,9 +5269,9 @@ } }, "node-abi": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.21.0.tgz", - "integrity": "sha512-smhrivuPqEM3H5LmnY3KU6HfYv0u4QklgAxfFyRNujKUzbUcYZ+Jc2EhukB9SRcD2VpqhxM7n/MIcp1Ua1/JMg==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.26.0.tgz", + "integrity": "sha512-ag/Vos/mXXpWLLAYWsAoQdgS+gW7IwvgMLOgqopm/DbzAjazLltzgzpVMsFlgmo9TzG5hGXeaBZx2AI731RIsQ==", "dev": true, "requires": { "semver": "^5.4.1" @@ -5446,9 +5527,9 @@ "dev": true }, "object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.2.tgz", + "integrity": "sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA==", "dev": true }, "object-keys": { @@ -5725,9 +5806,9 @@ "dev": true }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", "dev": true }, "pify": { @@ -5812,13 +5893,13 @@ "dev": true }, "postcss": { - "version": "8.2.8", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.8.tgz", - "integrity": "sha512-1F0Xb2T21xET7oQV9eKuctbM9S7BC0fetoHCc4H13z0PT6haiRLP4T0ZY4XWh7iLP0usgqykT6p9B2RtOf4FPw==", + "version": "8.2.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.10.tgz", + "integrity": "sha512-b/h7CPV7QEdrqIxtAf2j31U5ef05uBDuvoXv6L51Q4rcS1jdlXAVKJv+atCFdUXYl9dyTHGyoMzIepwowRJjFw==", "dev": true, "requires": { "colorette": "^1.2.2", - "nanoid": "^3.1.20", + "nanoid": "^3.1.22", "source-map": "^0.6.1" } }, @@ -6059,9 +6140,9 @@ }, "dependencies": { "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "load-json-file": { @@ -6707,9 +6788,9 @@ } }, "standard-version": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-9.1.1.tgz", - "integrity": "sha512-PF9JnRauBwH7DAkmefYu1mB2Kx0MVG13udqDTFmDUiogbyikBAHBdMrVuauxtAb2YIkyZ3FMYCNv0hqUKMOPww==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-9.2.0.tgz", + "integrity": "sha512-utJcqjk/wR4sePSwDoRcc5CzJ6S+kec5Hd0+1TJI+j1TRYuuptweAnEUdkkjGf2vYoGab2ezefyVtW065HZ1Uw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -6880,9 +6961,9 @@ } }, "y18n": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", - "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yargs": { @@ -7021,9 +7102,9 @@ } }, "supports-hyperlinks": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz", - "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", "dev": true, "requires": { "has-flag": "^4.0.0", @@ -7031,21 +7112,26 @@ } }, "table": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", - "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.3.2.tgz", + "integrity": "sha512-I9/Ca6Huf2oxFag7crD0DhA+arIdfLtWunSn0NIXSzjtUlDgIBGVZY7SsMkNPNT3Psd/z4gza0nuEpmra9eRbg==", "dev": true, "requires": { - "ajv": "^7.0.2", - "lodash": "^4.17.20", + "ajv": "^8.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "lodash.clonedeep": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", "string-width": "^4.2.0" }, "dependencies": { "ajv": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz", - "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.1.0.tgz", + "integrity": "sha512-B/Sk2Ix7A36fs/ZkuGLIR86EdjbgR6fsAcbx9lOP/QBSXujDNbVmIS/U4Itz5k8fPFDeVZl/zQ/gJW4Jrq6XjQ==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -7327,9 +7413,9 @@ } }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "locate-path": { @@ -7511,9 +7597,9 @@ } }, "typedoc": { - "version": "0.20.34", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.34.tgz", - "integrity": "sha512-es+N/KyGPcHl9cAuYh1Z5m7HzwcmfNLghkmb2pzGz7HRDS5GS2uA3hu/c2cv4gCxDsw8pPUPCOvww+Hzf48Kug==", + "version": "0.20.35", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.20.35.tgz", + "integrity": "sha512-7sNca19LXg2hgyGHq3b33tQ1YFApmd8aBDEzWQ2ry4VDkw/NdFWkysGiGRY1QckDCB0gVH8+MlXA4K71IB3azg==", "dev": true, "requires": { "colors": "^1.4.0", @@ -7558,9 +7644,9 @@ } }, "marked": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.1.tgz", - "integrity": "sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.3.tgz", + "integrity": "sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==", "dev": true }, "universalify": { @@ -7572,15 +7658,15 @@ } }, "typedoc-default-themes": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.9.tgz", - "integrity": "sha512-Jd5fYTiqzinZdoIY382W7tQXTwAzWRdg8KbHfaxmb78m1/3jL9riXtk23oBOKwhi8GFVykCOdPzEJKY87/D0LQ==", + "version": "0.12.10", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.12.10.tgz", + "integrity": "sha512-fIS001cAYHkyQPidWXmHuhs8usjP5XVJjWB8oZGqkTowZaz3v7g3KDZeeqE82FBrmkAnIBOY3jgy7lnPnqATbA==", "dev": true }, "typescript": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", - "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", "dev": true }, "typescript-cached-transpile": { @@ -7595,9 +7681,9 @@ }, "dependencies": { "@types/node": { - "version": "12.20.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.6.tgz", - "integrity": "sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA==", + "version": "12.20.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.10.tgz", + "integrity": "sha512-TxCmnSSppKBBOzYzPR2BR25YlX5Oay8z2XGwFBInuA/Co0V9xJhLlW4kjbxKtgeNo3NOMbQP1A5Rc03y+XecPw==", "dev": true }, "fs-extra": { @@ -7620,9 +7706,9 @@ "dev": true }, "uglify-js": { - "version": "3.13.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.2.tgz", - "integrity": "sha512-SbMu4D2Vo95LMC/MetNaso1194M1htEA+JrqE9Hk+G2DhI+itfS9TRu9ZKeCahLDNa/J3n4MqUJ/fOHMzQpRWw==", + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", + "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", "dev": true, "optional": true }, @@ -7768,9 +7854,9 @@ } }, "vscode-textmate": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.3.1.tgz", - "integrity": "sha512-X4E7iPJzmMsL9AY4MyZrxUt0Dm/kGWreJEGdQgAHXHQrRGDdlwAu9X1LCsQ0VKUCg5wjwSS1LPpy1BOfxIw4Tw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.4.0.tgz", + "integrity": "sha512-c0Q4zYZkcLizeYJ3hNyaVUM2AA8KDhNCA3JvXY8CeZSJuBdAy3bAvSbv46RClC4P3dSO9BdwhnKEx2zOo6vP/w==", "dev": true }, "walkdir": { @@ -8028,9 +8114,9 @@ "dev": true }, "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yallist": { diff --git a/src/bulk/common.ts b/src/bulk/common.ts index bff50cc31bc..df5a2d6bbfb 100644 --- a/src/bulk/common.ts +++ b/src/bulk/common.ts @@ -19,7 +19,7 @@ import type { Collection } from '../collection'; import type { Topology } from '../sdam/topology'; import type { CommandOperationOptions, CollationOptions } from '../operations/command'; import type { Hint } from '../operations/operation'; -import type { Query } from '../mongo_types'; +import type { Filter } from '../mongo_types'; /** @public */ export const BatchType = { @@ -40,7 +40,7 @@ export interface InsertOneModel { /** @public */ export interface DeleteOneModel { /** The filter to limit the deleted documents. */ - filter: Query; + filter: Filter; /** Specifies a collation. */ collation?: CollationOptions; /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ @@ -50,7 +50,7 @@ export interface DeleteOneModel { /** @public */ export interface DeleteManyModel { /** The filter to limit the deleted documents. */ - filter: Query; + filter: Filter; /** Specifies a collation. */ collation?: CollationOptions; /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ @@ -60,7 +60,7 @@ export interface DeleteManyModel { /** @public */ export interface ReplaceOneModel { /** The filter to limit the replaced document. */ - filter: Query; + filter: Filter; /** The document with which to replace the matched document. */ replacement: TSchema; /** Specifies a collation. */ diff --git a/src/collection.ts b/src/collection.ts index 1c0e8fcd5ad..373987b4709 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -89,7 +89,7 @@ import type { PkFactory } from './mongo_client'; import type { Logger, LoggerOptions } from './logger'; import { FindCursor } from './cursor/find_cursor'; import type { CountOptions } from './operations/count'; -import type { Query, TODO_NODE_2648, UpdateQuery, WithId, OptionalId } from './mongo_types'; +import type { Filter, TODO_NODE_2648, UpdateQuery, WithId, OptionalId } from './mongo_types'; /** @public */ export interface ModifyResult { @@ -387,33 +387,33 @@ export class Collection { /** * Update a single document in a collection * - * @param query - The query used to select the document to update + * @param filter - The filter used to select the document to update * @param update - The update operations to be applied to the document * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ updateOne( - query: Query, + filter: Filter, update: UpdateQuery | Partial ): Promise; updateOne( - query: Query, + filter: Filter, update: UpdateQuery | Partial, callback: Callback ): void; updateOne( - query: Query, + filter: Filter, update: UpdateQuery | Partial, options: UpdateOptions ): Promise; updateOne( - query: Query, + filter: Filter, update: UpdateQuery | Partial, options: UpdateOptions, callback: Callback ): void; updateOne( - query: Query, + filter: Filter, update: UpdateQuery | Partial, options?: UpdateOptions | Callback, callback?: Callback @@ -422,7 +422,7 @@ export class Collection { return executeOperation( getTopology(this), - new UpdateOneOperation(this, query, update, resolveOptions(this, options)), + new UpdateOneOperation(this, filter, update, resolveOptions(this, options)), callback ); } @@ -430,30 +430,30 @@ export class Collection { /** * Replace a document in a collection with another document * - * @param query - The query used to select the document to replace + * @param filter - The filter used to select the document to replace * @param replacement - The Document that replaces the matching document * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - replaceOne(query: Query, replacement: TSchema): Promise; + replaceOne(filter: Filter, replacement: TSchema): Promise; replaceOne( - query: Query, + filter: Filter, replacement: TSchema, callback: Callback ): void; replaceOne( - query: Query, + filter: Filter, replacement: TSchema, options: ReplaceOptions ): Promise; replaceOne( - query: Query, + filter: Filter, replacement: TSchema, options: ReplaceOptions, callback: Callback ): void; replaceOne( - query: Query, + filter: Filter, replacement: TSchema, options?: ReplaceOptions | Callback, callback?: Callback @@ -462,7 +462,7 @@ export class Collection { return executeOperation( getTopology(this), - new ReplaceOneOperation(this, query, replacement, resolveOptions(this, options)), + new ReplaceOneOperation(this, filter, replacement, resolveOptions(this, options)), callback ); } @@ -470,30 +470,33 @@ export class Collection { /** * Update multiple documents in a collection * - * @param query - The query used to select the documents to update + * @param filter - The filter used to select the documents to update * @param update - The update operations to be applied to the documents * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - updateMany(query: Query, update: UpdateQuery): Promise; updateMany( - query: Query, + filter: Filter, + update: UpdateQuery + ): Promise; + updateMany( + filter: Filter, update: UpdateQuery, callback: Callback ): void; updateMany( - query: Query, + filter: Filter, update: UpdateQuery, options: UpdateOptions ): Promise; updateMany( - query: Query, + filter: Filter, update: UpdateQuery, options: UpdateOptions, callback: Callback ): void; updateMany( - query: Query, + filter: Filter, update: UpdateQuery, options?: UpdateOptions | Callback, callback?: Callback @@ -502,7 +505,7 @@ export class Collection { return executeOperation( getTopology(this), - new UpdateManyOperation(this, query, update, resolveOptions(this, options)), + new UpdateManyOperation(this, filter, update, resolveOptions(this, options)), callback ); } @@ -510,16 +513,20 @@ export class Collection { /** * Delete a document from a collection * - * @param query - The query used to select the document to remove + * @param filter - The filter used to select the document to remove * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - deleteOne(query: Query): Promise; - deleteOne(query: Query, callback: Callback): void; - deleteOne(query: Query, options: DeleteOptions): Promise; - deleteOne(query: Query, options: DeleteOptions, callback?: Callback): void; + deleteOne(filter: Filter): Promise; + deleteOne(filter: Filter, callback: Callback): void; + deleteOne(filter: Filter, options: DeleteOptions): Promise; + deleteOne( + filter: Filter, + options: DeleteOptions, + callback?: Callback + ): void; deleteOne( - query: Query, + filter: Filter, options?: DeleteOptions | Callback, callback?: Callback ): Promise | void { @@ -527,7 +534,7 @@ export class Collection { return executeOperation( getTopology(this), - new DeleteOneOperation(this, query, resolveOptions(this, options)), + new DeleteOneOperation(this, filter, resolveOptions(this, options)), callback ); } @@ -535,26 +542,30 @@ export class Collection { /** * Delete multiple documents from a collection * - * @param query - The query used to select the documents to remove + * @param filter - The filter used to select the documents to remove * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - deleteMany(query: Query): Promise; - deleteMany(query: Query, callback: Callback): void; - deleteMany(query: Query, options: DeleteOptions): Promise; - deleteMany(query: Query, options: DeleteOptions, callback: Callback): void; + deleteMany(filter: Filter): Promise; + deleteMany(filter: Filter, callback: Callback): void; + deleteMany(filter: Filter, options: DeleteOptions): Promise; + deleteMany( + filter: Filter, + options: DeleteOptions, + callback: Callback + ): void; deleteMany( - query: Query, + filter: Filter, options?: DeleteOptions | Callback, callback?: Callback ): Promise | void { - if (query == null) { - query = {}; + if (filter == null) { + filter = {}; options = {}; callback = undefined; - } else if (typeof query === 'function') { - callback = query as Callback; - query = {}; + } else if (typeof filter === 'function') { + callback = filter as Callback; + filter = {}; options = {}; } else if (typeof options === 'function') { callback = options; @@ -563,7 +574,7 @@ export class Collection { return executeOperation( getTopology(this), - new DeleteManyOperation(this, query, resolveOptions(this, options)), + new DeleteManyOperation(this, filter, resolveOptions(this, options)), callback ); } @@ -622,20 +633,20 @@ export class Collection { } /** - * Fetches the first document that matches the query + * Fetches the first document that matches the filter * - * @param query - Query for find Operation + * @param filter - Query for find Operation * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ findOne(): Promise; findOne(callback: Callback): void; - findOne(query: Query): Promise; - findOne(query: Query, callback?: Callback): void; - findOne(query: Query, options: FindOptions): Promise; - findOne(query: Query, options: FindOptions, callback: Callback): void; + findOne(filter: Filter): Promise; + findOne(filter: Filter, callback?: Callback): void; + findOne(filter: Filter, options: FindOptions): Promise; + findOne(filter: Filter, options: FindOptions, callback: Callback): void; findOne( - query?: Query | Callback, + filter?: Filter | Callback, options?: FindOptions | Callback, callback?: Callback ): Promise | void { @@ -643,27 +654,27 @@ export class Collection { throw new TypeError('Third parameter to `findOne()` must be a callback or undefined'); } - if (typeof query === 'function') - (callback = query as Callback), (query = {}), (options = {}); + if (typeof filter === 'function') + (callback = filter as Callback), (filter = {}), (options = {}); if (typeof options === 'function') (callback = options), (options = {}); - query = query || {}; + filter = filter || {}; return executeOperation( getTopology(this), - new FindOneOperation(this, query, resolveOptions(this, options)) as TODO_NODE_2648, + new FindOneOperation(this, filter, resolveOptions(this, options)) as TODO_NODE_2648, callback ); } /** - * Creates a cursor for a query that can be used to iterate over results from MongoDB + * Creates a cursor for a filter that can be used to iterate over results from MongoDB * - * @param query - The query predicate. If unspecified, then all documents in the collection will match the predicate + * @param filter - The filter predicate. If unspecified, then all documents in the collection will match the predicate */ find(): FindCursor; - find(query: Query): FindCursor; - find(query: Query, options: FindOptions): FindCursor; - find(query?: Query, options?: FindOptions): FindCursor { + find(filter: Filter): FindCursor; + find(filter: Filter, options: FindOptions): FindCursor; + find(filter?: Filter, options?: FindOptions): FindCursor { if (arguments.length > 2) { throw new TypeError('Third parameter to `collection.find()` must be undefined'); } @@ -674,7 +685,7 @@ export class Collection { return new FindCursor( getTopology(this), this.s.namespace, - query, + filter, resolveOptions(this, options) ); } @@ -989,7 +1000,7 @@ export class Collection { * [3]: https://docs.mongodb.com/manual/reference/operator/query/center/#op._S_center * [4]: https://docs.mongodb.com/manual/reference/operator/query/centerSphere/#op._S_centerSphere * - * @param query - The query for the count + * @param filter - The filter for the count * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided * @@ -1000,35 +1011,35 @@ export class Collection { */ countDocuments(): Promise; countDocuments(callback: Callback): void; - countDocuments(query: Query): Promise; + countDocuments(filter: Filter): Promise; countDocuments(callback: Callback): void; - countDocuments(query: Query, options: CountDocumentsOptions): Promise; + countDocuments(filter: Filter, options: CountDocumentsOptions): Promise; countDocuments( - query: Query, + filter: Filter, options: CountDocumentsOptions, callback: Callback ): void; countDocuments( - query?: Document | CountDocumentsOptions | Callback, + filter?: Document | CountDocumentsOptions | Callback, options?: CountDocumentsOptions | Callback, callback?: Callback ): Promise | void { - if (typeof query === 'undefined') { - (query = {}), (options = {}), (callback = undefined); - } else if (typeof query === 'function') { - (callback = query as Callback), (query = {}), (options = {}); + if (typeof filter === 'undefined') { + (filter = {}), (options = {}), (callback = undefined); + } else if (typeof filter === 'function') { + (callback = filter as Callback), (filter = {}), (options = {}); } else { if (arguments.length === 2) { if (typeof options === 'function') (callback = options), (options = {}); } } - query ??= {}; + filter ??= {}; return executeOperation( getTopology(this), new CountDocumentsOperation( this, - query as Document, + filter as Document, resolveOptions(this, options as CountDocumentsOptions) ), callback @@ -1039,50 +1050,50 @@ export class Collection { * The distinct command returns a list of distinct values for the given key across a collection. * * @param key - Field of the document to find distinct values for - * @param query - The query for filtering the set of documents to which we apply the distinct filter. + * @param filter - The filter for filtering the set of documents to which we apply the distinct filter. * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ distinct>(key: Key): Promise; distinct>(key: Key, callback: Callback): void; - distinct>(key: Key, query: Query): Promise; + distinct>(key: Key, query: Filter): Promise; distinct>( key: Key, - query: Query, + query: Filter, callback: Callback ): void; distinct>( key: Key, - query: Query, + filter: Filter, options: DistinctOptions ): Promise; distinct>( key: Key, - query: Query, + filter: Filter, options: DistinctOptions, callback: Callback ): void; distinct>( key: Key, - query?: Query | DistinctOptions | Callback, + filter?: Filter | DistinctOptions | Callback, options?: DistinctOptions | Callback, callback?: Callback ): Promise | void { - if (typeof query === 'function') { - (callback = query as Callback), (query = {}), (options = {}); + if (typeof filter === 'function') { + (callback = filter as Callback), (filter = {}), (options = {}); } else { if (arguments.length === 3 && typeof options === 'function') { (callback = options), (options = {}); } } - query ??= {}; + filter ??= {}; return executeOperation( getTopology(this), new DistinctOperation( this, key as TODO_NODE_2648, - query, + filter, resolveOptions(this, options as DistinctOptions) ), callback @@ -1135,23 +1146,23 @@ export class Collection { /** * Find a document and delete it in one atomic operation. Requires a write lock for the duration of the operation. * - * @param query - The query used to select the document to remove + * @param filter - The filter used to select the document to remove * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - findOneAndDelete(query: Query): Promise>; - findOneAndDelete(query: Query, callback: Callback>): void; + findOneAndDelete(filter: Filter): Promise>; + findOneAndDelete(filter: Filter, callback: Callback>): void; findOneAndDelete( - query: Query, + filter: Filter, options: FindOneAndDeleteOptions ): Promise>; findOneAndDelete( - query: Query, + filter: Filter, options: FindOneAndDeleteOptions, callback: Callback> ): void; findOneAndDelete( - query: Query, + filter: Filter, options?: FindOneAndDeleteOptions | Callback>, callback?: Callback> ): Promise | void { @@ -1159,7 +1170,7 @@ export class Collection { return executeOperation( getTopology(this), - new FindOneAndDeleteOperation(this, query, resolveOptions(this, options)) as TODO_NODE_2648, + new FindOneAndDeleteOperation(this, filter, resolveOptions(this, options)) as TODO_NODE_2648, callback ); } @@ -1167,30 +1178,30 @@ export class Collection { /** * Find a document and replace it in one atomic operation. Requires a write lock for the duration of the operation. * - * @param query - The query used to select the document to replace + * @param filter - The filter used to select the document to replace * @param replacement - The Document that replaces the matching document * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - findOneAndReplace(query: Query, replacement: Document): Promise>; + findOneAndReplace(filter: Filter, replacement: Document): Promise>; findOneAndReplace( - query: Query, + filter: Filter, replacement: Document, callback: Callback> ): void; findOneAndReplace( - query: Query, + filter: Filter, replacement: Document, options: FindOneAndReplaceOptions ): Promise>; findOneAndReplace( - query: Query, + filter: Filter, replacement: Document, options: FindOneAndReplaceOptions, callback: Callback> ): void; findOneAndReplace( - query: Query, + filter: Filter, replacement: Document, options?: FindOneAndReplaceOptions | Callback>, callback?: Callback> @@ -1201,7 +1212,7 @@ export class Collection { getTopology(this), new FindOneAndReplaceOperation( this, - query, + filter, replacement, resolveOptions(this, options) ) as TODO_NODE_2648, @@ -1212,33 +1223,33 @@ export class Collection { /** * Find a document and update it in one atomic operation. Requires a write lock for the duration of the operation. * - * @param query - The query used to select the document to update + * @param filter - The filter used to select the document to update * @param update - Update operations to be performed on the document * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ findOneAndUpdate( - query: Query, + filter: Filter, update: UpdateQuery ): Promise>; findOneAndUpdate( - query: Query, + filter: Filter, update: UpdateQuery, callback: Callback> ): void; findOneAndUpdate( - query: Query, + filter: Filter, update: UpdateQuery, options: FindOneAndUpdateOptions ): Promise>; findOneAndUpdate( - query: Query, + filter: Filter, update: UpdateQuery, options: FindOneAndUpdateOptions, callback: Callback> ): void; findOneAndUpdate( - query: Query, + filter: Filter, update: UpdateQuery, options?: FindOneAndUpdateOptions | Callback>, callback?: Callback> @@ -1249,7 +1260,7 @@ export class Collection { getTopology(this), new FindOneAndUpdateOperation( this, - query, + filter, update, resolveOptions(this, options) ) as TODO_NODE_2648, @@ -1428,7 +1439,7 @@ export class Collection { * @param callback - An optional callback, a Promise will be returned if none is provided */ update( - selector: Query, + selector: Filter, update: UpdateQuery, options: UpdateOptions, callback: Callback @@ -1451,7 +1462,7 @@ export class Collection { * @param callback - An optional callback, a Promise will be returned if none is provided */ remove( - selector: Query, + selector: Filter, options: DeleteOptions, callback: Callback ): Promise | void { @@ -1465,7 +1476,7 @@ export class Collection { } /** - * An estimated count of matching documents in the db to a query. + * An estimated count of matching documents in the db to a filter. * * **NOTE:** This method has been deprecated, since it does not provide an accurate count of the documents * in a collection. To obtain an accurate count of documents in the collection, use {@link Collection#countDocuments| countDocuments}. @@ -1473,35 +1484,35 @@ export class Collection { * * @deprecated use {@link Collection#countDocuments| countDocuments} or {@link Collection#estimatedDocumentCount| estimatedDocumentCount} instead * - * @param query - The query for the count. + * @param filter - The filter for the count. * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ count(): Promise; count(callback: Callback): void; - count(query: Query): Promise; - count(query: Query, callback: Callback): void; - count(query: Query, options: CountOptions): Promise; + count(filter: Filter): Promise; + count(filter: Filter, callback: Callback): void; + count(filter: Filter, options: CountOptions): Promise; count( - query: Query, + filter: Filter, options: CountOptions, callback: Callback ): Promise | void; count( - query?: Query | CountOptions | Callback, + filter?: Filter | CountOptions | Callback, options?: CountOptions | Callback, callback?: Callback ): Promise | void { - if (typeof query === 'function') { - (callback = query as Callback), (query = {}), (options = {}); + if (typeof filter === 'function') { + (callback = filter as Callback), (filter = {}), (options = {}); } else { if (typeof options === 'function') (callback = options), (options = {}); } - query = query || {}; + filter ??= {}; return executeOperation( getTopology(this), - new CountDocumentsOperation(this, query, resolveOptions(this, options)), + new CountDocumentsOperation(this, filter, resolveOptions(this, options)), callback ); } diff --git a/src/gridfs-stream/download.ts b/src/gridfs-stream/download.ts index 988d4f78916..d15e070b71f 100644 --- a/src/gridfs-stream/download.ts +++ b/src/gridfs-stream/download.ts @@ -102,7 +102,7 @@ export class GridFSBucketReadStream extends Readable { * @param chunks - Handle for chunks collection * @param files - Handle for files collection * @param readPreference - The read preference to use - * @param filter - The query to use to find the file document + * @param filter - The filter to use to find the file document */ constructor( chunks: Collection, diff --git a/src/gridfs-stream/index.ts b/src/gridfs-stream/index.ts index b34dc289dd2..ed5e9e772fd 100644 --- a/src/gridfs-stream/index.ts +++ b/src/gridfs-stream/index.ts @@ -17,7 +17,7 @@ import type { FindOptions } from './../operations/find'; import type { Sort } from '../sort'; import type { Logger } from '../logger'; import type { FindCursor } from '../cursor/find_cursor'; -import type { Query } from '../mongo_types'; +import type { Filter } from '../mongo_types'; const DEFAULT_GRIDFS_BUCKET_OPTIONS: { bucketName: string; @@ -145,10 +145,10 @@ export class GridFSBucket extends EventEmitter { } /** Convenience wrapper around find on the files collection */ - find(query?: Query, options?: FindOptions): FindCursor { - query = query ?? {}; + find(filter?: Filter, options?: FindOptions): FindCursor { + filter ??= {}; options = options ?? {}; - return this.s._filesCollection.find(query, options); + return this.s._filesCollection.find(filter, options); } /** diff --git a/src/index.ts b/src/index.ts index d7fc7af4fa8..871ed8d9914 100644 --- a/src/index.ts +++ b/src/index.ts @@ -133,7 +133,7 @@ export type { AuthMechanismId } from './cmap/auth/defaultAuthProviders'; export type { MongoCredentials, MongoCredentialsOptions } from './cmap/auth/mongo_credentials'; export type { WriteProtocolMessageType, - Query as __InternalQuery, + Query, GetMore, Msg, KillCursor, @@ -337,7 +337,7 @@ export type { OptionalId, WithoutId, UpdateQuery, - Query, + Filter, Projection, InferIdType, ProjectionOperators, diff --git a/src/mongo_types.ts b/src/mongo_types.ts index fdabd63a208..1c85300e2b6 100644 --- a/src/mongo_types.ts +++ b/src/mongo_types.ts @@ -40,7 +40,7 @@ export type EnhancedOmit = string extends keyof TRecor export type WithoutId = Omit; /** A MongoDB filter can be some portion of the schema or a set of operators @public */ -export type Query = Partial & Document; +export type Filter = Partial & Document; /** A MongoDB UpdateQuery is set of operators @public */ // eslint-disable-next-line @typescript-eslint/no-unused-vars From 4cf92279e4e6c3f33f64b37e941998121a77747d Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Tue, 11 May 2021 16:02:01 -0400 Subject: [PATCH 07/15] fix: add @dariakp to maintainers --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index cfc843fbd78..87f85a4e1d7 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -57,6 +57,7 @@ - Neal Beeken <> - Eric Adum <> - Durran Jordan <> +- Daria Pardue <> ## Community Types From b9f5da60135fbb0c4d23271ea28e00ad46e070c6 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Tue, 11 May 2021 16:06:42 -0400 Subject: [PATCH 08/15] chore: add ticket for UpdateQuery todo --- src/mongo_types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mongo_types.ts b/src/mongo_types.ts index 1c85300e2b6..80d8abc6daf 100644 --- a/src/mongo_types.ts +++ b/src/mongo_types.ts @@ -44,7 +44,7 @@ export type Filter = Partial & Document; /** A MongoDB UpdateQuery is set of operators @public */ // eslint-disable-next-line @typescript-eslint/no-unused-vars -export type UpdateQuery = Document; // TODO +export type UpdateQuery = Document; // TODO(NODE-3274) /** @see https://docs.mongodb.com/manual/reference/operator/aggregation/meta/#proj._S_meta @public */ export type MetaSortOperators = 'textScore' | 'indexKey'; From 48802b3f64afcb0e9ccd8201fd32b7585d6f2b60 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Wed, 12 May 2021 10:26:56 -0400 Subject: [PATCH 09/15] respond to comments --- src/bulk/common.ts | 30 ++++++++++----------- src/collection.ts | 2 +- src/cursor/abstract_cursor.ts | 11 ++++---- src/mongo_types.ts | 7 ++--- test/types/basic_schema.test-d.ts | 2 +- test/types/indexed_schema.test-d.ts | 1 + test/types/union_schema.test-d.ts | 42 ++++++++++++++--------------- test/unit/type_check.test.js | 4 +-- 8 files changed, 51 insertions(+), 48 deletions(-) diff --git a/src/bulk/common.ts b/src/bulk/common.ts index df5a2d6bbfb..c93230fbd0e 100644 --- a/src/bulk/common.ts +++ b/src/bulk/common.ts @@ -19,7 +19,7 @@ import type { Collection } from '../collection'; import type { Topology } from '../sdam/topology'; import type { CommandOperationOptions, CollationOptions } from '../operations/command'; import type { Hint } from '../operations/operation'; -import type { Filter } from '../mongo_types'; +import type { Filter, OptionalId, UpdateQuery } from '../mongo_types'; /** @public */ export const BatchType = { @@ -32,13 +32,13 @@ export const BatchType = { export type BatchTypeId = typeof BatchType[keyof typeof BatchType]; /** @public */ -export interface InsertOneModel { +export interface InsertOneModel { /** The document to insert. */ - document: TSchema; + document: OptionalId; } /** @public */ -export interface DeleteOneModel { +export interface DeleteOneModel { /** The filter to limit the deleted documents. */ filter: Filter; /** Specifies a collation. */ @@ -48,7 +48,7 @@ export interface DeleteOneModel { } /** @public */ -export interface DeleteManyModel { +export interface DeleteManyModel { /** The filter to limit the deleted documents. */ filter: Filter; /** Specifies a collation. */ @@ -58,7 +58,7 @@ export interface DeleteManyModel { } /** @public */ -export interface ReplaceOneModel { +export interface ReplaceOneModel { /** The filter to limit the replaced document. */ filter: Filter; /** The document with which to replace the matched document. */ @@ -72,11 +72,11 @@ export interface ReplaceOneModel { } /** @public */ -export interface UpdateOneModel { +export interface UpdateOneModel { /** The filter to limit the updated documents. */ - filter: Document; + filter: Filter; /** A document or pipeline containing update operators. */ - update: Document | Document[]; + update: UpdateQuery | UpdateQuery[]; /** A set of filters specifying to which array elements an update should apply. */ arrayFilters?: Document[]; /** Specifies a collation. */ @@ -88,11 +88,11 @@ export interface UpdateOneModel { } /** @public */ -export interface UpdateManyModel { +export interface UpdateManyModel { /** The filter to limit the updated documents. */ - filter: Document; + filter: Filter; /** A document or pipeline containing update operators. */ - update: Document | Document[]; + update: UpdateQuery | UpdateQuery[]; /** A set of filters specifying to which array elements an update should apply. */ arrayFilters?: Document[]; /** Specifies a collation. */ @@ -104,11 +104,11 @@ export interface UpdateManyModel { } /** @public */ -export type AnyBulkWriteOperation = +export type AnyBulkWriteOperation = | { insertOne: InsertOneModel } | { replaceOne: ReplaceOneModel } - | { updateOne: UpdateOneModel } - | { updateMany: UpdateManyModel } + | { updateOne: UpdateOneModel } + | { updateMany: UpdateManyModel } | { deleteOne: DeleteOneModel } | { deleteMany: DeleteManyModel }; diff --git a/src/collection.ts b/src/collection.ts index 373987b4709..3970b84d8c4 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -379,7 +379,7 @@ export class Collection { return executeOperation( getTopology(this), - new BulkWriteOperation(this, operations, resolveOptions(this, options)), + new BulkWriteOperation(this, operations as TODO_NODE_2648, resolveOptions(this, options)), callback ); } diff --git a/src/cursor/abstract_cursor.ts b/src/cursor/abstract_cursor.ts index a56224a71bb..ff3c09961a8 100644 --- a/src/cursor/abstract_cursor.ts +++ b/src/cursor/abstract_cursor.ts @@ -303,7 +303,7 @@ export abstract class AbstractCursor extends EventEmitter { if (doc == null) return done(); // NOTE: no need to transform because `next` will do this automatically - let result = iterator(doc as TSchema); // TODO_NODE_2648 - We need to work with the transform return type somehow + let result = iterator(doc as TSchema); // TODO(NODE-2648): We need to work with the transform return type somehow if (result === false) return done(); // these do need to be transformed since they are copying the rest of the batch @@ -311,7 +311,7 @@ export abstract class AbstractCursor extends EventEmitter { if (internalDocs) { for (let i = 0; i < internalDocs.length; ++i) { result = iterator( - (transform ? transform(internalDocs[i]) : internalDocs[i]) as TSchema // TODO_NODE_2648 - We need to work with the transform return type somehow + (transform ? transform(internalDocs[i]) : internalDocs[i]) as TSchema // TODO(NODE-2648): We need to work with the transform return type somehow ); if (result === false) return done(); } @@ -401,7 +401,7 @@ export abstract class AbstractCursor extends EventEmitter { // these do need to be transformed since they are copying the rest of the batch const internalDocs = (transform ? this[kDocuments].splice(0, this[kDocuments].length).map(transform) - : this[kDocuments].splice(0, this[kDocuments].length)) as TSchema[]; // TODO_NODE_2648 - We need to work with the transform return type somehow + : this[kDocuments].splice(0, this[kDocuments].length)) as TSchema[]; // TODO(NODE-2648): We need to work with the transform return type somehow if (internalDocs) { docs.push(...internalDocs); @@ -444,7 +444,7 @@ export abstract class AbstractCursor extends EventEmitter { */ map(transform: (doc: TSchema) => TResult): this { assertUninitialized(this); - const oldTransform = this[kTransform] as (doc: TSchema) => TSchema; // TODO_NODE_2648 - We need to work with the transform return type somehow + const oldTransform = this[kTransform] as (doc: TSchema) => TSchema; // TODO(NODE-2648): We need to work with the transform return type somehow if (oldTransform) { this[kTransform] = doc => { return transform(oldTransform(doc)); @@ -601,7 +601,7 @@ function nextDocument( if (doc) { const transform = cursor[kTransform]; if (transform) { - return transform(doc) as TSchema; // TODO: How can user's parameterize this + return transform(doc) as TSchema; } return doc; @@ -662,6 +662,7 @@ function next( // for example if (cursor[kId] == null) { cursor[kId] = Long.ZERO; + // TODO(NODE-2648): ExecutionResult needs to accept a generic parameter cursor[kDocuments] = [state.response as TODO_NODE_2648]; } } diff --git a/src/mongo_types.ts b/src/mongo_types.ts index 80d8abc6daf..fb64bb7444b 100644 --- a/src/mongo_types.ts +++ b/src/mongo_types.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-types */ import type { Document, ObjectId } from './bson'; /** @internal */ @@ -6,8 +5,10 @@ export type TODO_NODE_2648 = any; /** Given an object shaped type, return the type of the _id field or default to ObjectId @public */ export type InferIdType = TSchema extends { _id: infer IdType } // user has defined a type for _id - ? {} extends IdType - ? Exclude + ? // eslint-disable-next-line @typescript-eslint/ban-types + {} extends IdType + ? // eslint-disable-next-line @typescript-eslint/ban-types + Exclude : unknown extends IdType ? ObjectId : IdType diff --git a/test/types/basic_schema.test-d.ts b/test/types/basic_schema.test-d.ts index c096970cea9..04bc7c5da9e 100644 --- a/test/types/basic_schema.test-d.ts +++ b/test/types/basic_schema.test-d.ts @@ -12,7 +12,7 @@ type ACounter = { a: number }; type ACounterWithId = { a: number; _id: ObjectId }; //////////////////////////////////////////////////////////////////////////////////////////////////// -// Can defined Schema without _id +// Can define Schema without _id expectType>(new Collection(db, '')); // Or with one expectType>(new Collection(db, '')); diff --git a/test/types/indexed_schema.test-d.ts b/test/types/indexed_schema.test-d.ts index 038fdecdbd2..be0e7ba154d 100644 --- a/test/types/indexed_schema.test-d.ts +++ b/test/types/indexed_schema.test-d.ts @@ -17,6 +17,7 @@ interface RandomKeysToNumberIncludingId { const randomKeysIncludeIdC = new Collection(db, ''); expectType>(randomKeysIncludeIdC.insertOne({ a: 2, randomKey: 23, _id: 23 })); expectError(randomKeysIncludeIdC.insertOne({ a: 2, randomKey: 23 })); +expectError(randomKeysIncludeIdC.insertOne({ _id: 2, randomKey: 'string' })); const arg1 = (null as unknown) as Parameters[0]; expectAssignable>(arg1); diff --git a/test/types/union_schema.test-d.ts b/test/types/union_schema.test-d.ts index 6c3efdd0fb0..f5de137c86f 100644 --- a/test/types/union_schema.test-d.ts +++ b/test/types/union_schema.test-d.ts @@ -1,13 +1,9 @@ -import { expectType, expectError, expectNotType, expectNotAssignable } from 'tsd'; +import { expectType, expectError, expectNotType, expectNotAssignable, expectAssignable } from 'tsd'; -import { Collection } from '../../src/collection'; +import type { Collection } from '../../src/collection'; import { ObjectId } from '../../src/bson'; -import { Db } from '../../src/db'; -import { MongoClient } from '../../src/mongo_client'; -type InsertRes = Promise<{ acknowledged: boolean; insertedId: TId }>; - -const db = new Db(new MongoClient(''), ''); +type InsertOneFirstParam = Parameters[0]; interface Circle { _id: ObjectId; @@ -20,18 +16,23 @@ interface Rectangle { } type Shape = Circle | Rectangle; -type c = Collection; -// should not insert a portion of a type -expectNotAssignable[0]>({ height: 2 }); +type ShapeInsert = InsertOneFirstParam>; +expectAssignable({ height: 2, width: 2, radius: 2 }); // This is permitted... +// error cases, should not insert a portion of a type +expectNotAssignable({ height: 2 }); +expectError({ + radius: 4, + extraKey: 'I should not be allowed', + _id: new ObjectId() +}); +// valid cases +expectAssignable({ height: 4, width: 4 }); +expectAssignable({ radius: 4 }); -const shapesC = new Collection(db, ''); -expectType(shapesC.insertOne({ radius: 4 })); -expectError( - shapesC.insertOne({ radius: 4, extraKey: 'I should not be allowed', _id: new ObjectId() }) -); -expectType(shapesC.insertOne({ height: 4, width: 4 })); -expectType>(shapesC.findOne({ height: 4, width: 4 })); -expectNotType>(shapesC.findOne({ height: 4, width: 4 })); // collection API can only respect TSchema given +const c: Collection = null as never; +expectType>(c.findOne({ height: 4, width: 4 })); +// collection API can only respect TSchema given, cannot pick a type inside a union +expectNotType>(c.findOne({ height: 4, width: 4 })); interface A { _id: number; @@ -40,6 +41,5 @@ interface B { _id: string; } type Data = A | B; -const dataC = db.collection(''); -expectType>(dataC.insertOne({ _id: 2 })); -expectType>(dataC.insertOne({ _id: 'hi' })); +expectAssignable>>({ _id: 2 }); +expectAssignable>>({ _id: 'hi' }); diff --git a/test/unit/type_check.test.js b/test/unit/type_check.test.js index 53066f0b6b7..877b6d8b8e7 100644 --- a/test/unit/type_check.test.js +++ b/test/unit/type_check.test.js @@ -3,8 +3,8 @@ const tsd = require('tsd').default; const { expect } = require('chai'); -describe('Exported Types', () => { - it('should be as expected', async () => { +describe('Typescript definitions', () => { + it('should pass assertions defined in test/types', async () => { const diagnostics = await tsd(); if (diagnostics.length !== 0) { const messages = diagnostics From b953d5f021404a3d3b8573f9efad8197588b14ae Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Fri, 14 May 2021 13:14:17 -0400 Subject: [PATCH 10/15] fix: add overriding parameters to cursor methods and improved change stream typing --- src/change_stream.ts | 26 +++--- src/collection.ts | 130 +++++++++++++++++++--------- src/cursor/abstract_cursor.ts | 62 ++++++------- src/db.ts | 2 +- src/gridfs-stream/download.ts | 29 ++++--- src/gridfs-stream/upload.ts | 2 +- src/utils.ts | 2 +- test/types/schema_helpers.test-d.ts | 44 ++++++++++ 8 files changed, 191 insertions(+), 106 deletions(-) create mode 100644 test/types/schema_helpers.test-d.ts diff --git a/src/change_stream.ts b/src/change_stream.ts index d8873900e30..3f74b9d4ada 100644 --- a/src/change_stream.ts +++ b/src/change_stream.ts @@ -102,7 +102,7 @@ export interface ChangeStreamDocument { * The id functions as an opaque token for use when resuming an interrupted * change stream. */ - _id: Document; + _id: InferIdType; /** * Describes the type of operation represented in this change notification. @@ -121,7 +121,7 @@ export interface ChangeStreamDocument { * Contains two fields: “db” and “coll” containing the database and * collection name in which the change happened. */ - ns: Document; + ns: { db: string; coll: string }; /** * Only present for ops of type ‘insert’, ‘update’, ‘replace’, and @@ -140,7 +140,7 @@ export interface ChangeStreamDocument { * Contains a description of updated and removed fields in this * operation. */ - updateDescription?: UpdateDescription; + updateDescription?: UpdateDescription; /** * Always present for operations of type ‘insert’ and ‘replace’. Also @@ -159,12 +159,12 @@ export interface ChangeStreamDocument { } /** @public */ -export interface UpdateDescription { +export interface UpdateDescription { /** * A document containing key:value pairs of names of the fields that were * changed, and the new value for those fields. */ - updatedFields: Document; + updatedFields: Partial; /** * An array of field names that were removed from the document. @@ -187,7 +187,7 @@ export type ChangeStreamEvents = { * Creates a new Change Stream instance. Normally created using {@link Collection#watch|Collection.watch()}. * @public */ -export class ChangeStream extends TypedEventEmitter { +export class ChangeStream extends TypedEventEmitter { pipeline: Document[]; options: ChangeStreamOptions; parent: MongoClient | Db | Collection; @@ -610,8 +610,8 @@ function waitForTopologyConnected( }, 500); // this is an arbitrary wait time to allow SDAM to transition } -function closeWithError( - changeStream: ChangeStream, +function closeWithError( + changeStream: ChangeStream, error: AnyError, callback?: Callback ): void { @@ -622,10 +622,7 @@ function closeWithError( changeStream.close(() => callback && callback(error)); } -function streamEvents( - changeStream: ChangeStream, - cursor: ChangeStreamCursor -): void { +function streamEvents(changeStream: ChangeStream, cursor: ChangeStreamCursor): void { const stream = changeStream[kCursorStream] || cursor.stream(); changeStream[kCursorStream] = stream; stream.on('data', change => processNewChange(changeStream, change)); @@ -736,10 +733,7 @@ function processError(changeStream: ChangeStream, error: AnyError, callback * * @param changeStream - the parent ChangeStream */ -function getCursor( - changeStream: ChangeStream, - callback: Callback> -) { +function getCursor(changeStream: ChangeStream, callback: Callback>) { if (changeStream[kClosed]) { callback(CHANGESTREAM_CLOSED_ERROR); return; diff --git a/src/collection.ts b/src/collection.ts index 3970b84d8c4..f1ecc6266b1 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -283,7 +283,11 @@ export class Collection { return executeOperation( getTopology(this), - new InsertOneOperation(this, doc, resolveOptions(this, options)) as TODO_NODE_2648, + new InsertOneOperation( + this as TODO_NODE_2648, + doc, + resolveOptions(this, options) + ) as TODO_NODE_2648, callback ); } @@ -297,16 +301,19 @@ export class Collection { * @param options - Optional settings for the command * @param callback - An optional callback, a Promise will be returned if none is provided */ - insertMany(docs: TSchema[]): Promise>; - insertMany(docs: TSchema[], callback: Callback>): void; - insertMany(docs: TSchema[], options: BulkWriteOptions): Promise>; + insertMany(docs: OptionalId[]): Promise>; + insertMany(docs: OptionalId[], callback: Callback>): void; + insertMany( + docs: OptionalId[], + options: BulkWriteOptions + ): Promise>; insertMany( - docs: TSchema[], + docs: OptionalId[], options: BulkWriteOptions, callback: Callback> ): void; insertMany( - docs: TSchema[], + docs: OptionalId[], options?: BulkWriteOptions | Callback>, callback?: Callback> ): Promise> | void { @@ -315,7 +322,11 @@ export class Collection { return executeOperation( getTopology(this), - new InsertManyOperation(this, docs, resolveOptions(this, options)) as any, + new InsertManyOperation( + this as TODO_NODE_2648, + docs, + resolveOptions(this, options) + ) as TODO_NODE_2648, callback ); } @@ -379,7 +390,11 @@ export class Collection { return executeOperation( getTopology(this), - new BulkWriteOperation(this, operations as TODO_NODE_2648, resolveOptions(this, options)), + new BulkWriteOperation( + this as TODO_NODE_2648, + operations as TODO_NODE_2648, + resolveOptions(this, options) + ), callback ); } @@ -422,7 +437,7 @@ export class Collection { return executeOperation( getTopology(this), - new UpdateOneOperation(this, filter, update, resolveOptions(this, options)), + new UpdateOneOperation(this as TODO_NODE_2648, filter, update, resolveOptions(this, options)), callback ); } @@ -462,7 +477,12 @@ export class Collection { return executeOperation( getTopology(this), - new ReplaceOneOperation(this, filter, replacement, resolveOptions(this, options)), + new ReplaceOneOperation( + this as TODO_NODE_2648, + filter, + replacement, + resolveOptions(this, options) + ), callback ); } @@ -505,7 +525,12 @@ export class Collection { return executeOperation( getTopology(this), - new UpdateManyOperation(this, filter, update, resolveOptions(this, options)), + new UpdateManyOperation( + this as TODO_NODE_2648, + filter, + update, + resolveOptions(this, options) + ), callback ); } @@ -534,7 +559,7 @@ export class Collection { return executeOperation( getTopology(this), - new DeleteOneOperation(this, filter, resolveOptions(this, options)), + new DeleteOneOperation(this as TODO_NODE_2648, filter, resolveOptions(this, options)), callback ); } @@ -574,7 +599,7 @@ export class Collection { return executeOperation( getTopology(this), - new DeleteManyOperation(this, filter, resolveOptions(this, options)), + new DeleteManyOperation(this as TODO_NODE_2648, filter, resolveOptions(this, options)), callback ); } @@ -603,7 +628,10 @@ export class Collection { // Intentionally, we do not inherit options from parent for this operation. return executeOperation( getTopology(this), - new RenameOperation(this, newName, { ...options, readPreference: ReadPreference.PRIMARY }), + new RenameOperation(this as TODO_NODE_2648, newName, { + ...options, + readPreference: ReadPreference.PRIMARY + }), callback ); } @@ -661,7 +689,11 @@ export class Collection { return executeOperation( getTopology(this), - new FindOneOperation(this, filter, resolveOptions(this, options)) as TODO_NODE_2648, + new FindOneOperation( + this as TODO_NODE_2648, + filter, + resolveOptions(this, options) + ) as TODO_NODE_2648, callback ); } @@ -686,7 +718,7 @@ export class Collection { getTopology(this), this.s.namespace, filter, - resolveOptions(this, options) + resolveOptions(this as TODO_NODE_2648, options) ); } @@ -708,7 +740,7 @@ export class Collection { return executeOperation( getTopology(this), - new OptionsOperation(this, resolveOptions(this, options)), + new OptionsOperation(this as TODO_NODE_2648, resolveOptions(this, options)), callback ); } @@ -731,7 +763,7 @@ export class Collection { return executeOperation( getTopology(this), - new IsCappedOperation(this, resolveOptions(this, options)), + new IsCappedOperation(this as TODO_NODE_2648, resolveOptions(this, options)), callback ); } @@ -782,7 +814,12 @@ export class Collection { return executeOperation( getTopology(this), - new CreateIndexOperation(this, this.collectionName, indexSpec, resolveOptions(this, options)), + new CreateIndexOperation( + this as TODO_NODE_2648, + this.collectionName, + indexSpec, + resolveOptions(this, options) + ), callback ); } @@ -839,7 +876,7 @@ export class Collection { return executeOperation( getTopology(this), new CreateIndexesOperation( - this, + this as TODO_NODE_2648, this.collectionName, indexSpecs, resolveOptions(this, options) @@ -872,7 +909,7 @@ export class Collection { return executeOperation( getTopology(this), - new DropIndexOperation(this, indexName, options), + new DropIndexOperation(this as TODO_NODE_2648, indexName, options), callback ); } @@ -895,7 +932,7 @@ export class Collection { return executeOperation( getTopology(this), - new DropIndexesOperation(this, resolveOptions(this, options)), + new DropIndexesOperation(this as TODO_NODE_2648, resolveOptions(this, options)), callback ); } @@ -906,7 +943,7 @@ export class Collection { * @param options - Optional settings for the command */ listIndexes(options?: ListIndexesOptions): ListIndexesCursor { - return new ListIndexesCursor(this, resolveOptions(this, options)); + return new ListIndexesCursor(this as TODO_NODE_2648, resolveOptions(this, options)); } /** @@ -933,7 +970,7 @@ export class Collection { return executeOperation( getTopology(this), - new IndexExistsOperation(this, indexes, resolveOptions(this, options)), + new IndexExistsOperation(this as TODO_NODE_2648, indexes, resolveOptions(this, options)), callback ); } @@ -978,7 +1015,7 @@ export class Collection { if (typeof options === 'function') (callback = options), (options = {}); return executeOperation( getTopology(this), - new EstimatedDocumentCountOperation(this, resolveOptions(this, options)), + new EstimatedDocumentCountOperation(this as TODO_NODE_2648, resolveOptions(this, options)), callback ); } @@ -1038,7 +1075,7 @@ export class Collection { return executeOperation( getTopology(this), new CountDocumentsOperation( - this, + this as TODO_NODE_2648, filter as Document, resolveOptions(this, options as CountDocumentsOptions) ), @@ -1056,10 +1093,10 @@ export class Collection { */ distinct>(key: Key): Promise; distinct>(key: Key, callback: Callback): void; - distinct>(key: Key, query: Filter): Promise; + distinct>(key: Key, filter: Filter): Promise; distinct>( key: Key, - query: Filter, + filter: Filter, callback: Callback ): void; distinct>( @@ -1091,7 +1128,7 @@ export class Collection { return executeOperation( getTopology(this), new DistinctOperation( - this, + this as TODO_NODE_2648, key as TODO_NODE_2648, filter, resolveOptions(this, options as DistinctOptions) @@ -1118,7 +1155,7 @@ export class Collection { return executeOperation( getTopology(this), - new IndexesOperation(this, resolveOptions(this, options)), + new IndexesOperation(this as TODO_NODE_2648, resolveOptions(this, options)), callback ); } @@ -1140,7 +1177,11 @@ export class Collection { if (typeof options === 'function') (callback = options), (options = {}); options = options ?? {}; - return executeOperation(getTopology(this), new CollStatsOperation(this, options), callback); + return executeOperation( + getTopology(this), + new CollStatsOperation(this as TODO_NODE_2648, options), + callback + ); } /** @@ -1170,7 +1211,11 @@ export class Collection { return executeOperation( getTopology(this), - new FindOneAndDeleteOperation(this, filter, resolveOptions(this, options)) as TODO_NODE_2648, + new FindOneAndDeleteOperation( + this as TODO_NODE_2648, + filter, + resolveOptions(this, options) + ) as TODO_NODE_2648, callback ); } @@ -1211,7 +1256,7 @@ export class Collection { return executeOperation( getTopology(this), new FindOneAndReplaceOperation( - this, + this as TODO_NODE_2648, filter, replacement, resolveOptions(this, options) @@ -1259,7 +1304,7 @@ export class Collection { return executeOperation( getTopology(this), new FindOneAndUpdateOperation( - this, + this as TODO_NODE_2648, filter, update, resolveOptions(this, options) @@ -1289,7 +1334,7 @@ export class Collection { } return new AggregationCursor( - this, + this as TODO_NODE_2648, getTopology(this), this.s.namespace, pipeline, @@ -1376,19 +1421,24 @@ export class Collection { return executeOperation( getTopology(this), - new MapReduceOperation(this, map, reduce, resolveOptions(this, options) as TODO_NODE_2648), + new MapReduceOperation( + this as TODO_NODE_2648, + map, + reduce, + resolveOptions(this, options) as TODO_NODE_2648 + ), callback ); } /** Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order. */ initializeUnorderedBulkOp(options?: BulkWriteOptions): UnorderedBulkOperation { - return new UnorderedBulkOperation(this, resolveOptions(this, options)); + return new UnorderedBulkOperation(this as TODO_NODE_2648, resolveOptions(this, options)); } /** Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types. */ initializeOrderedBulkOp(options?: BulkWriteOptions): OrderedBulkOperation { - return new OrderedBulkOperation(this, resolveOptions(this, options)); + return new OrderedBulkOperation(this as TODO_NODE_2648, resolveOptions(this, options)); } /** Get the db scoped logger */ @@ -1411,7 +1461,7 @@ export class Collection { * @param callback - An optional callback, a Promise will be returned if none is provided */ insert( - docs: TSchema[], + docs: OptionalId[], options: BulkWriteOptions, callback: Callback> ): Promise> | void { @@ -1512,7 +1562,7 @@ export class Collection { filter ??= {}; return executeOperation( getTopology(this), - new CountDocumentsOperation(this, filter, resolveOptions(this, options)), + new CountDocumentsOperation(this as TODO_NODE_2648, filter, resolveOptions(this, options)), callback ); } diff --git a/src/cursor/abstract_cursor.ts b/src/cursor/abstract_cursor.ts index 2178ede4cb2..b93186ce0e0 100644 --- a/src/cursor/abstract_cursor.ts +++ b/src/cursor/abstract_cursor.ts @@ -204,7 +204,7 @@ export abstract class AbstractCursor< [Symbol.asyncIterator](): AsyncIterator { return { - next: () => this.next().then(value => ({ value, done: value === null })) + next: () => this.next().then(value => ({ value, done: value === null })) }; } @@ -244,7 +244,8 @@ export abstract class AbstractCursor< return done(undefined, true); } - next(this, true, (err, doc) => { + next(this, true, (err, doc) => { + // FIXME(NODE): if (err) return done(err); if (doc) { @@ -259,9 +260,9 @@ export abstract class AbstractCursor< } /** Get the next available document from the cursor, returns null if no more documents are available. */ - next(): Promise; - next(callback: Callback): void; - next(callback?: Callback): Promise | void { + next(): Promise; + next(callback: Callback): void; + next(callback?: Callback): Promise | void { return maybePromise(callback, done => { if (this[kId] === Long.ZERO) { return done(new MongoError('Cursor is exhausted')); @@ -274,9 +275,9 @@ export abstract class AbstractCursor< /** * Try to get the next available document from the cursor or `null` if an empty batch is returned */ - tryNext(): Promise; - tryNext(callback: Callback): void; - tryNext(callback?: Callback): Promise | void { + tryNext(): Promise; + tryNext(callback: Callback): void; + tryNext(callback?: Callback): Promise | void { return maybePromise(callback, done => { if (this[kId] === Long.ZERO) { return done(new MongoError('Cursor is exhausted')); @@ -292,25 +293,24 @@ export abstract class AbstractCursor< * @param iterator - The iteration callback. * @param callback - The end callback. */ - forEach(iterator: (doc: TSchema) => boolean | void): Promise; - forEach(iterator: (doc: TSchema) => boolean | void, callback: Callback): void; - forEach( - iterator: (doc: TSchema) => boolean | void, + forEach(iterator: (doc: T) => boolean | void): Promise; + forEach(iterator: (doc: T) => boolean | void, callback: Callback): void; + forEach( + iterator: (doc: T) => boolean | void, callback?: Callback ): Promise | void { if (typeof iterator !== 'function') { throw new TypeError('Missing required parameter `iterator`'); } - return maybePromise(callback, done => { const transform = this[kTransform]; const fetchDocs = () => { - next(this, true, (err, doc) => { + next(this, true, (err, doc) => { if (err || doc == null) return done(err); if (doc == null) return done(); // NOTE: no need to transform because `next` will do this automatically - let result = iterator(doc as TSchema); // TODO(NODE-2648): We need to work with the transform return type somehow + let result = iterator(doc); // TODO(NODE-3283): Improve transform typing if (result === false) return done(); // these do need to be transformed since they are copying the rest of the batch @@ -318,7 +318,7 @@ export abstract class AbstractCursor< if (internalDocs) { for (let i = 0; i < internalDocs.length; ++i) { result = iterator( - (transform ? transform(internalDocs[i]) : internalDocs[i]) as TSchema // TODO(NODE-2648): We need to work with the transform return type somehow + (transform ? transform(internalDocs[i]) : internalDocs[i]) as T // TODO(NODE-3283): Improve transform typing ); if (result === false) return done(); } @@ -396,25 +396,25 @@ export abstract class AbstractCursor< * * @param callback - The result callback. */ - toArray(): Promise; - toArray(callback: Callback): void; - toArray(callback?: Callback): Promise | void { + toArray(): Promise; + toArray(callback: Callback): void; + toArray(callback?: Callback): Promise | void { return maybePromise(callback, done => { - const docs: TSchema[] = []; + const docs: T[] = []; const transform = this[kTransform]; const fetchDocs = () => { // NOTE: if we add a `nextBatch` then we should use it here - next(this, true, (err, doc) => { + next(this, true, (err, doc) => { if (err) return done(err); if (doc == null) return done(undefined, docs); // NOTE: no need to transform because `next` will do this automatically - docs.push(doc as TSchema); + docs.push(doc); // these do need to be transformed since they are copying the rest of the batch const internalDocs = (transform ? this[kDocuments].splice(0, this[kDocuments].length).map(transform) - : this[kDocuments].splice(0, this[kDocuments].length)) as TSchema[]; // TODO(NODE-2648): We need to work with the transform return type somehow + : this[kDocuments].splice(0, this[kDocuments].length)) as T[]; // TODO(NODE-3283): Improve transform typing if (internalDocs) { docs.push(...internalDocs); @@ -455,9 +455,9 @@ export abstract class AbstractCursor< * * @param transform - The mapping transformation method. */ - map(transform: (doc: TSchema) => TResult): this { + map(transform: (doc: TSchema) => any): this { assertUninitialized(this); - const oldTransform = this[kTransform] as (doc: TSchema) => TSchema; // TODO(NODE-2648): We need to work with the transform return type somehow + const oldTransform = this[kTransform] as (doc: TSchema) => TSchema; // TODO(NODE-3283): Improve transform typing if (oldTransform) { this[kTransform] = doc => { return transform(oldTransform(doc)); @@ -603,9 +603,7 @@ export abstract class AbstractCursor< } } -function nextDocument( - cursor: AbstractCursor -): TSchema | null | undefined { +function nextDocument(cursor: AbstractCursor): T | null | undefined { if (cursor[kDocuments] == null || !cursor[kDocuments].length) { return null; } @@ -614,7 +612,7 @@ function nextDocument( if (doc) { const transform = cursor[kTransform]; if (transform) { - return transform(doc) as TSchema; + return transform(doc) as T; } return doc; @@ -623,11 +621,7 @@ function nextDocument( return null; } -function next( - cursor: AbstractCursor, - blocking: boolean, - callback: Callback -): void { +function next(cursor: AbstractCursor, blocking: boolean, callback: Callback): void { const cursorId = cursor[kId]; if (cursor.closed) { return callback(undefined, null); diff --git a/src/db.ts b/src/db.ts index c9a0df18da6..39d9113e867 100644 --- a/src/db.ts +++ b/src/db.ts @@ -464,7 +464,7 @@ export class Db { return executeOperation( getTopology(this), new RenameOperation( - this.collection(fromCollection), + this.collection(fromCollection) as TODO_NODE_2648, toCollection, options ) as TODO_NODE_2648, diff --git a/src/gridfs-stream/download.ts b/src/gridfs-stream/download.ts index d15e070b71f..ace6e398e3c 100644 --- a/src/gridfs-stream/download.ts +++ b/src/gridfs-stream/download.ts @@ -6,7 +6,7 @@ import type { Sort } from '../sort'; import type { Callback } from '../utils'; import type { Collection } from '../collection'; import type { ReadPreference } from '../read_preference'; -import type { GridFSBucketWriteStream } from './upload'; +import type { GridFSBucketWriteStream, GridFSChunk } from './upload'; import type { FindCursor } from '../cursor/find_cursor'; /** @public */ @@ -45,10 +45,10 @@ export interface GridFSBucketReadStreamPrivate { bytesRead: number; bytesToTrim: number; bytesToSkip: number; - chunks: Collection; - cursor?: FindCursor; + chunks: Collection; + cursor?: FindCursor; expected: number; - files: Collection; + files: Collection; filter: Document; init: boolean; expectedEnd: number; @@ -105,8 +105,8 @@ export class GridFSBucketReadStream extends Readable { * @param filter - The filter to use to find the file document */ constructor( - chunks: Collection, - files: Collection, + chunks: Collection, + files: Collection, readPreference: ReadPreference | undefined, filter: Document, options?: GridFSBucketReadStreamOptions @@ -246,20 +246,23 @@ function doRead(stream: GridFSBucketReadStream): void { let buf = Buffer.isBuffer(doc.data) ? doc.data : doc.data.buffer; - if (buf.length !== expectedLength) { + if (buf.byteLength !== expectedLength) { if (bytesRemaining <= 0) { errmsg = 'ExtraChunk: Got unexpected n: ' + doc.n; return __handleError(stream, new Error(errmsg)); } errmsg = - 'ChunkIsWrongSize: Got unexpected length: ' + buf.length + ', expected: ' + expectedLength; + 'ChunkIsWrongSize: Got unexpected length: ' + + buf.byteLength + + ', expected: ' + + expectedLength; return __handleError(stream, new Error(errmsg)); } - stream.s.bytesRead += buf.length; + stream.s.bytesRead += buf.byteLength; - if (buf.length === 0) { + if (buf.byteLength === 0) { return stream.push(null); } @@ -275,12 +278,12 @@ function doRead(stream: GridFSBucketReadStream): void { const bytesLeftToRead = stream.s.options.end - stream.s.bytesToSkip; if (atEndOfStream && stream.s.bytesToTrim != null) { sliceEnd = stream.s.file.chunkSize - stream.s.bytesToTrim; - } else if (stream.s.options.end && bytesLeftToRead < doc.data.length()) { + } else if (stream.s.options.end && bytesLeftToRead < doc.data.byteLength) { sliceEnd = bytesLeftToRead; } if (sliceStart != null || sliceEnd != null) { - buf = buf.slice(sliceStart || 0, sliceEnd || buf.length); + buf = buf.slice(sliceStart || 0, sliceEnd || buf.byteLength); } stream.push(buf); @@ -421,7 +424,7 @@ function handleStartOption( function handleEndOption( stream: GridFSBucketReadStream, doc: Document, - cursor: FindCursor, + cursor: FindCursor, options: GridFSBucketReadStreamOptions ) { if (options && options.end != null) { diff --git a/src/gridfs-stream/upload.ts b/src/gridfs-stream/upload.ts index 3497b9b5d3a..daf46bc6e4e 100644 --- a/src/gridfs-stream/upload.ts +++ b/src/gridfs-stream/upload.ts @@ -16,7 +16,7 @@ export interface GridFSChunk { _id: ObjectId; files_id: ObjectId; n: number; - data: Buffer; + data: Buffer | Uint8Array; } /** @public */ diff --git a/src/utils.ts b/src/utils.ts index 87ca27944ae..4dfc2d2a45e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -460,7 +460,7 @@ export function decorateWithExplain(command: Document, explain: Explain): Docume * if the topology cannot be found. * @internal */ -export function getTopology(provider: MongoClient | Db | Collection): Topology { +export function getTopology(provider: MongoClient | Db | Collection): Topology { if (`topology` in provider && provider.topology) { return provider.topology; } else if ('client' in provider.s && provider.s.client.topology) { diff --git a/test/types/schema_helpers.test-d.ts b/test/types/schema_helpers.test-d.ts new file mode 100644 index 00000000000..e1745f6151c --- /dev/null +++ b/test/types/schema_helpers.test-d.ts @@ -0,0 +1,44 @@ +import type { + InferIdType, + WithId, + WithoutId, + OptionalId, + EnhancedOmit +} from '../../src/mongo_types'; + +import { expectType, expectNotType, expectAssignable } from 'tsd'; +import { Document, ObjectId } from 'bson'; + +// InferIdType +expectType>(new ObjectId()); +expectType>(1 + 1); +expectType>(new ObjectId()); +expectAssignable>(new ObjectId()); +expectAssignable>(1 + 1); + +// WithId +expectAssignable>({ _id: new ObjectId() }); +expectAssignable>({ _id: new ObjectId(), a: 3 }); +expectNotType>({ _id: 3 }); +// expectType>({ _id: 3 }); + +// OptionalId +// expectType>({ _id: new ObjectId(), a: 3 }); +// expectType>({ a: 3 }); // can be omit because ObjectId +// Changing _id to a type other than ObjectId makes it required: +// expectType>({ _id: 2, a: 3 }); +expectNotType>({ a: 3 }); +expectNotType>({ a: 3 }); + +// If you just have an indexed type there is no enforcement +// expectType>({ a: 3 }); + +// But you can still bring back enforcement yourself +expectNotType>({ a: 3 }); +// expectType>({ a: 3 }); +// expectType>({ _id: 3, a: 3 }); + +// Custom _id type +class MyId {} +expectNotType>({ a: 3 }); +expectNotType>({ _id: new ObjectId(), a: 3 }); From 7dad9c319deaf1bf13543a07b2684757f3f68e12 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Fri, 14 May 2021 13:37:36 -0400 Subject: [PATCH 11/15] fix: Collection defaults to Document type for schema --- src/collection.ts | 2 +- test/types/union_schema.test-d.ts | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/collection.ts b/src/collection.ts index f1ecc6266b1..36dbfe1baf0 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -154,7 +154,7 @@ export interface CollectionPrivate { * }); * ``` */ -export class Collection { +export class Collection { /** @internal */ s: CollectionPrivate; diff --git a/test/types/union_schema.test-d.ts b/test/types/union_schema.test-d.ts index f5de137c86f..f801b7f37f7 100644 --- a/test/types/union_schema.test-d.ts +++ b/test/types/union_schema.test-d.ts @@ -1,9 +1,9 @@ import { expectType, expectError, expectNotType, expectNotAssignable, expectAssignable } from 'tsd'; import type { Collection } from '../../src/collection'; -import { ObjectId } from '../../src/bson'; +import { ObjectId, Document } from '../../src/bson'; -type InsertOneFirstParam = Parameters[0]; +type InsertOneFirstParam = Parameters['insertOne']>[0]; interface Circle { _id: ObjectId; @@ -16,7 +16,9 @@ interface Rectangle { } type Shape = Circle | Rectangle; -type ShapeInsert = InsertOneFirstParam>; +type x = Shape extends Document ? true : false; + +type ShapeInsert = InsertOneFirstParam; expectAssignable({ height: 2, width: 2, radius: 2 }); // This is permitted... // error cases, should not insert a portion of a type expectNotAssignable({ height: 2 }); @@ -41,5 +43,5 @@ interface B { _id: string; } type Data = A | B; -expectAssignable>>({ _id: 2 }); -expectAssignable>>({ _id: 'hi' }); +expectAssignable>({ _id: 2 }); +expectAssignable>({ _id: 'hi' }); From 1a4d38d1a72a5641453cd07c001f4b68a43155d5 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Fri, 14 May 2021 13:38:30 -0400 Subject: [PATCH 12/15] chore: remove unused type declaration --- test/types/union_schema.test-d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/types/union_schema.test-d.ts b/test/types/union_schema.test-d.ts index f801b7f37f7..61f4a04c4ad 100644 --- a/test/types/union_schema.test-d.ts +++ b/test/types/union_schema.test-d.ts @@ -16,8 +16,6 @@ interface Rectangle { } type Shape = Circle | Rectangle; -type x = Shape extends Document ? true : false; - type ShapeInsert = InsertOneFirstParam; expectAssignable({ height: 2, width: 2, radius: 2 }); // This is permitted... // error cases, should not insert a portion of a type From 5bfba6aa21e04ce198793ba7ee04b516f1346dbf Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Fri, 14 May 2021 13:42:54 -0400 Subject: [PATCH 13/15] chore: remove unused import --- test/types/schema_helpers.test-d.ts | 6 +++--- test/types/union_schema.test-d.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/types/schema_helpers.test-d.ts b/test/types/schema_helpers.test-d.ts index e1745f6151c..c371cd64228 100644 --- a/test/types/schema_helpers.test-d.ts +++ b/test/types/schema_helpers.test-d.ts @@ -1,9 +1,9 @@ import type { InferIdType, WithId, - WithoutId, - OptionalId, - EnhancedOmit + // WithoutId, + OptionalId + // EnhancedOmit } from '../../src/mongo_types'; import { expectType, expectNotType, expectAssignable } from 'tsd'; diff --git a/test/types/union_schema.test-d.ts b/test/types/union_schema.test-d.ts index 61f4a04c4ad..8ec6b3d4b46 100644 --- a/test/types/union_schema.test-d.ts +++ b/test/types/union_schema.test-d.ts @@ -1,7 +1,7 @@ import { expectType, expectError, expectNotType, expectNotAssignable, expectAssignable } from 'tsd'; import type { Collection } from '../../src/collection'; -import { ObjectId, Document } from '../../src/bson'; +import { ObjectId } from '../../src/bson'; type InsertOneFirstParam = Parameters['insertOne']>[0]; From 19f640fca9299cdb814bd9f31f928378b884fe30 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Fri, 14 May 2021 15:45:55 -0400 Subject: [PATCH 14/15] fix: ticket numbers, test for exclusive union --- src/collection.ts | 84 +++++++++++++++---------------- src/cursor/abstract_cursor.ts | 6 +-- src/db.ts | 10 ++-- src/mongo_types.ts | 6 +-- test/types/union_schema.test-d.ts | 21 ++++++++ 5 files changed, 74 insertions(+), 53 deletions(-) diff --git a/src/collection.ts b/src/collection.ts index 36dbfe1baf0..6040e574ebe 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -89,7 +89,7 @@ import type { PkFactory } from './mongo_client'; import type { Logger, LoggerOptions } from './logger'; import { FindCursor } from './cursor/find_cursor'; import type { CountOptions } from './operations/count'; -import type { Filter, TODO_NODE_2648, UpdateQuery, WithId, OptionalId } from './mongo_types'; +import type { Filter, TODO_NODE_3286, UpdateQuery, WithId, OptionalId } from './mongo_types'; /** @public */ export interface ModifyResult { @@ -284,10 +284,10 @@ export class Collection { return executeOperation( getTopology(this), new InsertOneOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, doc, resolveOptions(this, options) - ) as TODO_NODE_2648, + ) as TODO_NODE_3286, callback ); } @@ -323,10 +323,10 @@ export class Collection { return executeOperation( getTopology(this), new InsertManyOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, docs, resolveOptions(this, options) - ) as TODO_NODE_2648, + ) as TODO_NODE_3286, callback ); } @@ -391,8 +391,8 @@ export class Collection { return executeOperation( getTopology(this), new BulkWriteOperation( - this as TODO_NODE_2648, - operations as TODO_NODE_2648, + this as TODO_NODE_3286, + operations as TODO_NODE_3286, resolveOptions(this, options) ), callback @@ -437,7 +437,7 @@ export class Collection { return executeOperation( getTopology(this), - new UpdateOneOperation(this as TODO_NODE_2648, filter, update, resolveOptions(this, options)), + new UpdateOneOperation(this as TODO_NODE_3286, filter, update, resolveOptions(this, options)), callback ); } @@ -478,7 +478,7 @@ export class Collection { return executeOperation( getTopology(this), new ReplaceOneOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, filter, replacement, resolveOptions(this, options) @@ -526,7 +526,7 @@ export class Collection { return executeOperation( getTopology(this), new UpdateManyOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, filter, update, resolveOptions(this, options) @@ -559,7 +559,7 @@ export class Collection { return executeOperation( getTopology(this), - new DeleteOneOperation(this as TODO_NODE_2648, filter, resolveOptions(this, options)), + new DeleteOneOperation(this as TODO_NODE_3286, filter, resolveOptions(this, options)), callback ); } @@ -599,7 +599,7 @@ export class Collection { return executeOperation( getTopology(this), - new DeleteManyOperation(this as TODO_NODE_2648, filter, resolveOptions(this, options)), + new DeleteManyOperation(this as TODO_NODE_3286, filter, resolveOptions(this, options)), callback ); } @@ -628,7 +628,7 @@ export class Collection { // Intentionally, we do not inherit options from parent for this operation. return executeOperation( getTopology(this), - new RenameOperation(this as TODO_NODE_2648, newName, { + new RenameOperation(this as TODO_NODE_3286, newName, { ...options, readPreference: ReadPreference.PRIMARY }), @@ -690,10 +690,10 @@ export class Collection { return executeOperation( getTopology(this), new FindOneOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, filter, resolveOptions(this, options) - ) as TODO_NODE_2648, + ) as TODO_NODE_3286, callback ); } @@ -718,7 +718,7 @@ export class Collection { getTopology(this), this.s.namespace, filter, - resolveOptions(this as TODO_NODE_2648, options) + resolveOptions(this as TODO_NODE_3286, options) ); } @@ -740,7 +740,7 @@ export class Collection { return executeOperation( getTopology(this), - new OptionsOperation(this as TODO_NODE_2648, resolveOptions(this, options)), + new OptionsOperation(this as TODO_NODE_3286, resolveOptions(this, options)), callback ); } @@ -763,7 +763,7 @@ export class Collection { return executeOperation( getTopology(this), - new IsCappedOperation(this as TODO_NODE_2648, resolveOptions(this, options)), + new IsCappedOperation(this as TODO_NODE_3286, resolveOptions(this, options)), callback ); } @@ -815,7 +815,7 @@ export class Collection { return executeOperation( getTopology(this), new CreateIndexOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, this.collectionName, indexSpec, resolveOptions(this, options) @@ -876,7 +876,7 @@ export class Collection { return executeOperation( getTopology(this), new CreateIndexesOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, this.collectionName, indexSpecs, resolveOptions(this, options) @@ -909,7 +909,7 @@ export class Collection { return executeOperation( getTopology(this), - new DropIndexOperation(this as TODO_NODE_2648, indexName, options), + new DropIndexOperation(this as TODO_NODE_3286, indexName, options), callback ); } @@ -932,7 +932,7 @@ export class Collection { return executeOperation( getTopology(this), - new DropIndexesOperation(this as TODO_NODE_2648, resolveOptions(this, options)), + new DropIndexesOperation(this as TODO_NODE_3286, resolveOptions(this, options)), callback ); } @@ -943,7 +943,7 @@ export class Collection { * @param options - Optional settings for the command */ listIndexes(options?: ListIndexesOptions): ListIndexesCursor { - return new ListIndexesCursor(this as TODO_NODE_2648, resolveOptions(this, options)); + return new ListIndexesCursor(this as TODO_NODE_3286, resolveOptions(this, options)); } /** @@ -970,7 +970,7 @@ export class Collection { return executeOperation( getTopology(this), - new IndexExistsOperation(this as TODO_NODE_2648, indexes, resolveOptions(this, options)), + new IndexExistsOperation(this as TODO_NODE_3286, indexes, resolveOptions(this, options)), callback ); } @@ -1015,7 +1015,7 @@ export class Collection { if (typeof options === 'function') (callback = options), (options = {}); return executeOperation( getTopology(this), - new EstimatedDocumentCountOperation(this as TODO_NODE_2648, resolveOptions(this, options)), + new EstimatedDocumentCountOperation(this as TODO_NODE_3286, resolveOptions(this, options)), callback ); } @@ -1075,7 +1075,7 @@ export class Collection { return executeOperation( getTopology(this), new CountDocumentsOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, filter as Document, resolveOptions(this, options as CountDocumentsOptions) ), @@ -1128,8 +1128,8 @@ export class Collection { return executeOperation( getTopology(this), new DistinctOperation( - this as TODO_NODE_2648, - key as TODO_NODE_2648, + this as TODO_NODE_3286, + key as TODO_NODE_3286, filter, resolveOptions(this, options as DistinctOptions) ), @@ -1155,7 +1155,7 @@ export class Collection { return executeOperation( getTopology(this), - new IndexesOperation(this as TODO_NODE_2648, resolveOptions(this, options)), + new IndexesOperation(this as TODO_NODE_3286, resolveOptions(this, options)), callback ); } @@ -1179,7 +1179,7 @@ export class Collection { return executeOperation( getTopology(this), - new CollStatsOperation(this as TODO_NODE_2648, options), + new CollStatsOperation(this as TODO_NODE_3286, options), callback ); } @@ -1212,10 +1212,10 @@ export class Collection { return executeOperation( getTopology(this), new FindOneAndDeleteOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, filter, resolveOptions(this, options) - ) as TODO_NODE_2648, + ) as TODO_NODE_3286, callback ); } @@ -1256,11 +1256,11 @@ export class Collection { return executeOperation( getTopology(this), new FindOneAndReplaceOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, filter, replacement, resolveOptions(this, options) - ) as TODO_NODE_2648, + ) as TODO_NODE_3286, callback ); } @@ -1304,11 +1304,11 @@ export class Collection { return executeOperation( getTopology(this), new FindOneAndUpdateOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, filter, update, resolveOptions(this, options) - ) as TODO_NODE_2648, + ) as TODO_NODE_3286, callback ); } @@ -1334,7 +1334,7 @@ export class Collection { } return new AggregationCursor( - this as TODO_NODE_2648, + this as TODO_NODE_3286, getTopology(this), this.s.namespace, pipeline, @@ -1422,10 +1422,10 @@ export class Collection { return executeOperation( getTopology(this), new MapReduceOperation( - this as TODO_NODE_2648, + this as TODO_NODE_3286, map, reduce, - resolveOptions(this, options) as TODO_NODE_2648 + resolveOptions(this, options) as TODO_NODE_3286 ), callback ); @@ -1433,12 +1433,12 @@ export class Collection { /** Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order. */ initializeUnorderedBulkOp(options?: BulkWriteOptions): UnorderedBulkOperation { - return new UnorderedBulkOperation(this as TODO_NODE_2648, resolveOptions(this, options)); + return new UnorderedBulkOperation(this as TODO_NODE_3286, resolveOptions(this, options)); } /** Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types. */ initializeOrderedBulkOp(options?: BulkWriteOptions): OrderedBulkOperation { - return new OrderedBulkOperation(this as TODO_NODE_2648, resolveOptions(this, options)); + return new OrderedBulkOperation(this as TODO_NODE_3286, resolveOptions(this, options)); } /** Get the db scoped logger */ @@ -1562,7 +1562,7 @@ export class Collection { filter ??= {}; return executeOperation( getTopology(this), - new CountDocumentsOperation(this as TODO_NODE_2648, filter, resolveOptions(this, options)), + new CountDocumentsOperation(this as TODO_NODE_3286, filter, resolveOptions(this, options)), callback ); } diff --git a/src/cursor/abstract_cursor.ts b/src/cursor/abstract_cursor.ts index b93186ce0e0..ff465fcb106 100644 --- a/src/cursor/abstract_cursor.ts +++ b/src/cursor/abstract_cursor.ts @@ -8,7 +8,7 @@ import type { Topology } from '../sdam/topology'; import { Readable, Transform } from 'stream'; import type { ExecutionResult } from '../operations/execute_operation'; import { ReadConcern, ReadConcernLike } from '../read_concern'; -import { TODO_NODE_2648, TypedEventEmitter } from '../mongo_types'; +import { TODO_NODE_3286, TypedEventEmitter } from '../mongo_types'; const kId = Symbol('id'); const kDocuments = Symbol('documents'); @@ -669,8 +669,8 @@ function next(cursor: AbstractCursor, blocking: boolean, callback: Callback(fromCollection) as TODO_NODE_2648, + this.collection(fromCollection) as TODO_NODE_3286, toCollection, options - ) as TODO_NODE_2648, + ) as TODO_NODE_3286, callback ); } diff --git a/src/mongo_types.ts b/src/mongo_types.ts index 338c610d018..8cf5dea9da9 100644 --- a/src/mongo_types.ts +++ b/src/mongo_types.ts @@ -2,12 +2,12 @@ import type { Document, ObjectId } from './bson'; import { EventEmitter } from 'events'; /** @internal */ -export type TODO_NODE_2648 = any; +export type TODO_NODE_3286 = any; /** Given an object shaped type, return the type of the _id field or default to ObjectId @public */ export type InferIdType = TSchema extends { _id: infer IdType } // user has defined a type for _id ? // eslint-disable-next-line @typescript-eslint/ban-types - {} extends IdType + {} extends IdType // TODO(NODE-3285): Improve type readability ? // eslint-disable-next-line @typescript-eslint/ban-types Exclude : unknown extends IdType @@ -29,7 +29,7 @@ export type WithId = EnhancedOmit & { _id: InferIdType< */ export type OptionalId = ObjectId extends TSchema['_id'] // a Schema with ObjectId _id type or "any" or "indexed type" provided ? EnhancedOmit & { _id?: InferIdType } // a Schema provided but _id type is not ObjectId - : WithId; + : WithId; // TODO(NODE-3285): Improve type readability /** TypeScript Omit (Exclude to be specific) does not work for objects with an "any" indexed type, and breaks discriminated unions @public */ export type EnhancedOmit = string extends keyof TRecordOrUnion diff --git a/test/types/union_schema.test-d.ts b/test/types/union_schema.test-d.ts index 8ec6b3d4b46..1159c884cad 100644 --- a/test/types/union_schema.test-d.ts +++ b/test/types/union_schema.test-d.ts @@ -2,6 +2,7 @@ import { expectType, expectError, expectNotType, expectNotAssignable, expectAssi import type { Collection } from '../../src/collection'; import { ObjectId } from '../../src/bson'; +import { Filter } from '../../src/mongo_types'; type InsertOneFirstParam = Parameters['insertOne']>[0]; @@ -43,3 +44,23 @@ interface B { type Data = A | B; expectAssignable>({ _id: 2 }); expectAssignable>({ _id: 'hi' }); + +// Ensure Exclusive Union Type doesn't break inside our collection methods +type Without = { [P in Exclude]?: never }; +// eslint-disable-next-line @typescript-eslint/ban-types +type XOR = T | U extends object ? (Without & U) | (Without & T) : T | U; + +interface Dog { + bark: string; +} +interface Cat { + meow: string; +} +type Pet = XOR; +expectNotType>({ meow: '', bark: '' }); +expectType>({ meow: '' }); +expectType>({ bark: '' }); +expectType>({ bark: '', _id: new ObjectId() }); +expectNotType>({ meow: '', bark: '' }); // find +expectType>({ bark: '' }); +expectType>({ meow: '' }); From 309993be96ae4ab452ff20d11d8bb89d206ffbbf Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Fri, 14 May 2021 17:01:22 -0400 Subject: [PATCH 15/15] fix: type assertions and generics in change_stream --- src/change_stream.ts | 15 +++++++++++---- test/types/schema_helpers.test-d.ts | 28 ++++++++++++++++++---------- test/types/union_schema.test-d.ts | 16 ++++++++-------- 3 files changed, 37 insertions(+), 22 deletions(-) diff --git a/src/change_stream.ts b/src/change_stream.ts index 3f74b9d4ada..6f0dae674a5 100644 --- a/src/change_stream.ts +++ b/src/change_stream.ts @@ -622,14 +622,17 @@ function closeWithError( changeStream.close(() => callback && callback(error)); } -function streamEvents(changeStream: ChangeStream, cursor: ChangeStreamCursor): void { +function streamEvents( + changeStream: ChangeStream, + cursor: ChangeStreamCursor +): void { const stream = changeStream[kCursorStream] || cursor.stream(); changeStream[kCursorStream] = stream; stream.on('data', change => processNewChange(changeStream, change)); stream.on('error', error => processError(changeStream, error)); } -function endStream(changeStream: ChangeStream): void { +function endStream(changeStream: ChangeStream): void { const cursorStream = changeStream[kCursorStream]; if (cursorStream) { ['data', 'close', 'end', 'error'].forEach(event => cursorStream.removeAllListeners(event)); @@ -670,7 +673,11 @@ function processNewChange( return callback(undefined, change); } -function processError(changeStream: ChangeStream, error: AnyError, callback?: Callback) { +function processError( + changeStream: ChangeStream, + error: AnyError, + callback?: Callback +) { const cursor = changeStream.cursor; // If the change stream has been closed explicitly, do not process error. @@ -680,7 +687,7 @@ function processError(changeStream: ChangeStream, error: AnyError, callback } // if the resume succeeds, continue with the new cursor - function resumeWithCursor(newCursor: ChangeStreamCursor) { + function resumeWithCursor(newCursor: ChangeStreamCursor) { changeStream.cursor = newCursor; processResumeQueue(changeStream); } diff --git a/test/types/schema_helpers.test-d.ts b/test/types/schema_helpers.test-d.ts index c371cd64228..9d177306ee5 100644 --- a/test/types/schema_helpers.test-d.ts +++ b/test/types/schema_helpers.test-d.ts @@ -1,9 +1,9 @@ import type { InferIdType, WithId, - // WithoutId, - OptionalId - // EnhancedOmit + WithoutId, + OptionalId, + EnhancedOmit } from '../../src/mongo_types'; import { expectType, expectNotType, expectAssignable } from 'tsd'; @@ -20,13 +20,8 @@ expectAssignable>(1 + 1); expectAssignable>({ _id: new ObjectId() }); expectAssignable>({ _id: new ObjectId(), a: 3 }); expectNotType>({ _id: 3 }); -// expectType>({ _id: 3 }); -// OptionalId -// expectType>({ _id: new ObjectId(), a: 3 }); -// expectType>({ a: 3 }); // can be omit because ObjectId // Changing _id to a type other than ObjectId makes it required: -// expectType>({ _id: 2, a: 3 }); expectNotType>({ a: 3 }); expectNotType>({ a: 3 }); @@ -35,10 +30,23 @@ expectNotType>({ a: 3 }); -// expectType>({ a: 3 }); -// expectType>({ _id: 3, a: 3 }); // Custom _id type class MyId {} expectNotType>({ a: 3 }); expectNotType>({ _id: new ObjectId(), a: 3 }); + +// WithoutId removes _id whether defined in the schema or not +expectType>({ a: 2 }); +expectNotType>({ _id: 3, a: 2 }); +expectNotType>({ _id: 3, a: 2 }); + +// EnhancedOmit fixes a problem with Typescript's built in Omit that breaks discriminated unions +// NODE-3287 +// expectNotAssignable>({ +// a: 'one' as const +// }); +expectAssignable>({ type: 'one' }); // This shouldn't work, but does, hence needing EnhancedOmit + +// Indexed type is unaffected, because you can't omit from {[x: string]: any} +expectAssignable>({ omitted: 2 }); diff --git a/test/types/union_schema.test-d.ts b/test/types/union_schema.test-d.ts index 1159c884cad..069e947f27d 100644 --- a/test/types/union_schema.test-d.ts +++ b/test/types/union_schema.test-d.ts @@ -2,7 +2,7 @@ import { expectType, expectError, expectNotType, expectNotAssignable, expectAssi import type { Collection } from '../../src/collection'; import { ObjectId } from '../../src/bson'; -import { Filter } from '../../src/mongo_types'; +import type { Filter } from '../../src/mongo_types'; type InsertOneFirstParam = Parameters['insertOne']>[0]; @@ -57,10 +57,10 @@ interface Cat { meow: string; } type Pet = XOR; -expectNotType>({ meow: '', bark: '' }); -expectType>({ meow: '' }); -expectType>({ bark: '' }); -expectType>({ bark: '', _id: new ObjectId() }); -expectNotType>({ meow: '', bark: '' }); // find -expectType>({ bark: '' }); -expectType>({ meow: '' }); +expectNotAssignable>({ meow: '', bark: '' }); +expectAssignable>({ meow: '' }); +expectAssignable>({ bark: '' }); +expectAssignable>({ bark: '', _id: new ObjectId() }); +expectNotAssignable>({ meow: '', bark: '' }); // find +expectAssignable>({ bark: '' }); +expectAssignable>({ meow: '' });