-
Notifications
You must be signed in to change notification settings - Fork 97
chore(NODE-3849)!: update dependencies and sync tooling #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4cdfc8a
chore(NODE-3849): update dependencies and sync tooling
nbbeeken cae85af
attach test results
nbbeeken c33761c
Bump nvm back down to v0.38.0
nbbeeken e1ce8c6
Put carat on prebuild-install
nbbeeken c1841cb
update lock file
nbbeeken 2afac39
fixes
nbbeeken f106f01
fix: hostname
nbbeeken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| { | ||
| "root": true, | ||
| "extends": [ | ||
| "eslint:recommended", | ||
| "plugin:prettier/recommended" | ||
| ], | ||
| "env": { | ||
| "node": true, | ||
| "mocha": true, | ||
| "es6": true | ||
| }, | ||
| "parserOptions": { | ||
| "ecmaVersion": 2019 | ||
| }, | ||
| "plugins": [ | ||
| "prettier" | ||
| ], | ||
| "rules": { | ||
| "no-restricted-properties": [ | ||
| "error", | ||
| { | ||
| "object": "describe", | ||
| "property": "only" | ||
| }, | ||
| { | ||
| "object": "it", | ||
| "property": "only" | ||
| }, | ||
| { | ||
| "object": "context", | ||
| "property": "only" | ||
| } | ||
| ], | ||
| "prettier/prettier": "error", | ||
| "no-console": "error", | ||
| "valid-typeof": "error", | ||
| "eqeqeq": ["error", "always", {"null": "ignore"}], | ||
| "strict": ["error", "global"], | ||
| "no-restricted-syntax": [ | ||
| "error", | ||
| { | ||
| "selector": "TSEnumDeclaration", | ||
| "message": "Do not declare enums" | ||
| }, | ||
| { | ||
| "selector": "BinaryExpression[operator=/[=!]==/] Identifier[name='undefined']", | ||
| "message": "Do not strictly check undefined" | ||
| }, | ||
| { | ||
| "selector": "BinaryExpression[operator=/[=!]==/] Literal[raw='null']", | ||
| "message": "Do not strictly check null" | ||
| }, | ||
| { | ||
| "selector": "BinaryExpression[operator=/[=!]==?/] Literal[value='undefined']", | ||
| "message": "Do not strictly check typeof undefined (NOTE: currently this rule only detects the usage of 'undefined' string literal so this could be a misfire)" | ||
| } | ||
| ] | ||
| }, | ||
| "overrides": [ | ||
| { | ||
| // Settings for javascript test files | ||
| "files": [ | ||
| "test/**/*.js" | ||
| ], | ||
| "rules": { | ||
| "no-console": "off", | ||
| "no-restricted-syntax": "off" | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #!/usr/bin/env bash -x | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Copied from the mongo-c-driver | ||
| find_cmake () | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,3 +18,5 @@ npm-debug.log | |
| .vscode | ||
| deps | ||
| *.tgz | ||
|
|
||
| xunit.xml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/mocharc.json", | ||
| "recursive": true, | ||
| "failZero": true, | ||
| "reporter": "test/tools/mongodb_reporter.js", | ||
| "sort": true, | ||
| "color": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "tabWidth": 2, | ||
| "printWidth": 100, | ||
| "arrowParens": "avoid", | ||
| "trailingComma": "none" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| 'use strict'; | ||
|
|
||
| /** @internal */ | ||
| const kBuffers = Symbol('buffers'); | ||
| /** @internal */ | ||
| const kLength = Symbol('length'); | ||
|
|
||
| /** | ||
| * A pool of Buffers which allow you to read them as if they were one | ||
| * @internal | ||
| */ | ||
| class BufferPool { | ||
| // [kBuffers]: Buffer[]; | ||
dariakp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // [kLength]: number; | ||
|
|
||
| constructor() { | ||
| this[kBuffers] = []; | ||
| this[kLength] = 0; | ||
| } | ||
|
|
||
| get length() { | ||
| return this[kLength]; | ||
| } | ||
|
|
||
| /** | ||
| * Adds a buffer to the internal buffer pool list | ||
| * @param {Buffer} buffer - buffer to append to the pool | ||
| * @returns {void} | ||
| */ | ||
| append(buffer) { | ||
| this[kBuffers].push(buffer); | ||
| this[kLength] += buffer.length; | ||
| } | ||
|
|
||
| /** | ||
| * Returns the requested number of bytes without consuming them | ||
| * @param {number} size - the number of bytes to return from the head of the pool | ||
| * @returns {Buffer} | ||
| */ | ||
| peek(size) { | ||
| return this.read(size, false); | ||
| } | ||
|
|
||
| /** | ||
| * Reads the requested number of bytes, optionally consuming them | ||
| * @param {number} size - the number of bytes to return from the head of the pool | ||
| * @param {boolean} [consume] - whether the bytes returned should be removed, defaults to true | ||
| * @returns {Buffer} | ||
| */ | ||
| read(size, consume = true) { | ||
| if (typeof size !== 'number' || size < 0) { | ||
| throw new Error('Argument "size" must be a non-negative number'); | ||
| } | ||
|
|
||
| if (size > this[kLength]) { | ||
| return Buffer.alloc(0); | ||
| } | ||
|
|
||
| let result; | ||
|
|
||
| // read the whole buffer | ||
| if (size === this.length) { | ||
| result = Buffer.concat(this[kBuffers]); | ||
|
|
||
| if (consume) { | ||
| this[kBuffers] = []; | ||
| this[kLength] = 0; | ||
| } | ||
| } | ||
|
|
||
| // size is within first buffer, no need to concat | ||
| else if (size <= this[kBuffers][0].length) { | ||
| result = this[kBuffers][0].slice(0, size); | ||
| if (consume) { | ||
| this[kBuffers][0] = this[kBuffers][0].slice(size); | ||
| this[kLength] -= size; | ||
| } | ||
| } | ||
|
|
||
| // size is beyond first buffer, need to track and copy | ||
| else { | ||
| result = Buffer.allocUnsafe(size); | ||
|
|
||
| let idx; | ||
| let offset = 0; | ||
| let bytesToCopy = size; | ||
| for (idx = 0; idx < this[kBuffers].length; ++idx) { | ||
| let bytesCopied; | ||
| if (bytesToCopy > this[kBuffers][idx].length) { | ||
| bytesCopied = this[kBuffers][idx].copy(result, offset, 0); | ||
| offset += bytesCopied; | ||
| } else { | ||
| bytesCopied = this[kBuffers][idx].copy(result, offset, 0, bytesToCopy); | ||
| if (consume) { | ||
| this[kBuffers][idx] = this[kBuffers][idx].slice(bytesCopied); | ||
| } | ||
| offset += bytesCopied; | ||
| break; | ||
| } | ||
|
|
||
| bytesToCopy -= bytesCopied; | ||
| } | ||
|
|
||
| // compact the internal buffer array | ||
| if (consume) { | ||
| this[kBuffers] = this[kBuffers].slice(idx); | ||
| this[kLength] -= size; | ||
| } | ||
| } | ||
|
|
||
| return result; | ||
| } | ||
| } | ||
|
|
||
| module.exports = { BufferPool }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.