diff --git a/.eslintrc.json b/.eslintrc.json index b8537ed9845..a0632f564a3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,8 @@ "@typescript-eslint", "prettier", "promise", - "eslint-plugin-tsdoc" + "eslint-plugin-tsdoc", + "sort-imports-es6-autofix" ], "extends": [ "eslint:recommended", @@ -26,6 +27,8 @@ "prettier/prettier": "error", "tsdoc/syntax": "warn", + "sort-imports": "off", + "sort-imports-es6-autofix/sort-imports-es6": "error", "no-console": "off", "eqeqeq": ["error", "always", { "null": "ignore" }], diff --git a/.evergreen/config.yml.in b/.evergreen/config.yml.in index 14b4afd13a0..827b2b3b419 100644 --- a/.evergreen/config.yml.in +++ b/.evergreen/config.yml.in @@ -242,16 +242,17 @@ functions: script: | MONGODB_URI='${plain_auth_mongodb_uri}' NODE_LTS_NAME='${NODE_LTS_NAME}' \ bash ${PROJECT_DIRECTORY}/.evergreen/run-ldap-tests.sh - + "run data lake tests": - command: shell.exec type: test params: working_dir: src script: | + ${PREPARE_SHELL} MONGODB_URI='mongodb://mhuser:pencil@localhost' NODE_LTS_NAME='${NODE_LTS_NAME}' \ bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh - + "run tls tests": - command: shell.exec type: test diff --git a/.gitignore b/.gitignore index bfef1ff9daf..8180efff86d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ pids *.png test*.* output +xunit.xml types docs/gen @@ -56,4 +57,4 @@ lib/ *.d.ts .vscode -output \ No newline at end of file +output diff --git a/.mocharc.json b/.mocharc.json index 3bbb8ff4019..34d0b0525c2 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -3,7 +3,7 @@ "require": ["ts-node/register", "source-map-support/register"], "file": "test/tools/runner", "ui": "test/tools/runner/metadata_ui.js", + "reporter": "test/tools/reporter/mongodb_reporter.js", "recursive": true, - "timeout": 60000, - "reporter": "spec-xunit-file" + "timeout": 60000 } diff --git a/graph.svg b/graph.svg new file mode 100644 index 00000000000..9b10697644e --- /dev/null +++ b/graph.svg @@ -0,0 +1,4717 @@ + + + + + + +G + + + +admin.ts + +admin.ts + + + +bson.ts + +bson.ts + + + +admin.ts->bson.ts + + + + + +db.ts + +db.ts + + + +admin.ts->db.ts + + + + + +operations/add_user.ts + +operations/add_user.ts + + + +admin.ts->operations/add_user.ts + + + + + +operations/command.ts + +operations/command.ts + + + +admin.ts->operations/command.ts + + + + + +operations/execute_operation.ts + +operations/execute_operation.ts + + + +admin.ts->operations/execute_operation.ts + + + + + +operations/remove_user.ts + +operations/remove_user.ts + + + +admin.ts->operations/remove_user.ts + + + + + +operations/run_command.ts + +operations/run_command.ts + + + +admin.ts->operations/run_command.ts + + + + + +operations/validate_collection.ts + +operations/validate_collection.ts + + + +admin.ts->operations/validate_collection.ts + + + + + +utils.ts + +utils.ts + + + +admin.ts->utils.ts + + + + + +bson.ts->bson.ts + + + + + +db.ts->admin.ts + + + + + +db.ts->bson.ts + + + + + +db.ts->operations/add_user.ts + + + + + +db.ts->operations/command.ts + + + + + +db.ts->operations/execute_operation.ts + + + + + +db.ts->operations/remove_user.ts + + + + + +db.ts->operations/run_command.ts + + + + + +db.ts->utils.ts + + + + + +collection.ts + +collection.ts + + + +db.ts->collection.ts + + + + + +error.ts + +error.ts + + + +db.ts->error.ts + + + + + +change_stream.ts + +change_stream.ts + + + +db.ts->change_stream.ts + + + + + +mongo_client.ts + +mongo_client.ts + + + +db.ts->mongo_client.ts + + + + + +operations/aggregate.ts + +operations/aggregate.ts + + + +db.ts->operations/aggregate.ts + + + + + +read_preference.ts + +read_preference.ts + + + +db.ts->read_preference.ts + + + + + +logger.ts + +logger.ts + + + +db.ts->logger.ts + + + + + +operations/common_functions.ts + +operations/common_functions.ts + + + +db.ts->operations/common_functions.ts + + + + + +operations/drop.ts + +operations/drop.ts + + + +db.ts->operations/drop.ts + + + + + +operations/indexes.ts + +operations/indexes.ts + + + +db.ts->operations/indexes.ts + + + + + +operations/rename.ts + +operations/rename.ts + + + +db.ts->operations/rename.ts + + + + + +operations/stats.ts + +operations/stats.ts + + + +db.ts->operations/stats.ts + + + + + +dynamic_loaders.ts + +dynamic_loaders.ts + + + +db.ts->dynamic_loaders.ts + + + + + +operations/collections.ts + +operations/collections.ts + + + +db.ts->operations/collections.ts + + + + + +operations/create_collection.ts + +operations/create_collection.ts + + + +db.ts->operations/create_collection.ts + + + + + +operations/eval.ts + +operations/eval.ts + + + +db.ts->operations/eval.ts + + + + + +operations/list_collections.ts + +operations/list_collections.ts + + + +db.ts->operations/list_collections.ts + + + + + +operations/profiling_level.ts + +operations/profiling_level.ts + + + +db.ts->operations/profiling_level.ts + + + + + +operations/set_profiling_level.ts + +operations/set_profiling_level.ts + + + +db.ts->operations/set_profiling_level.ts + + + + + +operations/add_user.ts->bson.ts + + + + + +operations/add_user.ts->db.ts + + + + + +operations/add_user.ts->operations/command.ts + + + + + +operations/add_user.ts->utils.ts + + + + + +operations/add_user.ts->error.ts + + + + + +operations/operation.ts + +operations/operation.ts + + + +operations/add_user.ts->operations/operation.ts + + + + + +sdam/server.ts + +sdam/server.ts + + + +operations/add_user.ts->sdam/server.ts + + + + + +operations/command.ts->bson.ts + + + + + +operations/command.ts->utils.ts + + + + + +cmap/wire_protocol/write_command.ts + +cmap/wire_protocol/write_command.ts + + + +operations/command.ts->cmap/wire_protocol/write_command.ts + + + + + +operations/command.ts->error.ts + + + + + +operations/command.ts->operations/operation.ts + + + + + +operations/command.ts->read_preference.ts + + + + + +sessions.ts + +sessions.ts + + + +operations/command.ts->sessions.ts + + + + + +operations/command.ts->logger.ts + + + + + +operations/command.ts->sdam/server.ts + + + + + +operations/execute_operation.ts->utils.ts + + + + + +operations/execute_operation.ts->error.ts + + + + + +operations/execute_operation.ts->operations/operation.ts + + + + + +sdam/topology.ts + +sdam/topology.ts + + + +operations/execute_operation.ts->sdam/topology.ts + + + + + +operations/execute_operation.ts->read_preference.ts + + + + + +operations/execute_operation.ts->sessions.ts + + + + + +operations/execute_operation.ts->sdam/server.ts + + + + + +sdam/common.ts + +sdam/common.ts + + + +operations/execute_operation.ts->sdam/common.ts + + + + + +operations/remove_user.ts->db.ts + + + + + +operations/remove_user.ts->operations/command.ts + + + + + +operations/remove_user.ts->utils.ts + + + + + +operations/remove_user.ts->operations/operation.ts + + + + + +operations/remove_user.ts->sdam/server.ts + + + + + +operations/run_command.ts->bson.ts + + + + + +operations/run_command.ts->operations/command.ts + + + + + +operations/run_command.ts->utils.ts + + + + + +operations/run_command.ts->sdam/server.ts + + + + + +operations/validate_collection.ts->admin.ts + + + + + +operations/validate_collection.ts->bson.ts + + + + + +operations/validate_collection.ts->operations/command.ts + + + + + +operations/validate_collection.ts->utils.ts + + + + + +operations/validate_collection.ts->sdam/server.ts + + + + + +utils.ts->bson.ts + + + + + +utils.ts->db.ts + + + + + +utils.ts->operations/command.ts + + + + + +utils.ts->collection.ts + + + + + +utils.ts->error.ts + + + + + +utils.ts->operations/operation.ts + + + + + +utils.ts->sdam/topology.ts + + + + + +cursor/cursor.ts + +cursor/cursor.ts + + + +utils.ts->cursor/cursor.ts + + + + + +utils.ts->mongo_client.ts + + + + + +utils.ts->read_preference.ts + + + + + +cmap/connection.ts + +cmap/connection.ts + + + +utils.ts->cmap/connection.ts + + + + + +utils.ts->sessions.ts + + + + + +utils.ts->sdam/server.ts + + + + + +utils.ts->operations/indexes.ts + + + + + +bulk/common.ts + +bulk/common.ts + + + +bulk/common.ts->bson.ts + + + + + +bulk/common.ts->operations/command.ts + + + + + +bulk/common.ts->operations/execute_operation.ts + + + + + +bulk/common.ts->utils.ts + + + + + +bulk/common.ts->cmap/wire_protocol/write_command.ts + + + + + +bulk/common.ts->collection.ts + + + + + +bulk/common.ts->error.ts + + + + + +operations/delete.ts + +operations/delete.ts + + + +bulk/common.ts->operations/delete.ts + + + + + +operations/insert.ts + +operations/insert.ts + + + +bulk/common.ts->operations/insert.ts + + + + + +bulk/common.ts->operations/operation.ts + + + + + +operations/update.ts + +operations/update.ts + + + +bulk/common.ts->operations/update.ts + + + + + +bulk/common.ts->sdam/topology.ts + + + + + +cmap/wire_protocol/write_command.ts->bson.ts + + + + + +cmap/wire_protocol/write_command.ts->utils.ts + + + + + +cmap/wire_protocol/write_command.ts->error.ts + + + + + +cmap/wire_protocol/command.ts + +cmap/wire_protocol/command.ts + + + +cmap/wire_protocol/write_command.ts->cmap/wire_protocol/command.ts + + + + + +cmap/wire_protocol/write_command.ts->sdam/server.ts + + + + + +collection.ts->bson.ts + + + + + +collection.ts->db.ts + + + + + +collection.ts->operations/command.ts + + + + + +collection.ts->operations/execute_operation.ts + + + + + +collection.ts->utils.ts + + + + + +collection.ts->bulk/common.ts + + + + + +collection.ts->error.ts + + + + + +collection.ts->operations/delete.ts + + + + + +collection.ts->operations/insert.ts + + + + + +collection.ts->operations/operation.ts + + + + + +collection.ts->operations/update.ts + + + + + +bulk/ordered.ts + +bulk/ordered.ts + + + +collection.ts->bulk/ordered.ts + + + + + +bulk/unordered.ts + +bulk/unordered.ts + + + +collection.ts->bulk/unordered.ts + + + + + +collection.ts->change_stream.ts + + + + + +collection.ts->mongo_client.ts + + + + + +collection.ts->operations/aggregate.ts + + + + + +collection.ts->read_preference.ts + + + + + +collection.ts->logger.ts + + + + + +operations/find.ts + +operations/find.ts + + + +collection.ts->operations/find.ts + + + + + +operations/bulk_write.ts + +operations/bulk_write.ts + + + +collection.ts->operations/bulk_write.ts + + + + + +collection.ts->operations/common_functions.ts + + + + + +operations/count.ts + +operations/count.ts + + + +collection.ts->operations/count.ts + + + + + +operations/count_documents.ts + +operations/count_documents.ts + + + +collection.ts->operations/count_documents.ts + + + + + +operations/distinct.ts + +operations/distinct.ts + + + +collection.ts->operations/distinct.ts + + + + + +collection.ts->operations/drop.ts + + + + + +operations/estimated_document_count.ts + +operations/estimated_document_count.ts + + + +collection.ts->operations/estimated_document_count.ts + + + + + +operations/find_and_modify.ts + +operations/find_and_modify.ts + + + +collection.ts->operations/find_and_modify.ts + + + + + +operations/find_one.ts + +operations/find_one.ts + + + +collection.ts->operations/find_one.ts + + + + + +collection.ts->operations/indexes.ts + + + + + +operations/insert_many.ts + +operations/insert_many.ts + + + +collection.ts->operations/insert_many.ts + + + + + +operations/is_capped.ts + +operations/is_capped.ts + + + +collection.ts->operations/is_capped.ts + + + + + +operations/map_reduce.ts + +operations/map_reduce.ts + + + +collection.ts->operations/map_reduce.ts + + + + + +operations/options_operation.ts + +operations/options_operation.ts + + + +collection.ts->operations/options_operation.ts + + + + + +collection.ts->operations/rename.ts + + + + + +operations/replace_one.ts + +operations/replace_one.ts + + + +collection.ts->operations/replace_one.ts + + + + + +collection.ts->operations/stats.ts + + + + + +error.ts->bson.ts + + + + + +sdam/server_description.ts + +sdam/server_description.ts + + + +error.ts->sdam/server_description.ts + + + + + +sdam/topology_description.ts + +sdam/topology_description.ts + + + +error.ts->sdam/topology_description.ts + + + + + +operations/delete.ts->bson.ts + + + + + +operations/delete.ts->operations/command.ts + + + + + +operations/delete.ts->utils.ts + + + + + +operations/delete.ts->cmap/wire_protocol/write_command.ts + + + + + +operations/delete.ts->collection.ts + + + + + +operations/delete.ts->operations/operation.ts + + + + + +operations/delete.ts->cmap/connection.ts + + + + + +operations/delete.ts->sdam/server.ts + + + + + +operations/delete.ts->operations/common_functions.ts + + + + + +operations/insert.ts->bson.ts + + + + + +operations/insert.ts->operations/command.ts + + + + + +operations/insert.ts->utils.ts + + + + + +operations/insert.ts->bulk/common.ts + + + + + +operations/insert.ts->cmap/wire_protocol/write_command.ts + + + + + +operations/insert.ts->collection.ts + + + + + +operations/insert.ts->error.ts + + + + + +operations/insert.ts->operations/operation.ts + + + + + +operations/insert.ts->cmap/connection.ts + + + + + +operations/insert.ts->sdam/server.ts + + + + + +operations/insert.ts->operations/common_functions.ts + + + + + +operations/operation.ts->bson.ts + + + + + +operations/operation.ts->utils.ts + + + + + +operations/operation.ts->read_preference.ts + + + + + +operations/operation.ts->sessions.ts + + + + + +operations/operation.ts->sdam/server.ts + + + + + +operations/update.ts->bson.ts + + + + + +operations/update.ts->operations/command.ts + + + + + +operations/update.ts->utils.ts + + + + + +operations/update.ts->cmap/wire_protocol/write_command.ts + + + + + +operations/update.ts->collection.ts + + + + + +operations/update.ts->operations/operation.ts + + + + + +operations/update.ts->sdam/server.ts + + + + + +operations/update.ts->operations/common_functions.ts + + + + + +sdam/topology.ts->bson.ts + + + + + +sdam/topology.ts->operations/run_command.ts + + + + + +sdam/topology.ts->utils.ts + + + + + +sdam/topology.ts->error.ts + + + + + +sdam/topology.ts->cursor/cursor.ts + + + + + +sdam/topology.ts->mongo_client.ts + + + + + +sdam/topology.ts->read_preference.ts + + + + + +cmap/auth/mongo_credentials.ts + +cmap/auth/mongo_credentials.ts + + + +sdam/topology.ts->cmap/auth/mongo_credentials.ts + + + + + +sdam/topology.ts->cmap/connection.ts + + + + + +sdam/topology.ts->sessions.ts + + + + + +cmap/events.ts + +cmap/events.ts + + + +sdam/topology.ts->cmap/events.ts + + + + + +sdam/topology.ts->logger.ts + + + + + +sdam/topology.ts->sdam/server.ts + + + + + +cmap/connection_pool.ts + +cmap/connection_pool.ts + + + +sdam/topology.ts->cmap/connection_pool.ts + + + + + +sdam/topology.ts->sdam/common.ts + + + + + +sdam/topology.ts->sdam/server_description.ts + + + + + +transactions.ts + +transactions.ts + + + +sdam/topology.ts->transactions.ts + + + + + +sdam/topology.ts->sdam/topology_description.ts + + + + + +sdam/events.ts + +sdam/events.ts + + + +sdam/topology.ts->sdam/events.ts + + + + + +sdam/server_selection.ts + +sdam/server_selection.ts + + + +sdam/topology.ts->sdam/server_selection.ts + + + + + +sdam/srv_polling.ts + +sdam/srv_polling.ts + + + +sdam/topology.ts->sdam/srv_polling.ts + + + + + +bulk/ordered.ts->bson.ts + + + + + +bulk/ordered.ts->bulk/common.ts + + + + + +bulk/ordered.ts->collection.ts + + + + + +bulk/unordered.ts->bson.ts + + + + + +bulk/unordered.ts->utils.ts + + + + + +bulk/unordered.ts->bulk/common.ts + + + + + +bulk/unordered.ts->collection.ts + + + + + +change_stream.ts->bson.ts + + + + + +change_stream.ts->db.ts + + + + + +change_stream.ts->operations/command.ts + + + + + +change_stream.ts->utils.ts + + + + + +change_stream.ts->cmap/wire_protocol/write_command.ts + + + + + +change_stream.ts->collection.ts + + + + + +change_stream.ts->error.ts + + + + + +change_stream.ts->sdam/topology.ts + + + + + +change_stream.ts->cursor/cursor.ts + + + + + +change_stream.ts->mongo_client.ts + + + + + +change_stream.ts->operations/aggregate.ts + + + + + +change_stream.ts->read_preference.ts + + + + + +cursor/cursor.ts->bson.ts + + + + + +cursor/cursor.ts->operations/command.ts + + + + + +cursor/cursor.ts->operations/execute_operation.ts + + + + + +cursor/cursor.ts->utils.ts + + + + + +cursor/cursor.ts->cmap/wire_protocol/write_command.ts + + + + + +cursor/cursor.ts->error.ts + + + + + +cursor/cursor.ts->operations/operation.ts + + + + + +cursor/cursor.ts->sdam/topology.ts + + + + + +cursor/cursor.ts->change_stream.ts + + + + + +cursor/cursor.ts->read_preference.ts + + + + + +cursor/cursor.ts->sessions.ts + + + + + +cursor/cursor.ts->logger.ts + + + + + +cursor/cursor.ts->sdam/server.ts + + + + + +cursor/cursor.ts->cmap/connection_pool.ts + + + + + +cursor/cursor.ts->operations/count.ts + + + + + +mongo_client.ts->bson.ts + + + + + +mongo_client.ts->db.ts + + + + + +mongo_client.ts->operations/command.ts + + + + + +mongo_client.ts->utils.ts + + + + + +mongo_client.ts->error.ts + + + + + +mongo_client.ts->sdam/topology.ts + + + + + +mongo_client.ts->change_stream.ts + + + + + +mongo_client.ts->read_preference.ts + + + + + +mongo_client.ts->cmap/auth/mongo_credentials.ts + + + + + +cmap/auth/defaultAuthProviders.ts + +cmap/auth/defaultAuthProviders.ts + + + +mongo_client.ts->cmap/auth/defaultAuthProviders.ts + + + + + +deps.ts + +deps.ts + + + +mongo_client.ts->deps.ts + + + + + +mongo_client.ts->sessions.ts + + + + + +mongo_client.ts->logger.ts + + + + + +cmap/wire_protocol/compression.ts + +cmap/wire_protocol/compression.ts + + + +mongo_client.ts->cmap/wire_protocol/compression.ts + + + + + +mongo_client.ts->sdam/server_description.ts + + + + + +connection_string.ts + +connection_string.ts + + + +mongo_client.ts->connection_string.ts + + + + + +operations/connect.ts + +operations/connect.ts + + + +mongo_client.ts->operations/connect.ts + + + + + +operations/aggregate.ts->bson.ts + + + + + +operations/aggregate.ts->operations/command.ts + + + + + +operations/aggregate.ts->utils.ts + + + + + +operations/aggregate.ts->cmap/wire_protocol/write_command.ts + + + + + +operations/aggregate.ts->error.ts + + + + + +operations/aggregate.ts->operations/operation.ts + + + + + +operations/aggregate.ts->read_preference.ts + + + + + +operations/aggregate.ts->sdam/server.ts + + + + + +read_preference.ts->bson.ts + + + + + +read_preference.ts->sessions.ts + + + + + +read_preference.ts->sdam/server_description.ts + + + + + +cmap/auth/auth_provider.ts + +cmap/auth/auth_provider.ts + + + +cmap/auth/auth_provider.ts->bson.ts + + + + + +cmap/auth/auth_provider.ts->utils.ts + + + + + +cmap/auth/auth_provider.ts->cmap/auth/mongo_credentials.ts + + + + + +cmap/connect.ts + +cmap/connect.ts + + + +cmap/auth/auth_provider.ts->cmap/connect.ts + + + + + +cmap/auth/auth_provider.ts->cmap/connection.ts + + + + + +cmap/auth/mongo_credentials.ts->bson.ts + + + + + +cmap/auth/mongo_credentials.ts->cmap/auth/defaultAuthProviders.ts + + + + + +cmap/connect.ts->bson.ts + + + + + +cmap/connect.ts->utils.ts + + + + + +cmap/connect.ts->error.ts + + + + + +cmap/connect.ts->cmap/auth/auth_provider.ts + + + + + +cmap/connect.ts->cmap/connection.ts + + + + + +cmap/connect.ts->cmap/auth/defaultAuthProviders.ts + + + + + +cmap/connection.ts->bson.ts + + + + + +cmap/connection.ts->utils.ts + + + + + +cmap/connection.ts->error.ts + + + + + +cmap/connection.ts->cmap/auth/mongo_credentials.ts + + + + + +cmap/connection.ts->cmap/connect.ts + + + + + +cmap/connection.ts->deps.ts + + + + + +cmap/commands.ts + +cmap/commands.ts + + + +cmap/connection.ts->cmap/commands.ts + + + + + +cmap/connection.ts->cmap/wire_protocol/command.ts + + + + + +cmap/connection.ts->sessions.ts + + + + + +cmap/connection.ts->cmap/events.ts + + + + + +cmap/message_stream.ts + +cmap/message_stream.ts + + + +cmap/connection.ts->cmap/message_stream.ts + + + + + +cmap/stream_description.ts + +cmap/stream_description.ts + + + +cmap/connection.ts->cmap/stream_description.ts + + + + + +cmap/wire_protocol/get_more.ts + +cmap/wire_protocol/get_more.ts + + + +cmap/connection.ts->cmap/wire_protocol/get_more.ts + + + + + +cmap/wire_protocol/index.ts + +cmap/wire_protocol/index.ts + + + +cmap/connection.ts->cmap/wire_protocol/index.ts + + + + + +cmap/connection.ts->logger.ts + + + + + +cmap/connection.ts->operations/find.ts + + + + + +cmap/connection.ts->sdam/server.ts + + + + + +cmap/auth/defaultAuthProviders.ts->cmap/auth/auth_provider.ts + + + + + +cmap/auth/mongodb_aws.ts + +cmap/auth/mongodb_aws.ts + + + +cmap/auth/defaultAuthProviders.ts->cmap/auth/mongodb_aws.ts + + + + + +cmap/auth/scram.ts + +cmap/auth/scram.ts + + + +cmap/auth/defaultAuthProviders.ts->cmap/auth/scram.ts + + + + + +cmap/auth/x509.ts + +cmap/auth/x509.ts + + + +cmap/auth/defaultAuthProviders.ts->cmap/auth/x509.ts + + + + + +cmap/auth/mongodb_aws.ts->bson.ts + + + + + +cmap/auth/mongodb_aws.ts->utils.ts + + + + + +cmap/auth/mongodb_aws.ts->error.ts + + + + + +cmap/auth/mongodb_aws.ts->cmap/auth/auth_provider.ts + + + + + +cmap/auth/mongodb_aws.ts->cmap/auth/mongo_credentials.ts + + + + + +cmap/auth/mongodb_aws.ts->cmap/auth/defaultAuthProviders.ts + + + + + +cmap/auth/mongodb_aws.ts->deps.ts + + + + + +cmap/auth/scram.ts->bson.ts + + + + + +cmap/auth/scram.ts->utils.ts + + + + + +cmap/auth/scram.ts->error.ts + + + + + +cmap/auth/scram.ts->cmap/auth/auth_provider.ts + + + + + +cmap/auth/scram.ts->cmap/auth/mongo_credentials.ts + + + + + +cmap/auth/scram.ts->cmap/connect.ts + + + + + +cmap/auth/scram.ts->deps.ts + + + + + +cmap/auth/x509.ts->bson.ts + + + + + +cmap/auth/x509.ts->utils.ts + + + + + +cmap/auth/x509.ts->error.ts + + + + + +cmap/auth/x509.ts->cmap/auth/auth_provider.ts + + + + + +cmap/auth/x509.ts->cmap/auth/mongo_credentials.ts + + + + + +cmap/auth/x509.ts->cmap/connect.ts + + + + + +deps.ts->bson.ts + + + + + +deps.ts->utils.ts + + + + + +deps.ts->error.ts + + + + + +deps.ts->mongo_client.ts + + + + + +cmap/commands.ts->bson.ts + + + + + +cmap/commands.ts->utils.ts + + + + + +cmap/commands.ts->read_preference.ts + + + + + +cmap/commands.ts->cmap/wire_protocol/command.ts + + + + + +cmap/commands.ts->sessions.ts + + + + + +cmap/wire_protocol/command.ts->bson.ts + + + + + +cmap/wire_protocol/command.ts->utils.ts + + + + + +cmap/wire_protocol/command.ts->cmap/wire_protocol/write_command.ts + + + + + +cmap/wire_protocol/command.ts->error.ts + + + + + +cmap/wire_protocol/command.ts->sdam/topology.ts + + + + + +cmap/wire_protocol/command.ts->read_preference.ts + + + + + +cmap/wire_protocol/command.ts->cmap/commands.ts + + + + + +cmap/wire_protocol/command.ts->sessions.ts + + + + + +cmap/wire_protocol/command.ts->sdam/server.ts + + + + + +cmap/wire_protocol/shared.ts + +cmap/wire_protocol/shared.ts + + + +cmap/wire_protocol/command.ts->cmap/wire_protocol/shared.ts + + + + + +cmap/wire_protocol/command.ts->transactions.ts + + + + + +sessions.ts->bson.ts + + + + + +sessions.ts->operations/execute_operation.ts + + + + + +sessions.ts->operations/run_command.ts + + + + + +sessions.ts->utils.ts + + + + + +sessions.ts->cmap/wire_protocol/write_command.ts + + + + + +sessions.ts->error.ts + + + + + +sessions.ts->sdam/topology.ts + + + + + +sessions.ts->cursor/cursor.ts + + + + + +sessions.ts->mongo_client.ts + + + + + +sessions.ts->read_preference.ts + + + + + +sessions.ts->sdam/common.ts + + + + + +sessions.ts->cmap/wire_protocol/shared.ts + + + + + +sessions.ts->transactions.ts + + + + + +cmap/events.ts->bson.ts + + + + + +cmap/events.ts->utils.ts + + + + + +cmap/events.ts->error.ts + + + + + +cmap/events.ts->cmap/connection.ts + + + + + +cmap/events.ts->cmap/commands.ts + + + + + +cmap/events.ts->cmap/connection_pool.ts + + + + + +cmap/message_stream.ts->bson.ts + + + + + +cmap/message_stream.ts->utils.ts + + + + + +cmap/message_stream.ts->error.ts + + + + + +cmap/message_stream.ts->cmap/commands.ts + + + + + +cmap/message_stream.ts->sessions.ts + + + + + +cmap/message_stream.ts->cmap/wire_protocol/compression.ts + + + + + +cmap/stream_description.ts->bson.ts + + + + + +cmap/stream_description.ts->cmap/wire_protocol/compression.ts + + + + + +cmap/stream_description.ts->sdam/common.ts + + + + + +cmap/stream_description.ts->sdam/server_description.ts + + + + + +cmap/wire_protocol/get_more.ts->bson.ts + + + + + +cmap/wire_protocol/get_more.ts->utils.ts + + + + + +cmap/wire_protocol/get_more.ts->error.ts + + + + + +cmap/wire_protocol/get_more.ts->cmap/commands.ts + + + + + +cmap/wire_protocol/get_more.ts->cmap/wire_protocol/command.ts + + + + + +cmap/wire_protocol/get_more.ts->sdam/server.ts + + + + + +cmap/wire_protocol/get_more.ts->cmap/wire_protocol/shared.ts + + + + + +cmap/wire_protocol/index.ts->bson.ts + + + + + +cmap/wire_protocol/index.ts->utils.ts + + + + + +cmap/wire_protocol/index.ts->cmap/wire_protocol/write_command.ts + + + + + +cmap/wire_protocol/index.ts->cmap/wire_protocol/command.ts + + + + + +cmap/wire_protocol/index.ts->cmap/wire_protocol/get_more.ts + + + + + +cmap/wire_protocol/index.ts->sdam/server.ts + + + + + +cmap/wire_protocol/kill_cursors.ts + +cmap/wire_protocol/kill_cursors.ts + + + +cmap/wire_protocol/index.ts->cmap/wire_protocol/kill_cursors.ts + + + + + +cmap/wire_protocol/query.ts + +cmap/wire_protocol/query.ts + + + +cmap/wire_protocol/index.ts->cmap/wire_protocol/query.ts + + + + + +logger.ts->error.ts + + + + + +operations/find.ts->bson.ts + + + + + +operations/find.ts->operations/command.ts + + + + + +operations/find.ts->utils.ts + + + + + +operations/find.ts->cmap/wire_protocol/write_command.ts + + + + + +operations/find.ts->collection.ts + + + + + +operations/find.ts->error.ts + + + + + +operations/find.ts->operations/operation.ts + + + + + +operations/find.ts->sdam/server.ts + + + + + +operations/find.ts->cmap/wire_protocol/query.ts + + + + + +sdam/server.ts->bson.ts + + + + + +sdam/server.ts->utils.ts + + + + + +sdam/server.ts->cmap/wire_protocol/write_command.ts + + + + + +sdam/server.ts->error.ts + + + + + +sdam/server.ts->sdam/topology.ts + + + + + +sdam/server.ts->read_preference.ts + + + + + +sdam/server.ts->cmap/auth/mongo_credentials.ts + + + + + +sdam/server.ts->cmap/connection.ts + + + + + +sdam/server.ts->deps.ts + + + + + +sdam/server.ts->cmap/wire_protocol/command.ts + + + + + +sdam/server.ts->sessions.ts + + + + + +sdam/server.ts->cmap/events.ts + + + + + +sdam/server.ts->cmap/wire_protocol/get_more.ts + + + + + +sdam/server.ts->logger.ts + + + + + +sdam/server.ts->operations/find.ts + + + + + +sdam/server.ts->cmap/connection_pool.ts + + + + + +sdam/server.ts->sdam/common.ts + + + + + +sdam/server.ts->sdam/server_description.ts + + + + + +sdam/server.ts->transactions.ts + + + + + +sdam/server.ts->cmap/wire_protocol/query.ts + + + + + +sdam/server.ts->sdam/events.ts + + + + + +sdam/monitor.ts + +sdam/monitor.ts + + + +sdam/server.ts->sdam/monitor.ts + + + + + +cmap/connection_pool.ts->bson.ts + + + + + +cmap/connection_pool.ts->utils.ts + + + + + +cmap/connection_pool.ts->error.ts + + + + + +cmap/connection_pool.ts->cmap/connect.ts + + + + + +cmap/connection_pool.ts->cmap/connection.ts + + + + + +cmap/connection_pool.ts->cmap/wire_protocol/command.ts + + + + + +cmap/connection_pool.ts->cmap/events.ts + + + + + +cmap/connection_pool.ts->logger.ts + + + + + +cmap/errors.ts + +cmap/errors.ts + + + +cmap/connection_pool.ts->cmap/errors.ts + + + + + +cmap/errors.ts->error.ts + + + + + +cmap/errors.ts->cmap/connection.ts + + + + + +cmap/errors.ts->cmap/connection_pool.ts + + + + + +cmap/wire_protocol/compression.ts->utils.ts + + + + + +cmap/wire_protocol/compression.ts->deps.ts + + + + + +cmap/wire_protocol/compression.ts->cmap/message_stream.ts + + + + + +sdam/common.ts->bson.ts + + + + + +sdam/common.ts->sdam/topology.ts + + + + + +sdam/common.ts->sessions.ts + + + + + +sdam/server_description.ts->bson.ts + + + + + +sdam/server_description.ts->utils.ts + + + + + +sdam/server_description.ts->sdam/common.ts + + + + + +cmap/wire_protocol/shared.ts->bson.ts + + + + + +cmap/wire_protocol/shared.ts->error.ts + + + + + +cmap/wire_protocol/shared.ts->sdam/topology.ts + + + + + +cmap/wire_protocol/shared.ts->read_preference.ts + + + + + +cmap/wire_protocol/shared.ts->cmap/commands.ts + + + + + +cmap/wire_protocol/shared.ts->cmap/wire_protocol/command.ts + + + + + +cmap/wire_protocol/shared.ts->sdam/server.ts + + + + + +cmap/wire_protocol/shared.ts->sdam/common.ts + + + + + +cmap/wire_protocol/shared.ts->sdam/server_description.ts + + + + + +cmap/wire_protocol/shared.ts->sdam/topology_description.ts + + + + + +transactions.ts->bson.ts + + + + + +transactions.ts->operations/command.ts + + + + + +transactions.ts->error.ts + + + + + +transactions.ts->read_preference.ts + + + + + +transactions.ts->sdam/server.ts + + + + + +cmap/wire_protocol/kill_cursors.ts->bson.ts + + + + + +cmap/wire_protocol/kill_cursors.ts->utils.ts + + + + + +cmap/wire_protocol/kill_cursors.ts->error.ts + + + + + +cmap/wire_protocol/kill_cursors.ts->cmap/commands.ts + + + + + +cmap/wire_protocol/kill_cursors.ts->cmap/wire_protocol/command.ts + + + + + +cmap/wire_protocol/kill_cursors.ts->sdam/server.ts + + + + + +cmap/wire_protocol/query.ts->bson.ts + + + + + +cmap/wire_protocol/query.ts->utils.ts + + + + + +cmap/wire_protocol/query.ts->error.ts + + + + + +cmap/wire_protocol/query.ts->read_preference.ts + + + + + +cmap/wire_protocol/query.ts->cmap/commands.ts + + + + + +cmap/wire_protocol/query.ts->cmap/wire_protocol/command.ts + + + + + +cmap/wire_protocol/query.ts->operations/find.ts + + + + + +cmap/wire_protocol/query.ts->sdam/server.ts + + + + + +cmap/wire_protocol/query.ts->cmap/wire_protocol/shared.ts + + + + + +sdam/topology_description.ts->bson.ts + + + + + +sdam/topology_description.ts->sdam/common.ts + + + + + +sdam/topology_description.ts->sdam/server_description.ts + + + + + +sdam/topology_description.ts->sdam/srv_polling.ts + + + + + +operations/bulk_write.ts->utils.ts + + + + + +operations/bulk_write.ts->bulk/common.ts + + + + + +operations/bulk_write.ts->collection.ts + + + + + +operations/bulk_write.ts->operations/operation.ts + + + + + +operations/bulk_write.ts->sdam/server.ts + + + + + +operations/common_functions.ts->bson.ts + + + + + +operations/common_functions.ts->db.ts + + + + + +operations/common_functions.ts->utils.ts + + + + + +operations/common_functions.ts->cmap/wire_protocol/write_command.ts + + + + + +operations/common_functions.ts->collection.ts + + + + + +operations/common_functions.ts->error.ts + + + + + +operations/common_functions.ts->operations/delete.ts + + + + + +operations/common_functions.ts->operations/update.ts + + + + + +operations/common_functions.ts->read_preference.ts + + + + + +operations/common_functions.ts->sessions.ts + + + + + +operations/common_functions.ts->sdam/server.ts + + + + + +operations/count.ts->bson.ts + + + + + +operations/count.ts->operations/command.ts + + + + + +operations/count.ts->utils.ts + + + + + +operations/count.ts->collection.ts + + + + + +operations/count.ts->operations/operation.ts + + + + + +operations/count.ts->cursor/cursor.ts + + + + + +operations/count.ts->sdam/server.ts + + + + + +operations/count_documents.ts->bson.ts + + + + + +operations/count_documents.ts->utils.ts + + + + + +operations/count_documents.ts->collection.ts + + + + + +operations/count_documents.ts->operations/aggregate.ts + + + + + +operations/count_documents.ts->sdam/server.ts + + + + + +operations/distinct.ts->bson.ts + + + + + +operations/distinct.ts->operations/command.ts + + + + + +operations/distinct.ts->utils.ts + + + + + +operations/distinct.ts->collection.ts + + + + + +operations/distinct.ts->error.ts + + + + + +operations/distinct.ts->operations/operation.ts + + + + + +operations/distinct.ts->sdam/server.ts + + + + + +operations/drop.ts->db.ts + + + + + +operations/drop.ts->operations/command.ts + + + + + +operations/drop.ts->utils.ts + + + + + +operations/drop.ts->operations/operation.ts + + + + + +operations/drop.ts->sdam/server.ts + + + + + +operations/estimated_document_count.ts->bson.ts + + + + + +operations/estimated_document_count.ts->operations/command.ts + + + + + +operations/estimated_document_count.ts->utils.ts + + + + + +operations/estimated_document_count.ts->collection.ts + + + + + +operations/estimated_document_count.ts->operations/operation.ts + + + + + +operations/estimated_document_count.ts->sdam/server.ts + + + + + +operations/find_and_modify.ts->bson.ts + + + + + +operations/find_and_modify.ts->operations/command.ts + + + + + +operations/find_and_modify.ts->utils.ts + + + + + +operations/find_and_modify.ts->collection.ts + + + + + +operations/find_and_modify.ts->error.ts + + + + + +operations/find_and_modify.ts->operations/operation.ts + + + + + +operations/find_and_modify.ts->read_preference.ts + + + + + +operations/find_and_modify.ts->sdam/server.ts + + + + + +operations/find_one.ts->bson.ts + + + + + +operations/find_one.ts->operations/command.ts + + + + + +operations/find_one.ts->utils.ts + + + + + +operations/find_one.ts->collection.ts + + + + + +operations/find_one.ts->error.ts + + + + + +operations/find_one.ts->operations/operation.ts + + + + + +operations/find_one.ts->operations/find.ts + + + + + +operations/find_one.ts->sdam/server.ts + + + + + +operations/indexes.ts->bson.ts + + + + + +operations/indexes.ts->db.ts + + + + + +operations/indexes.ts->operations/command.ts + + + + + +operations/indexes.ts->utils.ts + + + + + +operations/indexes.ts->cmap/wire_protocol/write_command.ts + + + + + +operations/indexes.ts->collection.ts + + + + + +operations/indexes.ts->error.ts + + + + + +operations/indexes.ts->operations/operation.ts + + + + + +operations/indexes.ts->read_preference.ts + + + + + +operations/indexes.ts->operations/find.ts + + + + + +operations/indexes.ts->sdam/server.ts + + + + + +operations/indexes.ts->operations/common_functions.ts + + + + + +operations/insert_many.ts->bson.ts + + + + + +operations/insert_many.ts->utils.ts + + + + + +operations/insert_many.ts->bulk/common.ts + + + + + +operations/insert_many.ts->collection.ts + + + + + +operations/insert_many.ts->error.ts + + + + + +operations/insert_many.ts->operations/operation.ts + + + + + +operations/insert_many.ts->sdam/server.ts + + + + + +operations/insert_many.ts->operations/bulk_write.ts + + + + + +operations/insert_many.ts->operations/common_functions.ts + + + + + +operations/is_capped.ts->utils.ts + + + + + +operations/is_capped.ts->collection.ts + + + + + +operations/is_capped.ts->operations/operation.ts + + + + + +operations/is_capped.ts->sdam/server.ts + + + + + +operations/map_reduce.ts->bson.ts + + + + + +operations/map_reduce.ts->operations/command.ts + + + + + +operations/map_reduce.ts->utils.ts + + + + + +operations/map_reduce.ts->collection.ts + + + + + +operations/map_reduce.ts->error.ts + + + + + +operations/map_reduce.ts->operations/operation.ts + + + + + +operations/map_reduce.ts->read_preference.ts + + + + + +operations/map_reduce.ts->sdam/server.ts + + + + + +operations/map_reduce.ts->dynamic_loaders.ts + + + + + +operations/options_operation.ts->bson.ts + + + + + +operations/options_operation.ts->utils.ts + + + + + +operations/options_operation.ts->collection.ts + + + + + +operations/options_operation.ts->error.ts + + + + + +operations/options_operation.ts->operations/operation.ts + + + + + +operations/options_operation.ts->sdam/server.ts + + + + + +operations/rename.ts->operations/command.ts + + + + + +operations/rename.ts->operations/run_command.ts + + + + + +operations/rename.ts->utils.ts + + + + + +operations/rename.ts->collection.ts + + + + + +operations/rename.ts->error.ts + + + + + +operations/rename.ts->operations/operation.ts + + + + + +operations/rename.ts->sdam/server.ts + + + + + +operations/rename.ts->dynamic_loaders.ts + + + + + +operations/replace_one.ts->bson.ts + + + + + +operations/replace_one.ts->operations/command.ts + + + + + +operations/replace_one.ts->utils.ts + + + + + +operations/replace_one.ts->cmap/wire_protocol/write_command.ts + + + + + +operations/replace_one.ts->collection.ts + + + + + +operations/replace_one.ts->operations/operation.ts + + + + + +operations/replace_one.ts->operations/update.ts + + + + + +operations/replace_one.ts->sdam/server.ts + + + + + +operations/replace_one.ts->operations/common_functions.ts + + + + + +operations/stats.ts->bson.ts + + + + + +operations/stats.ts->operations/command.ts + + + + + +operations/stats.ts->utils.ts + + + + + +operations/stats.ts->collection.ts + + + + + +operations/stats.ts->operations/operation.ts + + + + + +operations/stats.ts->sdam/server.ts + + + + + +connection_string.ts->bson.ts + + + + + +connection_string.ts->utils.ts + + + + + +connection_string.ts->error.ts + + + + + +connection_string.ts->mongo_client.ts + + + + + +connection_string.ts->read_preference.ts + + + + + +connection_string.ts->cmap/connection.ts + + + + + +connection_string.ts->cmap/wire_protocol/compression.ts + + + + + +dynamic_loaders.ts->admin.ts + + + + + +dynamic_loaders.ts->db.ts + + + + + +dynamic_loaders.ts->collection.ts + + + + + +dynamic_loaders.ts->mongo_client.ts + + + + + +operations/collections.ts->db.ts + + + + + +operations/collections.ts->utils.ts + + + + + +operations/collections.ts->collection.ts + + + + + +operations/collections.ts->operations/operation.ts + + + + + +operations/collections.ts->sdam/server.ts + + + + + +operations/collections.ts->dynamic_loaders.ts + + + + + +operations/create_collection.ts->bson.ts + + + + + +operations/create_collection.ts->db.ts + + + + + +operations/create_collection.ts->operations/command.ts + + + + + +operations/create_collection.ts->utils.ts + + + + + +operations/create_collection.ts->collection.ts + + + + + +operations/create_collection.ts->operations/operation.ts + + + + + +operations/create_collection.ts->mongo_client.ts + + + + + +operations/create_collection.ts->sdam/server.ts + + + + + +operations/create_collection.ts->dynamic_loaders.ts + + + + + +operations/eval.ts->bson.ts + + + + + +operations/eval.ts->db.ts + + + + + +operations/eval.ts->operations/command.ts + + + + + +operations/eval.ts->utils.ts + + + + + +operations/eval.ts->error.ts + + + + + +operations/eval.ts->read_preference.ts + + + + + +operations/eval.ts->sdam/server.ts + + + + + +operations/list_collections.ts->bson.ts + + + + + +operations/list_collections.ts->db.ts + + + + + +operations/list_collections.ts->operations/command.ts + + + + + +operations/list_collections.ts->utils.ts + + + + + +operations/list_collections.ts->operations/operation.ts + + + + + +operations/list_collections.ts->cursor/cursor.ts + + + + + +operations/list_collections.ts->sdam/server.ts + + + + + +operations/profiling_level.ts->db.ts + + + + + +operations/profiling_level.ts->operations/command.ts + + + + + +operations/profiling_level.ts->utils.ts + + + + + +operations/profiling_level.ts->sdam/server.ts + + + + + +operations/set_profiling_level.ts->db.ts + + + + + +operations/set_profiling_level.ts->operations/command.ts + + + + + +operations/set_profiling_level.ts->utils.ts + + + + + +operations/set_profiling_level.ts->sdam/server.ts + + + + + +gridfs-stream/download.ts + +gridfs-stream/download.ts + + + +gridfs-stream/download.ts->bson.ts + + + + + +gridfs-stream/download.ts->utils.ts + + + + + +gridfs-stream/download.ts->collection.ts + + + + + +gridfs-stream/download.ts->error.ts + + + + + +gridfs-stream/download.ts->cursor/cursor.ts + + + + + +gridfs-stream/download.ts->read_preference.ts + + + + + +gridfs-stream/download.ts->operations/find.ts + + + + + +gridfs-stream/upload.ts + +gridfs-stream/upload.ts + + + +gridfs-stream/download.ts->gridfs-stream/upload.ts + + + + + +gridfs-stream/upload.ts->bson.ts + + + + + +gridfs-stream/upload.ts->utils.ts + + + + + +gridfs-stream/upload.ts->collection.ts + + + + + +gridfs-stream/upload.ts->error.ts + + + + + +gridfs-stream/upload.ts->gridfs-stream/download.ts + + + + + +gridfs-stream/index.ts + +gridfs-stream/index.ts + + + +gridfs-stream/upload.ts->gridfs-stream/index.ts + + + + + +gridfs-stream/index.ts->bson.ts + + + + + +gridfs-stream/index.ts->db.ts + + + + + +gridfs-stream/index.ts->utils.ts + + + + + +gridfs-stream/index.ts->collection.ts + + + + + +gridfs-stream/index.ts->error.ts + + + + + +gridfs-stream/index.ts->cursor/cursor.ts + + + + + +gridfs-stream/index.ts->read_preference.ts + + + + + +gridfs-stream/index.ts->logger.ts + + + + + +gridfs-stream/index.ts->operations/find.ts + + + + + +gridfs-stream/index.ts->gridfs-stream/download.ts + + + + + +gridfs-stream/index.ts->gridfs-stream/upload.ts + + + + + +operations/connect.ts->bson.ts + + + + + +operations/connect.ts->utils.ts + + + + + +operations/connect.ts->error.ts + + + + + +operations/connect.ts->sdam/topology.ts + + + + + +operations/connect.ts->mongo_client.ts + + + + + +operations/connect.ts->read_preference.ts + + + + + +operations/connect.ts->cmap/auth/mongo_credentials.ts + + + + + +operations/connect.ts->cmap/connection.ts + + + + + +operations/connect.ts->cmap/auth/defaultAuthProviders.ts + + + + + +operations/connect.ts->cmap/events.ts + + + + + +operations/connect.ts->logger.ts + + + + + +operations/connect.ts->sdam/server.ts + + + + + +operations/connect.ts->connection_string.ts + + + + + +sdam/events.ts->bson.ts + + + + + +sdam/events.ts->sdam/server_description.ts + + + + + +sdam/events.ts->sdam/topology_description.ts + + + + + +sdam/monitor.ts->bson.ts + + + + + +sdam/monitor.ts->utils.ts + + + + + +sdam/monitor.ts->error.ts + + + + + +sdam/monitor.ts->cmap/connect.ts + + + + + +sdam/monitor.ts->cmap/connection.ts + + + + + +sdam/monitor.ts->sdam/server.ts + + + + + +sdam/monitor.ts->sdam/common.ts + + + + + +sdam/monitor.ts->sdam/server_description.ts + + + + + +sdam/monitor.ts->sdam/events.ts + + + + + +sdam/server_selection.ts->error.ts + + + + + +sdam/server_selection.ts->read_preference.ts + + + + + +sdam/server_selection.ts->sdam/common.ts + + + + + +sdam/server_selection.ts->sdam/server_description.ts + + + + + +sdam/server_selection.ts->sdam/topology_description.ts + + + + + +sdam/srv_polling.ts->logger.ts + + + + + diff --git a/package-lock.json b/package-lock.json index 505e4a45b7a..47f0641fc67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,12 @@ "source-map": "^0.5.0" }, "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -183,6 +189,58 @@ "@babel/helper-validator-identifier": "^7.10.4", "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", + "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" + } + }, + "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": { @@ -238,6 +296,32 @@ "to-fast-properties": "^2.0.0" } }, + "@eslint/eslintrc": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.1.tgz", + "integrity": "sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "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 + } + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -335,6 +419,12 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true + }, + "typescript": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.5.tgz", + "integrity": "sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==", + "dev": true } } }, @@ -383,6 +473,32 @@ } } }, + "@nodelib/fs.scandir": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", + "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.3", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", + "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", + "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.3", + "fastq": "^1.6.0" + } + }, "@rushstack/node-core-library": { "version": "3.35.1", "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.35.1.tgz", @@ -454,24 +570,34 @@ "type-detect": "4.0.8" } }, + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, "@sinonjs/formatio": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", - "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", + "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", "dev": true, "requires": { - "samsam": "1.3.0" + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^5.0.2" } }, "@sinonjs/samsam": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", - "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.0.tgz", + "integrity": "sha512-hXpcfx3aq+ETVBwPlRFICld5EnrkexXuXDwqUNhDdr5L8VjvMeSRwyOa0qL7XFmR+jVWR4rUZtnxlG7RX72sBg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.3.0", - "array-from": "^2.1.1", - "lodash": "^4.17.15" + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" } }, "@sinonjs/text-encoding": { @@ -502,9 +628,9 @@ } }, "@types/bson": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.2.tgz", - "integrity": "sha512-+uWmsejEHfmSjyyM/LkrP0orfE2m5Mx9Xel4tXNeqi1ldK5XMQcDsFkBmLDtuyKUbxj2jGDo0H240fbCRJZo7Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz", + "integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==", "dev": true, "requires": { "@types/node": "*" @@ -516,16 +642,10 @@ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, "@types/json-schema": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz", - "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", + "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", "dev": true }, "@types/kerberos": { @@ -535,15 +655,15 @@ "dev": true }, "@types/minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", + "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", "dev": true }, "@types/node": { - "version": "14.6.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz", - "integrity": "sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==", + "version": "14.14.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", + "integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==", "dev": true }, "@types/normalize-package-data": { @@ -559,92 +679,94 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz", - "integrity": "sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.1.tgz", + "integrity": "sha512-d7LeQ7dbUrIv5YVFNzGgaW3IQKMmnmKFneRWagRlGYOSfLJVaRbj/FrBNOBC1a3tVO+TgNq1GbHvRtg1kwL0FQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "3.10.1", + "@typescript-eslint/experimental-utils": "4.8.1", + "@typescript-eslint/scope-manager": "4.8.1", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "semver": "^7.3.2", "tsutils": "^3.17.1" - }, - "dependencies": { - "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-eslint/experimental-utils": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", - "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.1.tgz", + "integrity": "sha512-WigyLn144R3+lGATXW4nNcDJ9JlTkG8YdBWHkDlN0lC3gUGtDi7Pe3h5GPvFKMcRz8KbZpm9FJV9NTW8CpRHpg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", + "@typescript-eslint/scope-manager": "4.8.1", + "@typescript-eslint/types": "4.8.1", + "@typescript-eslint/typescript-estree": "4.8.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.10.1.tgz", - "integrity": "sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.8.1.tgz", + "integrity": "sha512-QND8XSVetATHK9y2Ltc/XBl5Ro7Y62YuZKnPEwnNPB8E379fDsvzJ1dMJ46fg/VOmk0hXhatc+GXs5MaXuL5Uw==", "dev": true, "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.10.1", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/scope-manager": "4.8.1", + "@typescript-eslint/types": "4.8.1", + "@typescript-eslint/typescript-estree": "4.8.1", + "debug": "^4.1.1" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.8.1.tgz", + "integrity": "sha512-r0iUOc41KFFbZdPAdCS4K1mXivnSZqXS5D9oW+iykQsRlTbQRfuFRSW20xKDdYiaCoH+SkSLeIF484g3kWzwOQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.8.1", + "@typescript-eslint/visitor-keys": "4.8.1" } }, "@typescript-eslint/types": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", - "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.8.1.tgz", + "integrity": "sha512-ave2a18x2Y25q5K05K/U3JQIe2Av4+TNi/2YuzyaXLAsDx6UZkz1boZ7nR/N6Wwae2PpudTZmHFXqu7faXfHmA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", - "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.1.tgz", + "integrity": "sha512-bJ6Fn/6tW2g7WIkCWh3QRlaSU7CdUUK52shx36/J7T5oTQzANvi6raoTsbwGM11+7eBbeem8hCCKbyvAc0X3sQ==", "dev": true, "requires": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", + "@typescript-eslint/types": "4.8.1", + "@typescript-eslint/visitor-keys": "4.8.1", "debug": "^4.1.1", - "glob": "^7.1.6", + "globby": "^11.0.1", "is-glob": "^4.0.1", "lodash": "^4.17.15", "semver": "^7.3.2", "tsutils": "^3.17.1" - }, - "dependencies": { - "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-eslint/visitor-keys": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", - "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.1.tgz", + "integrity": "sha512-3nrwXFdEYALQh/zW8rFwP4QltqsanCDz4CwWMPiIZmwlk9GlvBeueEIbq05SEq4ganqM0g9nh02xXgv5XI3PeQ==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/types": "4.8.1", + "eslint-visitor-keys": "^2.0.0" } }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -656,15 +778,15 @@ } }, "acorn": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", - "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", "dev": true }, "add-stream": { @@ -725,12 +847,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": { @@ -801,29 +923,17 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true }, - "array-from": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", - "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", - "dev": true - }, "array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", "dev": true }, - "array.prototype.map": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", - "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.4" - } + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true }, "arrify": { "version": "1.0.1", @@ -853,9 +963,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": { @@ -895,9 +1005,9 @@ "dev": true }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -924,12 +1034,25 @@ } }, "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.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==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "bluebird": { @@ -964,21 +1087,20 @@ "dev": true }, "bson": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.1.0.tgz", - "integrity": "sha512-xwNzRRsK2xmHvHuPESi0zVfgsm4edO47WdulNaShTriunNUMRDOAlKwpJc8zpkOXczIzbxUD7kFzhUGVYoZLDw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.2.0.tgz", + "integrity": "sha512-c3MlJqdROnCRvDr/+MLfaDvQ7CvGI4p1hKX45/fvgzSwKRdOjsfRug1NJJ8ty5mXCNtUdjJEWzoZWcBQxV4TyA==", "requires": { - "buffer": "^5.1.0", - "long": "^4.0.0" + "buffer": "^5.6.0" } }, "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "buffer-alloc": { @@ -1097,14 +1219,13 @@ "dev": true }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "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": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, "chardet": { @@ -1120,9 +1241,9 @@ "dev": true }, "chokidar": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", - "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "dev": true, "requires": { "anymatch": "~3.1.1", @@ -1132,7 +1253,7 @@ "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" + "readdirp": "~3.5.0" } }, "chownr": { @@ -1157,9 +1278,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.5.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", + "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", "dev": true }, "cli-width": { @@ -1179,6 +1300,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", @@ -1201,6 +1328,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" + } } } }, @@ -1223,18 +1359,18 @@ "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 }, "colors": { @@ -1324,28 +1460,28 @@ "dev": true }, "conventional-changelog": { - "version": "3.1.15", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.15.tgz", - "integrity": "sha512-CoWM+Z9bYyF00QzNpTnxkCLiuLAeRocJz3C/foFjvhsdltdtkJgMChp7GytQNjm4pT7JFBVJTpqLHTpxNtOzaA==", + "version": "3.1.23", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.23.tgz", + "integrity": "sha512-sScUu2NHusjRC1dPc5p8/b3kT78OYr95/Bx7Vl8CPB8tF2mG1xei5iylDTRjONV5hTlzt+Cn/tBWrKdd299b7A==", "dev": true, "requires": { - "conventional-changelog-angular": "^5.0.6", - "conventional-changelog-atom": "^2.0.3", - "conventional-changelog-codemirror": "^2.0.3", - "conventional-changelog-conventionalcommits": "^4.2.3", - "conventional-changelog-core": "^4.1.1", - "conventional-changelog-ember": "^2.0.4", - "conventional-changelog-eslint": "^3.0.4", - "conventional-changelog-express": "^2.0.1", - "conventional-changelog-jquery": "^3.0.6", - "conventional-changelog-jshint": "^2.0.3", - "conventional-changelog-preset-loader": "^2.3.0" + "conventional-changelog-angular": "^5.0.11", + "conventional-changelog-atom": "^2.0.7", + "conventional-changelog-codemirror": "^2.0.7", + "conventional-changelog-conventionalcommits": "^4.4.0", + "conventional-changelog-core": "^4.2.0", + "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.8", + "conventional-changelog-preset-loader": "^2.3.4" } }, "conventional-changelog-angular": { - "version": "5.0.11", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz", - "integrity": "sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz", + "integrity": "sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw==", "dev": true, "requires": { "compare-func": "^2.0.0", @@ -1353,18 +1489,18 @@ } }, "conventional-changelog-atom": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-2.0.7.tgz", - "integrity": "sha512-7dOREZwzB+tCEMjRTDfen0OHwd7vPUdmU0llTy1eloZgtOP4iSLVzYIQqfmdRZEty+3w5Jz+AbhfTJKoKw1JeQ==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz", + "integrity": "sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw==", "dev": true, "requires": { "q": "^1.5.1" } }, "conventional-changelog-codemirror": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.7.tgz", - "integrity": "sha512-Oralk1kiagn3Gb5cR5BffenWjVu59t/viE6UMD/mQa1hISMPkMYhJIqX+CMeA1zXgVBO+YHQhhokEj99GP5xcg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz", + "integrity": "sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw==", "dev": true, "requires": { "q": "^1.5.1" @@ -1377,118 +1513,79 @@ "dev": true }, "conventional-changelog-conventionalcommits": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.3.tgz", - "integrity": "sha512-atGa+R4vvEhb8N/8v3IoW59gCBJeeFiX6uIbPu876ENAmkMwsenyn0R21kdDHJFLQdy6zW4J6b4xN8KI3b9oww==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.4.0.tgz", + "integrity": "sha512-ybvx76jTh08tpaYrYn/yd0uJNLt5yMrb1BphDe4WBredMlvPisvMghfpnJb6RmRNcqXeuhR6LfGZGewbkRm9yA==", "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": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.2.0.tgz", - "integrity": "sha512-8+xMvN6JvdDtPbGBqA7oRNyZD4od1h/SIzrWqHcKZjitbVXrFpozEeyn4iI4af1UwdrabQpiZMaV07fPUTGd4w==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.2.1.tgz", + "integrity": "sha512-8cH8/DEoD3e5Q6aeogdR5oaaKs0+mG6+f+Om0ZYt3PNv7Zo0sQhu4bMDRsqAF+UTekTAtP1W/C41jH/fkm8Jtw==", "dev": true, "requires": { "add-stream": "^1.0.0", - "conventional-changelog-writer": "^4.0.17", - "conventional-commits-parser": "^3.1.0", + "conventional-changelog-writer": "^4.0.18", + "conventional-commits-parser": "^3.2.0", "dateformat": "^3.0.0", "get-pkg-repo": "^1.0.0", "git-raw-commits": "2.0.0", "git-remote-origin-url": "^2.0.0", - "git-semver-tags": "^4.1.0", + "git-semver-tags": "^4.1.1", "lodash": "^4.17.15", - "normalize-package-data": "^2.3.5", + "normalize-package-data": "^3.0.0", "q": "^1.5.1", "read-pkg": "^3.0.0", "read-pkg-up": "^3.0.0", "shelljs": "^0.8.3", - "through2": "^3.0.0" - }, - "dependencies": { - "git-semver-tags": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-4.1.0.tgz", - "integrity": "sha512-TcxAGeo03HdErzKzi4fDD+xEL7gi8r2Y5YSxH6N2XYdVSV5UkBwfrt7Gqo1b+uSHCjy/sa9Y6BBBxxFLxfbhTg==", - "dev": true, - "requires": { - "meow": "^7.0.0", - "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 - } + "through2": "^4.0.0" } }, "conventional-changelog-ember": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.8.tgz", - "integrity": "sha512-JEMEcUAMg4Q9yxD341OgWlESQ4gLqMWMXIWWUqoQU8yvTJlKnrvcui3wk9JvnZQyONwM2g1MKRZuAjKxr8hAXA==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz", + "integrity": "sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A==", "dev": true, "requires": { "q": "^1.5.1" } }, "conventional-changelog-eslint": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.8.tgz", - "integrity": "sha512-5rTRltgWG7TpU1PqgKHMA/2ivjhrB+E+S7OCTvj0zM/QGg4vmnVH67Vq/EzvSNYtejhWC+OwzvDrLk3tqPry8A==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz", + "integrity": "sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA==", "dev": true, "requires": { "q": "^1.5.1" } }, "conventional-changelog-express": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-2.0.5.tgz", - "integrity": "sha512-pW2hsjKG+xNx/Qjof8wYlAX/P61hT5gQ/2rZ2NsTpG+PgV7Rc8RCfITvC/zN9K8fj0QmV6dWmUefCteD9baEAw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz", + "integrity": "sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ==", "dev": true, "requires": { "q": "^1.5.1" } }, "conventional-changelog-jquery": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.6.tgz", - "integrity": "sha512-gHAABCXUNA/HjnZEm+vxAfFPJkgtrZvCDIlCKfdPVXtCIo/Q0lN5VKpx8aR5p8KdVRQFF3OuTlvv5kv6iPuRqA==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz", + "integrity": "sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw==", "dev": true, "requires": { "q": "^1.5.1" } }, "conventional-changelog-jshint": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.8.tgz", - "integrity": "sha512-hB/iI0IiZwnZ+seYI+qEQ4b+EMQSEC8jGIvhO2Vpz1E5p8FgLz75OX8oB1xJWl+s4xBMB6f8zJr0tC/BL7YOjw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz", + "integrity": "sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA==", "dev": true, "requires": { "compare-func": "^2.0.0", @@ -1502,21 +1599,21 @@ "dev": true }, "conventional-changelog-writer": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.17.tgz", - "integrity": "sha512-IKQuK3bib/n032KWaSb8YlBFds+aLmzENtnKtxJy3+HqDq5kohu3g/UdNbIHeJWygfnEbZjnCKFxAW0y7ArZAw==", + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.18.tgz", + "integrity": "sha512-mAQDCKyB9HsE8Ko5cCM1Jn1AWxXPYV0v8dFPabZRkvsiWUul2YyAqbIaoMKF88Zf2ffnOPSvKhboLf3fnjo5/A==", "dev": true, "requires": { "compare-func": "^2.0.0", - "conventional-commits-filter": "^2.0.6", + "conventional-commits-filter": "^2.0.7", "dateformat": "^3.0.0", "handlebars": "^4.7.6", "json-stringify-safe": "^5.0.1", "lodash": "^4.17.15", - "meow": "^7.0.0", + "meow": "^8.0.0", "semver": "^6.0.0", "split": "^1.0.0", - "through2": "^3.0.0" + "through2": "^4.0.0" }, "dependencies": { "semver": { @@ -1528,9 +1625,9 @@ } }, "conventional-commits-filter": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz", - "integrity": "sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", + "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", "dev": true, "requires": { "lodash.ismatch": "^4.4.0", @@ -1538,127 +1635,169 @@ } }, "conventional-commits-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz", - "integrity": "sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.0.tgz", + "integrity": "sha512-XmJiXPxsF0JhAKyfA2Nn+rZwYKJ60nanlbSWwwkGwLQFbugsc0gv1rzc7VbbUWAzJfR1qR87/pNgv9NgmxtBMQ==", "dev": true, "requires": { "JSONStream": "^1.0.4", "is-text-path": "^1.0.1", "lodash": "^4.17.15", - "meow": "^7.0.0", + "meow": "^8.0.0", "split2": "^2.0.0", - "through2": "^3.0.0", + "through2": "^4.0.0", "trim-off-newlines": "^1.0.0" } }, "conventional-recommended-bump": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.0.5.tgz", - "integrity": "sha512-srkferrB4kACPEbKYltZwX1CQZAEqbQkabKN444mavLRVMetzwJFJf23/+pwvtMsWbd+cc4HaleV1nHke0f8Rw==", + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-6.0.10.tgz", + "integrity": "sha512-2ibrqAFMN3ZA369JgVoSbajdD/BHN6zjY7DZFKTHzyzuQejDUCjQ85S5KHxCRxNwsbDJhTPD5hOKcis/jQhRgg==", "dev": true, "requires": { "concat-stream": "^2.0.0", - "conventional-changelog-preset-loader": "^2.3.0", - "conventional-commits-filter": "^2.0.2", - "conventional-commits-parser": "^3.0.8", + "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": "^3.0.1", - "meow": "^5.0.0", + "git-semver-tags": "^4.1.0", + "meow": "^7.0.0", "q": "^1.5.1" }, "dependencies": { - "camelcase": { + "find-up": { "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=", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "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 }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", - "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": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-7.1.1.tgz", + "integrity": "sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA==", "dev": true, "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "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", - "yargs-parser": "^10.0.0" + "@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" } }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "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": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, - "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 + "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" + } }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "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": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" + "p-limit": "^2.2.0" } }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "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 + } + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "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": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "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": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -1683,7 +1822,8 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "coveralls": { "version": "3.1.0", @@ -1699,16 +1839,14 @@ } }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "currently-unhandled": { @@ -1834,15 +1972,6 @@ "clone": "^1.0.2" } }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1861,18 +1990,27 @@ "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" }, "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": "7.2.2", + "resolved": "https://registry.npmjs.org/dependency-tree/-/dependency-tree-7.2.2.tgz", + "integrity": "sha512-WWZJpNuMWqEM97CGykmyKLjjUWGVGkRRMSIEBWk5izmugxmivnItg4MMHkDzuvmB/7vglhudEoc5wyMp5ODD+Q==", "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.2.1", + "filing-cabinet": "^2.6.0", + "precinct": "^6.3.1", + "typescript": "^3.9.7" }, "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "typescript": { "version": "3.9.7", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", @@ -1900,12 +2038,12 @@ "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.0.1", + "resolved": "https://registry.npmjs.org/detective-amd/-/detective-amd-3.0.1.tgz", + "integrity": "sha512-vJgluSKkPyo+/McW9hzwmZwY1VPA3BS0VS1agdpPAWAhr65HwC1ox4Ig82rVfGYDYCa4GcKQON5JWBk++2Kf1Q==", "dev": true, "requires": { - "ast-module-types": "^2.3.1", + "ast-module-types": "^2.7.0", "escodegen": "^1.8.0", "get-amd-module-type": "^3.0.0", "node-source-walk": "^4.0.0" @@ -2008,10 +2146,10 @@ "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==", + "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 }, "typescript": { @@ -2028,6 +2166,15 @@ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2038,9 +2185,9 @@ } }, "dot-prop": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", - "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, "requires": { "is-obj": "^2.0.0" @@ -2145,6 +2292,15 @@ "tapable": "^1.0.0" } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "entities": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", @@ -2169,71 +2325,18 @@ "is-arrayish": "^0.2.1" } }, - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "es-get-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", - "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", - "dev": true, - "requires": { - "es-abstract": "^1.17.4", - "has-symbols": "^1.0.1", - "is-arguments": "^1.0.4", - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-string": "^1.0.5", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, "es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "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-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -2251,25 +2354,68 @@ "esutils": "^2.0.2", "optionator": "^0.8.1", "source-map": "~0.6.1" + }, + "dependencies": { + "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": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.13.0.tgz", + "integrity": "sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.2.1", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.0", + "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", @@ -2278,66 +2424,49 @@ "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", + "levn": "^0.4.1", + "lodash": "^4.17.19", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", "table": "^5.2.3", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "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 } } }, "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-plugin-jsdoc": { - "version": "30.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.3.1.tgz", - "integrity": "sha512-185ARou6Wj/68DP0g9kLLBnvmVwgg6/E/7Z8Z7Dz7Z63WgvRNaSvOLQiXkzIOEwstQfwI9PCuFPh4qBJov907A==", + "version": "30.7.8", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.7.8.tgz", + "integrity": "sha512-OWm2AYvXjCl7nRbpcw5xisfSVkpVAyp4lGqL9T+DeK4kaPm6ecnmTc/G5s1PtcRrwbaI8bIWGzwScqv5CdGyxA==", "dev": true, "requires": { "comment-parser": "^0.7.6", - "debug": "^4.1.1", + "debug": "^4.2.0", "jsdoctypeparser": "^9.0.0", "lodash": "^4.17.20", "regextras": "^0.7.1", @@ -2345,11 +2474,14 @@ "spdx-expression-parse": "^3.0.1" }, "dependencies": { - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } } } }, @@ -2368,52 +2500,286 @@ "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", "dev": true }, - "eslint-plugin-tsdoc": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.6.tgz", - "integrity": "sha512-pU6/VVEOlC85BrUjsqZGGSRy41N+PHfWXokqjpQRWT1LSpBsAEbRpsueNYSFS+93Sx9CFD0511kjLKVySRbLbg==", + "eslint-plugin-sort-imports-es6-autofix": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sort-imports-es6-autofix/-/eslint-plugin-sort-imports-es6-autofix-0.5.0.tgz", + "integrity": "sha512-KEX2Uz6bAs67jDYiH/OT1xz1E7AzIJJOIRg1F7OnFAfUVlpws3ldSZj5oZySRHfoVkWqDX9GGExYxckdLrWhwg==", "dev": true, "requires": { - "@microsoft/tsdoc": "0.12.20", - "@microsoft/tsdoc-config": "0.13.5" + "eslint": "^6.2.2" }, "dependencies": { - "@microsoft/tsdoc": { - "version": "0.12.20", - "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.12.20.tgz", - "integrity": "sha512-/b13m37QZYPV6nCOiqkFyvlQjlTNvAcQpgFZ6ZKIqtStJxNdqVo/frULubxMUMWi6p9Uo5f4BRlguv5ViFcL0A==", + "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 }, - "@microsoft/tsdoc-config": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.13.5.tgz", - "integrity": "sha512-KlnIdTRnPSsU9Coz9wzDAkT8JCLopP3ec1sgsgo7trwE6QLMKRpM4hZi2uzVX897SW49Q4f439auGBcQLnZQfA==", + "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": { - "@microsoft/tsdoc": "0.12.20", - "ajv": "~6.12.3", - "jju": "~1.4.0", - "resolve": "~1.12.0" + "color-convert": "^1.9.0" } }, - "resolve": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.3.tgz", - "integrity": "sha512-hF6+hAPlxjqHWrw4p1rF3Wztbgxd4AjA5VlUzY5zcTb4J8D3JK4/1RjU48pHz2PJWzGVsLB1VWZkvJzhK2CCOA==", + "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": { - "path-parse": "^1.0.6" + "ansi-styles": "^3.2.1", + "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 + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "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 + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.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 + }, + "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 + }, + "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" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "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=", + "dev": true + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "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": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "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==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "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" + } + }, + "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" + } + }, + "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" + } + } + } + }, + "eslint-plugin-tsdoc": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.7.tgz", + "integrity": "sha512-GAbNpwNfwnolagP6mCQT8wY4usifnAE/iuCz15L3BcEca0xAidctU61h7w40mOuNiSp78DYPUl5gwN89nJ8+8Q==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.12.21", + "@microsoft/tsdoc-config": "0.13.6" + }, + "dependencies": { + "@microsoft/tsdoc": { + "version": "0.12.21", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.12.21.tgz", + "integrity": "sha512-j+9OJ0A0buZZaUn6NxeHUVpoa05tY2PgVs7kXJhJQiKRB0G1zQqbJxer3T7jWtzpqQWP89OBDluyIeyTsMk8Sg==", + "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" } }, @@ -2424,23 +2790,39 @@ "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": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", + "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", "dev": true, "requires": { - "acorn": "^7.1.1", + "acorn": "^7.4.0", "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "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": { @@ -2467,12 +2849,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": { @@ -2528,6 +2918,20 @@ "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "dev": true }, + "fast-glob": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", + "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2540,6 +2944,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fastq": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz", + "integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -2571,9 +2984,9 @@ "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": "2.6.0", + "resolved": "https://registry.npmjs.org/filing-cabinet/-/filing-cabinet-2.6.0.tgz", + "integrity": "sha512-7kSlTScEkxoYKXCix7tAQ52ZeIHcx7ZWWArEZgXY+eTMe6yDYFdDhHdkXm9rSmvrrpzdZeR1wiufS1rUt4OzMA==", "dev": true, "requires": { "app-module-path": "^2.2.0", @@ -2656,13 +3069,10 @@ } }, "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true }, "flat-cache": { "version": "2.0.1", @@ -2813,12 +3223,6 @@ "dev": true, "optional": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -2963,6 +3367,12 @@ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "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==", + "dev": true + }, "indent-string": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", @@ -2996,6 +3406,18 @@ "trim-newlines": "^1.0.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" + } + }, "path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", @@ -3005,6 +3427,23 @@ "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" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -3036,6 +3475,12 @@ "strip-indent": "^1.0.1" } }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, "strip-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", @@ -3108,12 +3553,24 @@ "quick-lru": "^1.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 }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, "map-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", @@ -3147,6 +3604,18 @@ "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" + } + }, "quick-lru": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", @@ -3163,6 +3632,12 @@ "strip-indent": "^2.0.0" } }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, "strip-indent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", @@ -3205,114 +3680,21 @@ } } }, - "git-semver-tags": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-3.0.1.tgz", - "integrity": "sha512-Hzd1MOHXouITfCasrpVJbRDg9uvW7LfABk3GQmXYZByerBDrfrEMP9HXpNT7RxAbieiocP6u+xq20DkvjwxnCA==", - "dev": true, - "requires": { - "meow": "^5.0.0", - "semver": "^6.0.0" - }, - "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" - } - }, - "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 - }, - "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": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "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", - "yargs-parser": "^10.0.0" - } - }, - "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" - } - }, - "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 - }, - "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" - } - }, + "git-semver-tags": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-4.1.1.tgz", + "integrity": "sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA==", + "dev": true, + "requires": { + "meow": "^8.0.0", + "semver": "^6.0.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 - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true - }, - "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 - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } } } }, @@ -3363,6 +3745,20 @@ "type-fest": "^0.8.1" } }, + "globby": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", + "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, "gonzales-pe": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz", @@ -3428,25 +3824,10 @@ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "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": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "has-unicode": { @@ -3478,10 +3859,13 @@ "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==", - "dev": true + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz", + "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "html-escaper": { "version": "2.0.2", @@ -3510,20 +3894,20 @@ } }, "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "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": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", + "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -3594,67 +3978,6 @@ "string-width": "^4.1.0", "strip-ansi": "^6.0.0", "through": "^2.3.6" - }, - "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 - }, - "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" - } - } } }, "interpret": { @@ -3663,12 +3986,6 @@ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true - }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -3684,24 +4001,6 @@ "binary-extensions": "^2.0.0" } }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, - "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", - "dev": true - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3735,12 +4034,6 @@ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true }, - "is-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", - "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", - "dev": true - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -3754,20 +4047,11 @@ "dev": true }, "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "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==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, "is-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", @@ -3780,33 +4064,12 @@ "integrity": "sha1-CRtGoNZ8HtD+hfH4z93gBrslHUY=", "dev": true }, - "is-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", - "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", - "dev": true - }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "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", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, "is-text-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", @@ -3843,7 +4106,8 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, "isexe": { "version": "2.0.0", @@ -4029,22 +4293,6 @@ "istanbul-lib-report": "^3.0.0" } }, - "iterate-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", - "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==", - "dev": true - }, - "iterate-value": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", - "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", - "dev": true, - "requires": { - "es-get-iterator": "^1.0.2", - "iterate-iterator": "^1.0.1" - } - }, "jju": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", @@ -4083,9 +4331,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", @@ -4137,9 +4385,9 @@ "dev": true }, "json-parse-even-better-errors": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.0.tgz", - "integrity": "sha512-o3aP+RsWDJZayj1SbHNQAI8x0v3T3SKiGoZlNYfbUP1S3omJQ6i9CnqADqkSPaOAxwua4/1YWx5CM7oiChJt2Q==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "json-schema": { @@ -4203,9 +4451,9 @@ } }, "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 }, "kind-of": { @@ -4230,13 +4478,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": { @@ -4370,25 +4618,14 @@ "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.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "dev": true, "requires": { - "chalk": "^2.4.2" + "chalk": "^4.0.0" } }, - "lolex": { - "version": "2.7.5", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.5.tgz", - "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==", - "dev": true - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -4399,6 +4636,15 @@ "signal-exit": "^3.0.0" } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", @@ -4406,16 +4652,16 @@ "dev": true }, "madge": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/madge/-/madge-3.9.2.tgz", - "integrity": "sha512-6ZvyKinAOOzcRpvpm1iyOuds+LvWIq3o3GmUYAHMJdIpDAgVY3mphxVzeWNo3agIOv0X0T/zbLycXQm9Rn19nA==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/madge/-/madge-3.12.0.tgz", + "integrity": "sha512-9kA2W5RIbvH25CWc8tzPNn1X47AOcHEEwZJxWAMxhEOKEziVR1iMCbGCFUea5tWXs/A+xgJF59o/oSbNkOXpeg==", "dev": true, "requires": { "chalk": "^4.1.0", "commander": "^5.1.0", "commondir": "^1.0.1", "debug": "^4.0.1", - "dependency-tree": "^7.2.1", + "dependency-tree": "^7.2.2", "detective-amd": "^3.0.0", "detective-cjs": "^3.1.1", "detective-es6": "^2.1.0", @@ -4426,8 +4672,7 @@ "detective-stylus": "^1.0.0", "detective-typescript": "^5.8.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", "pretty-ms": "^7.0.0", @@ -4436,62 +4681,12 @@ "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==", - "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", @@ -4510,10 +4705,10 @@ "semver": "^5.6.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": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true } } @@ -4578,9 +4773,9 @@ "optional": true }, "meow": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-7.1.0.tgz", - "integrity": "sha512-kq5F0KVteskZ3JdfyQFivJEj2RaA8NFsS4+r9DaMKLcUHpk5OcHS3Q0XkCXONB1mZRPsu/Y/qImKri0nwSEZog==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.0.0.tgz", + "integrity": "sha512-nbsTRz2fwniJBFgUkcdISq8y/q9n9VbiHYbfwklFh5V4V2uAcxtKQkDc0yCLPM/kP0d+inZBewn3zJqewHE7kg==", "dev": true, "requires": { "@types/minimist": "^1.2.0", @@ -4588,12 +4783,12 @@ "decamelize-keys": "^1.1.0", "hard-rejection": "^2.1.0", "minimist-options": "4.1.0", - "normalize-package-data": "^2.5.0", + "normalize-package-data": "^3.0.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" + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" }, "dependencies": { "find-up": { @@ -4606,6 +4801,12 @@ "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", @@ -4645,6 +4846,18 @@ "type-fest": "^0.6.0" }, "dependencies": { + "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" + } + }, "type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", @@ -4672,24 +4885,42 @@ } } }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "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==", + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", "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" - } + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true } } }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "mime-db": { "version": "1.44.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", @@ -4747,6 +4978,14 @@ "arrify": "^1.0.1", "is-plain-obj": "^1.1.0", "kind-of": "^6.0.3" + }, + "dependencies": { + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + } } }, "mkdirp": { @@ -4759,15 +4998,16 @@ } }, "mocha": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.3.tgz", - "integrity": "sha512-ZbaYib4hT4PpF4bdSO2DohooKXIn4lDeiYqB+vTmCdr6l2woW0b6H3pf5x4sM5nwQMru9RvjjHYWVGltR50ZBw==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz", + "integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==", "dev": true, "requires": { + "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.4.2", - "debug": "4.1.1", + "chokidar": "3.4.3", + "debug": "4.2.0", "diff": "4.0.2", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", @@ -4778,54 +5018,33 @@ "log-symbols": "4.0.0", "minimatch": "3.0.4", "ms": "2.1.2", - "object.assign": "4.1.0", - "promise.allsettled": "1.0.2", - "serialize-javascript": "4.0.0", - "strip-json-comments": "3.0.1", - "supports-color": "7.1.0", + "nanoid": "3.1.12", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "7.2.0", "which": "2.0.2", "wide-align": "1.1.3", - "workerpool": "6.0.0", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.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": { + "workerpool": "6.0.2", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "ansi-regex": { "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" - } + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true }, - "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==", + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "color-name": "~1.1.4" + "ms": "2.1.2" } }, - "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 - }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -4838,12 +5057,6 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "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 - }, "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", @@ -4860,15 +5073,6 @@ "path-exists": "^3.0.0" } }, - "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", - "dev": true, - "requires": { - "chalk": "^4.0.0" - } - }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -4904,28 +5108,13 @@ "strip-ansi": "^5.1.0" } }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", - "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" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "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": { - "isexe": "^2.0.0" + "ansi-regex": "^4.1.0" } }, "yargs": { @@ -4972,12 +5161,12 @@ "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" } }, @@ -5018,9 +5207,15 @@ "dev": true }, "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true + }, + "nanoid": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", + "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", "dev": true }, "napi-build-utils": { @@ -5048,46 +5243,33 @@ "dev": true }, "nise": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.3.tgz", - "integrity": "sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", + "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", "dev": true, "requires": { - "@sinonjs/formatio": "^3.2.1", + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", - "lolex": "^5.0.1", "path-to-regexp": "^1.7.0" - }, - "dependencies": { - "@sinonjs/formatio": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz", - "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^3.1.0" - } - }, - "lolex": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", - "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - } } }, "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.19.3", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.3.tgz", + "integrity": "sha512-9xZrlyfvKhWme2EXFKQhZRp1yNWT/uI1luYPr3sFl+H4keYY4xR+1jO7mvTTijIsHf1M+QDe9uWuKeEpLInIlg==", "dev": true, "requires": { "semver": "^5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "node-preload": { @@ -5115,14 +5297,14 @@ "dev": true }, "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==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.0.tgz", + "integrity": "sha512-6lUjEI0d3v6kFrtgA/lOx4zHCWULXsFNIjHolnZCKCTLA6m/G625cdn3O7eNmT0iD3jfo6HZ9cdImGZwf21prw==", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", + "hosted-git-info": "^3.0.6", + "resolve": "^1.17.0", + "semver": "^7.3.2", "validate-npm-package-license": "^3.0.1" } }, @@ -5348,30 +5530,6 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "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==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5391,94 +5549,33 @@ } }, "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.1.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.1.0.tgz", + "integrity": "sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==", "dev": true, "requires": { - "chalk": "^3.0.0", + "chalk": "^4.1.0", "cli-cursor": "^3.1.0", - "cli-spinners": "^2.2.0", + "cli-spinners": "^2.4.0", "is-interactive": "^1.0.0", - "log-symbols": "^3.0.0", + "log-symbols": "^4.0.0", "mute-stream": "0.0.8", "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": { @@ -5584,9 +5681,9 @@ "dev": true }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-parse": { @@ -5613,23 +5710,10 @@ } }, "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", @@ -5650,9 +5734,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": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "pinkie": { @@ -5725,9 +5809,9 @@ "dev": true }, "postcss": { - "version": "7.0.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", - "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", + "version": "7.0.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", + "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -5735,6 +5819,58 @@ "supports-color": "^6.1.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", + "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 + }, + "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": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -5803,15 +5939,15 @@ } }, "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 }, "prettier": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz", - "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz", + "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==", "dev": true }, "prettier-linter-helpers": { @@ -5824,9 +5960,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" @@ -5835,7 +5971,8 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true }, "process-on-spawn": { "version": "1.0.0", @@ -5852,19 +5989,6 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "promise.allsettled": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", - "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", - "dev": true, - "requires": { - "array.prototype.map": "^1.0.1", - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "iterate-value": "^1.0.0" - } - }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -5951,6 +6075,12 @@ "path-type": "^3.0.0" }, "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==", + "dev": true + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -5963,6 +6093,18 @@ "strip-bom": "^3.0.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" + } + }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -5988,6 +6130,12 @@ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -6061,6 +6209,7 @@ "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", @@ -6074,14 +6223,15 @@ "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==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", - "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -6233,6 +6383,12 @@ "signal-exit": "^3.0.2" } }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -6248,10 +6404,16 @@ "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "dev": true }, + "run-parallel": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", + "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", + "dev": true + }, "rxjs": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz", - "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==", + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -6260,7 +6422,8 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -6268,12 +6431,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", - "dev": true - }, "saslprep": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", @@ -6292,16 +6449,22 @@ "commander": "^2.16.0" } }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", "dev": true }, "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -6314,18 +6477,18 @@ "dev": true }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "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": "^1.0.0" + "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "shelljs": { @@ -6361,28 +6524,20 @@ "once": "^1.3.1", "simple-concat": "^1.0.0" } - }, - "sinon": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.5.0.tgz", - "integrity": "sha512-trdx+mB0VBBgoYucy6a9L7/jfQOmvGeaKZT4OOJ+lPAtI8623xyGr8wLiE4eojzBS8G9yXbhx42GHUOVLr4X2w==", - "dev": true, - "requires": { - "@sinonjs/formatio": "^2.0.0", - "diff": "^3.1.0", - "lodash.get": "^4.4.2", - "lolex": "^2.2.0", - "nise": "^1.2.0", - "supports-color": "^5.1.0", - "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==", - "dev": true - } + }, + "sinon": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.1.tgz", + "integrity": "sha512-naPfsamB5KEE1aiioaoqJ6MEhdUs/2vtI5w1hPAXX/UwvoPjXcwh1m5HiKx0HGgKR8lQSoFIgY5jM6KK8VrS9w==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.1", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/formatio": "^5.0.1", + "@sinonjs/samsam": "^5.2.0", + "diff": "^4.0.2", + "nise": "^4.0.4", + "supports-color": "^7.1.0" } }, "sinon-chai": { @@ -6391,6 +6546,12 @@ "integrity": "sha512-IifbusYiQBpUxxFJkR3wTU68xzBN0+bxCScEaKMjBvAQERg6FnTTc1F17rseLb1tjmkJ23730AXpFI0c47FgAg==", "dev": true }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, "slice-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", @@ -6402,6 +6563,30 @@ "is-fullwidth-code-point": "^2.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" + } + }, + "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 + }, "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", @@ -6411,9 +6596,9 @@ } }, "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", @@ -6513,9 +6698,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.6", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", + "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==", "dev": true }, "spec-xunit-file": { @@ -6578,36 +6763,46 @@ } }, "standard-version": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-7.1.0.tgz", - "integrity": "sha512-bHY2E/1tYGeVl+0XSXFivb+54h2fA4pWJocXAd6FGbtSFUvGsnfmMbIXYDxrYErpq7oEqoKreV8xTAp78WoATA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-9.0.0.tgz", + "integrity": "sha512-eRR04IscMP3xW9MJTykwz13HFNYs8jS33AGuDiBKgfo5YrO0qX0Nxb4rjupVwT5HDYL/aR+MBEVLjlmVFmFEDQ==", "dev": true, "requires": { - "chalk": "2.4.2", - "conventional-changelog": "3.1.15", + "chalk": "^2.4.2", + "conventional-changelog": "3.1.23", "conventional-changelog-config-spec": "2.1.0", - "conventional-changelog-conventionalcommits": "4.2.3", - "conventional-recommended-bump": "6.0.5", - "detect-indent": "6.0.0", - "detect-newline": "3.1.0", - "dotgitignore": "2.1.0", - "figures": "3.1.0", - "find-up": "4.1.0", - "fs-access": "1.0.1", - "git-semver-tags": "3.0.1", - "semver": "6.3.0", - "stringify-package": "1.0.1", - "yargs": "15.0.2" + "conventional-changelog-conventionalcommits": "4.4.0", + "conventional-recommended-bump": "6.0.10", + "detect-indent": "^6.0.0", + "detect-newline": "^3.1.0", + "dotgitignore": "^2.1.0", + "figures": "^3.1.0", + "find-up": "^4.1.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" }, "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==", + "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": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "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" } }, "cliui": { @@ -6622,29 +6817,20 @@ } }, "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 }, - "figures": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", - "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -6655,6 +6841,12 @@ "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", @@ -6682,19 +6874,13 @@ "p-limit": "^2.2.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 - }, - "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": { @@ -6706,12 +6892,38 @@ "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.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 + } } }, "yargs": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.0.2.tgz", - "integrity": "sha512-GH/X/hYt+x5hOat4LMnCqMd8r5Cv78heOMIJn1hr7QPPBqfeC6p89Y78+WB9yGDvfpCvgasfmWLzNzEioOUD9Q==", + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { "cliui": "^6.0.0", @@ -6724,13 +6936,13 @@ "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^16.1.0" + "yargs-parser": "^18.1.2" } }, "yargs-parser": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz", - "integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==", + "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", @@ -6767,26 +6979,6 @@ } } }, - "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -6820,20 +7012,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": { @@ -6868,12 +7052,12 @@ } }, "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": "^3.0.0" + "has-flag": "^4.0.0" } }, "table": { @@ -6888,6 +7072,12 @@ "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", @@ -6910,6 +7100,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" + } } } }, @@ -6965,9 +7164,9 @@ }, "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", @@ -7012,13 +7211,25 @@ "dev": true }, "through2": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", - "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", "dev": true, "requires": { - "inherits": "^2.0.4", - "readable-stream": "2 || 3" + "readable-stream": "3" + }, + "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" + } + } } }, "timsort": { @@ -7129,12 +7340,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": { @@ -7346,9 +7557,9 @@ "dev": true }, "v8-compile-cache": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", - "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "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==", "dev": true }, "validate-npm-package-license": { @@ -7394,9 +7605,9 @@ } }, "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" @@ -7478,9 +7689,9 @@ } }, "workerpool": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", - "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", + "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==", "dev": true }, "wrap-ansi": { @@ -7494,6 +7705,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", @@ -7516,6 +7757,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" + } } } }, @@ -7547,9 +7797,25 @@ } }, "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.3", + "resolved": "https://registry.npmjs.org/wtfnode/-/wtfnode-0.8.3.tgz", + "integrity": "sha512-Ll7iH8MbRQTE+QTw20Xax/0PM5VeSVSOhsmoR3+knWuJkEWTV5d9yPO6Sb+IDbt9I4UCrKpvHuF9T9zteRNOuA==", + "dev": true + }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", "dev": true }, "xmlcreate": { @@ -7570,100 +7836,60 @@ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "yargs": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", - "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.1.tgz", + "integrity": "sha512-hAD1RcFP/wfgfxgMVswPE+z3tlPFtxG8/yWUrG2i17sTWGCGqWnxKcLTF4cUKDUK8fzokwsmO9H0TDkRbMHy8w==", "dev": true, "requires": { - "cliui": "^5.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.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": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^15.0.1" + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "dependencies": { - "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==", + "cliui": { + "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": { - "p-try": "^2.0.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.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==", + "wrap-ansi": { + "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": { - "p-limit": "^2.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.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=", + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", "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" - } - }, "yargs-parser": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", - "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true } } }, @@ -7678,16 +7904,29 @@ } }, "yargs-unparser": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz", - "integrity": "sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { - "camelcase": "^5.3.1", - "decamelize": "^1.2.0", - "flat": "^4.1.0", - "is-plain-obj": "^1.1.0", - "yargs": "^14.2.3" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true + } } }, "yn": { diff --git a/package.json b/package.json index 012b1ea0a9f..ff77cb530ce 100644 --- a/package.json +++ b/package.json @@ -19,15 +19,14 @@ "official" ], "peerOptionalDependencies": { - "kerberos": "^1.1.0", - "mongodb-client-encryption": "^1.0.0", - "mongodb-extjson": "^2.1.2", - "snappy": "^6.1.1", - "bson-ext": "^2.0.0" + "kerberos": "^1.1.4", + "mongodb-client-encryption": "^1.1.0", + "snappy": "^6.3.5", + "bson-ext": "^2.0.5" }, "dependencies": { - "bl": "^2.2.1", - "bson": "^4.0.4", + "bl": "^4.0.3", + "bson": "^4.2.0", "denque": "^1.4.1" }, "devDependencies": { @@ -36,48 +35,51 @@ "@microsoft/tsdoc-config": "^0.13.6", "@types/aws4": "^1.5.1", "@types/bl": "^2.1.0", - "@types/bson": "^4.0.2", + "@types/bson": "^4.0.3", "@types/kerberos": "^1.1.0", - "@types/node": "^14.6.4", + "@types/node": "^14.14.9", "@types/saslprep": "^1.0.0", - "@typescript-eslint/eslint-plugin": "^3.10.0", - "@typescript-eslint/parser": "^3.10.0", + "@typescript-eslint/eslint-plugin": "^4.8.1", + "@typescript-eslint/parser": "^4.8.1", "chai": "^4.2.0", "chai-subset": "^1.6.0", - "chalk": "^2.4.2", + "chalk": "^4.1.0", "co": "4.6.0", - "coveralls": "^3.0.11", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-jsdoc": "^30.3.1", - "eslint-plugin-prettier": "^3.1.3", + "coveralls": "^3.1.0", + "eslint": "^7.13.0", + "eslint-config-prettier": "^6.15.0", + "eslint-plugin-jsdoc": "^30.7.8", + "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-tsdoc": "^0.2.6", - "jsdoc": "^3.6.4", + "eslint-plugin-sort-imports-es6-autofix": "^0.5.0", + "eslint-plugin-tsdoc": "^0.2.7", + "js-yaml": "^3.14.0", + "jsdoc": "^3.6.6", "lodash.camelcase": "^4.3.0", - "madge": "^3.9.0", - "mocha": "^8.1.3", - "mocha-sinon": "^2.1.0", + "madge": "^3.12.0", + "mocha": "^8.2.1", + "mocha-sinon": "^2.1.2", "mongodb-mock-server": "^2.0.1", "nyc": "^15.1.0", - "prettier": "^2.0.5", + "prettier": "^2.2.0", "rimraf": "^3.0.2", - "semver": "^5.5.0", - "sinon": "^4.3.0", - "sinon-chai": "^3.2.0", - "snappy": "^6.3.0", + "semver": "^7.3.2", + "sinon": "^9.2.1", + "sinon-chai": "^3.5.0", + "snappy": "^6.3.5", "source-map-support": "^0.5.19", "spec-xunit-file": "0.0.1-3", - "standard-version": "^7.1.0", - "through2": "^3.0.1", + "standard-version": "^9.0.0", + "through2": "^4.0.2", "ts-node": "^9.0.0", "typedoc": "^0.19.2", "typedoc-plugin-pages": "^1.0.1", "typescript": "^4.0.5", "typescript-cached-transpile": "^0.0.6", - "worker-farm": "^1.5.0", - "wtfnode": "^0.8.2", - "yargs": "^14.2.0" + "worker-farm": "^1.7.0", + "wtfnode": "^0.8.3", + "xml2js": "^0.4.23", + "yargs": "^16.1.1" }, "license": "Apache-2.0", "engines": { @@ -93,7 +95,7 @@ "build:docs": "npm run build:dts && typedoc", "check:bench": "node test/benchmarks/driverBench", "check:coverage": "nyc npm run check:test", - "check:lint": "npm run check:ts && eslint -v && eslint --max-warnings=0 --ext '.js,.ts' src test", + "check:lint": "npm run check:ts && eslint -v && eslint -f visualstudio --max-warnings=0 --ext '.js,.ts' src test", "check:test": "mocha --recursive test/functional test/unit", "check:ts": "tsc -v && tsc --noEmit", "check:atlas": "mocha --config \"test/manual/mocharc.json\" test/manual/atlas_connectivity.test.js", @@ -108,6 +110,6 @@ }, "homepage": "https://github.com/mongodb/node-mongodb-native", "optionalDependencies": { - "saslprep": "^1.0.0" + "saslprep": "^1.0.3" } } diff --git a/src/admin.ts b/src/admin.ts index 0b92403ae43..db6d86d4173 100644 --- a/src/admin.ts +++ b/src/admin.ts @@ -1,20 +1,20 @@ import { AddUserOperation, AddUserOptions } from './operations/add_user'; -import { RemoveUserOperation, RemoveUserOptions } from './operations/remove_user'; -import { - ValidateCollectionOperation, - ValidateCollectionOptions -} from './operations/validate_collection'; +import { Callback, getTopology } from './utils'; import { ListDatabasesOperation, ListDatabasesOptions, ListDatabasesResult } from './operations/list_databases'; -import { executeOperation } from './operations/execute_operation'; +import { RemoveUserOperation, RemoveUserOptions } from './operations/remove_user'; import { RunCommandOperation, RunCommandOptions } from './operations/run_command'; -import { Callback, getTopology } from './utils'; -import type { Document } from './bson'; +import { + ValidateCollectionOperation, + ValidateCollectionOptions +} from './operations/validate_collection'; +import { executeOperation } from './operations/execute_operation'; import type { CommandOperationOptions } from './operations/command'; import type { Db } from './db'; +import type { Document } from './bson'; /** @internal */ export interface AdminPrivate { diff --git a/src/apm.ts b/src/apm.ts index d3c7f9ec6da..c41fd779739 100644 --- a/src/apm.ts +++ b/src/apm.ts @@ -1,6 +1,6 @@ +import { Connection } from './cmap/connection'; import { EventEmitter } from 'events'; import type { Callback } from './utils'; -import { Connection } from './cmap/connection'; // eslint-disable-next-line @typescript-eslint/no-unused-vars import type { MongoClient } from './mongo_client'; diff --git a/src/bson.ts b/src/bson.ts index 628612d40dd..5100e44f9d4 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 { @@ -83,7 +82,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 2f68955a739..c96af3b73e5 100644 --- a/src/bulk/common.ts +++ b/src/bulk/common.ts @@ -1,26 +1,26 @@ -import { PromiseProvider } from '../promise_provider'; -import { Long, ObjectId, Document, BSONSerializeOptions, resolveBSONOptions } from '../bson'; -import { MongoError, MongoWriteConcernError, AnyError } from '../error'; +import { AnyError, MongoError, MongoWriteConcernError } from '../error'; +import { BSONSerializeOptions, Document, Long, ObjectId, resolveBSONOptions } from '../bson'; import { + Callback, + MongoDBNamespace, applyRetryableWrites, executeLegacyOperation, + getTopology, hasAtomicOperators, - Callback, - MongoDBNamespace, maxWireVersion, - getTopology, resolveOptions } from '../utils'; -import { executeOperation } from '../operations/execute_operation'; +import { DeleteOperation } from '../operations/delete'; import { InsertOperation } from '../operations/insert'; +import { PromiseProvider } from '../promise_provider'; import { UpdateOperation } from '../operations/update'; -import { DeleteOperation } from '../operations/delete'; import { WriteConcern } from '../write_concern'; +import { executeOperation } from '../operations/execute_operation'; +import type { CollationOptions } from '../cmap/wire_protocol/write_command'; import type { Collection } from '../collection'; -import type { Topology } from '../sdam/topology'; import type { CommandOperationOptions } from '../operations/command'; -import type { CollationOptions } from '../cmap/wire_protocol/write_command'; import type { Hint } from '../operations/operation'; +import type { Topology } from '../sdam/topology'; // Error codes const WRITE_CONCERN_ERROR = 64; diff --git a/src/bulk/ordered.ts b/src/bulk/ordered.ts index ec53223ce43..ee6bbe6ecd8 100644 --- a/src/bulk/ordered.ts +++ b/src/bulk/ordered.ts @@ -1,14 +1,14 @@ import * as BSON from '../bson'; import { - BulkOperationBase, Batch, BatchType, + BulkOperationBase, BulkWriteOptions, - UpdateStatement, - DeleteStatement + DeleteStatement, + UpdateStatement } from './common'; -import type { Document } from '../bson'; import type { Collection } from '../collection'; +import type { Document } from '../bson'; export class OrderedBulkOperation extends BulkOperationBase { constructor(collection: Collection, options: BulkWriteOptions) { diff --git a/src/bulk/unordered.ts b/src/bulk/unordered.ts index 1d7b4a97dcb..ca904188d60 100644 --- a/src/bulk/unordered.ts +++ b/src/bulk/unordered.ts @@ -1,16 +1,16 @@ import * as BSON from '../bson'; import { - BulkOperationBase, Batch, BatchType, + BulkOperationBase, BulkWriteOptions, - UpdateStatement, + BulkWriteResult, DeleteStatement, - BulkWriteResult + UpdateStatement } from './common'; import type { Callback } from '../utils'; -import type { Document } from '../bson'; import type { Collection } from '../collection'; +import type { Document } from '../bson'; export class UnorderedBulkOperation extends BulkOperationBase { constructor(collection: Collection, options: BulkWriteOptions) { diff --git a/src/change_stream.ts b/src/change_stream.ts index bd5e3fe8a5a..c21c9b1a466 100644 --- a/src/change_stream.ts +++ b/src/change_stream.ts @@ -1,26 +1,26 @@ import Denque = require('denque'); -import { EventEmitter } from 'events'; -import { MongoError, AnyError, isResumableError } from './error'; -import { Cursor, CursorOptions, CursorStream, CursorStreamOptions } from './cursor/cursor'; import { AggregateOperation, AggregateOptions } from './operations/aggregate'; +import { AnyError, MongoError, isResumableError } from './error'; import { - relayEvents, - maxWireVersion, + Callback, + MongoDBNamespace, calculateDurationInMs, - now, + getTopology, + maxWireVersion, maybePromise, - MongoDBNamespace, - Callback, - getTopology + now, + relayEvents } from './utils'; +import { Collection } from './collection'; +import { Cursor, CursorOptions, CursorStream, CursorStreamOptions } from './cursor/cursor'; +import { Db } from './db'; +import { EventEmitter } from 'events'; +import { MongoClient } from './mongo_client'; +import type { CollationOptions } from './cmap/wire_protocol/write_command'; +import type { Document, Timestamp } from './bson'; +import type { OperationParent } from './operations/command'; import type { ReadPreference } from './read_preference'; -import type { Timestamp, Document } from './bson'; import type { Topology } from './sdam/topology'; -import type { OperationParent } from './operations/command'; -import type { CollationOptions } from './cmap/wire_protocol/write_command'; -import { MongoClient } from './mongo_client'; -import { Db } from './db'; -import { Collection } from './collection'; const kResumeQueue = Symbol('resumeQueue'); const kCursorStream = Symbol('cursorStream'); diff --git a/src/cmap/auth/auth_provider.ts b/src/cmap/auth/auth_provider.ts index d01486cf66a..d2a7574acdc 100644 --- a/src/cmap/auth/auth_provider.ts +++ b/src/cmap/auth/auth_provider.ts @@ -1,8 +1,8 @@ -import type { Document } from '../../bson'; +import type { Callback, ClientMetadataOptions } from '../../utils'; import type { Connection, ConnectionOptions } from '../connection'; -import type { MongoCredentials } from './mongo_credentials'; +import type { Document } from '../../bson'; import type { HandshakeDocument } from '../connect'; -import type { ClientMetadataOptions, Callback } from '../../utils'; +import type { MongoCredentials } from './mongo_credentials'; export type AuthContextOptions = ConnectionOptions & ClientMetadataOptions; diff --git a/src/cmap/auth/defaultAuthProviders.ts b/src/cmap/auth/defaultAuthProviders.ts index 7f7b801bd54..a0d90414938 100644 --- a/src/cmap/auth/defaultAuthProviders.ts +++ b/src/cmap/auth/defaultAuthProviders.ts @@ -1,9 +1,9 @@ +import { GSSAPI } from './gssapi'; import { MongoCR } from './mongocr'; -import { X509 } from './x509'; +import { MongoDBAWS } from './mongodb_aws'; import { Plain } from './plain'; -import { GSSAPI } from './gssapi'; import { ScramSHA1, ScramSHA256 } from './scram'; -import { MongoDBAWS } from './mongodb_aws'; +import { X509 } from './x509'; import type { AuthProvider } from './auth_provider'; /** @public */ diff --git a/src/cmap/auth/gssapi.ts b/src/cmap/auth/gssapi.ts index 6ff5cbffde8..b68fb34aaa3 100644 --- a/src/cmap/auth/gssapi.ts +++ b/src/cmap/auth/gssapi.ts @@ -1,9 +1,9 @@ -import { AuthProvider, AuthContext } from './auth_provider'; -import { MongoError } from '../../error'; +import { AuthContext, AuthProvider } from './auth_provider'; import { Kerberos, KerberosClient } from '../../deps'; +import { MongoError } from '../../error'; import type { Callback } from '../../utils'; -import type { HandshakeDocument } from '../connect'; import type { Document } from '../../bson'; +import type { HandshakeDocument } from '../connect'; const kGssapiClient = Symbol('GSSAPI_CLIENT'); diff --git a/src/cmap/auth/mongo_credentials.ts b/src/cmap/auth/mongo_credentials.ts index 7f28fab78ef..abd8886b8ef 100644 --- a/src/cmap/auth/mongo_credentials.ts +++ b/src/cmap/auth/mongo_credentials.ts @@ -1,7 +1,7 @@ // Resolves the default auth mechanism according to -import type { Document } from '../../bson'; import { AuthMechanism } from './defaultAuthProviders'; +import type { Document } from '../../bson'; // https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst function getDefaultAuthMechanism(ismaster?: Document): AuthMechanism { diff --git a/src/cmap/auth/mongocr.ts b/src/cmap/auth/mongocr.ts index 60d29151cb3..d22a5d8178c 100644 --- a/src/cmap/auth/mongocr.ts +++ b/src/cmap/auth/mongocr.ts @@ -1,7 +1,7 @@ import * as crypto from 'crypto'; -import { AuthProvider, AuthContext } from './auth_provider'; -import type { Callback } from '../../utils'; +import { AuthContext, AuthProvider } from './auth_provider'; import { MongoError } from '../../error'; +import type { Callback } from '../../utils'; export class MongoCR extends AuthProvider { auth(authContext: AuthContext, callback: Callback): void { diff --git a/src/cmap/auth/mongodb_aws.ts b/src/cmap/auth/mongodb_aws.ts index 4438ee05892..2f9d8ed89ff 100644 --- a/src/cmap/auth/mongodb_aws.ts +++ b/src/cmap/auth/mongodb_aws.ts @@ -1,15 +1,15 @@ -import * as http from 'http'; +import * as BSON from '../../bson'; import * as crypto from 'crypto'; +import * as http from 'http'; import * as url from 'url'; -import * as BSON from '../../bson'; -import { AuthProvider, AuthContext } from './auth_provider'; +import { AuthContext, AuthProvider } from './auth_provider'; +import { Callback, maxWireVersion } from '../../utils'; import { MongoCredentials } from './mongo_credentials'; import { MongoError } from '../../error'; -import { maxWireVersion, Callback } from '../../utils'; import type { BSONSerializeOptions } from '../../bson'; -import { aws4 } from '../../deps'; import { AuthMechanism } from './defaultAuthProviders'; +import { aws4 } from '../../deps'; const ASCII_N = 110; const AWS_RELATIVE_URI = 'http://169.254.170.2'; diff --git a/src/cmap/auth/plain.ts b/src/cmap/auth/plain.ts index 57ad1ad414c..19169f2e2d8 100644 --- a/src/cmap/auth/plain.ts +++ b/src/cmap/auth/plain.ts @@ -1,5 +1,5 @@ +import { AuthContext, AuthProvider } from './auth_provider'; import { Binary } from '../../bson'; -import { AuthProvider, AuthContext } from './auth_provider'; import { MongoError } from '../../error'; import type { Callback } from '../../utils'; diff --git a/src/cmap/auth/scram.ts b/src/cmap/auth/scram.ts index 125b192b6fb..19f58c7bc59 100644 --- a/src/cmap/auth/scram.ts +++ b/src/cmap/auth/scram.ts @@ -1,10 +1,10 @@ import * as crypto from 'crypto'; +import { AnyError, MongoError } from '../../error'; +import { AuthContext, AuthProvider } from './auth_provider'; import { Binary, Document } from '../../bson'; -import { MongoError, AnyError } from '../../error'; -import { AuthProvider, AuthContext } from './auth_provider'; import type { Callback } from '../../utils'; -import type { MongoCredentials } from './mongo_credentials'; import type { HandshakeDocument } from '../connect'; +import type { MongoCredentials } from './mongo_credentials'; import { saslprep } from '../../deps'; diff --git a/src/cmap/auth/x509.ts b/src/cmap/auth/x509.ts index 37b80ece399..0cbc8498555 100644 --- a/src/cmap/auth/x509.ts +++ b/src/cmap/auth/x509.ts @@ -1,9 +1,9 @@ -import { AuthProvider, AuthContext } from './auth_provider'; +import { AuthContext, AuthProvider } from './auth_provider'; import { MongoError } from '../../error'; -import type { Document } from '../../bson'; import type { Callback } from '../../utils'; -import type { MongoCredentials } from './mongo_credentials'; +import type { Document } from '../../bson'; import type { HandshakeDocument } from '../connect'; +import type { MongoCredentials } from './mongo_credentials'; export class X509 extends AuthProvider { prepare(handshakeDoc: HandshakeDocument, authContext: AuthContext, callback: Callback): void { diff --git a/src/cmap/commands.ts b/src/cmap/commands.ts index 7189fc9bb3c..3ce10bbc92c 100644 --- a/src/cmap/commands.ts +++ b/src/cmap/commands.ts @@ -1,8 +1,8 @@ -import { ReadPreference } from '../read_preference'; import * as BSON from '../bson'; +import { OP_GETMORE, OP_KILL_CURSORS, OP_MSG, OP_QUERY } from './wire_protocol/constants'; +import { ReadPreference } from '../read_preference'; import { databaseNamespace } from '../utils'; -import { OP_QUERY, OP_GETMORE, OP_KILL_CURSORS, OP_MSG } from './wire_protocol/constants'; -import type { Long, Document, BSONSerializeOptions } from '../bson'; +import type { BSONSerializeOptions, Document, Long } from '../bson'; import type { ClientSession } from '../sessions'; import type { CommandOptions } from './wire_protocol/command'; diff --git a/src/cmap/connect.ts b/src/cmap/connect.ts index 077385b549a..c32cdb7d290 100644 --- a/src/cmap/connect.ts +++ b/src/cmap/connect.ts @@ -1,21 +1,21 @@ import * as net from 'net'; import * as tls from 'tls'; -import { Connection, ConnectionOptions } from './connection'; -import { MongoError, MongoNetworkError, MongoNetworkTimeoutError, AnyError } from '../error'; -import { defaultAuthProviders, AuthMechanism } from './auth/defaultAuthProviders'; +import { AnyError, MongoError, MongoNetworkError, MongoNetworkTimeoutError } from '../error'; import { AuthContext } from './auth/auth_provider'; -import { makeClientMetadata, ClientMetadata, Callback, CallbackWithType } from '../utils'; +import { AuthMechanism, defaultAuthProviders } from './auth/defaultAuthProviders'; +import { Callback, CallbackWithType, ClientMetadata, makeClientMetadata } from '../utils'; +import { Connection, ConnectionOptions } from './connection'; import { - MAX_SUPPORTED_WIRE_VERSION, MAX_SUPPORTED_SERVER_VERSION, - MIN_SUPPORTED_WIRE_VERSION, - MIN_SUPPORTED_SERVER_VERSION + MAX_SUPPORTED_WIRE_VERSION, + MIN_SUPPORTED_SERVER_VERSION, + MIN_SUPPORTED_WIRE_VERSION } from './wire_protocol/constants'; import type { Document } from '../bson'; import type { EventEmitter } from 'events'; import type { Socket, SocketConnectOpts } from 'net'; -import type { TLSSocket, ConnectionOptions as TLSConnectionOpts } from 'tls'; +import type { ConnectionOptions as TLSConnectionOpts, TLSSocket } from 'tls'; /** @public */ export type Stream = Socket | TLSSocket; diff --git a/src/cmap/connection.ts b/src/cmap/connection.ts index e9517896a0d..f76372383d1 100644 --- a/src/cmap/connection.ts +++ b/src/cmap/connection.ts @@ -1,29 +1,29 @@ +import * as wp from './wire_protocol'; +import { Callback, ClientMetadata, calculateDurationInMs, now, uuidV4 } from '../utils'; +import { CommandFailedEvent, CommandStartedEvent, CommandSucceededEvent } from './events'; import { EventEmitter } from 'events'; import { MessageStream, OperationDescription } from './message_stream'; -import { StreamDescription, StreamDescriptionOptions } from './stream_description'; -import * as wp from './wire_protocol'; -import { CommandStartedEvent, CommandFailedEvent, CommandSucceededEvent } from './events'; -import { updateSessionFromResponse } from '../sessions'; -import { uuidV4, ClientMetadata, now, calculateDurationInMs, Callback } from '../utils'; import { MongoError, MongoNetworkError, MongoNetworkTimeoutError, MongoWriteConcernError } from '../error'; -import type { BinMsg, WriteProtocolMessageType, Response } from './commands'; -import type { Document, Long } from '../bson'; +import { StreamDescription, StreamDescriptionOptions } from './stream_description'; +import { updateSessionFromResponse } from '../sessions'; import type { AutoEncrypter } from '../deps'; -import type { ConnectionOptions as TLSConnectionOptions } from 'tls'; -import type { TcpNetConnectOpts, IpcNetConnectOpts } from 'net'; -import type { Server } from '../sdam/server'; -import type { MongoCredentials } from './auth/mongo_credentials'; +import type { BinMsg, Response, WriteProtocolMessageType } from './commands'; import type { CommandOptions } from './wire_protocol/command'; +import type { Document, Long } from '../bson'; +import type { FindOptions } from '../operations/find'; import type { GetMoreOptions } from './wire_protocol/get_more'; -import type { InsertOptions, UpdateOptions, RemoveOptions } from './wire_protocol/index'; -import type { Stream } from './connect'; +import type { InsertOptions, RemoveOptions, UpdateOptions } from './wire_protocol/index'; +import type { IpcNetConnectOpts, TcpNetConnectOpts } from 'net'; import type { LoggerOptions } from '../logger'; -import type { FindOptions } from '../operations/find'; +import type { MongoCredentials } from './auth/mongo_credentials'; +import type { Server } from '../sdam/server'; +import type { Stream } from './connect'; +import type { ConnectionOptions as TLSConnectionOptions } from 'tls'; const kStream = Symbol('stream'); const kQueue = Symbol('queue'); diff --git a/src/cmap/connection_pool.ts b/src/cmap/connection_pool.ts index 6289017706c..2daecd833ab 100644 --- a/src/cmap/connection_pool.ts +++ b/src/cmap/connection_pool.ts @@ -1,23 +1,23 @@ import Denque = require('denque'); -import { EventEmitter } from 'events'; -import { Logger } from '../logger'; +import { Callback, eachAsync, makeCounter, relayEvents } from '../utils'; import { Connection, ConnectionOptions } from './connection'; -import { connect } from './connect'; -import { eachAsync, relayEvents, makeCounter, Callback } from '../utils'; -import { MongoError } from '../error'; -import { PoolClosedError, WaitQueueTimeoutError } from './errors'; import { - ConnectionPoolCreatedEvent, - ConnectionPoolClosedEvent, - ConnectionCreatedEvent, - ConnectionReadyEvent, - ConnectionClosedEvent, - ConnectionCheckOutStartedEvent, ConnectionCheckOutFailedEvent, - ConnectionCheckedOutEvent, + ConnectionCheckOutStartedEvent, ConnectionCheckedInEvent, - ConnectionPoolClearedEvent + ConnectionCheckedOutEvent, + ConnectionClosedEvent, + ConnectionCreatedEvent, + ConnectionPoolClearedEvent, + ConnectionPoolClosedEvent, + ConnectionPoolCreatedEvent, + ConnectionReadyEvent } from './events'; +import { EventEmitter } from 'events'; +import { Logger } from '../logger'; +import { MongoError } from '../error'; +import { PoolClosedError, WaitQueueTimeoutError } from './errors'; +import { connect } from './connect'; import type { CommandOptions } from './wire_protocol/command'; import type { Document } from '../bson'; diff --git a/src/cmap/events.ts b/src/cmap/events.ts index 9775af02b26..2e9bfac1fce 100644 --- a/src/cmap/events.ts +++ b/src/cmap/events.ts @@ -1,9 +1,9 @@ import { GetMore, KillCursor, Msg, WriteProtocolMessageType } from './commands'; import { calculateDurationInMs } from '../utils'; -import type { ConnectionPool, ConnectionPoolOptions } from './connection_pool'; +import type { AnyError } from '../error'; import type { Connection } from './connection'; +import type { ConnectionPool, ConnectionPoolOptions } from './connection_pool'; import type { Document } from '../bson'; -import type { AnyError } from '../error'; /** * The base export class for all monitoring events published from the connection pool diff --git a/src/cmap/message_stream.ts b/src/cmap/message_stream.ts index 9878b2d907c..239aa11b0f1 100644 --- a/src/cmap/message_stream.ts +++ b/src/cmap/message_stream.ts @@ -1,16 +1,16 @@ import BufferList = require('bl'); -import { Duplex, DuplexOptions } from 'stream'; -import { Response, Msg, BinMsg, Query, WriteProtocolMessageType, MessageHeader } from './commands'; -import { MongoError, MongoParseError } from '../error'; -import { OP_COMPRESSED, OP_MSG } from './wire_protocol/constants'; +import { BinMsg, MessageHeader, Msg, Query, Response, WriteProtocolMessageType } from './commands'; import { + Compressor, + CompressorName, compress, decompress, - uncompressibleCommands, - Compressor, - CompressorName + uncompressibleCommands } from './wire_protocol/compression'; -import type { Document, BSONSerializeOptions } from '../bson'; +import { Duplex, DuplexOptions } from 'stream'; +import { MongoError, MongoParseError } from '../error'; +import { OP_COMPRESSED, OP_MSG } from './wire_protocol/constants'; +import type { BSONSerializeOptions, Document } from '../bson'; import type { Callback } from '../utils'; import type { ClientSession } from '../sessions'; diff --git a/src/cmap/stream_description.ts b/src/cmap/stream_description.ts index 8209b51f3ad..30646a4d9b2 100644 --- a/src/cmap/stream_description.ts +++ b/src/cmap/stream_description.ts @@ -1,7 +1,7 @@ +import { ServerType } from '../sdam/common'; import { parseServerType } from '../sdam/server_description'; -import type { Document } from '../bson'; import type { CompressorName } from './wire_protocol/compression'; -import { ServerType } from '../sdam/common'; +import type { Document } from '../bson'; const RESPONSE_FIELDS = [ 'minWireVersion', diff --git a/src/cmap/wire_protocol/command.ts b/src/cmap/wire_protocol/command.ts index a165cba9f3b..0575261531f 100644 --- a/src/cmap/wire_protocol/command.ts +++ b/src/cmap/wire_protocol/command.ts @@ -1,14 +1,14 @@ -import { Query, Msg } from '../commands'; +import { Callback, databaseNamespace, maxWireVersion } from '../../utils'; +import { ClientSession, applySession } from '../../sessions'; +import { MongoError, MongoNetworkError } from '../../error'; +import { Msg, Query } from '../commands'; import { getReadPreference, isSharded } from './shared'; import { isTransactionCommand } from '../../transactions'; -import { applySession, ClientSession } from '../../sessions'; -import { maxWireVersion, databaseNamespace, Callback } from '../../utils'; -import { MongoError, MongoNetworkError } from '../../error'; -import type { Document, BSONSerializeOptions } from '../../bson'; +import type { BSONSerializeOptions, Document } from '../../bson'; +import type { ReadPreferenceLike } from '../../read_preference'; import type { Server } from '../../sdam/server'; import type { Topology } from '../../sdam/topology'; -import type { ReadPreferenceLike } from '../../read_preference'; -import type { WriteConcernOptions, WriteConcern, W } from '../../write_concern'; +import type { W, WriteConcern, WriteConcernOptions } from '../../write_concern'; import type { WriteCommandOptions } from './write_command'; /** @internal */ diff --git a/src/cmap/wire_protocol/get_more.ts b/src/cmap/wire_protocol/get_more.ts index f09f03fe9eb..130d3bade64 100644 --- a/src/cmap/wire_protocol/get_more.ts +++ b/src/cmap/wire_protocol/get_more.ts @@ -1,9 +1,9 @@ +import { Callback, collectionNamespace, maxWireVersion } from '../../utils'; +import { CommandOptions, command } from './command'; +import { Document, Long, pluckBSONSerializeOptions } from '../../bson'; import { GetMore } from '../commands'; -import { Long, Document, pluckBSONSerializeOptions } from '../../bson'; import { MongoError } from '../../error'; import { applyCommonQueryOptions } from './shared'; -import { maxWireVersion, collectionNamespace, Callback } from '../../utils'; -import { command, CommandOptions } from './command'; import type { Server } from '../../sdam/server'; /** @internal */ diff --git a/src/cmap/wire_protocol/index.ts b/src/cmap/wire_protocol/index.ts index 3ae12305480..4bdff5705c3 100644 --- a/src/cmap/wire_protocol/index.ts +++ b/src/cmap/wire_protocol/index.ts @@ -5,9 +5,9 @@ export { getMore } from './get_more'; export { query } from './query'; export { command } from './command'; -import { writeCommand, WriteCommandOptions } from './write_command'; -import type { Document } from '../../bson'; +import { WriteCommandOptions, writeCommand } from './write_command'; import type { Callback } from '../../utils'; +import type { Document } from '../../bson'; export { writeCommand }; diff --git a/src/cmap/wire_protocol/kill_cursors.ts b/src/cmap/wire_protocol/kill_cursors.ts index 09816eeea02..f03b8eaf295 100644 --- a/src/cmap/wire_protocol/kill_cursors.ts +++ b/src/cmap/wire_protocol/kill_cursors.ts @@ -1,9 +1,9 @@ +import { Callback, collectionNamespace, maxWireVersion } from '../../utils'; +import { CommandOptions, command } from './command'; import { KillCursor } from '../commands'; -import { maxWireVersion, collectionNamespace, Callback } from '../../utils'; -import { command, CommandOptions } from './command'; import { MongoError, MongoNetworkError } from '../../error'; -import type { Server } from '../../sdam/server'; import type { Long } from '../../bson'; +import type { Server } from '../../sdam/server'; export function killCursors( server: Server, diff --git a/src/cmap/wire_protocol/query.ts b/src/cmap/wire_protocol/query.ts index 24d81103677..a350cf9be55 100644 --- a/src/cmap/wire_protocol/query.ts +++ b/src/cmap/wire_protocol/query.ts @@ -1,13 +1,13 @@ -import { command, CommandOptions } from './command'; -import { Query } from '../commands'; -import { MongoError } from '../../error'; -import { maxWireVersion, collectionNamespace, Callback, decorateWithExplain } from '../../utils'; -import { getReadPreference, isSharded, applyCommonQueryOptions } from './shared'; +import { Callback, collectionNamespace, decorateWithExplain, maxWireVersion } from '../../utils'; +import { CommandOptions, command } from './command'; import { Document, pluckBSONSerializeOptions } from '../../bson'; -import type { Server } from '../../sdam/server'; -import type { ReadPreferenceLike } from '../../read_preference'; -import type { FindOptions } from '../../operations/find'; import { Explain } from '../../explain'; +import { MongoError } from '../../error'; +import { Query } from '../commands'; +import { applyCommonQueryOptions, getReadPreference, isSharded } from './shared'; +import type { FindOptions } from '../../operations/find'; +import type { ReadPreferenceLike } from '../../read_preference'; +import type { Server } from '../../sdam/server'; /** @internal */ export interface QueryOptions extends CommandOptions { diff --git a/src/cmap/wire_protocol/shared.ts b/src/cmap/wire_protocol/shared.ts index 982304bb04e..fadb5a63f1c 100644 --- a/src/cmap/wire_protocol/shared.ts +++ b/src/cmap/wire_protocol/shared.ts @@ -1,14 +1,14 @@ -import { ServerType } from '../../sdam/common'; -import { TopologyDescription } from '../../sdam/topology_description'; import { MongoError } from '../../error'; import { ReadPreference } from '../../read_preference'; +import { ServerType } from '../../sdam/common'; +import { TopologyDescription } from '../../sdam/topology_description'; +import type { CommandOptions } from './command'; import type { Document } from '../../bson'; import type { OpQueryOptions } from '../commands'; -import type { Topology } from '../../sdam/topology'; +import type { ReadPreferenceLike } from '../../read_preference'; import type { Server } from '../../sdam/server'; import type { ServerDescription } from '../../sdam/server_description'; -import type { ReadPreferenceLike } from '../../read_preference'; -import type { CommandOptions } from './command'; +import type { Topology } from '../../sdam/topology'; export interface ReadPreferenceOption { readPreference?: ReadPreferenceLike; diff --git a/src/cmap/wire_protocol/write_command.ts b/src/cmap/wire_protocol/write_command.ts index 7ec75b5d50c..20565946ae1 100644 --- a/src/cmap/wire_protocol/write_command.ts +++ b/src/cmap/wire_protocol/write_command.ts @@ -1,10 +1,10 @@ +import { Callback, collectionNamespace, decorateWithExplain } from '../../utils'; +import { CommandOptions, command } from './command'; +import { Explain, ExplainOptions } from '../../explain'; import { MongoError } from '../../error'; -import { collectionNamespace, Callback, decorateWithExplain } from '../../utils'; -import { command, CommandOptions } from './command'; +import type { BSONSerializeOptions, Document } from '../../bson'; import type { Server } from '../../sdam/server'; -import type { Document, BSONSerializeOptions } from '../../bson'; import type { WriteConcern } from '../../write_concern'; -import { Explain, ExplainOptions } from '../../explain'; /** @public */ export interface CollationOptions { diff --git a/src/collection.ts b/src/collection.ts index 9fdb23ce40d..fc074ca266d 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -1,90 +1,90 @@ -import { emitDeprecatedOptionWarning, resolveOptions } from './utils'; -import { ReadPreference, ReadPreferenceLike } from './read_preference'; -import { deprecate } from 'util'; +import { AggregateOperation, AggregateOptions } from './operations/aggregate'; +import { AggregationCursor, CommandCursor, Cursor } from './cursor'; +import { BSONSerializeOptions, Document, ObjectId, resolveBSONOptions } from './bson'; +import { BulkWriteOperation } from './operations/bulk_write'; import { - normalizeHintField, + Callback, + MongoDBNamespace, checkCollectionName, deprecateOptions, - MongoDBNamespace, - Callback, - getTopology + getTopology, + normalizeHintField } from './utils'; -import { ObjectId, Document, BSONSerializeOptions, resolveBSONOptions } from './bson'; -import { MongoError } from './error'; -import { UnorderedBulkOperation } from './bulk/unordered'; -import { OrderedBulkOperation } from './bulk/ordered'; import { ChangeStream, ChangeStreamOptions } from './change_stream'; -import { WriteConcern, WriteConcernOptions } from './write_concern'; -import { ReadConcern, ReadConcernLike } from './read_concern'; -import { AggregationCursor, CommandCursor, Cursor } from './cursor'; -import { AggregateOperation, AggregateOptions } from './operations/aggregate'; -import { BulkWriteOperation } from './operations/bulk_write'; +import { CollStatsOperation, CollStatsOptions } from './operations/stats'; import { CountDocumentsOperation, CountDocumentsOptions } from './operations/count_documents'; import { - CreateIndexesOperation, CreateIndexOperation, + CreateIndexesOperation, + CreateIndexesOptions, DropIndexOperation, DropIndexesOperation, + DropIndexesOptions, EnsureIndexOperation, - IndexesOperation, + IndexDescription, IndexExistsOperation, IndexInformationOperation, - ListIndexesOperation, - CreateIndexesOptions, - DropIndexesOptions, - ListIndexesOptions, IndexSpecification, - IndexDescription + IndexesOperation, + ListIndexesOperation, + ListIndexesOptions } from './operations/indexes'; +import { + DeleteManyOperation, + DeleteOneOperation, + DeleteOptions, + DeleteResult +} from './operations/delete'; import { DistinctOperation, DistinctOptions } from './operations/distinct'; import { DropCollectionOperation, DropCollectionOptions } from './operations/drop'; import { EstimatedDocumentCountOperation, EstimatedDocumentCountOptions } from './operations/estimated_document_count'; -import { FindOperation, FindOptions } from './operations/find'; -import { FindOneOperation } from './operations/find_one'; import { FindAndModifyOperation, + FindAndModifyOptions, FindOneAndDeleteOperation, FindOneAndReplaceOperation, - FindOneAndUpdateOperation, - FindAndModifyOptions + FindOneAndUpdateOperation } from './operations/find_and_modify'; +import { FindOneOperation } from './operations/find_one'; +import { FindOperation, FindOptions } from './operations/find'; import { InsertManyOperation, InsertManyResult } from './operations/insert_many'; import { InsertOneOperation, InsertOneOptions, InsertOneResult } from './operations/insert'; -import { - UpdateOneOperation, - UpdateManyOperation, - UpdateOptions, - UpdateResult -} from './operations/update'; -import { - DeleteOneOperation, - DeleteManyOperation, - DeleteOptions, - DeleteResult -} from './operations/delete'; import { IsCappedOperation } from './operations/is_capped'; import { - MapReduceOperation, MapFunction, - ReduceFunction, - MapReduceOptions + MapReduceOperation, + MapReduceOptions, + ReduceFunction } from './operations/map_reduce'; +import { MongoError } from './error'; import { OptionsOperation } from './operations/options_operation'; +import { OrderedBulkOperation } from './bulk/ordered'; +import { ReadConcern, ReadConcernLike } from './read_concern'; +import { ReadPreference, ReadPreferenceLike } from './read_preference'; import { RenameOperation, RenameOptions } from './operations/rename'; import { ReplaceOneOperation, ReplaceOptions } from './operations/replace_one'; -import { CollStatsOperation, CollStatsOptions } from './operations/stats'; +import { UnorderedBulkOperation } from './bulk/unordered'; +import { + UpdateManyOperation, + UpdateOneOperation, + UpdateOptions, + UpdateResult +} from './operations/update'; +import { WriteConcern, WriteConcernOptions } from './write_concern'; +import { deprecate } from 'util'; +import { emitDeprecatedOptionWarning, resolveOptions } from './utils'; import { executeOperation } from './operations/execute_operation'; +import type { AnyBulkWriteOperation, BulkWriteOptions, BulkWriteResult } from './bulk/common'; +import type { CountOptions } from './operations/count'; import type { Db } from './db'; -import type { OperationOptions, Hint } from './operations/operation'; +import type { Hint, OperationOptions } from './operations/operation'; import type { IndexInformationOptions } from './operations/common_functions'; -import type { CountOptions } from './operations/count'; -import type { BulkWriteResult, BulkWriteOptions, AnyBulkWriteOperation } from './bulk/common'; -import type { PkFactory } from './mongo_client'; import type { Logger, LoggerOptions } from './logger'; import type { OperationParent } from './operations/command'; +import type { PkFactory } from './mongo_client'; import type { Sort } from './sort'; /** @public */ diff --git a/src/connection_string.ts b/src/connection_string.ts index fa3ee8dd4df..c672f3d4fb8 100644 --- a/src/connection_string.ts +++ b/src/connection_string.ts @@ -1,13 +1,13 @@ -import * as url from 'url'; -import * as qs from 'querystring'; import * as dns from 'dns'; -import { URL } from 'url'; -import { ReadPreference } from './read_preference'; +import * as qs from 'querystring'; +import * as url from 'url'; import { MongoParseError } from './error'; +import { ReadPreference } from './read_preference'; +import { URL } from 'url'; import type { AnyOptions, Callback } from './utils'; +import type { CompressorName } from './cmap/wire_protocol/compression'; import type { ConnectionOptions } from './cmap/connection'; import type { Document } from './bson'; -import type { CompressorName } from './cmap/wire_protocol/compression'; import type { MongoClientOptions, MongoOptions } from './mongo_client'; /** diff --git a/src/cursor/aggregation_cursor.ts b/src/cursor/aggregation_cursor.ts index 3ed734c5ca7..a0ef18f7704 100644 --- a/src/cursor/aggregation_cursor.ts +++ b/src/cursor/aggregation_cursor.ts @@ -1,5 +1,5 @@ -import { MongoError } from '../error'; import { Cursor, CursorOptions, CursorState } from './cursor'; +import { MongoError } from '../error'; import type { AggregateOperation, AggregateOptions } from '../operations/aggregate'; import type { Document } from '../bson'; import type { Sort } from '../sort'; diff --git a/src/cursor/command_cursor.ts b/src/cursor/command_cursor.ts index 6d04f9881b1..0746c73086a 100644 --- a/src/cursor/command_cursor.ts +++ b/src/cursor/command_cursor.ts @@ -1,8 +1,8 @@ -import { ReadPreference, ReadPreferenceLike } from '../read_preference'; -import { MongoError } from '../error'; import { Cursor, CursorOptions, CursorState } from './cursor'; -import type { Topology } from '../sdam/topology'; +import { MongoError } from '../error'; +import { ReadPreference, ReadPreferenceLike } from '../read_preference'; import type { CommandOperation } from '../operations/command'; +import type { Topology } from '../sdam/topology'; /** @public */ export type CommandCursorOptions = CursorOptions; diff --git a/src/cursor/cursor.ts b/src/cursor/cursor.ts index b79ecae769d..2f1b3741d7b 100644 --- a/src/cursor/cursor.ts +++ b/src/cursor/cursor.ts @@ -1,25 +1,25 @@ +import { AnyError, MongoError, MongoNetworkError } from '../error'; +import { Aspect, Hint, OperationBase } from '../operations/operation'; +import { BSONSerializeOptions, Document, Long } from '../bson'; +import { Callback, MongoDBNamespace, emitDeprecatedOptionWarning, maybePromise } from '../utils'; +import { CommandOperation, CommandOperationOptions } from '../operations/command'; +import { CountOperation, CountOptions } from '../operations/count'; import { EventEmitter } from 'events'; -import { Readable } from 'stream'; -import { deprecate } from 'util'; -import { Long, Document, BSONSerializeOptions } from '../bson'; -import { MongoError, MongoNetworkError, AnyError } from '../error'; +import { Explain, ExplainVerbosityLike } from '../explain'; import { Logger } from '../logger'; -import { executeOperation } from '../operations/execute_operation'; -import { CountOperation, CountOptions } from '../operations/count'; +import { PromiseProvider } from '../promise_provider'; import { ReadPreference, ReadPreferenceLike } from '../read_preference'; -import { Callback, emitDeprecatedOptionWarning, maybePromise, MongoDBNamespace } from '../utils'; +import { Readable } from 'stream'; import { Sort, SortDirection, formatSort } from '../sort'; -import { PromiseProvider } from '../promise_provider'; -import type { OperationTime, ResumeToken } from '../change_stream'; +import { deprecate } from 'util'; +import { executeOperation } from '../operations/execute_operation'; +import type { ClientSession } from '../sessions'; import type { CloseOptions } from '../cmap/connection_pool'; import type { CollationOptions } from '../cmap/wire_protocol/write_command'; -import { Aspect, Hint, OperationBase } from '../operations/operation'; -import type { Topology } from '../sdam/topology'; -import { CommandOperation, CommandOperationOptions } from '../operations/command'; +import type { OperationTime, ResumeToken } from '../change_stream'; import type { ReadConcern } from '../read_concern'; import type { Server } from '../sdam/server'; -import type { ClientSession } from '../sessions'; -import { Explain, ExplainVerbosityLike } from '../explain'; +import type { Topology } from '../sdam/topology'; const kCursor = Symbol('cursor'); diff --git a/src/db.ts b/src/db.ts index 0c8feaf5475..01e6c18524b 100644 --- a/src/db.ts +++ b/src/db.ts @@ -1,62 +1,62 @@ -import { deprecate } from 'util'; +import * as CONSTANTS from './constants'; +import { AddUserOperation, AddUserOptions } from './operations/add_user'; +import { AggregateOperation, AggregateOptions } from './operations/aggregate'; +import { AggregationCursor, CommandCursor } from './cursor'; +import { BSONSerializeOptions, Code, Document, ObjectId, resolveBSONOptions } from './bson'; import { - emitDeprecatedOptionWarning, Callback, - resolveOptions, - filterOptions, - deprecateOptions, MongoDBNamespace, - getTopology + deprecateOptions, + emitDeprecatedOptionWarning, + filterOptions, + getTopology, + resolveOptions } from './utils'; -import { loadAdmin } from './dynamic_loaders'; -import { AggregationCursor, CommandCursor } from './cursor'; -import { ObjectId, Code, Document, BSONSerializeOptions, resolveBSONOptions } from './bson'; -import { ReadPreference, ReadPreferenceLike } from './read_preference'; -import { MongoError } from './error'; -import { Collection, CollectionOptions } from './collection'; import { ChangeStream, ChangeStreamOptions } from './change_stream'; -import * as CONSTANTS from './constants'; -import { WriteConcern, WriteConcernOptions } from './write_concern'; -import { ReadConcern } from './read_concern'; -import { Logger, LoggerOptions } from './logger'; -import { AggregateOperation, AggregateOptions } from './operations/aggregate'; -import { AddUserOperation, AddUserOptions } from './operations/add_user'; +import { Collection, CollectionOptions } from './collection'; import { CollectionsOperation } from './operations/collections'; -import { DbStatsOperation, DbStatsOptions } from './operations/stats'; -import { - RunCommandOperation, - RunAdminCommandOperation, - RunCommandOptions -} from './operations/run_command'; import { CreateCollectionOperation, CreateCollectionOptions } from './operations/create_collection'; import { CreateIndexOperation, + CreateIndexesOptions, EnsureIndexOperation, IndexInformationOperation, - CreateIndexesOptions, IndexSpecification } from './operations/indexes'; +import { DbStatsOperation, DbStatsOptions } from './operations/stats'; import { DropCollectionOperation, + DropCollectionOptions, DropDatabaseOperation, - DropDatabaseOptions, - DropCollectionOptions + DropDatabaseOptions } from './operations/drop'; +import { EvalOperation, EvalOptions } from './operations/eval'; import { ListCollectionsOperation, ListCollectionsOptions } from './operations/list_collections'; -import { ProfilingLevelOperation, ProfilingLevelOptions } from './operations/profiling_level'; -import { RemoveUserOperation, RemoveUserOptions } from './operations/remove_user'; -import { RenameOperation, RenameOptions } from './operations/rename'; +import { Logger, LoggerOptions } from './logger'; +import { MongoError } from './error'; import { - SetProfilingLevelOperation, ProfilingLevel, + SetProfilingLevelOperation, SetProfilingLevelOptions } from './operations/set_profiling_level'; +import { ProfilingLevelOperation, ProfilingLevelOptions } from './operations/profiling_level'; +import { ReadConcern } from './read_concern'; +import { ReadPreference, ReadPreferenceLike } from './read_preference'; +import { RemoveUserOperation, RemoveUserOptions } from './operations/remove_user'; +import { RenameOperation, RenameOptions } from './operations/rename'; +import { + RunAdminCommandOperation, + RunCommandOperation, + RunCommandOptions +} from './operations/run_command'; +import { WriteConcern, WriteConcernOptions } from './write_concern'; +import { deprecate } from 'util'; import { executeOperation } from './operations/execute_operation'; -import { EvalOperation, EvalOptions } from './operations/eval'; +import { loadAdmin } from './dynamic_loaders'; +import type { Admin } from './admin'; import type { IndexInformationOptions } from './operations/common_functions'; import type { MongoClient, PkFactory } from './mongo_client'; import type { OperationParent } from './operations/command'; -import type { Admin } from './admin'; // Allowed parameters const legalOptionNames = [ diff --git a/src/deps.ts b/src/deps.ts index 82b55a30cfb..d40e2f26c15 100644 --- a/src/deps.ts +++ b/src/deps.ts @@ -1,7 +1,7 @@ import { MongoError } from './error'; -import type { MongoClient } from './mongo_client'; -import type { Document } from './bson'; import type { Callback } from './utils'; +import type { Document } from './bson'; +import type { MongoClient } from './mongo_client'; function makeErrorModule(error: any) { const props = error ? { kModuleError: error } : {}; diff --git a/src/error.ts b/src/error.ts index aae4985bd73..8c2e03271a6 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,6 +1,6 @@ -import type { TopologyVersion } from './sdam/server_description'; import type { Document } from './bson'; import type { TopologyDescription } from './sdam/topology_description'; +import type { TopologyVersion } from './sdam/server_description'; /** @public */ export type AnyError = MongoError | Error; diff --git a/src/gridfs-stream/download.ts b/src/gridfs-stream/download.ts index a98499e3a65..404f5752e34 100644 --- a/src/gridfs-stream/download.ts +++ b/src/gridfs-stream/download.ts @@ -1,13 +1,13 @@ import { Readable } from 'stream'; import type { AnyError } from '../error'; -import type { Document } from '../bson'; -import type { FindOptions } from '../operations/find'; -import type { Sort } from '../sort'; -import type { Cursor } from './../cursor/cursor'; import type { Callback } from '../utils'; import type { Collection } from '../collection'; -import type { ReadPreference } from '../read_preference'; +import type { Cursor } from './../cursor/cursor'; +import type { Document } from '../bson'; +import type { FindOptions } from '../operations/find'; import type { GridFSBucketWriteStream } from './upload'; +import type { ReadPreference } from '../read_preference'; +import type { Sort } from '../sort'; /** @public */ export interface GridFSBucketReadStreamOptions { diff --git a/src/gridfs-stream/index.ts b/src/gridfs-stream/index.ts index db5f2285e2b..ae5780a3edf 100644 --- a/src/gridfs-stream/index.ts +++ b/src/gridfs-stream/index.ts @@ -1,4 +1,4 @@ -import { MongoError } from '../error'; +import { Callback, executeLegacyOperation, getTopology } from '../utils'; import { EventEmitter } from 'events'; import { GridFSBucketReadStream, @@ -6,16 +6,16 @@ import { GridFSBucketReadStreamOptionsWithRevision } from './download'; import { GridFSBucketWriteStream, GridFSBucketWriteStreamOptions, TFileId } from './upload'; -import { executeLegacyOperation, Callback, getTopology } from '../utils'; -import { WriteConcernOptions, WriteConcern } from '../write_concern'; -import type { Document } from '../bson'; -import type { Db } from '../db'; -import type { ReadPreference } from '../read_preference'; +import { MongoError } from '../error'; +import { WriteConcern, WriteConcernOptions } from '../write_concern'; import type { Collection } from '../collection'; import type { Cursor } from './../cursor/cursor'; +import type { Db } from '../db'; +import type { Document } from '../bson'; import type { FindOptions } from './../operations/find'; -import type { Sort } from '../sort'; import type { Logger } from '../logger'; +import type { ReadPreference } from '../read_preference'; +import type { Sort } from '../sort'; const DEFAULT_GRIDFS_BUCKET_OPTIONS: { bucketName: string; diff --git a/src/gridfs-stream/upload.ts b/src/gridfs-stream/upload.ts index ce144e9fa50..f1be42c0555 100644 --- a/src/gridfs-stream/upload.ts +++ b/src/gridfs-stream/upload.ts @@ -1,9 +1,9 @@ import * as crypto from 'crypto'; +import { AnyError, MongoError } from '../error'; +import { ObjectId } from '../bson'; +import { PromiseProvider } from '../promise_provider'; import { Writable } from 'stream'; -import { MongoError, AnyError } from '../error'; 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'; diff --git a/src/index.ts b/src/index.ts index ffcc9e67339..d144ce96185 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,13 @@ -import { Instrumentation } from './apm'; -import { Cursor, AggregationCursor, CommandCursor } from './cursor'; -import { PromiseProvider } from './promise_provider'; import { Admin } from './admin'; -import { MongoClient } from './mongo_client'; -import { Db } from './db'; +import { AggregationCursor, CommandCursor, Cursor } from './cursor'; import { Collection } from './collection'; -import { ReadPreference } from './read_preference'; -import { Logger } from './logger'; +import { Db } from './db'; import { GridFSBucket } from './gridfs-stream'; +import { Instrumentation } from './apm'; +import { Logger } from './logger'; +import { MongoClient } from './mongo_client'; +import { PromiseProvider } from './promise_provider'; +import { ReadPreference } from './read_preference'; import type { Callback } from './utils'; // Set up the instrumentation method diff --git a/src/logger.ts b/src/logger.ts index 648b575a6e8..79abd26a105 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -1,5 +1,5 @@ -import { format as f } from 'util'; import { MongoError } from './error'; +import { format as f } from 'util'; // Filters for classes const classFilters: any = {}; diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 88b4e6a9765..9e94d4c7a07 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -1,27 +1,27 @@ +import { AnyError, MongoError } from './error'; +import { BSONSerializeOptions, Document, resolveBSONOptions } from './bson'; +import { Callback, MongoDBNamespace, maybePromise } from './utils'; +import { ChangeStream, ChangeStreamOptions } from './change_stream'; import { Db, DbOptions } from './db'; import { EventEmitter } from 'events'; -import { ChangeStream, ChangeStreamOptions } from './change_stream'; +import { Logger } from './logger'; +import { PromiseProvider } from './promise_provider'; +import { ReadConcern, ReadConcernLevelLike, ReadConcernLike } from './read_concern'; import { ReadPreference, ReadPreferenceMode } from './read_preference'; -import { MongoError, AnyError } from './error'; import { WriteConcern, WriteConcernOptions } from './write_concern'; -import { maybePromise, MongoDBNamespace, Callback } from './utils'; -import { deprecate } from 'util'; import { connect, validOptions } from './operations/connect'; -import { PromiseProvider } from './promise_provider'; -import { Logger } from './logger'; -import { ReadConcern, ReadConcernLevelLike, ReadConcernLike } from './read_concern'; -import { BSONSerializeOptions, Document, resolveBSONOptions } from './bson'; -import type { AutoEncryptionOptions } from './deps'; -import type { CompressorName } from './cmap/wire_protocol/compression'; +import { deprecate } from 'util'; +import { parseOptions } from './connection_string'; import type { AuthMechanism } from './cmap/auth/defaultAuthProviders'; -import type { Topology } from './sdam/topology'; +import type { AutoEncryptionOptions } from './deps'; import type { ClientSession, ClientSessionOptions } from './sessions'; -import type { OperationParent } from './operations/command'; -import type { TagSet } from './sdam/server_description'; -import type { ConnectionOptions as TLSConnectionOptions } from 'tls'; +import type { CompressorName } from './cmap/wire_protocol/compression'; import type { TcpSocketConnectOpts as ConnectionOptions } from 'net'; import type { MongoCredentials } from './cmap/auth/mongo_credentials'; -import { parseOptions } from './connection_string'; +import type { OperationParent } from './operations/command'; +import type { ConnectionOptions as TLSConnectionOptions } from 'tls'; +import type { TagSet } from './sdam/server_description'; +import type { Topology } from './sdam/topology'; /** @public */ export enum LogLevel { diff --git a/src/operations/add_user.ts b/src/operations/add_user.ts index 95a84cd47cc..7c16d63ffcc 100644 --- a/src/operations/add_user.ts +++ b/src/operations/add_user.ts @@ -1,11 +1,11 @@ import * as crypto from 'crypto'; import { Aspect, defineAspects } from './operation'; +import { Callback, getTopology } from '../utils'; import { CommandOperation, CommandOperationOptions } from './command'; import { MongoError } from '../error'; -import { Callback, getTopology } from '../utils'; +import type { Db } from '../db'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Db } from '../db'; /** @public */ export interface AddUserOptions extends CommandOperationOptions { diff --git a/src/operations/aggregate.ts b/src/operations/aggregate.ts index a8fee700ba8..1d56d1ac9c2 100644 --- a/src/operations/aggregate.ts +++ b/src/operations/aggregate.ts @@ -1,12 +1,12 @@ +import { Aspect, Hint, defineAspects } from './operation'; import { CommandOperation, CommandOperationOptions, OperationParent } from './command'; -import { ReadPreference } from '../read_preference'; import { MongoError } from '../error'; +import { ReadPreference } from '../read_preference'; import { maxWireVersion } from '../utils'; -import { Aspect, defineAspects, Hint } from './operation'; import type { Callback } from '../utils'; +import type { CollationOptions } from '../cmap/wire_protocol/write_command'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { CollationOptions } from '../cmap/wire_protocol/write_command'; /** @internal */ export const DB_AGGREGATE_COLLECTION = 1 as const; diff --git a/src/operations/bulk_write.ts b/src/operations/bulk_write.ts index e2c829fbbe0..47d63f4d205 100644 --- a/src/operations/bulk_write.ts +++ b/src/operations/bulk_write.ts @@ -1,12 +1,12 @@ -import { applyRetryableWrites, Callback } from '../utils'; -import { Aspect, defineAspects, OperationBase } from './operation'; -import type { Collection } from '../collection'; +import { Aspect, OperationBase, defineAspects } from './operation'; +import { Callback, applyRetryableWrites } from '../utils'; import type { + AnyBulkWriteOperation, BulkOperationBase, - BulkWriteResult, BulkWriteOptions, - AnyBulkWriteOperation + BulkWriteResult } from '../bulk/common'; +import type { Collection } from '../collection'; import type { Server } from '../sdam/server'; /** @internal */ diff --git a/src/operations/command.ts b/src/operations/command.ts index 4b4aa99a795..2daa5d852b4 100644 --- a/src/operations/command.ts +++ b/src/operations/command.ts @@ -1,16 +1,16 @@ import { Aspect, OperationBase, OperationOptions } from './operation'; +import { Callback, MongoDBNamespace, decorateWithExplain, maxWireVersion } from '../utils'; +import { Explain, ExplainOptions } from '../explain'; +import { MongoError } from '../error'; import { ReadConcern } from '../read_concern'; import { WriteConcern, WriteConcernOptions } from '../write_concern'; -import { maxWireVersion, MongoDBNamespace, Callback, decorateWithExplain } from '../utils'; -import type { ReadPreference } from '../read_preference'; import { commandSupportsReadConcern } from '../sessions'; -import { MongoError } from '../error'; -import type { Logger } from '../logger'; -import type { Server } from '../sdam/server'; import type { BSONSerializeOptions, Document } from '../bson'; import type { CollationOptions } from '../cmap/wire_protocol/write_command'; +import type { Logger } from '../logger'; import type { ReadConcernLike } from './../read_concern'; -import { Explain, ExplainOptions } from '../explain'; +import type { ReadPreference } from '../read_preference'; +import type { Server } from '../sdam/server'; const SUPPORTS_WRITE_CONCERN_AND_COLLATION = 5; diff --git a/src/operations/common_functions.ts b/src/operations/common_functions.ts index 65dd379deee..5fc5a4f84cc 100644 --- a/src/operations/common_functions.ts +++ b/src/operations/common_functions.ts @@ -1,20 +1,20 @@ -import { MongoError } from '../error'; import { + Callback, applyRetryableWrites, decorateWithCollation, - Callback, getTopology, maxWireVersion } from '../utils'; -import type { Document } from '../bson'; -import type { Db } from '../db'; +import { MongoError } from '../error'; import type { ClientSession } from '../sessions'; -import type { Server } from '../sdam/server'; -import type { ReadPreference } from '../read_preference'; import type { Collection } from '../collection'; +import type { Db } from '../db'; +import type { DeleteOptions } from './delete'; +import type { Document } from '../bson'; +import type { ReadPreference } from '../read_preference'; +import type { Server } from '../sdam/server'; import type { UpdateOptions } from './update'; import type { WriteCommandOptions } from '../cmap/wire_protocol/write_command'; -import type { DeleteOptions } from './delete'; /** @internal */ export interface IndexInformationOptions { diff --git a/src/operations/connect.ts b/src/operations/connect.ts index 285c9670ae1..6d7065d8159 100644 --- a/src/operations/connect.ts +++ b/src/operations/connect.ts @@ -1,19 +1,19 @@ +import * as BSON from '../bson'; import * as fs from 'fs'; +import { AnyError, MongoError } from '../error'; +import { CMAP_EVENT_NAMES } from '../cmap/events'; +import { Callback, emitDeprecationWarning } from '../utils'; +import { Connection, ConnectionOptions } from '../cmap/connection'; import { Logger } from '../logger'; +import { MongoCredentials } from '../cmap/auth/mongo_credentials'; +import { ReadConcern } from '../read_concern'; import { ReadPreference } from '../read_preference'; -import { MongoError, AnyError } from '../error'; -import { Topology, TopologyOptions, ServerAddress } from '../sdam/topology'; +import { Server } from '../sdam/server'; +import { ServerAddress, Topology, TopologyOptions } from '../sdam/topology'; import { parseConnectionString } from '../connection_string'; -import { ReadConcern } from '../read_concern'; -import { emitDeprecationWarning, Callback } from '../utils'; -import { CMAP_EVENT_NAMES } from '../cmap/events'; -import { MongoCredentials } from '../cmap/auth/mongo_credentials'; -import * as BSON from '../bson'; +import type { AuthMechanism } from '../cmap/auth/defaultAuthProviders'; import type { Document } from '../bson'; import type { MongoClient } from '../mongo_client'; -import { ConnectionOptions, Connection } from '../cmap/connection'; -import type { AuthMechanism } from '../cmap/auth/defaultAuthProviders'; -import { Server } from '../sdam/server'; const VALID_AUTH_MECHANISMS = new Set([ 'DEFAULT', diff --git a/src/operations/count.ts b/src/operations/count.ts index 5e6468899ba..12d039392da 100644 --- a/src/operations/count.ts +++ b/src/operations/count.ts @@ -1,10 +1,10 @@ import { Aspect, defineAspects } from './operation'; +import { Callback, decorateWithCollation, decorateWithReadConcern } from '../utils'; import { CommandOperation, CommandOperationOptions } from './command'; -import { decorateWithCollation, decorateWithReadConcern, Callback } from '../utils'; -import type { Document } from '../bson'; -import type { Server } from '../sdam/server'; import type { Collection } from '../collection'; import type { Cursor } from '../cursor/cursor'; +import type { Document } from '../bson'; +import type { Server } from '../sdam/server'; /** @public */ export interface CountOptions extends CommandOperationOptions { diff --git a/src/operations/count_documents.ts b/src/operations/count_documents.ts index 5b8d8f08c0e..f634fdc61e8 100644 --- a/src/operations/count_documents.ts +++ b/src/operations/count_documents.ts @@ -1,8 +1,8 @@ import { AggregateOperation, AggregateOptions } from './aggregate'; import type { Callback } from '../utils'; +import type { Collection } from '../collection'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; /** @public */ export interface CountDocumentsOptions extends AggregateOptions { diff --git a/src/operations/create_collection.ts b/src/operations/create_collection.ts index 4c5962dd5f9..b97c4e17897 100644 --- a/src/operations/create_collection.ts +++ b/src/operations/create_collection.ts @@ -1,11 +1,11 @@ -import { CommandOperation, CommandOperationOptions } from './command'; import { Aspect, defineAspects } from './operation'; +import { CommandOperation, CommandOperationOptions } from './command'; import { loadCollection } from '../dynamic_loaders'; import type { Callback } from '../utils'; -import type { Document } from '../bson'; -import type { Server } from '../sdam/server'; import type { Db } from '../db'; +import type { Document } from '../bson'; import type { PkFactory } from '../mongo_client'; +import type { Server } from '../sdam/server'; // eslint-disable-next-line import type { Collection } from '../collection'; diff --git a/src/operations/delete.ts b/src/operations/delete.ts index 27e71cfc488..245ffd55dae 100644 --- a/src/operations/delete.ts +++ b/src/operations/delete.ts @@ -1,13 +1,13 @@ -import { defineAspects, Aspect, OperationBase, Hint } from './operation'; -import { removeDocuments } from './common_functions'; +import { Aspect, Hint, OperationBase, defineAspects } from './operation'; import { CommandOperation, CommandOperationOptions } from './command'; import { isObject } from 'util'; +import { removeDocuments } from './common_functions'; import type { Callback, MongoDBNamespace } from '../utils'; +import type { Collection } from '../collection'; +import type { Connection } from '../cmap/connection'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; import type { WriteCommandOptions } from '../cmap/wire_protocol/write_command'; -import type { Connection } from '../cmap/connection'; /** @public */ export interface DeleteOptions extends CommandOperationOptions { diff --git a/src/operations/distinct.ts b/src/operations/distinct.ts index 93d996481a6..e32334d73ce 100644 --- a/src/operations/distinct.ts +++ b/src/operations/distinct.ts @@ -1,10 +1,10 @@ import { Aspect, defineAspects } from './operation'; +import { Callback, decorateWithCollation, decorateWithReadConcern, maxWireVersion } from '../utils'; import { CommandOperation, CommandOperationOptions } from './command'; -import { decorateWithCollation, decorateWithReadConcern, Callback, maxWireVersion } from '../utils'; +import { MongoError } from '../error'; +import type { Collection } from '../collection'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; -import { MongoError } from '../error'; /** @public */ export type DistinctOptions = CommandOperationOptions; diff --git a/src/operations/drop.ts b/src/operations/drop.ts index 919f0c93c1d..6282bbe1ce9 100644 --- a/src/operations/drop.ts +++ b/src/operations/drop.ts @@ -1,8 +1,8 @@ import { Aspect, defineAspects } from './operation'; import { CommandOperation, CommandOperationOptions } from './command'; import type { Callback } from '../utils'; -import type { Server } from '../sdam/server'; import type { Db } from '../db'; +import type { Server } from '../sdam/server'; /** @public */ export type DropCollectionOptions = CommandOperationOptions; diff --git a/src/operations/estimated_document_count.ts b/src/operations/estimated_document_count.ts index fc30fa37c60..429df5a3477 100644 --- a/src/operations/estimated_document_count.ts +++ b/src/operations/estimated_document_count.ts @@ -1,9 +1,9 @@ -import { Aspect, defineAspects, Hint } from './operation'; +import { Aspect, Hint, defineAspects } from './operation'; import { CommandOperation, CommandOperationOptions } from './command'; import type { Callback } from '../utils'; +import type { Collection } from '../collection'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; /** @public */ export interface EstimatedDocumentCountOptions extends CommandOperationOptions { diff --git a/src/operations/eval.ts b/src/operations/eval.ts index 9e7b1e1a035..057f578e6dc 100644 --- a/src/operations/eval.ts +++ b/src/operations/eval.ts @@ -1,11 +1,11 @@ -import { CommandOperation, CommandOperationOptions } from './command'; import { Code, Document } from '../bson'; -import { ReadPreference } from '../read_preference'; +import { CommandOperation, CommandOperationOptions } from './command'; import { MongoError } from '../error'; +import { ReadPreference } from '../read_preference'; import type { Callback } from '../utils'; -import type { Server } from '../sdam/server'; -import type { Db } from '../db'; import type { Collection } from '..'; +import type { Db } from '../db'; +import type { Server } from '../sdam/server'; /** @public */ export interface EvalOptions extends CommandOperationOptions { diff --git a/src/operations/execute_operation.ts b/src/operations/execute_operation.ts index 50f60b50f80..8a9c44ce577 100644 --- a/src/operations/execute_operation.ts +++ b/src/operations/execute_operation.ts @@ -1,11 +1,11 @@ -import { ReadPreference } from '../read_preference'; -import { MongoError, isRetryableError, AnyError } from '../error'; +import { AnyError, MongoError, isRetryableError } from '../error'; import { Aspect, OperationBase, OperationOptions } from './operation'; -import { maxWireVersion, maybePromise, Callback } from '../utils'; +import { Callback, maxWireVersion, maybePromise } from '../utils'; +import { ReadPreference } from '../read_preference'; import { ServerType } from '../sdam/common'; +import type { ClientSession } from '../sessions'; import type { Server } from '../sdam/server'; import type { Topology } from '../sdam/topology'; -import type { ClientSession } from '../sessions'; const MMAPv1_RETRY_WRITES_ERROR_CODE = 20; const MMAPv1_RETRY_WRITES_ERROR_MESSAGE = diff --git a/src/operations/find.ts b/src/operations/find.ts index f2b968ae0a5..da70cecdc22 100644 --- a/src/operations/find.ts +++ b/src/operations/find.ts @@ -1,13 +1,13 @@ -import { Aspect, defineAspects, Hint } from './operation'; -import { maxWireVersion, MongoDBNamespace, Callback, normalizeHintField } from '../utils'; +import { Aspect, Hint, defineAspects } from './operation'; +import { Callback, MongoDBNamespace, maxWireVersion, normalizeHintField } from '../utils'; +import { CommandOperation, CommandOperationOptions } from './command'; import { MongoError } from '../error'; -import type { Document } from '../bson'; -import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; +import { Sort, formatSort } from '../sort'; import type { CollationOptions } from '../cmap/wire_protocol/write_command'; +import type { Collection } from '../collection'; +import type { Document } from '../bson'; import type { QueryOptions } from '../cmap/wire_protocol/query'; -import { CommandOperation, CommandOperationOptions } from './command'; -import { Sort, formatSort } from '../sort'; +import type { Server } from '../sdam/server'; /** @public */ export interface FindOptions extends QueryOptions, CommandOperationOptions { diff --git a/src/operations/find_and_modify.ts b/src/operations/find_and_modify.ts index 37356f476cf..b22ffa1095d 100644 --- a/src/operations/find_and_modify.ts +++ b/src/operations/find_and_modify.ts @@ -1,18 +1,18 @@ -import { ReadPreference } from '../read_preference'; +import { Aspect, defineAspects } from './operation'; import { - maxWireVersion, + Callback, applyRetryableWrites, decorateWithCollation, hasAtomicOperators, - Callback + maxWireVersion } from '../utils'; -import { MongoError } from '../error'; import { CommandOperation, CommandOperationOptions } from './command'; -import { defineAspects, Aspect } from './operation'; +import { MongoError } from '../error'; +import { ReadPreference } from '../read_preference'; +import { Sort, formatSort } from '../sort'; +import type { Collection } from '../collection'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; -import { Sort, formatSort } from '../sort'; /** @public */ export interface FindAndModifyOptions extends CommandOperationOptions { diff --git a/src/operations/find_one.ts b/src/operations/find_one.ts index 047d08458f7..30820a7c8c3 100644 --- a/src/operations/find_one.ts +++ b/src/operations/find_one.ts @@ -1,11 +1,11 @@ +import { Aspect, defineAspects } from './operation'; +import { CommandOperation } from './command'; +import { MongoError } from '../error'; import type { Callback } from '../utils'; -import type { Document } from '../bson'; import type { Collection } from '../collection'; +import type { Document } from '../bson'; import type { FindOptions } from './find'; -import { MongoError } from '../error'; import type { Server } from '../sdam/server'; -import { CommandOperation } from './command'; -import { Aspect, defineAspects } from './operation'; /** @internal */ export class FindOneOperation extends CommandOperation { diff --git a/src/operations/indexes.ts b/src/operations/indexes.ts index a57c5548ac6..e04ebd40230 100644 --- a/src/operations/indexes.ts +++ b/src/operations/indexes.ts @@ -1,15 +1,15 @@ -import { indexInformation, IndexInformationOptions } from './common_functions'; -import { OperationBase, Aspect, defineAspects } from './operation'; -import { MongoError } from '../error'; -import { maxWireVersion, parseIndexOptions, MongoDBNamespace, Callback } from '../utils'; +import { Aspect, OperationBase, defineAspects } from './operation'; +import { Callback, MongoDBNamespace, maxWireVersion, parseIndexOptions } from '../utils'; import { CommandOperation, CommandOperationOptions, OperationParent } from './command'; +import { IndexInformationOptions, indexInformation } from './common_functions'; +import { MongoError } from '../error'; import { ReadPreference } from '../read_preference'; -import type { Server } from '../sdam/server'; -import type { Document } from '../bson'; +import type { CollationOptions } from '../cmap/wire_protocol/write_command'; import type { Collection } from '../collection'; import type { Db } from '../db'; -import type { CollationOptions } from '../cmap/wire_protocol/write_command'; +import type { Document } from '../bson'; import type { FindOptions } from './find'; +import type { Server } from '../sdam/server'; const LIST_INDEXES_WIRE_VERSION = 3; const VALID_INDEX_OPTIONS = new Set([ diff --git a/src/operations/insert.ts b/src/operations/insert.ts index 0fad3ec5fda..e667a4d12b5 100644 --- a/src/operations/insert.ts +++ b/src/operations/insert.ts @@ -1,14 +1,14 @@ -import { MongoError } from '../error'; -import { defineAspects, Aspect, OperationBase } from './operation'; +import { Aspect, OperationBase, defineAspects } from './operation'; +import { Callback, MongoDBNamespace, applyRetryableWrites } from '../utils'; import { CommandOperation } from './command'; -import { applyRetryableWrites, Callback, MongoDBNamespace } from '../utils'; +import { MongoError } from '../error'; import { prepareDocs } from './common_functions'; -import type { Server } from '../sdam/server'; +import type { BSONSerializeOptions, Document, ObjectId } from '../bson'; +import type { BulkWriteOptions } from '../bulk/common'; import type { Collection } from '../collection'; -import type { WriteCommandOptions } from '../cmap/wire_protocol/write_command'; -import type { ObjectId, Document, BSONSerializeOptions } from '../bson'; import type { Connection } from '../cmap/connection'; -import type { BulkWriteOptions } from '../bulk/common'; +import type { Server } from '../sdam/server'; +import type { WriteCommandOptions } from '../cmap/wire_protocol/write_command'; import type { WriteConcernOptions } from '../write_concern'; /** @internal */ diff --git a/src/operations/insert_many.ts b/src/operations/insert_many.ts index b9ec116efe0..908312b8ebe 100644 --- a/src/operations/insert_many.ts +++ b/src/operations/insert_many.ts @@ -1,11 +1,11 @@ -import { Aspect, defineAspects, OperationBase } from './operation'; +import { Aspect, OperationBase, defineAspects } from './operation'; import { BulkWriteOperation } from './bulk_write'; import { MongoError } from '../error'; import { prepareDocs } from './common_functions'; +import type { BulkWriteOptions, BulkWriteResult } from '../bulk/common'; import type { Callback } from '../utils'; import type { Collection } from '../collection'; -import type { ObjectId, Document } from '../bson'; -import type { BulkWriteResult, BulkWriteOptions } from '../bulk/common'; +import type { Document, ObjectId } from '../bson'; import type { Server } from '../sdam/server'; /** @public */ diff --git a/src/operations/is_capped.ts b/src/operations/is_capped.ts index 11b1f0bd2ea..07a28eab370 100644 --- a/src/operations/is_capped.ts +++ b/src/operations/is_capped.ts @@ -1,8 +1,8 @@ +import { MongoError } from '..'; +import { OperationBase, OperationOptions } from './operation'; import type { Callback } from '../utils'; import type { Collection } from '../collection'; -import { OperationOptions, OperationBase } from './operation'; import type { Server } from '../sdam/server'; -import { MongoError } from '..'; /** @internal */ export class IsCappedOperation extends OperationBase { diff --git a/src/operations/list_collections.ts b/src/operations/list_collections.ts index 2900eaa0838..5ac8f798878 100644 --- a/src/operations/list_collections.ts +++ b/src/operations/list_collections.ts @@ -1,11 +1,11 @@ -import { CommandOperation, CommandOperationOptions } from './command'; -import { Aspect, defineAspects } from './operation'; -import { maxWireVersion, Callback } from '../utils'; import * as CONSTANTS from '../constants'; -import type { Document } from '../bson'; -import type { Server } from '../sdam/server'; +import { Aspect, defineAspects } from './operation'; +import { Callback, maxWireVersion } from '../utils'; +import { CommandOperation, CommandOperationOptions } from './command'; import type { Db } from '../db'; +import type { Document } from '../bson'; import type { DocumentTransforms } from '../cursor/cursor'; +import type { Server } from '../sdam/server'; const LIST_COLLECTIONS_WIRE_VERSION = 3; diff --git a/src/operations/list_databases.ts b/src/operations/list_databases.ts index de24459f7bc..4278068a2e5 100644 --- a/src/operations/list_databases.ts +++ b/src/operations/list_databases.ts @@ -1,9 +1,9 @@ -import { CommandOperation, CommandOperationOptions } from './command'; import { Aspect, defineAspects } from './operation'; -import { MongoDBNamespace, Callback } from '../utils'; +import { Callback, MongoDBNamespace } from '../utils'; +import { CommandOperation, CommandOperationOptions } from './command'; +import type { Db } from '../db'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Db } from '../db'; /** @public */ export type ListDatabasesResult = string[] | Document[]; diff --git a/src/operations/map_reduce.ts b/src/operations/map_reduce.ts index c6d36cfc8f0..e6aa7fb8bd5 100644 --- a/src/operations/map_reduce.ts +++ b/src/operations/map_reduce.ts @@ -1,21 +1,21 @@ -import { Code, Document } from '../bson'; -import { loadDb } from '../dynamic_loaders'; +import { Aspect, defineAspects } from './operation'; import { + Callback, applyWriteConcern, decorateWithCollation, decorateWithReadConcern, isObject, - Callback, maxWireVersion } from '../utils'; -import { ReadPreference, ReadPreferenceMode } from '../read_preference'; +import { Code, Document } from '../bson'; import { CommandOperation, CommandOperationOptions } from './command'; -import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; -import type { Sort } from '../sort'; import { MongoError } from '../error'; +import { ReadPreference, ReadPreferenceMode } from '../read_preference'; +import { loadDb } from '../dynamic_loaders'; +import type { Collection } from '../collection'; import type { ObjectId } from '../bson'; -import { Aspect, defineAspects } from './operation'; +import type { Server } from '../sdam/server'; +import type { Sort } from '../sort'; const exclusionList = [ 'explain', diff --git a/src/operations/operation.ts b/src/operations/operation.ts index b4a18859aea..fdc58af5431 100644 --- a/src/operations/operation.ts +++ b/src/operations/operation.ts @@ -1,7 +1,7 @@ +import { BSONSerializeOptions, Document, resolveBSONOptions } from '../bson'; import { ReadPreference, ReadPreferenceLike } from '../read_preference'; +import type { Callback, MongoDBNamespace } from '../utils'; import type { ClientSession } from '../sessions'; -import { Document, BSONSerializeOptions, resolveBSONOptions } from '../bson'; -import type { MongoDBNamespace, Callback } from '../utils'; import type { Server } from '../sdam/server'; export const Aspect = { diff --git a/src/operations/options_operation.ts b/src/operations/options_operation.ts index b33c7899303..9ea1aeee552 100644 --- a/src/operations/options_operation.ts +++ b/src/operations/options_operation.ts @@ -1,8 +1,8 @@ -import { OperationBase, OperationOptions } from './operation'; import { MongoError } from '../error'; +import { OperationBase, OperationOptions } from './operation'; import type { Callback } from '../utils'; -import type { Document } from '../bson'; import type { Collection } from '../collection'; +import type { Document } from '../bson'; import type { Server } from '../sdam/server'; /** @internal */ diff --git a/src/operations/profiling_level.ts b/src/operations/profiling_level.ts index 51a751180ee..8bc2a6bd5ed 100644 --- a/src/operations/profiling_level.ts +++ b/src/operations/profiling_level.ts @@ -1,7 +1,7 @@ import { CommandOperation, CommandOperationOptions } from './command'; import type { Callback } from '../utils'; -import type { Server } from '../sdam/server'; import type { Db } from '../db'; +import type { Server } from '../sdam/server'; /** @public */ export type ProfilingLevelOptions = CommandOperationOptions; diff --git a/src/operations/remove_user.ts b/src/operations/remove_user.ts index bfa25b0321a..ecaca662452 100644 --- a/src/operations/remove_user.ts +++ b/src/operations/remove_user.ts @@ -1,8 +1,8 @@ import { Aspect, defineAspects } from './operation'; import { CommandOperation, CommandOperationOptions } from './command'; import type { Callback } from '../utils'; -import type { Server } from '../sdam/server'; import type { Db } from '../db'; +import type { Server } from '../sdam/server'; /** @public */ export type RemoveUserOptions = CommandOperationOptions; diff --git a/src/operations/rename.ts b/src/operations/rename.ts index 19d28d35303..523790f4679 100644 --- a/src/operations/rename.ts +++ b/src/operations/rename.ts @@ -1,11 +1,11 @@ -import { checkCollectionName, Callback } from '../utils'; -import { loadCollection } from '../dynamic_loaders'; +import { Aspect, defineAspects } from './operation'; +import { Callback, checkCollectionName } from '../utils'; +import { MongoError } from '../error'; import { RunAdminCommandOperation } from './run_command'; -import { defineAspects, Aspect } from './operation'; -import type { Server } from '../sdam/server'; +import { loadCollection } from '../dynamic_loaders'; import type { Collection } from '../collection'; import type { CommandOperationOptions } from './command'; -import { MongoError } from '../error'; +import type { Server } from '../sdam/server'; /** @public */ export interface RenameOptions extends CommandOperationOptions { diff --git a/src/operations/replace_one.ts b/src/operations/replace_one.ts index d27e02f151e..5cbba0bbd08 100644 --- a/src/operations/replace_one.ts +++ b/src/operations/replace_one.ts @@ -1,11 +1,11 @@ -import { defineAspects, Aspect } from './operation'; -import { updateDocuments } from './common_functions'; -import { hasAtomicOperators, Callback } from '../utils'; +import { Aspect, defineAspects } from './operation'; +import { Callback, hasAtomicOperators } from '../utils'; import { CommandOperation, CommandOperationOptions } from './command'; +import { updateDocuments } from './common_functions'; +import type { CollationOptions } from '../cmap/wire_protocol/write_command'; +import type { Collection } from '../collection'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; -import type { CollationOptions } from '../cmap/wire_protocol/write_command'; import type { UpdateResult } from './update'; /** @public */ diff --git a/src/operations/run_command.ts b/src/operations/run_command.ts index 27ed443f81d..c66ea89e6a1 100644 --- a/src/operations/run_command.ts +++ b/src/operations/run_command.ts @@ -1,7 +1,7 @@ +import { Callback, MongoDBNamespace } from '../utils'; import { CommandOperation, CommandOperationOptions, OperationParent } from './command'; -import { MongoDBNamespace, Callback } from '../utils'; -import type { Server } from '../sdam/server'; import type { Document } from '../bson'; +import type { Server } from '../sdam/server'; /** @public */ export type RunCommandOptions = CommandOperationOptions; diff --git a/src/operations/set_profiling_level.ts b/src/operations/set_profiling_level.ts index 6eb9422863c..b87ef79afb7 100644 --- a/src/operations/set_profiling_level.ts +++ b/src/operations/set_profiling_level.ts @@ -1,7 +1,7 @@ import { CommandOperation, CommandOperationOptions } from './command'; import type { Callback } from '../utils'; -import type { Server } from '../sdam/server'; import type { Db } from '../db'; +import type { Server } from '../sdam/server'; const levelValues = new Set(['off', 'slow_only', 'all']); /** @public */ diff --git a/src/operations/stats.ts b/src/operations/stats.ts index 96cfe980977..10bfb6dbab3 100644 --- a/src/operations/stats.ts +++ b/src/operations/stats.ts @@ -1,9 +1,9 @@ import { Aspect, defineAspects } from './operation'; import { CommandOperation, CommandOperationOptions } from './command'; import type { Callback } from '../utils'; +import type { Collection } from '../collection'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; /** @public */ export interface CollStatsOptions extends CommandOperationOptions { diff --git a/src/operations/update.ts b/src/operations/update.ts index 35c8664e5c6..b5a45b5dd9f 100644 --- a/src/operations/update.ts +++ b/src/operations/update.ts @@ -1,11 +1,11 @@ -import { defineAspects, Aspect, OperationBase } from './operation'; -import { updateDocuments } from './common_functions'; -import { hasAtomicOperators, MongoDBNamespace, Callback } from '../utils'; +import { Aspect, OperationBase, defineAspects } from './operation'; +import { Callback, MongoDBNamespace, hasAtomicOperators } from '../utils'; import { CommandOperation, CommandOperationOptions } from './command'; -import type { Server } from '../sdam/server'; -import type { Collection } from '../collection'; +import { updateDocuments } from './common_functions'; import type { CollationOptions, WriteCommandOptions } from '../cmap/wire_protocol/write_command'; -import type { ObjectId, Document } from '../bson'; +import type { Collection } from '../collection'; +import type { Document, ObjectId } from '../bson'; +import type { Server } from '../sdam/server'; /** @public */ export interface UpdateOptions extends CommandOperationOptions { diff --git a/src/operations/validate_collection.ts b/src/operations/validate_collection.ts index 92b60027e76..7f4efdf1462 100644 --- a/src/operations/validate_collection.ts +++ b/src/operations/validate_collection.ts @@ -1,8 +1,8 @@ import { CommandOperation, CommandOperationOptions } from './command'; +import type { Admin } from '../admin'; import type { Callback } from '../utils'; import type { Document } from '../bson'; import type { Server } from '../sdam/server'; -import type { Admin } from '../admin'; /** @public */ export interface ValidateCollectionOptions extends CommandOperationOptions { diff --git a/src/read_preference.ts b/src/read_preference.ts index 7d885f28565..61e9a11bfa2 100644 --- a/src/read_preference.ts +++ b/src/read_preference.ts @@ -1,6 +1,6 @@ -import type { TagSet } from './sdam/server_description'; -import type { Document } from './bson'; import type { ClientSession } from './sessions'; +import type { Document } from './bson'; +import type { TagSet } from './sdam/server_description'; /** @public */ export type ReadPreferenceLike = diff --git a/src/sdam/common.ts b/src/sdam/common.ts index 7dbf552c6d9..cf76876dab2 100644 --- a/src/sdam/common.ts +++ b/src/sdam/common.ts @@ -1,6 +1,6 @@ -import type { Timestamp, Binary, Long } from '../bson'; -import type { Topology } from './topology'; +import type { Binary, Long, Timestamp } from '../bson'; import type { ClientSession } from '../sessions'; +import type { Topology } from './topology'; // shared state names export const STATE_CLOSING = 'closing'; diff --git a/src/sdam/events.ts b/src/sdam/events.ts index 69475cc33f9..aea3accfa2c 100644 --- a/src/sdam/events.ts +++ b/src/sdam/events.ts @@ -1,6 +1,6 @@ +import type { Document } from '../bson'; import type { ServerDescription } from './server_description'; import type { TopologyDescription } from './topology_description'; -import type { Document } from '../bson'; /** * Emitted when server description changes, but does NOT include changes to the RTT. diff --git a/src/sdam/monitor.ts b/src/sdam/monitor.ts index 88e50877b54..f40c68e55ef 100644 --- a/src/sdam/monitor.ts +++ b/src/sdam/monitor.ts @@ -1,25 +1,25 @@ -import { ServerType, STATE_CLOSED, STATE_CLOSING } from './common'; -import { - now, - makeStateMachine, - calculateDurationInMs, - makeInterruptableAsyncInterval -} from '../utils'; -import { EventEmitter } from 'events'; -import { connect } from '../cmap/connect'; +import { AnyError, MongoNetworkError } from '../error'; import { Connection } from '../cmap/connection'; -import { MongoNetworkError, AnyError } from '../error'; -import { Long, Document } from '../bson'; +import { Document, Long } from '../bson'; +import { EventEmitter } from 'events'; +import { STATE_CLOSED, STATE_CLOSING, ServerType } from './common'; import { + ServerHeartbeatFailedEvent, ServerHeartbeatStartedEvent, - ServerHeartbeatSucceededEvent, - ServerHeartbeatFailedEvent + ServerHeartbeatSucceededEvent } from './events'; +import { + calculateDurationInMs, + makeInterruptableAsyncInterval, + makeStateMachine, + now +} from '../utils'; +import { connect } from '../cmap/connect'; import { Server } from './server'; -import type { InterruptableAsyncInterval, Callback } from '../utils'; -import type { TopologyVersion } from './server_description'; +import type { Callback, InterruptableAsyncInterval } from '../utils'; import type { ConnectionOptions } from '../cmap/connection'; +import type { TopologyVersion } from './server_description'; const kServer = Symbol('server'); const kMonitorId = Symbol('monitorId'); diff --git a/src/sdam/server.ts b/src/sdam/server.ts index 5e63ca351b1..f57f1dd4d74 100644 --- a/src/sdam/server.ts +++ b/src/sdam/server.ts @@ -1,50 +1,50 @@ -import { EventEmitter } from 'events'; -import { Logger } from '../logger'; -import { ReadPreference } from '../read_preference'; -import { ConnectionPool, ConnectionPoolOptions } from '../cmap/connection_pool'; import { CMAP_EVENT_NAMES } from '../cmap/events'; -import { ServerDescription, compareTopologyVersion } from './server_description'; -import { Monitor } from './monitor'; -import { isTransactionCommand } from '../transactions'; import { - relayEvents, + Callback, + CallbackWithType, + ClientMetadataOptions, collationNotSupported, debugOptions, makeStateMachine, maxWireVersion, - ClientMetadataOptions, - Callback, - CallbackWithType + relayEvents } from '../utils'; import { - ServerType, + ClusterTime, STATE_CLOSED, STATE_CLOSING, - STATE_CONNECTING, STATE_CONNECTED, - ClusterTime + STATE_CONNECTING, + ServerType } from './common'; +import { Connection, DestroyOptions } from '../cmap/connection'; +import { ConnectionPool, ConnectionPoolOptions } from '../cmap/connection_pool'; +import { EventEmitter } from 'events'; +import { Logger } from '../logger'; import { MongoError, MongoNetworkError, MongoNetworkTimeoutError, - isSDAMUnrecoverableError, - isRetryableWriteError, + isNetworkErrorBeforeHandshake, isNodeShuttingDownError, - isNetworkErrorBeforeHandshake + isRetryableWriteError, + isSDAMUnrecoverableError } from '../error'; -import { Connection, DestroyOptions } from '../cmap/connection'; -import type { Topology } from './topology'; -import type { MongoCredentials } from '../cmap/auth/mongo_credentials'; -import type { ServerHeartbeatSucceededEvent } from './events'; +import { Monitor } from './monitor'; +import { ReadPreference } from '../read_preference'; +import { ServerDescription, compareTopologyVersion } from './server_description'; +import { isTransactionCommand } from '../transactions'; +import type { AutoEncrypter } from '../deps'; import type { ClientSession } from '../sessions'; import type { CommandOptions } from '../cmap/wire_protocol/command'; -import type { QueryOptions } from '../cmap/wire_protocol/query'; -import type { GetMoreOptions } from '../cmap/wire_protocol/get_more'; -import type { WriteCommandOptions } from '../cmap/wire_protocol/write_command'; import type { Document, Long } from '../bson'; -import type { AutoEncrypter } from '../deps'; import type { FindOptions } from '../operations/find'; +import type { GetMoreOptions } from '../cmap/wire_protocol/get_more'; +import type { MongoCredentials } from '../cmap/auth/mongo_credentials'; +import type { QueryOptions } from '../cmap/wire_protocol/query'; +import type { ServerHeartbeatSucceededEvent } from './events'; +import type { Topology } from './topology'; +import type { WriteCommandOptions } from '../cmap/wire_protocol/write_command'; // Used for filtering out fields for logging const DEBUG_FIELDS = [ diff --git a/src/sdam/server_description.ts b/src/sdam/server_description.ts index 00d18c6e90c..db081ba8fec 100644 --- a/src/sdam/server_description.ts +++ b/src/sdam/server_description.ts @@ -1,8 +1,8 @@ -import { arrayStrictEqual, errorStrictEqual } from '../utils'; import { ServerType } from './common'; +import { arrayStrictEqual, errorStrictEqual } from '../utils'; import { now } from '../utils'; -import type { ObjectId, Long, Document } from '../bson'; import type { ClusterTime } from './common'; +import type { Document, Long, ObjectId } from '../bson'; const WRITABLE_SERVER_TYPES = new Set([ ServerType.RSPrimary, diff --git a/src/sdam/server_selection.ts b/src/sdam/server_selection.ts index 7589eabe082..9f31a19f2cc 100644 --- a/src/sdam/server_selection.ts +++ b/src/sdam/server_selection.ts @@ -1,8 +1,8 @@ -import { ServerType, TopologyType } from './common'; -import { ReadPreference } from '../read_preference'; import { MongoError } from '../error'; -import type { TopologyDescription } from './topology_description'; +import { ReadPreference } from '../read_preference'; +import { ServerType, TopologyType } from './common'; import type { ServerDescription, TagSet } from './server_description'; +import type { TopologyDescription } from './topology_description'; // max staleness constants const IDLE_WRITE_PERIOD = 10000; diff --git a/src/sdam/srv_polling.ts b/src/sdam/srv_polling.ts index 072b45fb436..82fe6aa10ba 100644 --- a/src/sdam/srv_polling.ts +++ b/src/sdam/srv_polling.ts @@ -1,6 +1,6 @@ import * as dns from 'dns'; -import { Logger, LoggerOptions } from '../logger'; import { EventEmitter } from 'events'; +import { Logger, LoggerOptions } from '../logger'; /** * Determines whether a provided address matches the provided parent domain in order diff --git a/src/sdam/topology.ts b/src/sdam/topology.ts index cea8938cfd5..d208c808fea 100644 --- a/src/sdam/topology.ts +++ b/src/sdam/topology.ts @@ -1,62 +1,62 @@ import Denque = require('denque'); -import { EventEmitter } from 'events'; -import { ReadPreference, ReadPreferenceLike } from '../read_preference'; -import { ServerDescription } from './server_description'; -import { TopologyDescription } from './topology_description'; -import { Server, ServerOptions } from './server'; -import { Cursor } from '../cursor'; -import { - ClientSession, - ServerSessionPool, - ServerSessionId, - ClientSessionOptions -} from '../sessions'; -import { SrvPoller, SrvPollingEvent } from './srv_polling'; +import { AnyError, MongoError, MongoServerSelectionError } from '../error'; import { CMAP_EVENT_NAMES } from '../cmap/events'; -import { MongoError, MongoServerSelectionError, AnyError } from '../error'; -import { readPreferenceServerSelector, ServerSelector } from './server_selection'; -import { deprecate } from 'util'; import { - relayEvents, - makeStateMachine, - eachAsync, - makeClientMetadata, - emitDeprecatedOptionWarning, + Callback, ClientMetadata, MongoDBNamespace, - Callback + eachAsync, + emitDeprecatedOptionWarning, + makeClientMetadata, + makeStateMachine, + relayEvents } from '../utils'; import { - TopologyType, - ServerType, + ClientSession, + ClientSessionOptions, + ServerSessionId, + ServerSessionPool +} from '../sessions'; +import { ClusterTime, - TimerQueue, - resolveClusterTime, - drainTimerQueue, - clearAndRemoveTimerFrom, STATE_CLOSED, STATE_CLOSING, - STATE_CONNECTING, STATE_CONNECTED, - TOPOLOGY_DEFAULTS + STATE_CONNECTING, + ServerType, + TOPOLOGY_DEFAULTS, + TimerQueue, + TopologyType, + clearAndRemoveTimerFrom, + drainTimerQueue, + resolveClusterTime } from './common'; +import { Connection, DestroyOptions } from '../cmap/connection'; +import { Cursor } from '../cursor'; +import { EventEmitter } from 'events'; +import { ReadPreference, ReadPreferenceLike } from '../read_preference'; +import { RunCommandOperation } from '../operations/run_command'; +import { Server, ServerOptions } from './server'; import { - ServerOpeningEvent, ServerClosedEvent, ServerDescriptionChangedEvent, - TopologyOpeningEvent, + ServerOpeningEvent, TopologyClosedEvent, - TopologyDescriptionChangedEvent + TopologyDescriptionChangedEvent, + TopologyOpeningEvent } from './events'; -import type { Document, BSONSerializeOptions } from '../bson'; -import type { MongoCredentials } from '../cmap/auth/mongo_credentials'; -import type { Transaction } from '../transactions'; +import { ServerDescription } from './server_description'; +import { ServerSelector, readPreferenceServerSelector } from './server_selection'; +import { SrvPoller, SrvPollingEvent } from './srv_polling'; +import { TopologyDescription } from './topology_description'; +import { deprecate } from 'util'; +import type { BSONSerializeOptions, Document } from '../bson'; import type { CloseOptions } from '../cmap/connection_pool'; -import type { LoggerOptions } from '../logger'; -import { DestroyOptions, Connection } from '../cmap/connection'; -import { RunCommandOperation } from '../operations/run_command'; import type { CursorOptions } from '../cursor/cursor'; +import type { LoggerOptions } from '../logger'; import type { MongoClientOptions } from '../mongo_client'; +import type { MongoCredentials } from '../cmap/auth/mongo_credentials'; +import type { Transaction } from '../transactions'; // Global state let globalTopologyCounter = 0; diff --git a/src/sdam/topology_description.ts b/src/sdam/topology_description.ts index c74de7510fe..aac114b2de9 100644 --- a/src/sdam/topology_description.ts +++ b/src/sdam/topology_description.ts @@ -1,7 +1,7 @@ -import { ServerDescription } from './server_description'; import * as WIRE_CONSTANTS from '../cmap/wire_protocol/constants'; -import { TopologyType, ServerType } from './common'; -import type { ObjectId, Document } from '../bson'; +import { ServerDescription } from './server_description'; +import { ServerType, TopologyType } from './common'; +import type { Document, ObjectId } from '../bson'; import type { SrvPollingEvent } from './srv_polling'; // constants related to compatibility checks diff --git a/src/sessions.ts b/src/sessions.ts index ca89d82dc14..e4c8d65b893 100644 --- a/src/sessions.ts +++ b/src/sessions.ts @@ -1,26 +1,26 @@ -import { PromiseProvider } from './promise_provider'; -import { EventEmitter } from 'events'; -import { Binary, Long, Timestamp, Document } from './bson'; -import { ReadPreference } from './read_preference'; -import { isTransactionCommand, TxnState, Transaction, TransactionOptions } from './transactions'; -import { resolveClusterTime, ClusterTime } from './sdam/common'; -import { isSharded } from './cmap/wire_protocol/shared'; -import { MongoError, isRetryableError, MongoNetworkError, MongoWriteConcernError } from './error'; +import { Binary, Document, Long, Timestamp } from './bson'; import { - now, - calculateDurationInMs, Callback, + calculateDurationInMs, isPromiseLike, - uuidV4, maxWireVersion, - maybePromise + maybePromise, + now, + uuidV4 } from './utils'; -import type { Topology } from './sdam/topology'; -import type { MongoClientOptions } from './mongo_client'; +import { ClusterTime, resolveClusterTime } from './sdam/common'; +import { EventEmitter } from 'events'; +import { MongoError, MongoNetworkError, MongoWriteConcernError, isRetryableError } from './error'; +import { PromiseProvider } from './promise_provider'; +import { ReadPreference } from './read_preference'; +import { RunAdminCommandOperation } from './operations/run_command'; +import { Transaction, TransactionOptions, TxnState, isTransactionCommand } from './transactions'; +import { executeOperation } from './operations/execute_operation'; +import { isSharded } from './cmap/wire_protocol/shared'; import type { Cursor } from './cursor/cursor'; +import type { MongoClientOptions } from './mongo_client'; +import type { Topology } from './sdam/topology'; import type { WriteCommandOptions } from './cmap/wire_protocol/write_command'; -import { executeOperation } from './operations/execute_operation'; -import { RunAdminCommandOperation } from './operations/run_command'; const minWireVersionForShardedTransactions = 8; diff --git a/src/transactions.ts b/src/transactions.ts index 794edbd8f83..4ef7b85844c 100644 --- a/src/transactions.ts +++ b/src/transactions.ts @@ -1,10 +1,10 @@ -import { ReadPreference } from './read_preference'; import { MongoError } from './error'; import { ReadConcern } from './read_concern'; +import { ReadPreference } from './read_preference'; import { WriteConcern } from './write_concern'; -import type { Server } from './sdam/server'; import type { CommandOperationOptions } from './operations/command'; import type { Document } from './bson'; +import type { Server } from './sdam/server'; /** @internal */ export enum TxnState { diff --git a/src/utils.ts b/src/utils.ts index 0c146835ae7..551500af8cc 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,26 +1,26 @@ -import * as os from 'os'; import * as crypto from 'crypto'; +import * as os from 'os'; +import { AnyError, MongoError } from './error'; +import { Document, resolveBSONOptions } from './bson'; import { PromiseProvider } from './promise_provider'; -import { MongoError, AnyError } from './error'; -import { WriteConcern, WriteConcernOptions, W } from './write_concern'; -import type { Server } from './sdam/server'; -import type { Topology } from './sdam/topology'; -import type { EventEmitter } from 'events'; -import type { Db } from './db'; -import type { Collection } from './collection'; -import type { OperationOptions, OperationBase, Hint } from './operations/operation'; -import type { ClientSession } from './sessions'; import { ReadConcern } from './read_concern'; -import type { Connection } from './cmap/connection'; +import { ReadPreference } from './read_preference'; +import { W, WriteConcern, WriteConcernOptions } from './write_concern'; import { readFileSync } from 'fs'; import { resolve } from 'path'; -import { Document, resolveBSONOptions } from './bson'; -import type { IndexSpecification, IndexDirection } from './operations/indexes'; +import type { ClientSession } from './sessions'; +import type { Collection } from './collection'; +import type { CommandOperationOptions, OperationParent } from './operations/command'; +import type { Connection } from './cmap/connection'; +import type { Cursor } from './cursor/cursor'; +import type { Db } from './db'; +import type { EventEmitter } from 'events'; import type { Explain } from './explain'; +import type { Hint, OperationOptions } from './operations/operation'; +import type { IndexDirection, IndexSpecification } from './operations/indexes'; import type { MongoClient } from './mongo_client'; -import type { Cursor } from './cursor/cursor'; -import type { CommandOperationOptions, OperationParent } from './operations/command'; -import { ReadPreference } from './read_preference'; +import type { Server } from './sdam/server'; +import type { Topology } from './sdam/topology'; /** * MongoDB Driver style callback @@ -233,7 +233,7 @@ export function filterOptions(options: AnyOptions, names: string[]): AnyOptions * @param args - Arguments to apply the provided operation * @param options - Options that modify the behavior of the method */ -export function executeLegacyOperation( +export function executeLegacyOperation( topology: Topology, operation: (...args: any[]) => void | Promise, args: any[], @@ -624,7 +624,8 @@ export function maybePromise( result = new Promise((resolve, reject) => { callback = (err, res) => { if (err) return reject(err); - resolve(res); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + resolve(res!); }; }); } diff --git a/test/.eslintrc.json b/test/.eslintrc.json index 08752d0eb54..79c84db8bbb 100644 --- a/test/.eslintrc.json +++ b/test/.eslintrc.json @@ -45,5 +45,11 @@ "augments": "extends" } } - } + }, + "overrides": [ + { + "files": ["*.mjs"], + "parserOptions": {"sourceType": "module"} + } +] } diff --git a/test/disabled/authentication.test.js b/test/disabled/authentication.test.js index 4ba2e0cb226..57fbffba84f 100644 --- a/test/disabled/authentication.test.js +++ b/test/disabled/authentication.test.js @@ -1149,26 +1149,28 @@ describe('Authentication', function () { var userconfirm = result; var ensureIndexOptions = { unique: true, w: 0, background: true }; - userconfirm.ensureIndex([['confirmcode', 1]], ensureIndexOptions, function ( - err - ) { - test.equal(null, err); - - db_p.collection('session', function (err, result) { + userconfirm.ensureIndex( + [['confirmcode', 1]], + ensureIndexOptions, + function (err) { test.equal(null, err); - var session = result; - session.ensureIndex([['sid', 1]], ensureIndexOptions, function (err) { + db_p.collection('session', function (err, result) { test.equal(null, err); - client.close(); + var session = result; + session.ensureIndex([['sid', 1]], ensureIndexOptions, function (err) { + test.equal(null, err); - replicasetManager.stop().then(function () { - done(); + client.close(); + + replicasetManager.stop().then(function () { + done(); + }); }); }); - }); - }); + } + ); }); }); }); diff --git a/test/disabled/basic_single_server_auth.test.js b/test/disabled/basic_single_server_auth.test.js index d8330979f67..ede6cc748bf 100644 --- a/test/disabled/basic_single_server_auth.test.js +++ b/test/disabled/basic_single_server_auth.test.js @@ -374,14 +374,15 @@ describe('Basic single server auth tests', function () { }); var executeIsMaster = function () { - _server.command('admin.$cmd', { ismaster: true }, function ( - adminErr, - adminRes - ) { - expect(adminRes).to.exist; - expect(adminErr).to.not.exist; - if (adminErr) error = adminErr; - }); + _server.command( + 'admin.$cmd', + { ismaster: true }, + function (adminErr, adminRes) { + expect(adminRes).to.exist; + expect(adminErr).to.not.exist; + if (adminErr) error = adminErr; + } + ); }; for (var i = 0; i < 100; i++) { @@ -463,20 +464,21 @@ describe('Basic single server auth tests', function () { _server.logout('test', function (logoutErr) { expect(logoutErr).to.be.null; - _server.insert('test.test', [{ a: 1 }], function ( - secondInsertErr, - secondInsertRes - ) { - expect(secondInsertRes).to.exist; - expect(secondInsertErr).to.not.be.null; - - _server.destroy({ force: true }); - // console.log('=================== ' + Object.keys(Connection.connections()).length) - expect(Object.keys(Connection.connections()).length).to.equal(0); - // console.log('============================ 5') - Connection.disableConnectionAccounting(); - done(); - }); + _server.insert( + 'test.test', + [{ a: 1 }], + function (secondInsertErr, secondInsertRes) { + expect(secondInsertRes).to.exist; + expect(secondInsertErr).to.not.be.null; + + _server.destroy({ force: true }); + // console.log('=================== ' + Object.keys(Connection.connections()).length) + expect(Object.keys(Connection.connections()).length).to.equal(0); + // console.log('============================ 5') + Connection.disableConnectionAccounting(); + done(); + } + ); }); }); }); @@ -558,18 +560,19 @@ describe('Basic single server auth tests', function () { expect(authRes).to.exist; expect(authErr).to.be.null; - _server.insert('test.test', [{ a: 1 }], function ( - secondInsertErr, - secondInsertRes - ) { - expect(secondInsertRes).to.exist; - expect(secondInsertErr).to.be.null; - - _server.destroy({ force: true }); - expect(Object.keys(Connection.connections()).length).to.equal(0); - Connection.disableConnectionAccounting(); - done(); - }); + _server.insert( + 'test.test', + [{ a: 1 }], + function (secondInsertErr, secondInsertRes) { + expect(secondInsertRes).to.exist; + expect(secondInsertErr).to.be.null; + + _server.destroy({ force: true }); + expect(Object.keys(Connection.connections()).length).to.equal(0); + Connection.disableConnectionAccounting(); + done(); + } + ); }); }); }); diff --git a/test/disabled/connection.test.js b/test/disabled/connection.test.js index 5b69defbda4..fd255635ead 100644 --- a/test/disabled/connection.test.js +++ b/test/disabled/connection.test.js @@ -4,7 +4,7 @@ const expect = require('chai').expect; const mock = require('mongodb-mock-server'); const Connection = require('../../../src/core/connection/connection'); -describe('Connection', function () { +describe('Connection (disabled)', function () { const noop = () => {}; let server; afterEach(() => mock.cleanup()); diff --git a/test/disabled/disconnect_handler.test.js b/test/disabled/disconnect_handler.test.js index 3e7bb1924c3..1d75d490d49 100644 --- a/test/disabled/disconnect_handler.test.js +++ b/test/disabled/disconnect_handler.test.js @@ -15,15 +15,16 @@ describe('Disconnect Handler', function () { var db = client.db(configuration.db); configuration.manager.stop(9).then(function () { - db.collection('disconnect_handler_tests').update({ a: 1 }, { $set: { b: 1 } }, function ( - err, - r - ) { - test.equal(null, err); - test.equal(0, r.result.n); + db.collection('disconnect_handler_tests').update( + { a: 1 }, + { $set: { b: 1 } }, + function (err, r) { + test.equal(null, err); + test.equal(0, r.result.n); - client.close(); - }); + client.close(); + } + ); setTimeout(function () { configuration.manager.restart(9, { waitMS: 5000 }).then(function () { diff --git a/test/disabled/mongos/retryable_writes.test.js b/test/disabled/mongos/retryable_writes.test.js index 0e8bf191a77..ed2221317d6 100644 --- a/test/disabled/mongos/retryable_writes.test.js +++ b/test/disabled/mongos/retryable_writes.test.js @@ -49,16 +49,19 @@ describe('Retryable Writes (Mongos)', function () { test.servers[1].setMessageHandler(messageHandler('MONGOS2')); topology.once('fullsetup', function () { - topology.insert('test.test', [{ a: 1 }], { retryWrites: true, session: session }, function ( - err - ) { - expect(err).to.not.exist; - expect(command).to.have.property('txnNumber'); - expect(command.txnNumber).to.eql(1); - - topology.destroy(); - done(); - }); + topology.insert( + 'test.test', + [{ a: 1 }], + { retryWrites: true, session: session }, + function (err) { + expect(err).to.not.exist; + expect(command).to.have.property('txnNumber'); + expect(command.txnNumber).to.eql(1); + + topology.destroy(); + done(); + } + ); }); topology.on('error', done); @@ -107,15 +110,18 @@ describe('Retryable Writes (Mongos)', function () { test.servers[0].setMessageHandler(messageHandler('MONGOS1')); test.servers[1].setMessageHandler(messageHandler('MONGOS2')); mongos.once('fullsetup', function () { - mongos.insert('test.test', [{ a: 1 }], { retryWrites: true, session: session }, function ( - err - ) { - if (err) console.dir(err); - expect(err).to.not.exist; - expect(command).to.have.property('txnNumber'); - expect(command.txnNumber).to.eql(1); - mongos.destroy(done); - }); + mongos.insert( + 'test.test', + [{ a: 1 }], + { retryWrites: true, session: session }, + function (err) { + if (err) console.dir(err); + expect(err).to.not.exist; + expect(command).to.have.property('txnNumber'); + expect(command.txnNumber).to.eql(1); + mongos.destroy(done); + } + ); }); mongos.on('error', done); @@ -164,17 +170,20 @@ describe('Retryable Writes (Mongos)', function () { test.servers[0].setMessageHandler(messageHandler('MONGOS1')); test.servers[1].setMessageHandler(messageHandler('MONGOS2')); mongos.once('fullsetup', function () { - mongos.insert('test.test', [{ a: 1 }], { retryWrites: true, session: session }, function ( - err - ) { - expect(err).to.not.exist; - expect(command).to.have.property('txnNumber'); - expect(command.txnNumber).to.eql(1); - - session.endSession(() => { - mongos.destroy(done); - }); - }); + mongos.insert( + 'test.test', + [{ a: 1 }], + { retryWrites: true, session: session }, + function (err) { + expect(err).to.not.exist; + expect(command).to.have.property('txnNumber'); + expect(command.txnNumber).to.eql(1); + + session.endSession(() => { + mongos.destroy(done); + }); + } + ); }); mongos.on('error', done); diff --git a/test/disabled/replset/retryable_writes.test.js b/test/disabled/replset/retryable_writes.test.js index 539fa56b362..b70ebf789ce 100644 --- a/test/disabled/replset/retryable_writes.test.js +++ b/test/disabled/replset/retryable_writes.test.js @@ -44,16 +44,19 @@ describe('Retryable Writes (ReplSet)', function () { }); replset.on('all', () => { - replset.insert('test.test', [{ a: 1 }], { retryWrites: true, session: session }, function ( - err - ) { - expect(err).to.not.exist; - expect(command).to.have.property('txnNumber'); - expect(command.txnNumber).to.eql(1); - - replset.destroy(); - done(); - }); + replset.insert( + 'test.test', + [{ a: 1 }], + { retryWrites: true, session: session }, + function (err) { + expect(err).to.not.exist; + expect(command).to.have.property('txnNumber'); + expect(command.txnNumber).to.eql(1); + + replset.destroy(); + done(); + } + ); }); replset.on('error', done); @@ -99,17 +102,20 @@ describe('Retryable Writes (ReplSet)', function () { }); replset.on('all', () => { - replset.insert('test.test', [{ a: 1 }], { retryWrites: true, session: session }, function ( - err - ) { - if (err) console.dir(err); - expect(err).to.not.exist; - expect(command).to.have.property('txnNumber'); - expect(command.txnNumber).to.eql(1); - - replset.destroy(); - done(); - }); + replset.insert( + 'test.test', + [{ a: 1 }], + { retryWrites: true, session: session }, + function (err) { + if (err) console.dir(err); + expect(err).to.not.exist; + expect(command).to.have.property('txnNumber'); + expect(command.txnNumber).to.eql(1); + + replset.destroy(); + done(); + } + ); }); replset.on('error', done); @@ -155,16 +161,19 @@ describe('Retryable Writes (ReplSet)', function () { }); replset.on('all', () => { - replset.insert('test.test', [{ a: 1 }], { retryWrites: true, session: session }, function ( - err - ) { - expect(err).to.not.exist; - expect(command).to.have.property('txnNumber'); - expect(command.txnNumber).to.eql(1); - - replset.destroy(); - done(); - }); + replset.insert( + 'test.test', + [{ a: 1 }], + { retryWrites: true, session: session }, + function (err) { + expect(err).to.not.exist; + expect(command).to.have.property('txnNumber'); + expect(command.txnNumber).to.eql(1); + + replset.destroy(); + done(); + } + ); }); replset.on('error', done); diff --git a/test/disabled/replset_connection.test.js b/test/disabled/replset_connection.test.js index f6afdab7f5b..b4785adbc5a 100644 --- a/test/disabled/replset_connection.test.js +++ b/test/disabled/replset_connection.test.js @@ -521,15 +521,16 @@ describe.skip('ReplSet (Connection)', function () { client.topology.on('left', function (t) { if (t === 'primary') { // Attempt an insert - db.collection('_should_fail_due_to_bufferMaxEntries_0').insert({ a: 1 }, function ( - err - ) { - test.ok(err != null); - test.ok(err.message.indexOf('0') !== -1); - client.close(); + db.collection('_should_fail_due_to_bufferMaxEntries_0').insert( + { a: 1 }, + function (err) { + test.ok(err != null); + test.ok(err.message.indexOf('0') !== -1); + client.close(); - restartAndDone(configuration, done); - }); + restartAndDone(configuration, done); + } + ); } }); diff --git a/test/disabled/replset_read_preference.test.js b/test/disabled/replset_read_preference.test.js index cf95d0da589..633aef83aa3 100644 --- a/test/disabled/replset_read_preference.test.js +++ b/test/disabled/replset_read_preference.test.js @@ -114,12 +114,12 @@ describe.skip('ReplSet (ReadPreference)', function () { test.equal(null, err); // Pick the server - client.topology.replset.once('pickedServer', function ( - readPreference, - server - ) { - test.equal('localhost:31000', server.name); - }); + client.topology.replset.once( + 'pickedServer', + function (readPreference, server) { + test.equal('localhost:31000', server.name); + } + ); // Attempt to perform a read db.collection('somecollection').findOne( diff --git a/test/disabled/server.test.js b/test/disabled/server.test.js index 801b702f5ed..40bd7dfc9b5 100644 --- a/test/disabled/server.test.js +++ b/test/disabled/server.test.js @@ -98,16 +98,18 @@ describe('Server tests', function () { expect(insertOneErr).to.be.null; expect(insertOneR.result.n).to.equal(1); - server.insert('integration_tests.inserts', { a: 1 }, { ordered: false }, function ( - insertTwoErr, - insertTwoR - ) { - expect(insertTwoErr).to.be.null; - expect(insertTwoR.result.n).to.equal(1); + server.insert( + 'integration_tests.inserts', + { a: 1 }, + { ordered: false }, + function (insertTwoErr, insertTwoR) { + expect(insertTwoErr).to.be.null; + expect(insertTwoR.result.n).to.equal(1); - server.destroy(); - done(); - }); + server.destroy(); + done(); + } + ); }); }); @@ -161,26 +163,27 @@ describe('Server tests', function () { // Add event listeners server.on('connect', function () { - server.insert('integration_tests.inserts', [{ a: 1 }, { b: 1 }], function ( - insertOneErr, - insertOneR - ) { - expect(insertOneErr).to.be.null; - expect(insertOneR.result.n).to.equal(2); - - server.insert( - 'integration_tests.inserts', - [{ a: 1 }, { b: 1 }], - { ordered: false }, - function (insertTwoErr, insertTwoR) { - expect(insertTwoErr).to.be.null; - expect(insertTwoR.result.n).to.equal(2); + server.insert( + 'integration_tests.inserts', + [{ a: 1 }, { b: 1 }], + function (insertOneErr, insertOneR) { + expect(insertOneErr).to.be.null; + expect(insertOneR.result.n).to.equal(2); + + server.insert( + 'integration_tests.inserts', + [{ a: 1 }, { b: 1 }], + { ordered: false }, + function (insertTwoErr, insertTwoR) { + expect(insertTwoErr).to.be.null; + expect(insertTwoR.result.n).to.equal(2); - server.destroy(); - done(); - } - ); - }); + server.destroy(); + done(); + } + ); + } + ); }); // Start connection @@ -197,26 +200,28 @@ describe('Server tests', function () { // Add event listeners server.on('connect', function () { - server.insert('integration_tests.inserts', { a: 1 }, { writeConcern: { w: 0 } }, function ( - insertOneErr, - insertOneR - ) { - expect(insertOneErr).to.be.null; - expect(insertOneR.result.ok).to.equal(1); - - server.insert( - 'integration_tests.inserts', - { a: 1 }, - { ordered: false, writeConcern: { w: 0 } }, - function (insertTwoErr, insertTwoR) { - expect(insertTwoErr).to.be.null; - expect(insertTwoR.result.ok).to.equal(1); + server.insert( + 'integration_tests.inserts', + { a: 1 }, + { writeConcern: { w: 0 } }, + function (insertOneErr, insertOneR) { + expect(insertOneErr).to.be.null; + expect(insertOneR.result.ok).to.equal(1); + + server.insert( + 'integration_tests.inserts', + { a: 1 }, + { ordered: false, writeConcern: { w: 0 } }, + function (insertTwoErr, insertTwoR) { + expect(insertTwoErr).to.be.null; + expect(insertTwoR.result.ok).to.equal(1); - server.destroy(); - done(); - } - ); - }); + server.destroy(); + done(); + } + ); + } + ); }); // Start connection @@ -609,27 +614,28 @@ describe('Server tests', function () { // Add event listeners server.on('connect', function () { - server.insert('integration_tests.inserts', { a: 1 }, function ( - insertOneErr, - insertOneRes - ) { - expect(insertOneErr).to.be.null; - expect(insertOneRes.result.n).to.equal(1); - - server.insert( - 'integration_tests.inserts', - { a: 1 }, - { ordered: false }, - function (insertTwoErr, insertTwoR) { - expect(insertTwoErr).to.be.null; - expect(insertTwoR.result.n).to.equal(1); - - server.destroy(); - Connection.disableConnectionAccounting(); - done(); - } - ); - }); + server.insert( + 'integration_tests.inserts', + { a: 1 }, + function (insertOneErr, insertOneRes) { + expect(insertOneErr).to.be.null; + expect(insertOneRes.result.n).to.equal(1); + + server.insert( + 'integration_tests.inserts', + { a: 1 }, + { ordered: false }, + function (insertTwoErr, insertTwoR) { + expect(insertTwoErr).to.be.null; + expect(insertTwoR.result.n).to.equal(1); + + server.destroy(); + Connection.disableConnectionAccounting(); + done(); + } + ); + } + ); }); server.connect({ credentials }); diff --git a/test/disabled/sharding_failover.test.js b/test/disabled/sharding_failover.test.js index df318bd9fc8..4335d5084ec 100644 --- a/test/disabled/sharding_failover.test.js +++ b/test/disabled/sharding_failover.test.js @@ -211,13 +211,14 @@ describe.skip('Sharding (Failover)', function () { proxies[0].start().then(function () { // Kill the mongos proxy proxies[1].start().then(function () { - db.collection('replicaset_mongo_client_collection').insert({ c: 1 }, function ( - err - ) { - test.equal(null, err); - test.ok(reconnectCalled); - client.close(done); - }); + db.collection('replicaset_mongo_client_collection').insert( + { c: 1 }, + function (err) { + test.equal(null, err); + test.ok(reconnectCalled); + client.close(done); + } + ); }); }); }); diff --git a/test/disabled/single_mocks/compression.test.js b/test/disabled/single_mocks/compression.test.js index 1453e75822f..d308898146d 100644 --- a/test/disabled/single_mocks/compression.test.js +++ b/test/disabled/single_mocks/compression.test.js @@ -114,25 +114,26 @@ describe('Single Compression (mocks)', function () { expect(err).to.be.null; expect(r.result.n).to.equal(1); - _server.update('test.test', { q: { a: 1 }, u: { $set: { b: 1 } } }, function ( - _err, - _r - ) { - expect(_err).to.be.null; - expect(_r.result.n).to.equal(1); - - _server.remove('test.test', { q: { a: 1 } }, function (__err, __r) { - expect(__err).to.be.null; - expect(__r.result.n).to.equal(1); - - _server.command('system.$cmd', { ping: 1 }, function (___err, ___r) { - expect(___err).to.be.null; - expect(___r.result.ok).to.equal(1); - - client.destroy(done); + _server.update( + 'test.test', + { q: { a: 1 }, u: { $set: { b: 1 } } }, + function (_err, _r) { + expect(_err).to.be.null; + expect(_r.result.n).to.equal(1); + + _server.remove('test.test', { q: { a: 1 } }, function (__err, __r) { + expect(__err).to.be.null; + expect(__r.result.n).to.equal(1); + + _server.command('system.$cmd', { ping: 1 }, function (___err, ___r) { + expect(___err).to.be.null; + expect(___r.result.ok).to.equal(1); + + client.destroy(done); + }); }); - }); - }); + } + ); }); }); @@ -211,25 +212,26 @@ describe('Single Compression (mocks)', function () { expect(err).to.be.null; expect(r.result.n).to.equal(1); - _server.update('test.test', { q: { a: 1 }, u: { $set: { b: 1 } } }, function ( - _err, - _r - ) { - expect(_err).to.be.null; - expect(_r.result.n).to.equal(1); + _server.update( + 'test.test', + { q: { a: 1 }, u: { $set: { b: 1 } } }, + function (_err, _r) { + expect(_err).to.be.null; + expect(_r.result.n).to.equal(1); - _server.remove('test.test', { q: { a: 1 } }, function (__err, __r) { - expect(__err).to.be.null; - expect(__r.result.n).to.equal(1); + _server.remove('test.test', { q: { a: 1 } }, function (__err, __r) { + expect(__err).to.be.null; + expect(__r.result.n).to.equal(1); - _server.command('system.$cmd', { ping: 1 }, function (___err, ___r) { - expect(___err).to.be.null; - expect(___r.result.ok).to.equal(1); + _server.command('system.$cmd', { ping: 1 }, function (___err, ___r) { + expect(___err).to.be.null; + expect(___r.result.ok).to.equal(1); - client.destroy(done); + client.destroy(done); + }); }); - }); - }); + } + ); }); }); @@ -310,25 +312,26 @@ describe('Single Compression (mocks)', function () { expect(err).to.be.null; expect(r.result.n).to.equal(1); - _server.update('test.test', { q: { a: 1 }, u: { $set: { b: 1 } } }, function ( - _err, - _r - ) { - expect(_err).to.be.null; - expect(_r.result.n).to.equal(1); + _server.update( + 'test.test', + { q: { a: 1 }, u: { $set: { b: 1 } } }, + function (_err, _r) { + expect(_err).to.be.null; + expect(_r.result.n).to.equal(1); - _server.remove('test.test', { q: { a: 1 } }, function (__err, __r) { - expect(__err).to.be.null; - expect(__r.result.n).to.equal(1); + _server.remove('test.test', { q: { a: 1 } }, function (__err, __r) { + expect(__err).to.be.null; + expect(__r.result.n).to.equal(1); - _server.command('system.$cmd', { ping: 1 }, function (___err, ___r) { - expect(___err).to.be.null; - expect(___r.result.ok).to.equal(1); + _server.command('system.$cmd', { ping: 1 }, function (___err, ___r) { + expect(___err).to.be.null; + expect(___r.result.ok).to.equal(1); - client.destroy(done); + client.destroy(done); + }); }); - }); - }); + } + ); }); }); diff --git a/test/disabled/ssl_validation.test.js b/test/disabled/ssl_validation.test.js index 5e0408e8180..45d14d5cdd7 100644 --- a/test/disabled/ssl_validation.test.js +++ b/test/disabled/ssl_validation.test.js @@ -278,28 +278,28 @@ describe('SSL Validation', function () { }, 1000); // Create a collection - db.createCollection('shouldCorrectlyValidateAndPresentCertificateReplSet1', function ( - err, - collection - ) { - collection.remove({}, configuration.writeConcernMax(), function () { - collection.insert( - [{ a: 1 }, { b: 2 }, { c: 'hello world' }], - configuration.writeConcernMax(), - function (err) { - test.equal(null, err); - collection.find({}).toArray(function (err, items) { - test.equal(3, items.length); - client.close(); - - replicasetManager.stop().then(function () { - done(); + db.createCollection( + 'shouldCorrectlyValidateAndPresentCertificateReplSet1', + function (err, collection) { + collection.remove({}, configuration.writeConcernMax(), function () { + collection.insert( + [{ a: 1 }, { b: 2 }, { c: 'hello world' }], + configuration.writeConcernMax(), + function (err) { + test.equal(null, err); + collection.find({}).toArray(function (err, items) { + test.equal(3, items.length); + client.close(); + + replicasetManager.stop().then(function () { + done(); + }); }); - }); - } - ); - }); - }); + } + ); + }); + } + ); }); }); } @@ -518,28 +518,28 @@ describe('SSL Validation', function () { var db = client.db(configuration.db); // Create a collection - db.createCollection('shouldCorrectlyValidateAndPresentCertificate2', function ( - err, - collection - ) { - collection.remove({}, configuration.writeConcernMax(), function () { - collection.insert( - [{ a: 1 }, { b: 2 }, { c: 'hello world' }], - configuration.writeConcernMax(), - function (err) { - test.equal(null, err); - collection.find({}).toArray(function (err, items) { - test.equal(3, items.length); - client.close(); - - replicasetManager.stop().then(function () { - done(); + db.createCollection( + 'shouldCorrectlyValidateAndPresentCertificate2', + function (err, collection) { + collection.remove({}, configuration.writeConcernMax(), function () { + collection.insert( + [{ a: 1 }, { b: 2 }, { c: 'hello world' }], + configuration.writeConcernMax(), + function (err) { + test.equal(null, err); + collection.find({}).toArray(function (err, items) { + test.equal(3, items.length); + client.close(); + + replicasetManager.stop().then(function () { + done(); + }); }); - }); - } - ); - }); - }); + } + ); + }); + } + ); }); } ); @@ -596,28 +596,28 @@ describe('SSL Validation', function () { var db = client.db(configuration.db); // Create a collection - db.createCollection('shouldCorrectlyCommunicateUsingSSLSocket', function ( - err, - collection - ) { - collection.remove({}, configuration.writeConcernMax(), function () { - collection.insert( - [{ a: 1 }, { b: 2 }, { c: 'hello world' }], - configuration.writeConcernMax(), - function (err) { - test.equal(null, err); - collection.find({}).toArray(function (err, items) { - test.equal(3, items.length); - client.close(); - - replicasetManager.stop().then(function () { - done(); + db.createCollection( + 'shouldCorrectlyCommunicateUsingSSLSocket', + function (err, collection) { + collection.remove({}, configuration.writeConcernMax(), function () { + collection.insert( + [{ a: 1 }, { b: 2 }, { c: 'hello world' }], + configuration.writeConcernMax(), + function (err) { + test.equal(null, err); + collection.find({}).toArray(function (err, items) { + test.equal(3, items.length); + client.close(); + + replicasetManager.stop().then(function () { + done(); + }); }); - }); - } - ); - }); - }); + } + ); + }); + } + ); }); } ); diff --git a/test/examples/array_filters.js b/test/examples/array_filters.js index f122325ae9d..7b864fb8282 100644 --- a/test/examples/array_filters.js +++ b/test/examples/array_filters.js @@ -2,7 +2,7 @@ const setupDatabase = require('../functional/shared').setupDatabase; -describe('examples(project-fields-from-query):', function () { +describe('examples(project-fields-from-query,array_filters):', function () { let client; let collection; diff --git a/test/functional/change_stream.test.js b/test/functional/change_stream.test.js index f5708b81972..0ac9fd73701 100644 --- a/test/functional/change_stream.test.js +++ b/test/functional/change_stream.test.js @@ -2248,7 +2248,7 @@ describe('Change Streams', function () { // getResumeToken must return the _id of the last document returned if one exists. // getResumeToken must return resumeAfter from the initial aggregate if the option was specified. // If ``resumeAfter`` was not specified, the ``getResumeToken`` result must be empty. - describe('for emptied batch on server <= 4.0.7', function () { + describe('for emptied batch on server less than 4.0.7', function () { it('must return the _id of the last document returned if one exists', function () { const manager = new MockServerManager(this.configuration, { aggregate: (function* () { diff --git a/test/functional/cmap/connection.test.js b/test/functional/cmap/connection.test.js index e3ada152d77..530d919bd09 100644 --- a/test/functional/cmap/connection.test.js +++ b/test/functional/cmap/connection.test.js @@ -5,7 +5,7 @@ const { connect } = require('../../../src/cmap/connect'); const expect = require('chai').expect; const setupDatabase = require('../../functional/shared').setupDatabase; -describe('Connection', function () { +describe('Connection (functional/cmap)', function () { before(function () { return setupDatabase(this.configuration); }); diff --git a/test/functional/collection.test.js b/test/functional/collection.test.js index 5eb2df734c5..a96351e4d0e 100644 --- a/test/functional/collection.test.js +++ b/test/functional/collection.test.js @@ -6,7 +6,7 @@ const sinonChai = require('sinon-chai'); const mock = require('mongodb-mock-server'); chai.use(sinonChai); -describe('Collection', function () { +describe('Collection (functional)', function () { let configuration; before(function () { configuration = this.configuration; diff --git a/test/functional/connection.test.js b/test/functional/connection.test.js index 302e3a4532c..3f3e23c4558 100644 --- a/test/functional/connection.test.js +++ b/test/functional/connection.test.js @@ -3,7 +3,7 @@ const { withClient, setupDatabase } = require('./shared'); const test = require('./shared').assert; const { expect } = require('chai'); -describe('Connection', function () { +describe('Connection (functional)', function () { before(function () { return setupDatabase(this.configuration); }); diff --git a/test/functional/crud_api.test.js b/test/functional/crud_api.test.js index de0a6e9589d..d4a71c79c34 100644 --- a/test/functional/crud_api.test.js +++ b/test/functional/crud_api.test.js @@ -383,42 +383,43 @@ describe('CRUD API', function () { // Bulk write method unordered // ------------------------------------------------- var bulkWriteUnOrderedSpec = function () { - db.collection('t2_6').insertMany([{ c: 1 }, { c: 2 }, { c: 3 }], { w: 1 }, function ( - err, - r - ) { - expect(err).to.not.exist; - test.equal(3, r.result.n); - - db.collection('t2_6').bulkWrite( - [ - { insertOne: { document: { a: 1 } } }, - { updateOne: { filter: { a: 2 }, update: { $set: { a: 2 } }, upsert: true } }, - { updateMany: { filter: { a: 3 }, update: { $set: { a: 3 } }, upsert: true } }, - { deleteOne: { filter: { c: 1 } } }, - { deleteMany: { filter: { c: 2 } } }, - { replaceOne: { filter: { c: 3 }, replacement: { c: 4 }, upsert: true } } - ], - { ordered: false, w: 1 }, - function (err, r) { - expect(err).to.not.exist; - test.equal(1, r.nInserted); - test.equal(2, r.nUpserted); - test.equal(2, r.nRemoved); - - // Crud fields - test.equal(1, r.insertedCount); - test.equal(1, Object.keys(r.insertedIds).length); - test.equal(1, r.matchedCount); - test.equal(2, r.deletedCount); - test.equal(2, r.upsertedCount); - test.equal(2, Object.keys(r.upsertedIds).length); + db.collection('t2_6').insertMany( + [{ c: 1 }, { c: 2 }, { c: 3 }], + { w: 1 }, + function (err, r) { + expect(err).to.not.exist; + test.equal(3, r.result.n); + + db.collection('t2_6').bulkWrite( + [ + { insertOne: { document: { a: 1 } } }, + { updateOne: { filter: { a: 2 }, update: { $set: { a: 2 } }, upsert: true } }, + { updateMany: { filter: { a: 3 }, update: { $set: { a: 3 } }, upsert: true } }, + { deleteOne: { filter: { c: 1 } } }, + { deleteMany: { filter: { c: 2 } } }, + { replaceOne: { filter: { c: 3 }, replacement: { c: 4 }, upsert: true } } + ], + { ordered: false, w: 1 }, + function (err, r) { + expect(err).to.not.exist; + test.equal(1, r.nInserted); + test.equal(2, r.nUpserted); + test.equal(2, r.nRemoved); - // Ordered bulk operation - bulkWriteOrdered(); - } - ); - }); + // Crud fields + test.equal(1, r.insertedCount); + test.equal(1, Object.keys(r.insertedIds).length); + test.equal(1, r.matchedCount); + test.equal(2, r.deletedCount); + test.equal(2, r.upsertedCount); + test.equal(2, Object.keys(r.upsertedIds).length); + + // Ordered bulk operation + bulkWriteOrdered(); + } + ); + } + ); }; // @@ -519,15 +520,17 @@ describe('CRUD API', function () { // Legacy update method // ------------------------------------------------- var legacyUpdate = function () { - db.collection('t3_1').update({ a: 1 }, { $set: { a: 2 } }, { upsert: true }, function ( - err, - r - ) { - expect(err).to.not.exist; - expect(r).property('upsertedCount').to.equal(1); + db.collection('t3_1').update( + { a: 1 }, + { $set: { a: 2 } }, + { upsert: true }, + function (err, r) { + expect(err).to.not.exist; + expect(r).property('upsertedCount').to.equal(1); - updateOne(); - }); + updateOne(); + } + ); }; // @@ -571,19 +574,21 @@ describe('CRUD API', function () { test.equal(0, r.matchedCount); test.ok(r.upsertedId != null); - db.collection('t3_3').replaceOne({ a: 2 }, { a: 3 }, { upsert: true }, function ( - err, - r - ) { - expect(err).to.not.exist; - expect(r).property('modifiedCount').to.equal(1); - test.ok(r.result.upserted == null); + db.collection('t3_3').replaceOne( + { a: 2 }, + { a: 3 }, + { upsert: true }, + function (err, r) { + expect(err).to.not.exist; + expect(r).property('modifiedCount').to.equal(1); + test.ok(r.result.upserted == null); - test.equal(1, r.matchedCount); - test.ok(r.upsertedId == null); + test.equal(1, r.matchedCount); + test.ok(r.upsertedId == null); - updateMany(); - }); + updateMany(); + } + ); }); }; diff --git a/test/functional/cursor.test.js b/test/functional/cursor.test.js index 2e45145bd0b..e51be4579b7 100644 --- a/test/functional/cursor.test.js +++ b/test/functional/cursor.test.js @@ -2091,61 +2091,62 @@ describe('Cursor', function () { const db = client.db(configuration.db); var options = { capped: true, size: 10000000 }; - db.createCollection('test_if_dead_tailable_cursors_close', options, function ( - err, - collection - ) { - expect(err).to.not.exist; + db.createCollection( + 'test_if_dead_tailable_cursors_close', + options, + function (err, collection) { + expect(err).to.not.exist; - var closeCount = 0; - var errorOccurred = false; + var closeCount = 0; + var errorOccurred = false; - var count = 100; - // Just hammer the server - for (var i = 0; i < 100; i++) { - collection.insert({ id: i }, { w: 'majority', wtimeout: 5000 }, err => { - expect(err).to.not.exist; - count = count - 1; + var count = 100; + // Just hammer the server + for (var i = 0; i < 100; i++) { + collection.insert({ id: i }, { w: 'majority', wtimeout: 5000 }, err => { + expect(err).to.not.exist; + count = count - 1; - if (count === 0) { - const cursor = collection.find({}, { tailable: true, awaitData: true }); - const stream = cursor.stream(); - // let index = 0; - stream.resume(); + if (count === 0) { + const cursor = collection.find({}, { tailable: true, awaitData: true }); + const stream = cursor.stream(); + // let index = 0; + stream.resume(); - stream.on('error', err => { - expect(err).to.exist; - errorOccurred = true; - }); + stream.on('error', err => { + expect(err).to.exist; + errorOccurred = true; + }); - var validator = () => { - closeCount++; - if (closeCount === 2) { - expect(errorOccurred).to.equal(true); - done(); - } - }; + var validator = () => { + closeCount++; + if (closeCount === 2) { + expect(errorOccurred).to.equal(true); + done(); + } + }; - stream.on('end', validator); - cursor.on('close', validator); + stream.on('end', validator); + cursor.on('close', validator); - // Just hammer the server - for (var i = 0; i < 100; i++) { - const id = i; - process.nextTick(function () { - collection.insert({ id }, err => { - expect(err).to.not.exist; + // Just hammer the server + for (var i = 0; i < 100; i++) { + const id = i; + process.nextTick(function () { + collection.insert({ id }, err => { + expect(err).to.not.exist; - if (id === 99) { - setTimeout(() => client.close()); - } + if (id === 99) { + setTimeout(() => client.close()); + } + }); }); - }); + } } - } - }); + }); + } } - }); + ); }); } }); @@ -2734,24 +2735,25 @@ describe('Cursor', function () { // Execute inserts for (i = 0; i < left; i++) { setTimeout(function () { - collection.insert(allDocs.shift(), configuration.writeConcernMax(), function ( - err, - d - ) { - expect(err).to.not.exist; + collection.insert( + allDocs.shift(), + configuration.writeConcernMax(), + function (err, d) { + expect(err).to.not.exist; - left = left - 1; - totalI = totalI + d.length; + left = left - 1; + totalI = totalI + d.length; - if (left === 0) { - collection.find({}).toArray((err, items) => { - expect(err).to.not.exist; + if (left === 0) { + collection.find({}).toArray((err, items) => { + expect(err).to.not.exist; - test.equal(30000, items.length); - done(); - }); + test.equal(30000, items.length); + done(); + }); + } } - }); + ); }, timeout); timeout = timeout + 100; } @@ -3121,36 +3123,36 @@ describe('Cursor', function () { this.defer(() => client.close()); const db = client.db(configuration.db); - db.createCollection('Should_correctly_execute_count_on_cursor_2', function ( - err, - collection - ) { - expect(err).to.not.exist; - - // insert all docs - collection.insert(docs, configuration.writeConcernMax(), err => { + db.createCollection( + 'Should_correctly_execute_count_on_cursor_2', + function (err, collection) { expect(err).to.not.exist; - // Create a cursor for the content - var cursor = collection.find({}); - cursor.limit(100); - cursor.skip(10); - cursor.count(true, { maxTimeMS: 1000 }, err => { + // insert all docs + collection.insert(docs, configuration.writeConcernMax(), err => { expect(err).to.not.exist; // Create a cursor for the content var cursor = collection.find({}); cursor.limit(100); cursor.skip(10); - cursor.maxTimeMS(100); - cursor.count(err => { + cursor.count(true, { maxTimeMS: 1000 }, err => { expect(err).to.not.exist; - done(); + // Create a cursor for the content + var cursor = collection.find({}); + cursor.limit(100); + cursor.skip(10); + cursor.maxTimeMS(100); + cursor.count(err => { + expect(err).to.not.exist; + + done(); + }); }); }); - }); - }); + } + ); }); } }); @@ -3177,25 +3179,25 @@ describe('Cursor', function () { this.defer(() => client.close()); const db = client.db(configuration.db); - db.createCollection('Should_correctly_execute_count_on_cursor_3', function ( - err, - collection - ) { - expect(err).to.not.exist; - - // insert all docs - collection.insert(docs, configuration.writeConcernMax(), err => { + db.createCollection( + 'Should_correctly_execute_count_on_cursor_3', + function (err, collection) { expect(err).to.not.exist; - // Create a cursor for the content - var cursor = collection.find({}, { maxTimeMS: 100 }); - cursor.toArray(err => { + // insert all docs + collection.insert(docs, configuration.writeConcernMax(), err => { expect(err).to.not.exist; - done(); + // Create a cursor for the content + var cursor = collection.find({}, { maxTimeMS: 100 }); + cursor.toArray(err => { + expect(err).to.not.exist; + + done(); + }); }); - }); - }); + } + ); }); } }); @@ -3511,37 +3513,38 @@ describe('Cursor', function () { const db = client.db(configuration.db); var options = { capped: true, size: 8 }; - db.createCollection('should_await_data_max_awaittime_ms', options, function ( - err, - collection - ) { - expect(err).to.not.exist; - - collection.insert({ a: 1 }, configuration.writeConcernMax(), err => { + db.createCollection( + 'should_await_data_max_awaittime_ms', + options, + function (err, collection) { expect(err).to.not.exist; - var s = new Date(); - // Create cursor with awaitData, and timeout after the period specified - var cursor = collection - .find({}) - .addCursorFlag('tailable', true) - .addCursorFlag('awaitData', true) - .maxAwaitTimeMS(500); + collection.insert({ a: 1 }, configuration.writeConcernMax(), err => { + expect(err).to.not.exist; - cursor.each(function (err, result) { - if (result) { - setTimeout(function () { - cursor.kill(); - }, 300); - } else { - test.ok(new Date().getTime() - s.getTime() >= 500); + var s = new Date(); + // Create cursor with awaitData, and timeout after the period specified + var cursor = collection + .find({}) + .addCursorFlag('tailable', true) + .addCursorFlag('awaitData', true) + .maxAwaitTimeMS(500); - // TODO: forced because the cursor is still open/active - client.close(true, done); - } + cursor.each(function (err, result) { + if (result) { + setTimeout(function () { + cursor.kill(); + }, 300); + } else { + test.ok(new Date().getTime() - s.getTime() >= 500); + + // TODO: forced because the cursor is still open/active + client.close(true, done); + } + }); }); - }); - }); + } + ); }); } }); @@ -3608,33 +3611,33 @@ describe('Cursor', function () { this.defer(() => client.close()); const db = client.db(configuration.db); - db.createCollection('shouldCorrectlyExecuteEnsureIndexWithNoCallback', function ( - err, - collection - ) { - expect(err).to.not.exist; - - // ensure index of createdAt index - collection.ensureIndex({ createdAt: 1 }, err => { + db.createCollection( + 'shouldCorrectlyExecuteEnsureIndexWithNoCallback', + function (err, collection) { expect(err).to.not.exist; - // insert all docs - collection.insert(docs, configuration.writeConcernMax(), err => { + // ensure index of createdAt index + collection.ensureIndex({ createdAt: 1 }, err => { expect(err).to.not.exist; - // Find with sort - collection - .find() - .sort(['createdAt', 'asc']) - .toArray((err, items) => { - expect(err).to.not.exist; + // insert all docs + collection.insert(docs, configuration.writeConcernMax(), err => { + expect(err).to.not.exist; - test.equal(1, items.length); - done(); - }); + // Find with sort + collection + .find() + .sort(['createdAt', 'asc']) + .toArray((err, items) => { + expect(err).to.not.exist; + + test.equal(1, items.length); + done(); + }); + }); }); - }); - }); + } + ); }); } }); @@ -3716,26 +3719,26 @@ describe('Cursor', function () { this.defer(() => client.close()); const db = client.db(configuration.db); - db.createCollection('Should_correctly_execute_count_on_cursor_1_', function ( - err, - collection - ) { - expect(err).to.not.exist; - - // insert all docs - collection.insert(docs, configuration.writeConcernMax(), err => { + db.createCollection( + 'Should_correctly_execute_count_on_cursor_1_', + function (err, collection) { expect(err).to.not.exist; - // Create a cursor for the content - var cursor = collection.find({}); - cursor.batchSize(-10).next(err => { + // insert all docs + collection.insert(docs, configuration.writeConcernMax(), err => { expect(err).to.not.exist; - test.ok(cursor.id.equals(BSON.Long.ZERO)); - done(); + // Create a cursor for the content + var cursor = collection.find({}); + cursor.batchSize(-10).next(err => { + expect(err).to.not.exist; + test.ok(cursor.id.equals(BSON.Long.ZERO)); + + done(); + }); }); - }); - }); + } + ); }); } }); diff --git a/test/functional/cursorstream.test.js b/test/functional/cursorstream.test.js index 88403a18325..8a6c31eedda 100644 --- a/test/functional/cursorstream.test.js +++ b/test/functional/cursorstream.test.js @@ -33,51 +33,51 @@ describe('Cursor Streams', function () { client.connect(function (err, client) { var db = client.db(self.configuration.db); - db.createCollection('test_streaming_function_with_limit_for_fetching2', function ( - err, - collection - ) { - var left = allDocs.length; - for (var i = 0; i < allDocs.length; i++) { - collection.insert(allDocs[i], { w: 1 }, function (err) { - expect(err).to.not.exist; + db.createCollection( + 'test_streaming_function_with_limit_for_fetching2', + function (err, collection) { + var left = allDocs.length; + for (var i = 0; i < allDocs.length; i++) { + collection.insert(allDocs[i], { w: 1 }, function (err) { + expect(err).to.not.exist; - left = left - 1; + left = left - 1; - if (left === 0) { - // Perform a find to get a cursor - var stream = collection.find({}).stream(); - var data = []; + if (left === 0) { + // Perform a find to get a cursor + var stream = collection.find({}).stream(); + var data = []; - // For each data item - stream.on('data', function () { - data.push(1); - j = j + 1; - stream.pause(); + // For each data item + stream.on('data', function () { + data.push(1); + j = j + 1; + stream.pause(); - collection.findOne({}, function (err) { - expect(err).to.not.exist; - stream.resume(); + collection.findOne({}, function (err) { + expect(err).to.not.exist; + stream.resume(); + }); }); - }); - - // When the stream is done - stream.on('end', function () { - setTimeout(() => { - let err; - try { - expect(data).to.have.length(3000); - } catch (e) { - err = e; - } - - client.close(() => done(err)); - }, 1000); - }); - } - }); + + // When the stream is done + stream.on('end', function () { + setTimeout(() => { + let err; + try { + expect(data).to.have.length(3000); + } catch (e) { + err = e; + } + + client.close(() => done(err)); + }, 1000); + }); + } + }); + } } - }); + ); }); } }); @@ -108,50 +108,50 @@ describe('Cursor Streams', function () { client.connect(function (err, client) { var db = client.db(self.configuration.db); - db.createCollection('test_streaming_function_with_limit_for_fetching_2', function ( - err, - collection - ) { - var left = allDocs.length; - for (var i = 0; i < allDocs.length; i++) { - collection.insert(allDocs[i], { w: 1 }, function (err) { - expect(err).to.not.exist; - left = left - 1; - - if (left === 0) { - // Perform a find to get a cursor - var stream = collection.find({}).stream(); - var data = []; - - // For each data item - stream.on('data', function () { - j = j + 1; - stream.pause(); - data.push(1); - - collection.findOne({}, function (err) { - expect(err).to.not.exist; - stream.resume(); + db.createCollection( + 'test_streaming_function_with_limit_for_fetching_2', + function (err, collection) { + var left = allDocs.length; + for (var i = 0; i < allDocs.length; i++) { + collection.insert(allDocs[i], { w: 1 }, function (err) { + expect(err).to.not.exist; + left = left - 1; + + if (left === 0) { + // Perform a find to get a cursor + var stream = collection.find({}).stream(); + var data = []; + + // For each data item + stream.on('data', function () { + j = j + 1; + stream.pause(); + data.push(1); + + collection.findOne({}, function (err) { + expect(err).to.not.exist; + stream.resume(); + }); }); - }); - - // When the stream is done - stream.on('end', function () { - setTimeout(() => { - let err; - try { - expect(data).to.have.length(10000); - } catch (e) { - err = e; - } - - client.close(err2 => done(err || err2)); - }, 1000); - }); - } - }); + + // When the stream is done + stream.on('end', function () { + setTimeout(() => { + let err; + try { + expect(data).to.have.length(10000); + } catch (e) { + err = e; + } + + client.close(err2 => done(err || err2)); + }, 1000); + }); + } + }); + } } - }); + ); }); } }); @@ -177,32 +177,32 @@ describe('Cursor Streams', function () { client.connect(function (err, client) { var db = client.db(self.configuration.db); - db.createCollection('test_streaming_function_with_limit_for_fetching_3', function ( - err, - collection - ) { - collection.insert(docs, { w: 1 }, function (err) { - expect(err).to.not.exist; - - // Perform a find to get a cursor - var stream = collection.find({}).stream(); - - // For each data item - stream.on('data', function () { - counter++; - stream.pause(); - stream.resume(); - counter2++; - }); + db.createCollection( + 'test_streaming_function_with_limit_for_fetching_3', + function (err, collection) { + collection.insert(docs, { w: 1 }, function (err) { + expect(err).to.not.exist; - // When the stream is done - stream.on('end', function () { - expect(counter).to.equal(1000); - expect(counter2).to.equal(1000); - client.close(done); + // Perform a find to get a cursor + var stream = collection.find({}).stream(); + + // For each data item + stream.on('data', function () { + counter++; + stream.pause(); + stream.resume(); + counter2++; + }); + + // When the stream is done + stream.on('end', function () { + expect(counter).to.equal(1000); + expect(counter2).to.equal(1000); + client.close(done); + }); }); - }); - }); + } + ); }); } }); diff --git a/test/functional/deprecate_warning.test.js b/test/functional/deprecate_warning.test.js index 0631e17db99..ad4fa7b5ef2 100644 --- a/test/functional/deprecate_warning.test.js +++ b/test/functional/deprecate_warning.test.js @@ -13,7 +13,7 @@ const ClassWithoutLogger = utils.ClassWithoutLogger; const ClassWithUndefinedLogger = utils.ClassWithUndefinedLogger; const ensureCalledWith = utils.ensureCalledWith; -describe('Deprecation Warnings', function () { +describe('Deprecation Warnings (functional)', function () { beforeEach(function () { this.sinon.stub(console, 'error'); }); diff --git a/test/functional/find.test.js b/test/functional/find.test.js index dc51bb476fd..60586e37c67 100644 --- a/test/functional/find.test.js +++ b/test/functional/find.test.js @@ -27,30 +27,31 @@ describe('Find', function () { var doc1 = null; // Insert some test documents - collection.insert([{ a: 2 }, { b: 3 }], configuration.writeConcernMax(), function ( - err, - r - ) { - doc1 = r.ops[0]; + collection.insert( + [{ a: 2 }, { b: 3 }], + configuration.writeConcernMax(), + function (err, r) { + doc1 = r.ops[0]; - // Ensure correct insertion testing via the cursor and the count function - collection.find().toArray(function (err, documents) { - expect(err).to.not.exist; - test.equal(2, documents.length); + // Ensure correct insertion testing via the cursor and the count function + collection.find().toArray(function (err, documents) { + expect(err).to.not.exist; + test.equal(2, documents.length); - collection.count(function (err, count) { - test.equal(2, count); + collection.count(function (err, count) { + test.equal(2, count); - // Fetch values by selection - collection.find({ a: doc1.a }).toArray(function (err, documents) { - test.equal(1, documents.length); - test.equal(doc1.a, documents[0].a); - // Let's close the db - client.close(done); + // Fetch values by selection + collection.find({ a: doc1.a }).toArray(function (err, documents) { + test.equal(1, documents.length); + test.equal(doc1.a, documents[0].a); + // Let's close the db + client.close(done); + }); }); }); - }); - }); + } + ); }); }); } @@ -75,29 +76,30 @@ describe('Find', function () { var doc1 = null; // Insert some test documents - collection.insert([{ a: 2 }, { b: 3 }], configuration.writeConcernMax(), function ( - err, - r - ) { - doc1 = r.ops[0]; + collection.insert( + [{ a: 2 }, { b: 3 }], + configuration.writeConcernMax(), + function (err, r) { + doc1 = r.ops[0]; - // Ensure correct insertion testing via the cursor and the count function - collection.find().toArray(function (err, documents) { - test.equal(2, documents.length); + // Ensure correct insertion testing via the cursor and the count function + collection.find().toArray(function (err, documents) { + test.equal(2, documents.length); - collection.count(function (err, count) { - test.equal(2, count); + collection.count(function (err, count) { + test.equal(2, count); - // Fetch values by selection - collection.find({ a: doc1.a }).toArray(function (err, documents) { - test.equal(1, documents.length); - test.equal(doc1.a, documents[0].a); - // Let's close the db - client.close(done); + // Fetch values by selection + collection.find({ a: doc1.a }).toArray(function (err, documents) { + test.equal(1, documents.length); + test.equal(doc1.a, documents[0].a); + // Let's close the db + client.close(done); + }); }); }); - }); - }); + } + ); }); }); }); @@ -673,17 +675,18 @@ describe('Find', function () { collection.insert(doc, configuration.writeConcernMax(), function (err) { expect(err).to.not.exist; - collection.findOne({ _id: doc._id }, { w: 1, projection: undefined }, function ( - err, - doc - ) { - expect(err).to.not.exist; - test.equal(2, doc.comments.length); - test.equal('number 1', doc.comments[0].title); - test.equal('number 2', doc.comments[1].title); + collection.findOne( + { _id: doc._id }, + { w: 1, projection: undefined }, + function (err, doc) { + expect(err).to.not.exist; + test.equal(2, doc.comments.length); + test.equal('number 1', doc.comments[0].title); + test.equal('number 2', doc.comments[1].title); - client.close(done); - }); + client.close(done); + } + ); }); }); }); @@ -705,23 +708,23 @@ describe('Find', function () { p_client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('test_should_correctly_retrieve_one_record', function ( - err, - collection - ) { - collection.insert({ a: 0 }, configuration.writeConcernMax(), function (err) { - expect(err).to.not.exist; - db.collection('test_should_correctly_retrieve_one_record', function ( - err, - usercollection - ) { - usercollection.findOne({ a: 0 }, function (err) { - expect(err).to.not.exist; - p_client.close(done); - }); + db.createCollection( + 'test_should_correctly_retrieve_one_record', + function (err, collection) { + collection.insert({ a: 0 }, configuration.writeConcernMax(), function (err) { + expect(err).to.not.exist; + db.collection( + 'test_should_correctly_retrieve_one_record', + function (err, usercollection) { + usercollection.findOne({ a: 0 }, function (err) { + expect(err).to.not.exist; + p_client.close(done); + }); + } + ); }); - }); - }); + } + ); }); } }); @@ -838,60 +841,62 @@ describe('Find', function () { test.equal(2, result.value.b); // Test remove object on change - collection.insert({ a: 3, b: 2 }, configuration.writeConcernMax(), function ( - err - ) { - expect(err).to.not.exist; - // Let's modify the document in place - collection.findAndModify( - { a: 3 }, - [], - { $set: { b: 3 } }, - { remove: true }, - function (err, updated_doc) { - test.equal(3, updated_doc.value.a); - test.equal(2, updated_doc.value.b); - - // Let's upsert! - collection.findAndModify( - { a: 4 }, - [], - { $set: { b: 3 } }, - { new: true, upsert: true }, - function (err, updated_doc) { - test.equal(4, updated_doc.value.a); - test.equal(3, updated_doc.value.b); - - // Test selecting a subset of fields - collection.insert( - { a: 100, b: 101 }, - configuration.writeConcernMax(), - function (err, r) { - expect(err).to.not.exist; - - collection.findAndModify( - { a: 100 }, - [], - { $set: { b: 5 } }, - { new: true, projection: { b: 1 } }, - function (err, updated_doc) { - test.equal(2, Object.keys(updated_doc.value).length); - test.equal( - r.ops[0]['_id'].toHexString(), - updated_doc.value._id.toHexString() - ); - test.equal(5, updated_doc.value.b); - test.equal('undefined', typeof updated_doc.value.a); - client.close(done); - } - ); - } - ); - } - ); - } - ); - }); + collection.insert( + { a: 3, b: 2 }, + configuration.writeConcernMax(), + function (err) { + expect(err).to.not.exist; + // Let's modify the document in place + collection.findAndModify( + { a: 3 }, + [], + { $set: { b: 3 } }, + { remove: true }, + function (err, updated_doc) { + test.equal(3, updated_doc.value.a); + test.equal(2, updated_doc.value.b); + + // Let's upsert! + collection.findAndModify( + { a: 4 }, + [], + { $set: { b: 3 } }, + { new: true, upsert: true }, + function (err, updated_doc) { + test.equal(4, updated_doc.value.a); + test.equal(3, updated_doc.value.b); + + // Test selecting a subset of fields + collection.insert( + { a: 100, b: 101 }, + configuration.writeConcernMax(), + function (err, r) { + expect(err).to.not.exist; + + collection.findAndModify( + { a: 100 }, + [], + { $set: { b: 5 } }, + { new: true, projection: { b: 1 } }, + function (err, updated_doc) { + test.equal(2, Object.keys(updated_doc.value).length); + test.equal( + r.ops[0]['_id'].toHexString(), + updated_doc.value._id.toHexString() + ); + test.equal(5, updated_doc.value.b); + test.equal('undefined', typeof updated_doc.value.a); + client.close(done); + } + ); + } + ); + } + ); + } + ); + } + ); } ); }); @@ -949,40 +954,40 @@ describe('Find', function () { var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('shouldCorrectlyExecuteFindOneWithAnInSearchTag', function ( - err, - collection - ) { - // Test return new document on change - collection.insert( - { - title: 'Tobi', - author: 'Brian', - newTitle: 'Woot', - meta: { visitors: 0 } - }, - configuration.writeConcernMax(), - function (err, r) { - // Fetch the id - var id = r.ops[0]._id; + db.createCollection( + 'shouldCorrectlyExecuteFindOneWithAnInSearchTag', + function (err, collection) { + // Test return new document on change + collection.insert( + { + title: 'Tobi', + author: 'Brian', + newTitle: 'Woot', + meta: { visitors: 0 } + }, + configuration.writeConcernMax(), + function (err, r) { + // Fetch the id + var id = r.ops[0]._id; - collection.update( - { _id: id }, - { $inc: { 'meta.visitors': 1 } }, - configuration.writeConcernMax(), - function (err, r) { - test.equal(1, r.result.n); - expect(err).to.not.exist; + collection.update( + { _id: id }, + { $inc: { 'meta.visitors': 1 } }, + configuration.writeConcernMax(), + function (err, r) { + test.equal(1, r.result.n); + expect(err).to.not.exist; - collection.findOne({ _id: id }, function (err, item) { - test.equal(1, item.meta.visitors); - client.close(done); - }); - } - ); - } - ); - }); + collection.findOne({ _id: id }, function (err, item) { + test.equal(1, item.meta.visitors); + client.close(done); + }); + } + ); + } + ); + } + ); }); } }); @@ -1041,23 +1046,23 @@ describe('Find', function () { var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('AttemptToFindAndModifyNonExistingDocument', function ( - err, - collection - ) { - // Let's modify the document in place - collection.findAndModify( - { name: 'test1' }, - [], - { $set: { name: 'test2' } }, - {}, - function (err, updated_doc) { - expect(updated_doc.value).to.not.exist; - test.ok(err == null || err.errmsg.match('No matching object found')); - client.close(done); - } - ); - }); + db.createCollection( + 'AttemptToFindAndModifyNonExistingDocument', + function (err, collection) { + // Let's modify the document in place + collection.findAndModify( + { name: 'test1' }, + [], + { $set: { name: 'test2' } }, + {}, + function (err, updated_doc) { + expect(updated_doc.value).to.not.exist; + test.ok(err == null || err.errmsg.match('No matching object found')); + client.close(done); + } + ); + } + ); }); } }); @@ -1183,28 +1188,28 @@ describe('Find', function () { p_client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('shouldCorrectlyFindAndModifyDocumentWithDBStrict', function ( - err, - collection - ) { - // Test return old document on change - collection.insert({ a: 2, b: 2 }, configuration.writeConcernMax(), function (err) { - expect(err).to.not.exist; + db.createCollection( + 'shouldCorrectlyFindAndModifyDocumentWithDBStrict', + function (err, collection) { + // Test return old document on change + collection.insert({ a: 2, b: 2 }, configuration.writeConcernMax(), function (err) { + expect(err).to.not.exist; - // Let's modify the document in place - collection.findAndModify( - { a: 2 }, - [['a', 1]], - { $set: { b: 3 } }, - { new: true }, - function (err, result) { - test.equal(2, result.value.a); - test.equal(3, result.value.b); - p_client.close(done); - } - ); - }); - }); + // Let's modify the document in place + collection.findAndModify( + { a: 2 }, + [['a', 1]], + { $set: { b: 3 } }, + { new: true }, + function (err, result) { + test.equal(2, result.value.a); + test.equal(3, result.value.b); + p_client.close(done); + } + ); + }); + } + ); }); } }); @@ -1223,40 +1228,40 @@ describe('Find', function () { client.connect(function (err, client) { expect(err).to.not.exist; var db = client.db(configuration.db); - db.createCollection('shouldCorrectlyFindAndModifyDocumentThatFailsInFirstStep', function ( - err, - collection - ) { - expect(err).to.not.exist; - // Set up an index to force duplicate index erro - collection.ensureIndex([['failIndex', 1]], { unique: true, w: 1 }, function (err) { + db.createCollection( + 'shouldCorrectlyFindAndModifyDocumentThatFailsInFirstStep', + function (err, collection) { expect(err).to.not.exist; + // Set up an index to force duplicate index erro + collection.ensureIndex([['failIndex', 1]], { unique: true, w: 1 }, function (err) { + expect(err).to.not.exist; - // Setup a new document - collection.insert( - { a: 2, b: 2, failIndex: 2 }, - configuration.writeConcernMax(), - function (err) { - expect(err).to.not.exist; + // Setup a new document + collection.insert( + { a: 2, b: 2, failIndex: 2 }, + configuration.writeConcernMax(), + function (err) { + expect(err).to.not.exist; - // Let's attempt to upsert with a duplicate key error - collection.findAndModify( - { c: 2 }, - [['a', 1]], - { a: 10, b: 10, failIndex: 2 }, - { w: 1, upsert: true }, - function (err, result) { - expect(result).to.not.exist; - expect(err) - .property('errmsg') - .to.match(/duplicate key/); - client.close(done); - } - ); - } - ); - }); - }); + // Let's attempt to upsert with a duplicate key error + collection.findAndModify( + { c: 2 }, + [['a', 1]], + { a: 10, b: 10, failIndex: 2 }, + { w: 1, upsert: true }, + function (err, result) { + expect(result).to.not.exist; + expect(err) + .property('errmsg') + .to.match(/duplicate key/); + client.close(done); + } + ); + } + ); + }); + } + ); }); } }); @@ -1271,34 +1276,34 @@ describe('Find', function () { var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('Should_correctly_return_new_modified_document', function ( - err, - collection - ) { - var id = new ObjectId(); - var doc = { _id: id, a: 1, b: 1, c: { a: 1, b: 1 } }; + db.createCollection( + 'Should_correctly_return_new_modified_document', + function (err, collection) { + var id = new ObjectId(); + var doc = { _id: id, a: 1, b: 1, c: { a: 1, b: 1 } }; - collection.insert(doc, configuration.writeConcernMax(), function (err) { - expect(err).to.not.exist; + collection.insert(doc, configuration.writeConcernMax(), function (err) { + expect(err).to.not.exist; - // Find and modify returning the new object - collection.findAndModify( - { _id: id }, - [], - { $set: { 'c.c': 100 } }, - { new: true }, - function (err, item) { - test.equal(doc._id.toString(), item.value._id.toString()); - test.equal(doc.a, item.value.a); - test.equal(doc.b, item.value.b); - test.equal(doc.c.a, item.value.c.a); - test.equal(doc.c.b, item.value.c.b); - test.equal(100, item.value.c.c); - client.close(done); - } - ); - }); - }); + // Find and modify returning the new object + collection.findAndModify( + { _id: id }, + [], + { $set: { 'c.c': 100 } }, + { new: true }, + function (err, item) { + test.equal(doc._id.toString(), item.value._id.toString()); + test.equal(doc.a, item.value.a); + test.equal(doc.b, item.value.b); + test.equal(doc.c.a, item.value.c.a); + test.equal(doc.c.b, item.value.c.b); + test.equal(100, item.value.c.c); + client.close(done); + } + ); + }); + } + ); }); } }); @@ -1345,38 +1350,42 @@ describe('Find', function () { var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('should_correctly_return_record_with_64bit_id', function ( - err, - collection - ) { - var _lowerId = new ObjectId(); - var _higherId = new ObjectId(); - var lowerId = new Long.fromString('133118461172916224', 10); - var higherId = new Long.fromString('133118461172916225', 10); - - var lowerDoc = { _id: _lowerId, id: lowerId }; - var higherDoc = { _id: _higherId, id: higherId }; - - collection.insert([lowerDoc, higherDoc], configuration.writeConcernMax(), function (err) { - expect(err).to.not.exist; + db.createCollection( + 'should_correctly_return_record_with_64bit_id', + function (err, collection) { + var _lowerId = new ObjectId(); + var _higherId = new ObjectId(); + var lowerId = new Long.fromString('133118461172916224', 10); + var higherId = new Long.fromString('133118461172916225', 10); - // Select record with id of 133118461172916225 using $gt directive - collection.find({ id: { $gt: lowerId } }, {}).toArray(function (err, arr) { - test.ok(err == null); - test.equal( - arr.length, - 1, - 'Selecting record via $gt directive on 64-bit integer should return a record with higher Id' - ); - test.equal( - arr[0].id.toString(), - '133118461172916225', - 'Returned Id should be equal to 133118461172916225' - ); - client.close(done); - }); - }); - }); + var lowerDoc = { _id: _lowerId, id: lowerId }; + var higherDoc = { _id: _higherId, id: higherId }; + + collection.insert( + [lowerDoc, higherDoc], + configuration.writeConcernMax(), + function (err) { + expect(err).to.not.exist; + + // Select record with id of 133118461172916225 using $gt directive + collection.find({ id: { $gt: lowerId } }, {}).toArray(function (err, arr) { + test.ok(err == null); + test.equal( + arr.length, + 1, + 'Selecting record via $gt directive on 64-bit integer should return a record with higher Id' + ); + test.equal( + arr[0].id.toString(), + '133118461172916225', + 'Returned Id should be equal to 133118461172916225' + ); + client.close(done); + }); + } + ); + } + ); }); } }); @@ -1470,14 +1479,17 @@ describe('Find', function () { db.createCollection( 'shouldCorrectlyHandlerErrorForFindAndModifyWhenNoRecordExists', function (err, collection) { - collection.findAndModify({ a: 1 }, [], { $set: { b: 3 } }, { new: true }, function ( - err, - updated_doc - ) { - expect(err).to.not.exist; - expect(updated_doc.value).to.not.exist; - client.close(done); - }); + collection.findAndModify( + { a: 1 }, + [], + { $set: { b: 3 } }, + { new: true }, + function (err, updated_doc) { + expect(err).to.not.exist; + expect(updated_doc.value).to.not.exist; + client.close(done); + } + ); } ); }); @@ -1751,38 +1763,38 @@ describe('Find', function () { var db = client.db(configuration.db); expect(err).to.not.exist; - db.createCollection('shouldCorrectlyErrorOutFindAndModifyOnDuplicateRecord', function ( - err, - collection - ) { - expect(err).to.not.exist; + db.createCollection( + 'shouldCorrectlyErrorOutFindAndModifyOnDuplicateRecord', + function (err, collection) { + expect(err).to.not.exist; - // Test return old document on change - collection.insert( - [{ login: 'user1' }, { login: 'user2' }], - configuration.writeConcernMax(), - function (err, r) { - expect(err).to.not.exist; - var id = r.ops[1]._id; - // Set an index - collection.ensureIndex('login', { unique: true, w: 1 }, function (err) { + // Test return old document on change + collection.insert( + [{ login: 'user1' }, { login: 'user2' }], + configuration.writeConcernMax(), + function (err, r) { expect(err).to.not.exist; + var id = r.ops[1]._id; + // Set an index + collection.ensureIndex('login', { unique: true, w: 1 }, function (err) { + expect(err).to.not.exist; - // Attemp to modify document - collection.findAndModify( - { _id: id }, - [], - { $set: { login: 'user1' } }, - {}, - function (err) { - test.ok(err !== null); - p_client.close(done); - } - ); - }); - } - ); - }); + // Attemp to modify document + collection.findAndModify( + { _id: id }, + [], + { $set: { login: 'user1' } }, + {}, + function (err) { + test.ok(err !== null); + p_client.close(done); + } + ); + }); + } + ); + } + ); }); } }); @@ -1983,30 +1995,30 @@ describe('Find', function () { var db = client.db(configuration.db); // Create a collection we want to drop later - db.createCollection('shouldPerformQueryWithBatchSizeDifferentToStandard', function ( - err, - collection - ) { - expect(err).to.not.exist; - - var docs = []; - for (var i = 0; i < 1000; i++) { - docs.push({ a: i }); - } - - // Insert a bunch of documents for the testing - collection.insert(docs, configuration.writeConcernMax(), function (err) { + db.createCollection( + 'shouldPerformQueryWithBatchSizeDifferentToStandard', + function (err, collection) { expect(err).to.not.exist; - // Perform a simple find and return all the documents - collection.find({}, { batchSize: 1000 }).toArray(function (err, docs) { + var docs = []; + for (var i = 0; i < 1000; i++) { + docs.push({ a: i }); + } + + // Insert a bunch of documents for the testing + collection.insert(docs, configuration.writeConcernMax(), function (err) { expect(err).to.not.exist; - test.equal(1000, docs.length); - client.close(done); + // Perform a simple find and return all the documents + collection.find({}, { batchSize: 1000 }).toArray(function (err, docs) { + expect(err).to.not.exist; + test.equal(1000, docs.length); + + client.close(done); + }); }); - }); - }); + } + ); }); } }); diff --git a/test/functional/gridfs_stream.test.js b/test/functional/gridfs_stream.test.js index 180d6725c01..b81e25d4589 100644 --- a/test/functional/gridfs_stream.test.js +++ b/test/functional/gridfs_stream.test.js @@ -992,6 +992,10 @@ describe('GridFS Stream', function () { this.skip(); } + after(function () { + fs.unlinkSync('output'); + }); + const configuration = this.configuration; const client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { @@ -1324,63 +1328,66 @@ describe('GridFS Stream', function () { * @example-class GridFSBucket * @example-method openDownloadStream */ - it('NODE-829 start/end options for openDownloadStream where start-end is < size of chunk', { - metadata: { requires: { topology: ['single'] } }, + it( + 'NODE-829 start/end options for openDownloadStream where start-end is less than size of chunk', + { + metadata: { requires: { topology: ['single'] } }, + + test: function (done) { + var configuration = this.configuration; + var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); + // LINE var MongoClient = require('mongodb').MongoClient, + // LINE test = require('assert'); + // LINE const client = new MongoClient('mongodb://localhost:27017/test'); + // LINE const db = client.db('test); + // REPLACE configuration.writeConcernMax() WITH {w:1} + // REMOVE-LINE restartAndDone + // REMOVE-LINE done(); + // REMOVE-LINE var db = client.db(configuration.db); + // BEGIN + client.connect(function (err, client) { + var db = client.db(configuration.db); + var bucket = new GridFSBucket(db, { + bucketName: 'gridfsdownload', + chunkSizeBytes: 20 + }); - test: function (done) { - var configuration = this.configuration; - var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); - // LINE var MongoClient = require('mongodb').MongoClient, - // LINE test = require('assert'); - // LINE const client = new MongoClient('mongodb://localhost:27017/test'); - // LINE const db = client.db('test); - // REPLACE configuration.writeConcernMax() WITH {w:1} - // REMOVE-LINE restartAndDone - // REMOVE-LINE done(); - // REMOVE-LINE var db = client.db(configuration.db); - // BEGIN - client.connect(function (err, client) { - var db = client.db(configuration.db); - var bucket = new GridFSBucket(db, { - bucketName: 'gridfsdownload', - chunkSizeBytes: 20 - }); + var readStream = fs.createReadStream('./LICENSE.md'); + var uploadStream = bucket.openUploadStream('teststart.dat'); - var readStream = fs.createReadStream('./LICENSE.md'); - var uploadStream = bucket.openUploadStream('teststart.dat'); + uploadStream.once('finish', function () { + var downloadStream = bucket + .openDownloadStreamByName('teststart.dat', { start: 1 }) + .end(6); - uploadStream.once('finish', function () { - var downloadStream = bucket - .openDownloadStreamByName('teststart.dat', { start: 1 }) - .end(6); + downloadStream.on('error', function (error) { + expect(error).to.not.exist; + }); - downloadStream.on('error', function (error) { - expect(error).to.not.exist; - }); + var gotData = 0; + var str = ''; + downloadStream.on('data', function (data) { + ++gotData; + str += data.toString('utf8'); + }); - var gotData = 0; - var str = ''; - downloadStream.on('data', function (data) { - ++gotData; - str += data.toString('utf8'); + downloadStream.on('end', function () { + // Depending on different versions of node, we may get + // different amounts of 'data' events. node 0.10 gives 2, + // node >= 0.12 gives 3. Either is correct, but we just + // care that we got between 1 and 3, and got the right result + test.ok(gotData >= 1 && gotData <= 3); + test.equal(str, 'pache'); + client.close(done); + }); }); - downloadStream.on('end', function () { - // Depending on different versions of node, we may get - // different amounts of 'data' events. node 0.10 gives 2, - // node >= 0.12 gives 3. Either is correct, but we just - // care that we got between 1 and 3, and got the right result - test.ok(gotData >= 1 && gotData <= 3); - test.equal(str, 'pache'); - client.close(done); - }); + readStream.pipe(uploadStream); }); - - readStream.pipe(uploadStream); - }); - // END + // END + } } - }); + ); it('should correctly handle indexes create with BSON.Double', function (done) { const configuration = this.configuration; diff --git a/test/functional/index.test.js b/test/functional/index.test.js index 31ba5d3cea4..cdb5800801f 100644 --- a/test/functional/index.test.js +++ b/test/functional/index.test.js @@ -308,38 +308,40 @@ describe('Indexes', function () { db.createCollection('test_ensure_index', function (err, collection) { expect(err).to.not.exist; // Create an index on the collection - db.ensureIndex(collection.collectionName, 'a', configuration.writeConcernMax(), function ( - err, - indexName - ) { - expect(err).to.not.exist; - test.equal('a_1', indexName); - // Let's fetch the index information - db.indexInformation(collection.collectionName, function (err, collectionInfo) { - test.ok(collectionInfo['_id_'] != null); - test.equal('_id', collectionInfo['_id_'][0][0]); - test.ok(collectionInfo['a_1'] != null); - test.deepEqual([['a', 1]], collectionInfo['a_1']); - - db.ensureIndex( - collection.collectionName, - 'a', - configuration.writeConcernMax(), - function (err, indexName) { - test.equal('a_1', indexName); - // Let's fetch the index information - db.indexInformation(collection.collectionName, function (err, collectionInfo) { - test.ok(collectionInfo['_id_'] != null); - test.equal('_id', collectionInfo['_id_'][0][0]); - test.ok(collectionInfo['a_1'] != null); - test.deepEqual([['a', 1]], collectionInfo['a_1']); - // Let's close the db - client.close(done); - }); - } - ); - }); - }); + db.ensureIndex( + collection.collectionName, + 'a', + configuration.writeConcernMax(), + function (err, indexName) { + expect(err).to.not.exist; + test.equal('a_1', indexName); + // Let's fetch the index information + db.indexInformation(collection.collectionName, function (err, collectionInfo) { + test.ok(collectionInfo['_id_'] != null); + test.equal('_id', collectionInfo['_id_'][0][0]); + test.ok(collectionInfo['a_1'] != null); + test.deepEqual([['a', 1]], collectionInfo['a_1']); + + db.ensureIndex( + collection.collectionName, + 'a', + configuration.writeConcernMax(), + function (err, indexName) { + test.equal('a_1', indexName); + // Let's fetch the index information + db.indexInformation(collection.collectionName, function (err, collectionInfo) { + test.ok(collectionInfo['_id_'] != null); + test.equal('_id', collectionInfo['_id_'][0][0]); + test.ok(collectionInfo['a_1'] != null); + test.deepEqual([['a', 1]], collectionInfo['a_1']); + // Let's close the db + client.close(done); + }); + } + ); + }); + } + ); }); }); } @@ -409,20 +411,24 @@ describe('Indexes', function () { db.collection('geospatial_index_test', function (err, collection) { collection.ensureIndex({ loc: '2d' }, configuration.writeConcernMax(), function (err) { expect(err).to.not.exist; - collection.insert({ loc: [-100, 100] }, configuration.writeConcernMax(), function ( - err - ) { - expect(err).to.not.exist; + collection.insert( + { loc: [-100, 100] }, + configuration.writeConcernMax(), + function (err) { + expect(err).to.not.exist; - collection.insert({ loc: [200, 200] }, configuration.writeConcernMax(), function ( - err - ) { - test.ok(err.errmsg.indexOf('point not in interval of') !== -1); - test.ok(err.errmsg.indexOf('-180') !== -1); - test.ok(err.errmsg.indexOf('180') !== -1); - client.close(done); - }); - }); + collection.insert( + { loc: [200, 200] }, + configuration.writeConcernMax(), + function (err) { + test.ok(err.errmsg.indexOf('point not in interval of') !== -1); + test.ok(err.errmsg.indexOf('-180') !== -1); + test.ok(err.errmsg.indexOf('180') !== -1); + client.close(done); + } + ); + } + ); }); }); }); @@ -450,26 +456,30 @@ describe('Indexes', function () { db.collection('geospatial_index_altered_test', function (err, collection) { collection.ensureIndex({ loc: '2d' }, { min: 0, max: 1024, w: 1 }, function (err) { expect(err).to.not.exist; - collection.insert({ loc: [100, 100] }, configuration.writeConcernMax(), function ( - err - ) { - expect(err).to.not.exist; - collection.insert({ loc: [200, 200] }, configuration.writeConcernMax(), function ( - err - ) { + collection.insert( + { loc: [100, 100] }, + configuration.writeConcernMax(), + function (err) { expect(err).to.not.exist; collection.insert( - { loc: [-200, -200] }, + { loc: [200, 200] }, configuration.writeConcernMax(), function (err) { - test.ok(err.errmsg.indexOf('point not in interval of') !== -1); - test.ok(err.errmsg.indexOf('0') !== -1); - test.ok(err.errmsg.indexOf('1024') !== -1); - client.close(done); + expect(err).to.not.exist; + collection.insert( + { loc: [-200, -200] }, + configuration.writeConcernMax(), + function (err) { + test.ok(err.errmsg.indexOf('point not in interval of') !== -1); + test.ok(err.errmsg.indexOf('0') !== -1); + test.ok(err.errmsg.indexOf('1024') !== -1); + client.close(done); + } + ); } ); - }); - }); + } + ); }); }); }); @@ -487,19 +497,23 @@ describe('Indexes', function () { var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('shouldThrowDuplicateKeyErrorWhenCreatingIndex', function ( - err, - collection - ) { - collection.insert([{ a: 1 }, { a: 1 }], configuration.writeConcernMax(), function (err) { - expect(err).to.not.exist; + db.createCollection( + 'shouldThrowDuplicateKeyErrorWhenCreatingIndex', + function (err, collection) { + collection.insert( + [{ a: 1 }, { a: 1 }], + configuration.writeConcernMax(), + function (err) { + expect(err).to.not.exist; - collection.ensureIndex({ a: 1 }, { unique: true, w: 1 }, function (err) { - test.ok(err != null); - client.close(done); - }); - }); - }); + collection.ensureIndex({ a: 1 }, { unique: true, w: 1 }, function (err) { + test.ok(err != null); + client.close(done); + }); + } + ); + } + ); }); } }); @@ -514,19 +528,23 @@ describe('Indexes', function () { var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('shouldThrowDuplicateKeyErrorWhenDriverInStrictMode', function ( - err, - collection - ) { - collection.insert([{ a: 1 }, { a: 1 }], configuration.writeConcernMax(), function (err) { - expect(err).to.not.exist; + db.createCollection( + 'shouldThrowDuplicateKeyErrorWhenDriverInStrictMode', + function (err, collection) { + collection.insert( + [{ a: 1 }, { a: 1 }], + configuration.writeConcernMax(), + function (err) { + expect(err).to.not.exist; - collection.ensureIndex({ a: 1 }, { unique: true, w: 1 }, function (err) { - test.ok(err != null); - client.close(done); - }); - }); - }); + collection.ensureIndex({ a: 1 }, { unique: true, w: 1 }, function (err) { + test.ok(err != null); + client.close(done); + }); + } + ); + } + ); }); } }); @@ -542,21 +560,25 @@ describe('Indexes', function () { client.connect(function (err, client) { var db = client.db(configuration.db); // Establish connection to db - db.createCollection('shouldCorrectlyUseMinMaxForSettingRangeInEnsureIndex', function ( - err, - collection - ) { - expect(err).to.not.exist; - - collection.ensureIndex({ loc: '2d' }, { min: 200, max: 1400, w: 1 }, function (err) { + db.createCollection( + 'shouldCorrectlyUseMinMaxForSettingRangeInEnsureIndex', + function (err, collection) { expect(err).to.not.exist; - collection.insert({ loc: [600, 600] }, configuration.writeConcernMax(), function (err) { + collection.ensureIndex({ loc: '2d' }, { min: 200, max: 1400, w: 1 }, function (err) { expect(err).to.not.exist; - client.close(done); + + collection.insert( + { loc: [600, 600] }, + configuration.writeConcernMax(), + function (err) { + expect(err).to.not.exist; + client.close(done); + } + ); }); - }); - }); + } + ); }); } }); @@ -572,22 +594,22 @@ describe('Indexes', function () { client.connect(function (err, client) { var db = client.db(configuration.db); // Establish connection to db - db.createCollection('shouldCorrectlyCreateAnIndexWithOverridenName', function ( - err, - collection - ) { - expect(err).to.not.exist; - - collection.ensureIndex('name', { name: 'myfunky_name' }, function (err) { + db.createCollection( + 'shouldCorrectlyCreateAnIndexWithOverridenName', + function (err, collection) { expect(err).to.not.exist; - // Fetch full index information - collection.indexInformation({ full: false }, function (err, indexInformation) { - test.ok(indexInformation['myfunky_name'] != null); - client.close(done); + collection.ensureIndex('name', { name: 'myfunky_name' }, function (err) { + expect(err).to.not.exist; + + // Fetch full index information + collection.indexInformation({ full: false }, function (err, indexInformation) { + test.ok(indexInformation['myfunky_name'] != null); + client.close(done); + }); }); - }); - }); + } + ); }); } }); @@ -604,17 +626,21 @@ describe('Indexes', function () { var db = client.db(configuration.db); var shared = require('./contexts'); - db.collection('indexcontext').ensureIndex(shared.object, { background: true }, function ( - err - ) { - expect(err).to.not.exist; - db.collection('indexcontext').ensureIndex(shared.array, { background: true }, function ( - err - ) { + db.collection('indexcontext').ensureIndex( + shared.object, + { background: true }, + function (err) { expect(err).to.not.exist; - client.close(done); - }); - }); + db.collection('indexcontext').ensureIndex( + shared.array, + { background: true }, + function (err) { + expect(err).to.not.exist; + client.close(done); + } + ); + } + ); }); } }); @@ -723,29 +749,30 @@ describe('Indexes', function () { client.connect(function (err, client) { var db = client.db(configuration.db); var collection = db.collection('should_correctly_set_language_override'); - collection.insert([{ text: 'Lorem ipsum dolor sit amet.', langua: 'italian' }], function ( - err - ) { - expect(err).to.not.exist; - - collection.ensureIndex( - { text: 'text' }, - { language_override: 'langua', name: 'language_override_index' }, - function (err) { - expect(err).to.not.exist; + collection.insert( + [{ text: 'Lorem ipsum dolor sit amet.', langua: 'italian' }], + function (err) { + expect(err).to.not.exist; - collection.indexInformation({ full: true }, function (err, indexInformation) { + collection.ensureIndex( + { text: 'text' }, + { language_override: 'langua', name: 'language_override_index' }, + function (err) { expect(err).to.not.exist; - for (var i = 0; i < indexInformation.length; i++) { - if (indexInformation[i].name === 'language_override_index') - test.equal(indexInformation[i].language_override, 'langua'); - } - client.close(done); - }); - } - ); - }); + collection.indexInformation({ full: true }, function (err, indexInformation) { + expect(err).to.not.exist; + for (var i = 0; i < indexInformation.length; i++) { + if (indexInformation[i].name === 'language_override_index') + test.equal(indexInformation[i].language_override, 'langua'); + } + + client.close(done); + }); + } + ); + } + ); }); } }); @@ -878,15 +905,16 @@ describe('Indexes', function () { var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { var db = client.db(configuration.db); - db.collection('text_index').createIndex({ '$**': 'text' }, { name: 'TextIndex' }, function ( - err, - r - ) { - expect(err).to.not.exist; - test.equal('TextIndex', r); - // Let's close the db - client.close(done); - }); + db.collection('text_index').createIndex( + { '$**': 'text' }, + { name: 'TextIndex' }, + function (err, r) { + expect(err).to.not.exist; + test.equal('TextIndex', r); + // Let's close the db + client.close(done); + } + ); }); } }); @@ -1135,22 +1163,24 @@ describe('Indexes', function () { var db = client.db(configuration.db); var collection = db.collection('messed_up_options'); - collection.ensureIndex({ 'a.one': 1, 'a.two': 1 }, { name: 'n1', sparse: false }, function ( - err - ) { - expect(err).to.not.exist; + collection.ensureIndex( + { 'a.one': 1, 'a.two': 1 }, + { name: 'n1', sparse: false }, + function (err) { + expect(err).to.not.exist; - collection.ensureIndex( - { 'a.one': 1, 'a.two': 1 }, - { name: 'n2', sparse: true }, - function (err) { - test.ok(err); - test.equal(85, err.code); + collection.ensureIndex( + { 'a.one': 1, 'a.two': 1 }, + { name: 'n2', sparse: true }, + function (err) { + test.ok(err); + test.equal(85, err.code); - client.close(done); - } - ); - }); + client.close(done); + } + ); + } + ); }); } }); diff --git a/test/functional/insert.test.js b/test/functional/insert.test.js index 1f51543c8cd..bc72a461743 100644 --- a/test/functional/insert.test.js +++ b/test/functional/insert.test.js @@ -372,36 +372,37 @@ describe('Insert', function () { // sys.puts(sys.inspect(context.motherOfAllDocuments)) var motherOfAllDocuments = context.motherOfAllDocuments; - collection.insert(context.motherOfAllDocuments, configuration.writeConcernMax(), function ( - err, - docs - ) { - test.ok(docs); - collection.findOne(function (err, doc) { - // Assert correct deserialization of the values - test.equal(motherOfAllDocuments.string, doc.string); - test.deepEqual(motherOfAllDocuments.array, doc.array); - test.equal(motherOfAllDocuments.hash.a, doc.hash.a); - test.equal(motherOfAllDocuments.hash.b, doc.hash.b); - test.equal(date.getTime(), doc.long); - test.equal(date.toString(), doc.date.toString()); - test.equal(date.getTime(), doc.date.getTime()); - test.equal(motherOfAllDocuments.oid.toHexString(), doc.oid.toHexString()); - test.equal(motherOfAllDocuments.binary.value(), doc.binary.value()); - - test.equal(motherOfAllDocuments.int, doc.int); - test.equal(motherOfAllDocuments.long, doc.long); - test.equal(motherOfAllDocuments.float, doc.float); - test.equal(motherOfAllDocuments.regexp.toString(), doc.regexp.toString()); - test.equal(motherOfAllDocuments.boolean, doc.boolean); - test.equal(motherOfAllDocuments.where.code, doc.where.code); - test.equal(motherOfAllDocuments.where.scope['i'], doc.where.scope.i); - test.equal(motherOfAllDocuments.dbref.namespace, doc.dbref.namespace); - test.equal(motherOfAllDocuments.dbref.oid.toHexString(), doc.dbref.oid.toHexString()); - test.equal(motherOfAllDocuments.dbref.db, doc.dbref.db); - client.close(done); - }); - }); + collection.insert( + context.motherOfAllDocuments, + configuration.writeConcernMax(), + function (err, docs) { + test.ok(docs); + collection.findOne(function (err, doc) { + // Assert correct deserialization of the values + test.equal(motherOfAllDocuments.string, doc.string); + test.deepEqual(motherOfAllDocuments.array, doc.array); + test.equal(motherOfAllDocuments.hash.a, doc.hash.a); + test.equal(motherOfAllDocuments.hash.b, doc.hash.b); + test.equal(date.getTime(), doc.long); + test.equal(date.toString(), doc.date.toString()); + test.equal(date.getTime(), doc.date.getTime()); + test.equal(motherOfAllDocuments.oid.toHexString(), doc.oid.toHexString()); + test.equal(motherOfAllDocuments.binary.value(), doc.binary.value()); + + test.equal(motherOfAllDocuments.int, doc.int); + test.equal(motherOfAllDocuments.long, doc.long); + test.equal(motherOfAllDocuments.float, doc.float); + test.equal(motherOfAllDocuments.regexp.toString(), doc.regexp.toString()); + test.equal(motherOfAllDocuments.boolean, doc.boolean); + test.equal(motherOfAllDocuments.where.code, doc.where.code); + test.equal(motherOfAllDocuments.where.scope['i'], doc.where.scope.i); + test.equal(motherOfAllDocuments.dbref.namespace, doc.dbref.namespace); + test.equal(motherOfAllDocuments.dbref.oid.toHexString(), doc.dbref.oid.toHexString()); + test.equal(motherOfAllDocuments.dbref.db, doc.dbref.db); + client.close(done); + }); + } + ); }); } }); @@ -529,18 +530,19 @@ describe('Insert', function () { return 1; }; // Insert the update - collection.insert({ i: 1, z: func }, { w: 1, serializeFunctions: true }, function ( - err, - result - ) { - expect(err).to.not.exist; + collection.insert( + { i: 1, z: func }, + { w: 1, serializeFunctions: true }, + function (err, result) { + expect(err).to.not.exist; - collection.findOne({ _id: result.ops[0]._id }, function (err, object) { - test.equal(normalizedFunctionString(func), object.z.code); - test.equal(1, object.i); - client.close(done); - }); - }); + collection.findOne({ _id: result.ops[0]._id }, function (err, object) { + test.equal(normalizedFunctionString(func), object.z.code); + test.equal(1, object.i); + client.close(done); + }); + } + ); }); } }); @@ -1068,13 +1070,15 @@ describe('Insert', function () { client.connect(function (err, client) { var db = client.db(configuration.db); var collection = db.collection('Should_Correctly_fail_to_update_returning_0_results'); - collection.update({ a: 1 }, { $set: { a: 1 } }, configuration.writeConcernMax(), function ( - err, - r - ) { - test.equal(0, r.result.n); - client.close(done); - }); + collection.update( + { a: 1 }, + { $set: { a: 1 } }, + configuration.writeConcernMax(), + function (err, r) { + test.equal(0, r.result.n); + client.close(done); + } + ); }); } }); @@ -1176,19 +1180,20 @@ describe('Insert', function () { var db = client.db(configuration.db); var collection = db.collection('shouldCorrectlyInsertDocWithCustomId'); // Insert the update - collection.insert({ _id: 0, test: 'hello' }, configuration.writeConcernMax(), function ( - err, - result - ) { - expect(err).to.not.exist; - test.ok(result); + collection.insert( + { _id: 0, test: 'hello' }, + configuration.writeConcernMax(), + function (err, result) { + expect(err).to.not.exist; + test.ok(result); - collection.findOne({ _id: 0 }, function (err, item) { - test.equal(0, item._id); - test.equal('hello', item.test); - client.close(done); - }); - }); + collection.findOne({ _id: 0 }, function (err, item) { + test.equal(0, item._id); + test.equal('hello', item.test); + client.close(done); + }); + } + ); }); } }); @@ -1210,25 +1215,29 @@ describe('Insert', function () { ); // Upsert a new doc - collection.update({ a: 1 }, { $set: { a: 1 } }, { upsert: true, w: 1 }, function ( - err, - result - ) { - expect(err).to.not.exist; - if (result.result.updatedExisting) test.equal(false, result.result.updatedExisting); - test.equal(1, result.result.n); - test.ok(result.result.upserted != null); - - // Upsert an existing doc - collection.update({ a: 1 }, { $set: { a: 1 } }, { upsert: true, w: 1 }, function ( - err, - result - ) { - if (result.updatedExisting) test.equal(true, result.updatedExisting); + collection.update( + { a: 1 }, + { $set: { a: 1 } }, + { upsert: true, w: 1 }, + function (err, result) { + expect(err).to.not.exist; + if (result.result.updatedExisting) test.equal(false, result.result.updatedExisting); test.equal(1, result.result.n); - client.close(done); - }); - }); + test.ok(result.result.upserted != null); + + // Upsert an existing doc + collection.update( + { a: 1 }, + { $set: { a: 1 } }, + { upsert: true, w: 1 }, + function (err, result) { + if (result.updatedExisting) test.equal(true, result.updatedExisting); + test.equal(1, result.result.n); + client.close(done); + } + ); + } + ); }); } }); @@ -1254,19 +1263,20 @@ describe('Insert', function () { string = string + 'a'; } - collection.insert({ a: 1, string: string }, configuration.writeConcernMax(), function ( - err, - result - ) { - expect(err).to.not.exist; - test.ok(result); - - collection.findOne({ a: 1 }, function (err, doc) { + collection.insert( + { a: 1, string: string }, + configuration.writeConcernMax(), + function (err, result) { expect(err).to.not.exist; - test.equal(50000, doc.string.length); - client.close(done); - }); - }); + test.ok(result); + + collection.findOne({ a: 1 }, function (err, doc) { + expect(err).to.not.exist; + test.equal(50000, doc.string.length); + client.close(done); + }); + } + ); }); } }); @@ -1355,32 +1365,33 @@ describe('Insert', function () { var db = client.db(configuration.db); var collection = db.collection('shouldCorrectlyUseCustomObjectToUpdateDocument'); - collection.insert({ a: { b: { c: 1 } } }, configuration.writeConcernMax(), function ( - err, - result - ) { - expect(err).to.not.exist; - test.ok(result); + collection.insert( + { a: { b: { c: 1 } } }, + configuration.writeConcernMax(), + function (err, result) { + expect(err).to.not.exist; + test.ok(result); - // Dynamically build query - var query = {}; - query['a'] = {}; - query.a['b'] = {}; - query.a.b['c'] = 1; + // Dynamically build query + var query = {}; + query['a'] = {}; + query.a['b'] = {}; + query.a.b['c'] = 1; - // Update document - collection.update( - query, - { $set: { 'a.b.d': 1 } }, - configuration.writeConcernMax(), - function (err, r) { - expect(err).to.not.exist; - test.equal(1, r.result.n); + // Update document + collection.update( + query, + { $set: { 'a.b.d': 1 } }, + configuration.writeConcernMax(), + function (err, r) { + expect(err).to.not.exist; + test.equal(1, r.result.n); - client.close(done); - } - ); - }); + client.close(done); + } + ); + } + ); }); } }); @@ -1522,32 +1533,32 @@ describe('Insert', function () { expect(err).to.not.exist; test.equal(1, doc.double); - collection.findOne({ binary: new Binary(Buffer.from('hello world')) }, function ( - err, - doc - ) { - expect(err).to.not.exist; - test.equal('hello world', doc.binary.toString()); - - collection.findOne({ minkey: new MinKey() }, function (err, doc) { + collection.findOne( + { binary: new Binary(Buffer.from('hello world')) }, + function (err, doc) { expect(err).to.not.exist; - test.ok(doc.minkey._bsontype === 'MinKey'); + test.equal('hello world', doc.binary.toString()); - collection.findOne({ maxkey: new MaxKey() }, function (err, doc) { + collection.findOne({ minkey: new MinKey() }, function (err, doc) { expect(err).to.not.exist; - test.ok(doc.maxkey._bsontype === 'MaxKey'); + test.ok(doc.minkey._bsontype === 'MinKey'); - collection.findOne({ code: new Code('function () {}', { a: 55 }) }, function ( - err, - doc - ) { + collection.findOne({ maxkey: new MaxKey() }, function (err, doc) { expect(err).to.not.exist; - test.ok(doc != null); - client.close(done); + test.ok(doc.maxkey._bsontype === 'MaxKey'); + + collection.findOne( + { code: new Code('function () {}', { a: 55 }) }, + function (err, doc) { + expect(err).to.not.exist; + test.ok(doc != null); + client.close(done); + } + ); }); }); - }); - }); + } + ); }); }); }); @@ -1599,32 +1610,32 @@ describe('Insert', function () { expect(err).to.not.exist; test.equal(1, doc.double); - collection.findOne({ binary: new Binary(Buffer.from('hello world')) }, function ( - err, - doc - ) { - expect(err).to.not.exist; - test.equal('hello world', doc.binary.toString()); - - collection.findOne({ minkey: new MinKey() }, function (err, doc) { + collection.findOne( + { binary: new Binary(Buffer.from('hello world')) }, + function (err, doc) { expect(err).to.not.exist; - test.ok(doc.minkey._bsontype === 'MinKey'); + test.equal('hello world', doc.binary.toString()); - collection.findOne({ maxkey: new MaxKey() }, function (err, doc) { + collection.findOne({ minkey: new MinKey() }, function (err, doc) { expect(err).to.not.exist; - test.ok(doc.maxkey._bsontype === 'MaxKey'); + test.ok(doc.minkey._bsontype === 'MinKey'); - collection.findOne({ code: new Code('function () {}', { a: 55 }) }, function ( - err, - doc - ) { + collection.findOne({ maxkey: new MaxKey() }, function (err, doc) { expect(err).to.not.exist; - test.ok(doc != null); - client.close(done); + test.ok(doc.maxkey._bsontype === 'MaxKey'); + + collection.findOne( + { code: new Code('function () {}', { a: 55 }) }, + function (err, doc) { + expect(err).to.not.exist; + test.ok(doc != null); + client.close(done); + } + ); }); }); - }); - }); + } + ); }); }); }); diff --git a/test/functional/mapreduce.test.js b/test/functional/mapreduce.test.js index 34200b56f18..6eb676dd5e6 100644 --- a/test/functional/mapreduce.test.js +++ b/test/functional/mapreduce.test.js @@ -33,19 +33,21 @@ describe('MapReduce', function () { var map = 'function() { emit(this.user_id, 1); }'; var reduce = 'function(k,vals) { return 1; }'; - collection.mapReduce(map, reduce, { out: { replace: 'tempCollection' } }, function ( - err, - collection - ) { - collection.findOne({ _id: 1 }, function (err, result) { - test.equal(1, result.value); - - collection.findOne({ _id: 2 }, function (err, result) { + collection.mapReduce( + map, + reduce, + { out: { replace: 'tempCollection' } }, + function (err, collection) { + collection.findOne({ _id: 1 }, function (err, result) { test.equal(1, result.value); - client.close(done); + + collection.findOne({ _id: 2 }, function (err, result) { + test.equal(1, result.value); + client.close(done); + }); }); - }); - }); + } + ); } ); }); @@ -103,41 +105,43 @@ describe('MapReduce', function () { var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('test_map_reduce_with_functions_as_arguments', function ( - err, - collection - ) { - expect(err).to.not.exist; - collection.insert( - [{ user_id: 1 }, { user_id: 2 }], - configuration.writeConcernMax(), - function (err) { - expect(err).to.not.exist; + db.createCollection( + 'test_map_reduce_with_functions_as_arguments', + function (err, collection) { + expect(err).to.not.exist; + collection.insert( + [{ user_id: 1 }, { user_id: 2 }], + configuration.writeConcernMax(), + function (err) { + expect(err).to.not.exist; - // String functions - var map = function () { + // String functions + var map = function () { emit(this.user_id, 1); // eslint-disable-line - }; - var reduce = function () { - return 1; - }; - - collection.mapReduce(map, reduce, { out: { replace: 'tempCollection' } }, function ( - err, - collection - ) { - collection.findOne({ _id: 1 }, function (err, result) { - test.equal(1, result.value); + }; + var reduce = function () { + return 1; + }; - collection.findOne({ _id: 2 }, function (err, result) { - test.equal(1, result.value); - client.close(done); - }); - }); - }); - } - ); - }); + collection.mapReduce( + map, + reduce, + { out: { replace: 'tempCollection' } }, + function (err, collection) { + collection.findOne({ _id: 1 }, function (err, result) { + test.equal(1, result.value); + + collection.findOne({ _id: 2 }, function (err, result) { + test.equal(1, result.value); + client.close(done); + }); + }); + } + ); + } + ); + } + ); }); } }); @@ -162,19 +166,21 @@ describe('MapReduce', function () { var map = new Code('function() { emit(this.user_id, 1); }'); var reduce = new Code('function(k,vals) { return 1; }'); - collection.mapReduce(map, reduce, { out: { replace: 'tempCollection' } }, function ( - err, - collection - ) { - collection.findOne({ _id: 1 }, function (err, result) { - test.equal(1, result.value); - - collection.findOne({ _id: 2 }, function (err, result) { + collection.mapReduce( + map, + reduce, + { out: { replace: 'tempCollection' } }, + function (err, collection) { + collection.findOne({ _id: 1 }, function (err, result) { test.equal(1, result.value); - client.close(done); + + collection.findOne({ _id: 2 }, function (err, result) { + test.equal(1, result.value); + client.close(done); + }); }); - }); - }); + } + ); } ); }); diff --git a/test/functional/maxtimems.test.js b/test/functional/maxtimems.test.js index ea7627f546c..40cb97d14cc 100644 --- a/test/functional/maxtimems.test.js +++ b/test/functional/maxtimems.test.js @@ -3,7 +3,7 @@ var test = require('./shared').assert; const { expect } = require('chai'); var setupDatabase = require('./shared').setupDatabase; -describe('Unicode', function () { +describe('Unicode (maxTimeMS)', function () { before(function () { return setupDatabase(this.configuration); }); diff --git a/test/functional/mongo_client.test.js b/test/functional/mongo_client.test.js index e9a404e3eb6..6076ee389fb 100644 --- a/test/functional/mongo_client.test.js +++ b/test/functional/mongo_client.test.js @@ -284,7 +284,7 @@ describe('MongoClient', function () { } }); - it('should be able to access a database named "constructor"', function () { + it("should be able to access a database named 'constructor'", function () { const client = this.configuration.newClient(); let err; return client diff --git a/test/functional/operation_example.test.js b/test/functional/operation_example.test.js index 8fc4cbd4ddf..38d0ac1882b 100644 --- a/test/functional/operation_example.test.js +++ b/test/functional/operation_example.test.js @@ -669,27 +669,28 @@ describe('Operation Examples', function () { // Crete the collection for the distinct example var collection = db.collection('countExample1'); // Insert documents to perform distinct against - collection.insertMany([{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4, b: 1 }], { w: 1 }, function ( - err, - ids - ) { - test.ok(ids); - expect(err).to.not.exist; - - // Perform a total count command - collection.count(function (err, count) { + collection.insertMany( + [{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4, b: 1 }], + { w: 1 }, + function (err, ids) { + test.ok(ids); expect(err).to.not.exist; - test.equal(4, count); - // Perform a partial account where b=1 - collection.count({ b: 1 }, function (err, count) { + // Perform a total count command + collection.count(function (err, count) { expect(err).to.not.exist; - test.equal(1, count); + test.equal(4, count); - client.close(done); + // Perform a partial account where b=1 + collection.count({ b: 1 }, function (err, count) { + expect(err).to.not.exist; + test.equal(1, count); + + client.close(done); + }); }); - }); - }); + } + ); }); // END } @@ -795,26 +796,27 @@ describe('Operation Examples', function () { // Create a collection we want to drop later var collection = db.collection('createIndexExample2'); // Insert a bunch of documents for the index - collection.insertMany([{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4 }], { w: 1 }, function ( - err, - result - ) { - test.ok(result); - expect(err).to.not.exist; + collection.insertMany( + [{ a: 1 }, { a: 2 }, { a: 3 }, { a: 4 }], + { w: 1 }, + function (err, result) { + test.ok(result); + expect(err).to.not.exist; - // Create an index on the a field - collection.createIndex('a', { w: 1 }, function (err, indexName) { - test.equal('a_1', indexName); + // Create an index on the a field + collection.createIndex('a', { w: 1 }, function (err, indexName) { + test.equal('a_1', indexName); - // Perform a query, with explain to show we hit the query - collection.find({ a: 2 }).explain(function (err, explanation) { - expect(err).to.not.exist; - test.ok(explanation != null); + // Perform a query, with explain to show we hit the query + collection.find({ a: 2 }).explain(function (err, explanation) { + expect(err).to.not.exist; + test.ok(explanation != null); - client.close(done); + client.close(done); + }); }); - }); - }); + } + ); }); // END } @@ -1814,23 +1816,25 @@ describe('Operation Examples', function () { }; // Execute map reduce and return results inline - collection.mapReduce(map, reduce, { out: { inline: 1 }, verbose: true }, function ( - err, - result - ) { - test.equal(2, result.results.length); - test.ok(result.stats != null); + collection.mapReduce( + map, + reduce, + { out: { inline: 1 }, verbose: true }, + function (err, result) { + test.equal(2, result.results.length); + test.ok(result.stats != null); - collection.mapReduce( - map, - reduce, - { out: { replace: 'mapreduce_integration_test' }, verbose: true }, - function (err, result) { - test.ok(result.stats != null); - client.close(done); - } - ); - }); + collection.mapReduce( + map, + reduce, + { out: { replace: 'mapreduce_integration_test' }, verbose: true }, + function (err, result) { + test.ok(result.stats != null); + client.close(done); + } + ); + } + ); }); }); // END @@ -2059,28 +2063,33 @@ describe('Operation Examples', function () { // Crete the collection for the distinct example var collection = db.collection('simple_key_based_distinct'); // Create a geo 2d index - collection.ensureIndex({ loc: '2d' }, configuration.writeConcernMax(), function ( - err, - result - ) { - test.ok(result); - expect(err).to.not.exist; - - // Create a simple single field index - collection.ensureIndex({ a: 1 }, configuration.writeConcernMax(), function (err, result) { + collection.ensureIndex( + { loc: '2d' }, + configuration.writeConcernMax(), + function (err, result) { test.ok(result); expect(err).to.not.exist; - setTimeout(function () { - // List all of the indexes on the collection - collection.indexes(function (err, indexes) { - test.equal(3, indexes.length); + // Create a simple single field index + collection.ensureIndex( + { a: 1 }, + configuration.writeConcernMax(), + function (err, result) { + test.ok(result); + expect(err).to.not.exist; - client.close(done); - }); - }, 1000); - }); - }); + setTimeout(function () { + // List all of the indexes on the collection + collection.indexes(function (err, indexes) { + test.equal(3, indexes.length); + + client.close(done); + }); + }, 1000); + } + ); + } + ); }); // END } @@ -2196,27 +2205,27 @@ describe('Operation Examples', function () { expect(err).to.not.exist; // Fetch basic indexInformation for collection - db.indexInformation('more_index_information_test_2', function ( - err, - indexInformation - ) { - test.deepEqual([['_id', 1]], indexInformation._id_); - test.deepEqual( - [ - ['a', 1], - ['b', 1] - ], - indexInformation.a_1_b_1 - ); - - // Fetch full index information - collection.indexInformation({ full: true }, function (err, indexInformation) { - test.deepEqual({ _id: 1 }, indexInformation[0].key); - test.deepEqual({ a: 1, b: 1 }, indexInformation[1].key); - - client.close(done); - }); - }); + db.indexInformation( + 'more_index_information_test_2', + function (err, indexInformation) { + test.deepEqual([['_id', 1]], indexInformation._id_); + test.deepEqual( + [ + ['a', 1], + ['b', 1] + ], + indexInformation.a_1_b_1 + ); + + // Fetch full index information + collection.indexInformation({ full: true }, function (err, indexInformation) { + test.deepEqual({ _id: 1 }, indexInformation[0].key); + test.deepEqual({ a: 1, b: 1 }, indexInformation[1].key); + + client.close(done); + }); + } + ); } ); } @@ -2559,19 +2568,20 @@ describe('Operation Examples', function () { // BEGIN var db = client.db(configuration.db); // Create a test collection that we are getting the options back from - db.createCollection('test_collection_is_capped', { capped: true, size: 1024 }, function ( - err, - collection - ) { - test.equal('test_collection_is_capped', collection.collectionName); + db.createCollection( + 'test_collection_is_capped', + { capped: true, size: 1024 }, + function (err, collection) { + test.equal('test_collection_is_capped', collection.collectionName); - // Let's fetch the collection options - collection.isCapped(function (err, capped) { - test.equal(true, capped); + // Let's fetch the collection options + collection.isCapped(function (err, capped) { + test.equal(true, capped); - client.close(done); - }); - }); + client.close(done); + }); + } + ); }); // END } @@ -2604,20 +2614,21 @@ describe('Operation Examples', function () { // BEGIN var db = client.db(configuration.db); // Create a test collection that we are getting the options back from - db.createCollection('test_collection_options', { capped: true, size: 1024 }, function ( - err, - collection - ) { - test.equal('test_collection_options', collection.collectionName); + db.createCollection( + 'test_collection_options', + { capped: true, size: 1024 }, + function (err, collection) { + test.equal('test_collection_options', collection.collectionName); - // Let's fetch the collection options - collection.options(function (err, options) { - test.equal(true, options.capped); - test.ok(options.size >= 1024); + // Let's fetch the collection options + collection.options(function (err, options) { + test.equal(true, options.capped); + test.ok(options.size >= 1024); - client.close(done); - }); - }); + client.close(done); + }); + } + ); }); // END } @@ -2804,32 +2815,33 @@ describe('Operation Examples', function () { } // Insert a couple of documents - collection1.insertMany([{ x: 1 }, { x: 2 }], configuration.writeConcernMax(), function ( - err, - docs - ) { - test.ok(docs); - expect(err).to.not.exist; - - // Attemp to rename the first collection to the second one, this will fail - collection1.rename('test_rename_collection2', function (err, collection) { - expect(collection).to.not.exist; - test.ok(err instanceof Error); - test.ok(err.message.length > 0); - - // Attemp to rename the first collection to a name that does not exist - // this will be successful - collection1.rename('test_rename_collection3', function (err, collection2) { - test.equal('test_rename_collection3', collection2.collectionName); + collection1.insertMany( + [{ x: 1 }, { x: 2 }], + configuration.writeConcernMax(), + function (err, docs) { + test.ok(docs); + expect(err).to.not.exist; - // Ensure that the collection is pointing to the new one - collection2.count(function (err, count) { - test.equal(2, count); - client.close(done); + // Attemp to rename the first collection to the second one, this will fail + collection1.rename('test_rename_collection2', function (err, collection) { + expect(collection).to.not.exist; + test.ok(err instanceof Error); + test.ok(err.message.length > 0); + + // Attemp to rename the first collection to a name that does not exist + // this will be successful + collection1.rename('test_rename_collection3', function (err, collection2) { + test.equal('test_rename_collection3', collection2.collectionName); + + // Ensure that the collection is pointing to the new one + collection2.count(function (err, count) { + test.equal(2, count); + client.close(done); + }); }); }); - }); - }); + } + ); }); }); }); @@ -2919,21 +2931,23 @@ describe('Operation Examples', function () { // Get a collection var collection = db.collection('update_a_simple_document_upsert'); // Update the document using an upsert operation, ensuring creation if it does not exist - collection.updateOne({ a: 1 }, { $set: { b: 2, a: 1 } }, { upsert: true, w: 1 }, function ( - err, - result - ) { - expect(err).to.not.exist; - test.equal(1, result.result.n); - - // Fetch the document that we modified and check if it got inserted correctly - collection.findOne({ a: 1 }, function (err, item) { + collection.updateOne( + { a: 1 }, + { $set: { b: 2, a: 1 } }, + { upsert: true, w: 1 }, + function (err, result) { expect(err).to.not.exist; - test.equal(1, item.a); - test.equal(2, item.b); - client.close(done); - }); - }); + test.equal(1, result.result.n); + + // Fetch the document that we modified and check if it got inserted correctly + collection.findOne({ a: 1 }, function (err, item) { + expect(err).to.not.exist; + test.equal(1, item.a); + test.equal(2, item.b); + client.close(done); + }); + } + ); }); // END } @@ -3381,30 +3395,32 @@ describe('Operation Examples', function () { expect(err).to.not.exist; // Grab a collection with a callback in safe mode, ensuring it exists (should fail as it's not created) - db.collection('test_correctly_access_collections', { strict: true }, function ( - err, - col3 - ) { - expect(col3).to.not.exist; - test.ok(err != null); - - // Create the collection - db.createCollection('test_correctly_access_collections', function (err, result) { - test.ok(result); - expect(err).to.not.exist; - - // Retry to get the collection, should work as it's now created - db.collection('test_correctly_access_collections', { strict: true }, function ( - err, - col3 - ) { - test.ok(col3); + db.collection( + 'test_correctly_access_collections', + { strict: true }, + function (err, col3) { + expect(col3).to.not.exist; + test.ok(err != null); + + // Create the collection + db.createCollection('test_correctly_access_collections', function (err, result) { + test.ok(result); expect(err).to.not.exist; - client.close(done); + // Retry to get the collection, should work as it's now created + db.collection( + 'test_correctly_access_collections', + { strict: true }, + function (err, col3) { + test.ok(col3); + expect(err).to.not.exist; + + client.close(done); + } + ); }); - }); - }); + } + ); }); }); // END @@ -3656,29 +3672,29 @@ describe('Operation Examples', function () { expect(err).to.not.exist; // Insert a document in the capped collection - collection.insertOne({ a: 1 }, configuration.writeConcernMax(), function ( - err, - result - ) { - test.ok(result); - expect(err).to.not.exist; - - // Drop the collection from this world - db.dropCollection('a_simple_create_drop_collection', function (err, result) { + collection.insertOne( + { a: 1 }, + configuration.writeConcernMax(), + function (err, result) { test.ok(result); expect(err).to.not.exist; - // Verify that the collection is gone - db.listCollections({ name: 'a_simple_create_drop_collection' }).toArray(function ( - err, - names - ) { - test.equal(0, names.length); + // Drop the collection from this world + db.dropCollection('a_simple_create_drop_collection', function (err, result) { + test.ok(result); + expect(err).to.not.exist; - client.close(done); + // Verify that the collection is gone + db.listCollections({ name: 'a_simple_create_drop_collection' }).toArray( + function (err, names) { + test.equal(0, names.length); + + client.close(done); + } + ); }); - }); - }); + } + ); } ); }); @@ -3756,55 +3772,55 @@ describe('Operation Examples', function () { expect(err).to.not.exist; // Create a collection - db.createCollection('simple_rename_collection', configuration.writeConcernMax(), function ( - err, - collection - ) { - expect(err).to.not.exist; - - // Insert a document in the collection - collection.insertOne({ a: 1 }, configuration.writeConcernMax(), function (err, result) { - test.ok(result); + db.createCollection( + 'simple_rename_collection', + configuration.writeConcernMax(), + function (err, collection) { expect(err).to.not.exist; - // Retrieve the number of documents from the collection - collection.count(function (err, count) { - test.equal(1, count); + // Insert a document in the collection + collection.insertOne({ a: 1 }, configuration.writeConcernMax(), function (err, result) { + test.ok(result); + expect(err).to.not.exist; - // Rename the collection - db.renameCollection( - 'simple_rename_collection', - 'simple_rename_collection_2', - function (err, collection2) { - expect(err).to.not.exist; + // Retrieve the number of documents from the collection + collection.count(function (err, count) { + test.equal(1, count); + + // Rename the collection + db.renameCollection( + 'simple_rename_collection', + 'simple_rename_collection_2', + function (err, collection2) { + expect(err).to.not.exist; - // Retrieve the number of documents from the collection - collection2.count(function (err, count) { - test.equal(1, count); + // Retrieve the number of documents from the collection + collection2.count(function (err, count) { + test.equal(1, count); - // Verify that the collection is gone - db.listCollections({ name: 'simple_rename_collection' }).toArray(function ( - err, - names - ) { - test.equal(0, names.length); - - // Verify that the new collection exists - db.listCollections({ name: 'simple_rename_collection_2' }).toArray(function ( + // Verify that the collection is gone + db.listCollections({ name: 'simple_rename_collection' }).toArray(function ( err, names ) { - test.equal(1, names.length); + test.equal(0, names.length); - client.close(done); + // Verify that the new collection exists + db.listCollections({ name: 'simple_rename_collection_2' }).toArray( + function (err, names) { + test.equal(1, names.length); + + client.close(done); + } + ); }); }); - }); - } - ); + } + ); + }); }); - }); - }); + } + ); }); // END } @@ -4764,21 +4780,22 @@ describe('Operation Examples', function () { var collection = db.collection('test_array'); // Insert a test document - collection.insertOne({ b: [1, 2, 3] }, configuration.writeConcernMax(), function ( - err, - ids - ) { - test.ok(ids); - expect(err).to.not.exist; + collection.insertOne( + { b: [1, 2, 3] }, + configuration.writeConcernMax(), + function (err, ids) { + test.ok(ids); + expect(err).to.not.exist; - // Retrieve all the documents in the collection - collection.find().toArray(function (err, documents) { - test.equal(1, documents.length); - test.deepEqual([1, 2, 3], documents[0].b); + // Retrieve all the documents in the collection + collection.find().toArray(function (err, documents) { + test.equal(1, documents.length); + test.deepEqual([1, 2, 3], documents[0].b); - client.close(done); - }); - }); + client.close(done); + }); + } + ); }); // END } @@ -4997,21 +5014,22 @@ describe('Operation Examples', function () { var collection = db.collection('cursor_count_collection'); // Insert some docs - collection.insertMany([{ a: 1 }, { a: 2 }], configuration.writeConcernMax(), function ( - err, - docs - ) { - test.ok(docs); - expect(err).to.not.exist; - - // Do a find and get the cursor count - collection.find().count(function (err, count) { + collection.insertMany( + [{ a: 1 }, { a: 2 }], + configuration.writeConcernMax(), + function (err, docs) { + test.ok(docs); expect(err).to.not.exist; - test.equal(2, count); - client.close(done); - }); - }); + // Do a find and get the cursor count + collection.find().count(function (err, count) { + expect(err).to.not.exist; + test.equal(2, count); + + client.close(done); + }); + } + ); }); // END } @@ -6544,16 +6562,17 @@ describe('Operation Examples', function () { expect(err).to.not.exist; test.equal(1, r.result.n); - col.findOneAndDelete({ a: 1 }, { projection: { b: 1 }, sort: { a: 1 } }, function ( - err, - r - ) { - expect(err).to.not.exist; - test.equal(1, r.lastErrorObject.n); - test.equal(1, r.value.b); + col.findOneAndDelete( + { a: 1 }, + { projection: { b: 1 }, sort: { a: 1 } }, + function (err, r) { + expect(err).to.not.exist; + test.equal(1, r.lastErrorObject.n); + test.equal(1, r.value.b); - client.close(done); - }); + client.close(done); + } + ); }); }); // END diff --git a/test/functional/raw.test.js b/test/functional/raw.test.js index 5afef456105..fac29bd1f19 100644 --- a/test/functional/raw.test.js +++ b/test/functional/raw.test.js @@ -20,37 +20,37 @@ describe('Raw', function () { var client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 }); client.connect(function (err, client) { var db = client.db(configuration.db); - db.createCollection('shouldCorrectlySaveDocumentsAndReturnAsRaw', function ( - err, - collection - ) { - expect(err).to.not.exist; - // Insert some documents - collection.insert([{ a: 1 }, { b: 2000 }, { c: 2.3 }], { w: 1 }, function (err) { + db.createCollection( + 'shouldCorrectlySaveDocumentsAndReturnAsRaw', + function (err, collection) { expect(err).to.not.exist; - // You have to pass at least query + fields before passing options - collection.find({}, { raw: true, batchSize: 2 }).toArray(function (err, items) { - var objects = []; + // Insert some documents + collection.insert([{ a: 1 }, { b: 2000 }, { c: 2.3 }], { w: 1 }, function (err) { + expect(err).to.not.exist; + // You have to pass at least query + fields before passing options + collection.find({}, { raw: true, batchSize: 2 }).toArray(function (err, items) { + var objects = []; - for (var i = 0; i < items.length; i++) { - test.ok(Buffer.isBuffer(items[i])); - objects.push(BSON.deserialize(items[i])); - } + for (var i = 0; i < items.length; i++) { + test.ok(Buffer.isBuffer(items[i])); + objects.push(BSON.deserialize(items[i])); + } - test.equal(1, objects[0].a); - test.equal(2000, objects[1].b); - test.equal(2.3, objects[2].c); + test.equal(1, objects[0].a); + test.equal(2000, objects[1].b); + test.equal(2.3, objects[2].c); - // Execute findOne - collection.findOne({ a: 1 }, { raw: true }, function (err, item) { - test.ok(Buffer.isBuffer(item)); - var object = BSON.deserialize(item); - test.equal(1, object.a); - client.close(done); + // Execute findOne + collection.findOne({ a: 1 }, { raw: true }, function (err, item) { + test.ok(Buffer.isBuffer(item)); + var object = BSON.deserialize(item); + test.equal(1, object.a); + client.close(done); + }); }); }); - }); - }); + } + ); }); } }); diff --git a/test/functional/readpreference.test.js b/test/functional/readpreference.test.js index 780c4ae3a9e..f8dd3fdf0ea 100644 --- a/test/functional/readpreference.test.js +++ b/test/functional/readpreference.test.js @@ -458,7 +458,7 @@ describe('ReadPreference', function () { }); context('hedge', function () { - it('should set hedge using [find option & empty hedge]', { + it('should set hedge using [find option and empty hedge]', { metadata: { requires: { mongodb: '>=3.6.0' } }, test: withMonitoredClient(['find'], function (client, events, done) { const rp = new ReadPreference(ReadPreference.SECONDARY, null, { hedge: {} }); @@ -475,7 +475,7 @@ describe('ReadPreference', function () { }) }); - it('should set hedge using [.setReadPreference & empty hedge] ', { + it('should set hedge using [.setReadPreference and empty hedge] ', { metadata: { requires: { mongodb: '>=3.6.0' } }, test: withMonitoredClient(['find'], function (client, events, done) { const rp = new ReadPreference(ReadPreference.SECONDARY, null, { hedge: {} }); @@ -493,7 +493,7 @@ describe('ReadPreference', function () { }) }); - it('should set hedge using [.setReadPreference & enabled hedge] ', { + it('should set hedge using [.setReadPreference and enabled hedge] ', { metadata: { requires: { mongodb: '>=3.6.0' } }, test: withMonitoredClient(['find'], function (client, events, done) { const rp = new ReadPreference(ReadPreference.SECONDARY, null, { hedge: { enabled: true } }); @@ -511,7 +511,7 @@ describe('ReadPreference', function () { }) }); - it('should set hedge using [.setReadPreference & disabled hedge] ', { + it('should set hedge using [.setReadPreference and disabled hedge] ', { metadata: { requires: { mongodb: '>=3.6.0' } }, test: withMonitoredClient(['find'], function (client, events, done) { const rp = new ReadPreference(ReadPreference.SECONDARY, null, { @@ -531,7 +531,7 @@ describe('ReadPreference', function () { }) }); - it('should set hedge using [.setReadPreference & undefined hedge] ', { + it('should set hedge using [.setReadPreference and undefined hedge] ', { metadata: { requires: { mongodb: '>=3.6.0' } }, test: withMonitoredClient(['find'], function (client, events, done) { const rp = new ReadPreference(ReadPreference.SECONDARY, null); diff --git a/test/functional/saslprep.test.js b/test/functional/saslprep.test.js index 6293cbc63b8..171049b4fbc 100644 --- a/test/functional/saslprep.test.js +++ b/test/functional/saslprep.test.js @@ -70,7 +70,7 @@ describe('SASLPrep', function () { const username = user.username; const password = user.password; - it(`should be able to login with username "${username}" and password "${password}"`, { + it(`should be able to login with username '${username}' and password '${password}'`, { metadata: { requires: { mongodb: '>=3.7.3', diff --git a/test/functional/sessions.test.js b/test/functional/sessions.test.js index eb25a46ec87..ed5813199ec 100644 --- a/test/functional/sessions.test.js +++ b/test/functional/sessions.test.js @@ -33,7 +33,7 @@ const test = { } }; -describe('Sessions', function () { +describe('Sessions (Functional)', function () { before(function () { return setupDatabase(this.configuration); }); @@ -200,40 +200,42 @@ describe('Sessions', function () { context('unacknowledged writes', () => { it('should not include session for unacknowledged writes', { metadata: { requires: { topology: 'single', mongodb: '>=3.6.0' } }, - test: withMonitoredClient('insert', { clientOptions: { w: 0 } }, function ( - client, - events, - done - ) { - client - .db('test') - .collection('foo') - .insertOne({ foo: 'bar' }, err => { - expect(err).to.not.exist; - const event = events[0]; - expect(event).nested.property('command.writeConcern.w').to.equal(0); - expect(event).to.not.have.nested.property('command.lsid'); - done(); - }); - }) + test: withMonitoredClient( + 'insert', + { clientOptions: { w: 0 } }, + function (client, events, done) { + client + .db('test') + .collection('foo') + .insertOne({ foo: 'bar' }, err => { + expect(err).to.not.exist; + const event = events[0]; + expect(event).nested.property('command.writeConcern.w').to.equal(0); + expect(event).to.not.have.nested.property('command.lsid'); + done(); + }); + } + ) }); it('should throw error with explicit session', { metadata: { requires: { topology: 'replicaset', mongodb: '>=3.6.0' } }, - test: withMonitoredClient('insert', { clientOptions: { w: 0 } }, function ( - client, - events, - done - ) { - const session = client.startSession({ causalConsistency: true }); - client - .db('test') - .collection('foo') - .insertOne({ foo: 'bar' }, { session }, err => { - expect(err).to.exist; - expect(err.message).to.equal('Cannot have explicit session with unacknowledged writes'); - client.close(done); - }); - }) + test: withMonitoredClient( + 'insert', + { clientOptions: { w: 0 } }, + function (client, events, done) { + const session = client.startSession({ causalConsistency: true }); + client + .db('test') + .collection('foo') + .insertOne({ foo: 'bar' }, { session }, err => { + expect(err).to.exist; + expect(err.message).to.equal( + 'Cannot have explicit session with unacknowledged writes' + ); + client.close(done); + }); + } + ) }); }); }); diff --git a/test/functional/unicode.test.js b/test/functional/unicode.test.js index 908ec1f3c58..80fb4a3bb3c 100644 --- a/test/functional/unicode.test.js +++ b/test/functional/unicode.test.js @@ -2,7 +2,7 @@ const { assert: test, setupDatabase } = require('./shared'); const { expect } = require('chai'); -describe('Unicode', function () { +describe('Unicode (functional)', function () { before(function () { return setupDatabase(this.configuration); }); @@ -61,20 +61,20 @@ describe('Unicode', function () { 'http://a3.twimg.com/profile_images/107142257/passbild-square_normal.jpg' }; - db.createCollection('test_should_correctly_insert_unicode_containing_document', function ( - err, - collection - ) { - doc['_id'] = 'felixge'; + db.createCollection( + 'test_should_correctly_insert_unicode_containing_document', + function (err, collection) { + doc['_id'] = 'felixge'; - collection.insertOne(doc, { w: 1 }, function (err) { - expect(err).to.not.exist; - collection.findOne(function (err, doc) { - test.equal('felixge', doc._id); - client.close(done); + collection.insertOne(doc, { w: 1 }, function (err) { + expect(err).to.not.exist; + collection.findOne(function (err, doc) { + test.equal('felixge', doc._id); + client.close(done); + }); }); - }); - }); + } + ); }); } }); diff --git a/test/functional/uri.test.js b/test/functional/uri.test.js index 4410c01c705..772b9a0387e 100644 --- a/test/functional/uri.test.js +++ b/test/functional/uri.test.js @@ -22,20 +22,22 @@ describe('URI', function () { expect(err).to.not.exist; var db = client.db(self.configuration.db); - db.collection('mongoclient_test').update({ a: 1 }, { b: 1 }, { upsert: true }, function ( - err, - result - ) { - expect(err).to.not.exist; + db.collection('mongoclient_test').update( + { a: 1 }, + { b: 1 }, + { upsert: true }, + function (err, result) { + expect(err).to.not.exist; - if (result) { - expect(result.result.ok).to.equal(1); - } else { - expect(result).to.not.exist; - } + if (result) { + expect(result.result.ok).to.equal(1); + } else { + expect(result).to.not.exist; + } - client.close(done); - }); + client.close(done); + } + ); }); } }); diff --git a/test/functional/view.test.js b/test/functional/view.test.js index 0e24f8330eb..9881d833f93 100644 --- a/test/functional/view.test.js +++ b/test/functional/view.test.js @@ -52,20 +52,21 @@ describe('Views', function () { var db = client.db(self.configuration.db); // Simple findAndModify command returning the new document - db.createCollection('test', { viewOn: 'users', pipeline: [{ $match: {} }] }, function ( - err, - r - ) { - expect(r).to.exist; - expect(err).to.not.exist; - expect(commandResult).to.eql({ - create: 'test', - viewOn: 'users', - pipeline: [{ $match: {} }] - }); + db.createCollection( + 'test', + { viewOn: 'users', pipeline: [{ $match: {} }] }, + function (err, r) { + expect(r).to.exist; + expect(err).to.not.exist; + expect(commandResult).to.eql({ + create: 'test', + viewOn: 'users', + pipeline: [{ $match: {} }] + }); - client.close(done); - }); + client.close(done); + } + ); }); }); } diff --git a/test/manual/data_lake.test.js b/test/manual/data_lake.test.js index 8e22d93f4c3..7ecec8c060c 100644 --- a/test/manual/data_lake.test.js +++ b/test/manual/data_lake.test.js @@ -45,29 +45,29 @@ describe('Atlas Data Lake', function () { ); it( 'should connect with auth SCRAM-SHA-1', - withClient('mongodb://mhuser:pencil@localhost?authMechanism=SCRAM-SHA-1', function ( - client, - done - ) { - const db = client.db('admin'); - db.command({ killCursors: 'kill_cursor_collection' }, err => { - expect(err).to.not.exist; - done(); - }); - }) + withClient( + 'mongodb://mhuser:pencil@localhost?authMechanism=SCRAM-SHA-1', + function (client, done) { + const db = client.db('admin'); + db.command({ killCursors: 'kill_cursor_collection' }, err => { + expect(err).to.not.exist; + done(); + }); + } + ) ); it( 'should connect with auth SCRAM-SHA-256', - withClient('mongodb://mhuser:pencil@localhost?authMechanism=SCRAM-SHA-256', function ( - client, - done - ) { - const db = client.db('admin'); - db.command({ killCursors: 'kill_cursor_collection' }, err => { - expect(err).to.not.exist; - done(); - }); - }) + withClient( + 'mongodb://mhuser:pencil@localhost?authMechanism=SCRAM-SHA-256', + function (client, done) { + const db = client.db('admin'); + db.command({ killCursors: 'kill_cursor_collection' }, err => { + expect(err).to.not.exist; + done(); + }); + } + ) ); }); }); diff --git a/test/manual/mocharc.json b/test/manual/mocharc.json index b619df10599..78cf9600e48 100644 --- a/test/manual/mocharc.json +++ b/test/manual/mocharc.json @@ -1,4 +1,4 @@ { "require": "ts-node/register", - "reporter": "spec-xunit-file" -} \ No newline at end of file + "reporter": "test/tools/reporter/mongodb_reporter.js" +} diff --git a/test/tools/crawfish.mjs b/test/tools/crawfish.mjs new file mode 100755 index 00000000000..c681ef93e69 --- /dev/null +++ b/test/tools/crawfish.mjs @@ -0,0 +1,154 @@ +#! /usr/bin/env node --experimental-modules + +import { createReadStream, existsSync, promises } from 'fs'; +const { readFile } = promises; +import { createInterface } from 'readline'; +import xml2js from 'xml2js'; +const { parseStringPromise } = xml2js; +import yargs from 'yargs'; +import chalk from 'chalk'; + +let warnings = false; + +/** + * @param {string[]} args - program arguments + */ +async function main(args) { + args = yargs(args) + .option('l', { + alias: 'log', + demandOption: true, + default: './data/mongod.log', // cluster_setup.sh default + describe: 'The log you wish to filter', + type: 'string' + }) + .option('f', { + alias: 'filter', + demandOption: true, + default: '', // No filter is still useful if you want to look at all tests + describe: 'The test name filter, if none provided all test logs will be shown', + type: 'string' + }) + .option('v', { + alias: 'verbose', + demandOption: false, + describe: 'Enable warnings about processing', + type: 'boolean' + }) + .help('h') + .alias('h', 'help').epilog(` + - Some log processing is done: + - better date time format + - string interpolation + - 'testName' property added + - Depends on an xunit file, should be left over from every test run + + Examples: + ${chalk.green('crawfish.mjs X Y | jq -SC | less -R')} + - jq -SC will sort the keys and force color output + - less lets you page through and search logs + + ${chalk.green('crawfish.mjs X Y | jq -Sc | code -')} + - jq -Sc will sort the keys and keep the logs one line (compact) + - Opens the output in vscode, good for searching! + `).argv; + + warnings = !!args.verbose; + const logFile = args.log; + const testNameRegex = args.filter; + + if (!existsSync('xunit.xml')) { + console.error('xunit.xml file not found, required for db log test filtering.'); + process.exit(1); + } + + const content = await readFile('xunit.xml', { encoding: 'utf8' }); + const xunit = await parseStringPromise(content); + + const tests = collectTests(xunit, testNameRegex); + if (warnings) console.error(`filtering log file ${logFile}`); + + const logStream = + logFile === '-' ? process.stdin : createReadStream(logFile, { encoding: 'utf8' }); + const lineStream = createInterface({ + input: logStream, + crlfDelay: Infinity + }); + + const testToLogs = new Map(tests.map(({ name }) => [name, []])); + for await (const line of lineStream) { + const structuredLog = JSON.parse(line); + for (const test of tests) { + const logTime = Date.parse(structuredLog.t.$date); + if (logTime <= test.end && logTime >= test.start) { + testToLogs.get(test.name).push(structuredLog); + } + } + } + + for (const [name, logs] of testToLogs.entries()) { + for (const log of logs) { + log.testName = name; + interpolateMsg(log); + friendlyDate(log); + console.log(JSON.stringify(log)); + } + } +} + +function interpolateMsg(log) { + if (!log.msg) return; + + if (!log.attr) return; + + for (const key in log.attr) { + if (Reflect.has(log.attr, key)) { + log.msg = log.msg.split(`{${key}}`).join(`${JSON.stringify(log.attr[key])}`); + delete log.attr[key]; + } + } + + if (Object.keys(log.attr).length === 0) delete log.attr; + log.msg = log.msg.split(`"`).join(`'`); +} + +function friendlyDate(log) { + const dateString = typeof log.t === 'string' ? log.t : log.t.$date; + try { + log.t = new Date(Date.parse(dateString)).toISOString(); + } catch (e) { + if (warnings) console.error(`Cannot translate date time of ${JSON.stringify(log)}`); + } +} + +function collectTests(xuint, testFilter) { + const suites = xuint.testsuites.testsuite; + + const tests = []; + + for (const suite of suites) { + if (suite.testcase) { + for (const test of suite.testcase) { + const fullName = `${suite.$.name} ${test.$.name}`; + if (fullName.toLowerCase().includes(testFilter.toLowerCase())) { + if (test.$.start === '0') { + if (warnings) console.error(`Warning: ${fullName} was skipped, theres no logs`); + continue; + } + tests.push({ + name: fullName, + start: Date.parse(test.$.start), + end: Date.parse(test.$.end) + }); + } + } + } + } + + return tests; +} + +main(process.argv).catch(e => { + console.error(e); + process.exit(1); +}); diff --git a/test/tools/reporter/mongodb_reporter.js b/test/tools/reporter/mongodb_reporter.js new file mode 100644 index 00000000000..60b63024074 --- /dev/null +++ b/test/tools/reporter/mongodb_reporter.js @@ -0,0 +1,274 @@ +//@ts-check +'use strict'; +const mocha = require('mocha'); +const chalk = require('chalk').default; +const { + EVENT_RUN_BEGIN, + EVENT_RUN_END, + EVENT_TEST_FAIL, + EVENT_TEST_PASS, + EVENT_SUITE_BEGIN, + EVENT_SUITE_END, + EVENT_TEST_PENDING, + EVENT_TEST_BEGIN, + EVENT_TEST_END +} = mocha.Runner.constants; + +const fs = require('fs'); +const os = require('os'); + +let REPORT_TO_STDIO = false; + +function captureStream(stream) { + var oldWrite = stream.write; + var buf = ''; + stream.write = function (chunk) { + buf += chunk.toString(); // chunk is a String or Buffer + oldWrite.apply(stream, arguments); + }; + + return { + unhook: function unhook() { + stream.write = oldWrite; + return buf; + }, + captured: function () { + return buf; + } + }; +} + +/** + * @param {Mocha.Runner} runner + * @this {any} + */ +class MongoDBMochaReporter extends mocha.reporters.Spec { + constructor(runner) { + super(runner); + /** @type {Map} */ + this.suites = new Map(); + this.xunitWritten = false; + runner.on(EVENT_RUN_BEGIN, () => this.start()); + runner.on(EVENT_RUN_END, () => this.end()); + runner.on(EVENT_SUITE_BEGIN, suite => this.onSuite(suite)); + runner.on(EVENT_TEST_BEGIN, test => this.onTest(test)); + runner.on(EVENT_TEST_PASS, test => this.pass(test)); + runner.on(EVENT_TEST_FAIL, (test, error) => this.fail(test, error)); + runner.on(EVENT_TEST_PENDING, test => this.pending(test)); + runner.on(EVENT_SUITE_END, suite => this.suiteEnd(suite)); + runner.on(EVENT_TEST_END, test => this.testEnd(test)); + + process.on('SIGINT', () => this.end(true)); + } + start() {} + + end(ctrlC) { + if (ctrlC) console.log('emergency exit!'); + const output = { testSuites: [] }; + + for (const [id, [className, { suite }]] of [...this.suites.entries()].entries()) { + let totalSuiteTime = 0; + let testCases = []; + let failureCount = 0; + + for (const test of suite.tests) { + let time = Reflect.get(test, 'elapsedTime') / 1000; + time = Number.isNaN(time) ? 0 : time; + + totalSuiteTime += time; + failureCount += test.state === 'failed' ? 1 : 0; + + let startTime = Reflect.get(test, 'startTime'); + startTime = startTime ? startTime.toISOString() : 0; + + let endTime = Reflect.get(test, 'endTime'); + endTime = endTime ? endTime.toISOString() : 0; + + let error = Reflect.get(test, 'error'); + let failure = error + ? { + type: error.constructor.name, + message: error.message, + stack: error.stack + } + : undefined; + + let skipped = !!Reflect.get(test, 'skipped'); + + testCases.push({ name: test.title, className, time, startTime, endTime, skipped, failure }); + } + + let timestamp = Reflect.get(suite, 'timestamp'); + timestamp = timestamp ? timestamp.toISOString().split('.')[0] : ''; + + output.testSuites.push({ + package: suite.file.includes('functional') ? 'Functional' : 'Unit', + id, + name: className, + timestamp, + hostname: os.hostname(), + tests: suite.tests.length, + failures: failureCount, + errors: '0', + time: totalSuiteTime, + testCases, + stdout: Reflect.get(suite, 'stdout'), + stderr: Reflect.get(suite, 'stderr') + }); + } + + if (!this.xunitWritten) { + fs.writeFileSync('xunit.xml', outputToXML(output), { encoding: 'utf8' }); + } + this.xunitWritten = true; + console.log(chalk.bold('wrote xunit.xml')); + } + + /** + * @param {Mocha.Suite} suite + */ + onSuite(suite) { + if (suite.root) return; + if (!this.suites.has(suite.fullTitle())) { + Reflect.set(suite, 'timestamp', new Date()); + this.suites.set(suite.fullTitle(), { + suite, + stdout: captureStream(process.stdout), + stderr: captureStream(process.stderr) + }); + } else { + console.warn(`${chalk.yellow('WARNING:')}: ${suite.fullTitle()} started twice`); + } + } + + /** + * @param {Mocha.Suite} suite + */ + suiteEnd(suite) { + if (suite.root) return; + const currentSuite = this.suites.get(suite.fullTitle()); + if (!currentSuite) { + console.error('Suite never started >:('); + process.exit(1); + } + if (currentSuite.stdout || currentSuite.stderr) { + Reflect.set(suite, 'stdout', currentSuite.stdout.unhook()); + Reflect.set(suite, 'stderr', currentSuite.stderr.unhook()); + delete currentSuite.stdout; + delete currentSuite.stderr; + } + } + + /** + * @param {Mocha.Test} test + */ + onTest(test) { + Reflect.set(test, 'startTime', new Date()); + } + + /** + * @param {Mocha.Test} test + */ + testEnd(test) { + Reflect.set(test, 'endTime', new Date()); + Reflect.set( + test, + 'elapsedTime', + Number(Reflect.get(test, 'endTime') - Reflect.get(test, 'startTime')) + ); + } + + /** + * @param {Mocha.Test} test + */ + pass(test) { + if (REPORT_TO_STDIO) console.log(chalk.green(`✔ ${test.fullTitle()}`)); + } + + /** + * @param {Mocha.Test} test + * @param {{ message: any; }} error + */ + fail(test, error) { + if (REPORT_TO_STDIO) console.log(chalk.red(`⨯ ${test.fullTitle()} -- ${error.message}`)); + Reflect.set(test, 'error', error); + } + + /** + * @param {Mocha.Test} test + */ + pending(test) { + if (REPORT_TO_STDIO) console.log(chalk.cyan(`↬ ${test.fullTitle()}`)); + Reflect.set(test, 'skipped', true); + } +} + +module.exports = MongoDBMochaReporter; + +// eslint-disable-next-line no-control-regex +const ANSI_ESCAPE_REGEX = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; +function outputToXML(output) { + function cdata(str) { + return `').join('\\]\\]\\>')}]]>`; + } + + function makeTag(name, attributes, selfClose, content) { + const attributesString = Object.entries(attributes || {}) + .map(([k, v]) => `${k}="${String(v).split('"').join("'")}"`) + .join(' '); + let tag = `<${name}${attributesString ? ' ' + attributesString : ''}`; + if (selfClose) return tag + '/>\n'; + else tag += '>'; + if (content) return tag + content + ``; + return tag; + } + + let s = + '\n\n\n'; + + for (const suite of output.testSuites) { + s += makeTag('testsuite', { + package: suite.package, + id: suite.id, + name: suite.name, + timestamp: suite.timestamp, + hostname: suite.hostname, + tests: suite.tests, + failures: suite.failures, + errors: suite.errors, + time: suite.time + }); + s += '\n\t' + makeTag('properties') + '\n'; // can put metadata here? + for (const test of suite.testCases) { + s += + '\t' + + makeTag( + 'testcase', + { + name: test.name, + classname: test.className, + time: test.time, + start: test.startTime, + end: test.endTime + }, + !test.failure && !test.skipped + ); + if (test.failure) { + s += + '\n\t\t' + + makeTag('failure', { type: test.failure.type }, false, cdata(test.failure.stack)) + + '\n'; + s += `\t\n`; + } + if (test.skipped) { + s += makeTag('skipped', {}, true); + s += `\t\n`; + } + } + s += '\t' + makeTag('system-out', {}, false, cdata(suite.stdout)) + '\n'; + s += '\t' + makeTag('system-err', {}, false, cdata(suite.stderr)) + '\n'; + s += `\n`; + } + + return s + '\n'; +} diff --git a/test/tools/reporter/xunit.xsd b/test/tools/reporter/xunit.xsd new file mode 100644 index 00000000000..da4249e2c0a --- /dev/null +++ b/test/tools/reporter/xunit.xsd @@ -0,0 +1,219 @@ + + + + JUnit test result schema for the Apache Ant JUnit and JUnitReport tasks +Copyright © 2011, Windy Road Technology Pty. Limited +The Apache Ant JUnit XML Schema is distributed under the terms of the Apache License Version 2.0 http://www.apache.org/licenses/ +Permission to waive conditions of this license may be requested from Windy Road Support (http://windyroad.org/support). + + + + + + + + + + Contains an aggregation of testsuite results + + + + + + + + + + Derived from testsuite/@name in the non-aggregated documents + + + + + Starts at '0' for the first testsuite and is incremented by 1 for each following testsuite + + + + + + + + + + + + Contains the results of exexuting a testsuite + + + + + Properties (e.g., environment settings) set during test execution + + + + + + + + + + + + + + + + + + + + + + + + + Indicates that the test errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the test. Contains as a text node relevant data for the error, e.g., a stack trace + + + + + + + The error message. e.g., if a java exception is thrown, the return value of getMessage() + + + + + The type of error that occured. e.g., if a java execption is thrown the full class name of the exception. + + + + + + + + + Indicates that the test failed. A failure is a test which the code has explicitly failed by using the mechanisms for that purpose. e.g., via an assertEquals. Contains as a text node relevant data for the failure, e.g., a stack trace + + + + + + + The message specified in the assert + + + + + The type of the assert. + + + + + + + + + + Name of the test method + + + + + Full class name for the class the test method is in. + + + + + Time taken (in seconds) to execute the test + + + + + Timestamp test started + + + + + Timestamp test ended + + + + + + + Data that was written to standard out while the test was executed + + + + + + + + + + Data that was written to standard error while the test was executed + + + + + + + + + + + Full class name of the test for non-aggregated testsuite documents. Class name without the package for aggregated testsuites documents + + + + + + + + + + when the test was executed. Timezone may not be specified. + + + + + Host on which the tests were executed. 'localhost' should be used if the hostname cannot be determined. + + + + + + + + + + The total number of tests in the suite + + + + + The total number of tests in the suite that failed. A failure is a test which the code has explicitly failed by using the mechanisms for that purpose. e.g., via an assertEquals + + + + + The total number of tests in the suite that errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the test. + + + + + The total number of ignored or skipped tests in the suite. + + + + + Time taken (in seconds) to execute the tests in the suite + + + + + + + + + diff --git a/test/unit/cmap/connection.test.js b/test/unit/cmap/connection.test.js index 46bacc99778..b2fe38d122d 100644 --- a/test/unit/cmap/connection.test.js +++ b/test/unit/cmap/connection.test.js @@ -5,7 +5,7 @@ const { connect } = require('../../../src/cmap/connect'); const Connection = require('../../../src/cmap/connection').Connection; const expect = require('chai').expect; -describe('Connection', function () { +describe('Connection (unit/cmap)', function () { let server; after(() => mock.cleanup()); before(() => mock.createServer().then(s => (server = s))); diff --git a/test/unit/core/sessions.test.js b/test/unit/core/sessions.test.js index 1434b1745af..11e1311d318 100644 --- a/test/unit/core/sessions.test.js +++ b/test/unit/core/sessions.test.js @@ -8,7 +8,7 @@ const { ServerSessionPool, ServerSession, ClientSession } = require('../../../sr const { now } = require('../../../src/utils'); let test = {}; -describe('Sessions', function () { +describe('Sessions (core)', function () { describe('ClientSession', function () { it('should throw errors with invalid parameters', { metadata: { requires: { topology: 'single' } }, diff --git a/test/unit/deprecate_warning.test.js b/test/unit/deprecate_warning.test.js index 366f6167adc..6137593d2b8 100644 --- a/test/unit/deprecate_warning.test.js +++ b/test/unit/deprecate_warning.test.js @@ -9,7 +9,7 @@ chai.use(sinonChai); const makeTestFunction = require('../tools/utils').makeTestFunction; const ensureCalledWith = require('../tools/utils').ensureCalledWith; -describe('Deprecation Warnings', function () { +describe('Deprecation Warnings (unit)', function () { let messages = []; const deprecatedOptions = ['maxScan', 'snapshot', 'fields']; const defaultMessage = ' is deprecated and will be removed in a later version.'; diff --git a/test/unit/sessions/client.test.js b/test/unit/sessions/client.test.js index 7402efcc5dd..81f374ac60f 100644 --- a/test/unit/sessions/client.test.js +++ b/test/unit/sessions/client.test.js @@ -4,7 +4,7 @@ const expect = require('chai').expect; const mock = require('mongodb-mock-server'); const test = {}; -describe('Sessions', function () { +describe('Sessions (client)', function () { describe('Client', function () { afterEach(() => mock.cleanup()); beforeEach(() => { diff --git a/test/unit/sessions/collection.test.js b/test/unit/sessions/collection.test.js index 0e870771511..2af4be9179d 100644 --- a/test/unit/sessions/collection.test.js +++ b/test/unit/sessions/collection.test.js @@ -5,7 +5,7 @@ const mock = require('mongodb-mock-server'); const test = {}; describe('Sessions', function () { - describe('Collection', function () { + describe('Collection (sessions)', function () { afterEach(() => mock.cleanup()); beforeEach(() => { return mock.createServer().then(server => { @@ -45,7 +45,8 @@ describe('Sessions', function () { .then(() => coll.findOne({}, { session: session, readConcern: { level: 'majority' } })) .then(() => { expect(findCommand.readConcern).to.have.keys(['level', 'afterClusterTime']); - expect(findCommand.readConcern.afterClusterTime).to.eql(insertOperationTime); + expect(insertOperationTime.equals(findCommand.readConcern.afterClusterTime)).to.be + .true; session.endSession({ skipCommand: true }); return client.close();