Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mongodb/js-bson
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.0.0-alpha.2
Choose a base ref
...
head repository: mongodb/js-bson
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing 301 changed files with 219,405 additions and 13,417 deletions.
34 changes: 23 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,8 @@
},
"plugins": [
"prettier",
"eslint-plugin-tsdoc"
"eslint-plugin-tsdoc",
"no-bigint-usage"
],
"reportUnusedDisableDirectives": true,
"rules": {
@@ -50,19 +51,30 @@
"error",
"global"
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Function": false
}
}
],
"@typescript-eslint/no-unsafe-function-type": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off"
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
// Note: you must disable the base rule as it can report incorrect errors
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"disallowTypeAnnotations": false,
"fixStyle": "inline-type-imports"
}
],
"no-bigint-usage/no-bigint-literals": "error",
"no-restricted-globals": [
"error",
"BigInt",
"DataView"
]
},
"overrides": [
{
@@ -76,4 +88,4 @@
}
}
]
}
}
216 changes: 186 additions & 30 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
@@ -25,88 +25,162 @@ functions:
binary: bash
add_expansions_to_env: true
args:
- .evergreen/setup-environment.sh
- '.evergreen/prepare-shell.sh'
- command: expansions.update
params:
file: src/expansion.yml

install dependencies:
- command: shell.exec
- command: subprocess.exec
type: setup
params:
working_dir: src
script: |
${PREPARE_SHELL}
echo "NODE_VERSION=${NODE_VERSION}"
NODE_VERSION=${NODE_VERSION} ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
binary: bash
add_expansions_to_env: true
args:
- .evergreen/install-dependencies.sh

perf send:
- command: subprocess.exec
params:
working_dir: src
binary: bash
add_expansions_to_env: true
args:
- .evergreen/perf-send.sh

run tests:
- command: shell.exec
- command: subprocess.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
echo "NODE_VERSION=${NODE_VERSION} TEST_TARGET=${TEST_TARGET}"
NODE_VERSION=${NODE_VERSION} ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh ${TEST_TARGET}
add_expansions_to_env: true
binary: bash
args:
- .evergreen/run-tests.sh

run checks:
- command: shell.exec
- command: subprocess.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
echo "NODE_VERSION=${NODE_VERSION} TEST_TARGET=${TEST_TARGET}"
bash ${PROJECT_DIRECTORY}/.evergreen/run-checks.sh
add_expansions_to_env: true
binary: bash
args:
- .evergreen/run-checks.sh

run typescript:
- command: subprocess.exec
type: test
params:
working_dir: src
timeout_secs: 60
add_expansions_to_env: true
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TS_VERSION: "${TS_VERSION}"
TRY_COMPILING_LIBRARY: "${TRY_COMPILING_LIBRARY}"
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-typescript.sh

run eslint plugin tests:
- command: subprocess.exec
type: test
params:
working_dir: src
timeout_secs: 60
add_expansions_to_env: true
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
binary: bash
args:
- .evergreen/run-eslint-plugin-test.sh
run bundling:
- command: subprocess.exec
type: test
params:
working_dir: src
binary: bash
add_expansions_to_env: true
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
args:
- .evergreen/run-bundling-test.sh
run granular benchmarks:
- command: subprocess.exec
type: test
params:
working_dir: src
binary: bash
add_expansions_to_env: true
args:
- .evergreen/run-granular-benchmarks.sh
run custom benchmarks:
- command: subprocess.exec
type: test
params:
working_dir: src
binary: bash
add_expansions_to_env: true
args:
- .evergreen/run-custom-benchmarks.sh
run spec benchmarks:
- command: subprocess.exec
type: test
params:
working_dir: src
binary: bash
add_expansions_to_env: true
args:
- .evergreen/run-spec-benchmarks.sh
tasks:
- name: node-tests-v14
- name: node-tests-v16
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 14
NODE_LTS_VERSION: 16
NPM_VERSION: 9
- func: install dependencies
vars:
NODE_LTS_VERSION: 16
NPM_VERSION: 9
- func: run tests
vars:
TEST_TARGET: node
- name: node-tests-v16
- name: node-tests-v18
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 16
NODE_LTS_VERSION: 18
NPM_VERSION: 10
- func: install dependencies
- func: run tests
vars:
TEST_TARGET: node
- name: node-tests-v18
- name: node-tests-v20
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 18
NODE_LTS_VERSION: 20
- func: install dependencies
- func: run tests
- name: node-tests-v22
tags: ["node"]
commands:
- func: fetch source
vars:
TEST_TARGET: node
NODE_LTS_VERSION: 22
- func: install dependencies
- func: run tests
- name: node-tests-latest
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: latest
NODE_LTS_VERSION: latest
- func: install dependencies
- func: run tests
vars:
@@ -116,25 +190,43 @@ tasks:
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 18
NODE_LTS_VERSION: 22
- func: install dependencies
- func: run tests
vars:
TEST_TARGET: web
- name: bundling-tests
commands:
- func: fetch source
vars:
NODE_LTS_VERSION: 22
- func: install dependencies
- func: run bundling
- name: no-bigint-web-tests
tags: ["no-bigint", "web"]
commands:
- func: fetch source
vars:
NODE_LTS_VERSION: 22
- func: install dependencies
- func: run tests
vars:
TEST_TARGET: web
NO_BIGINT: true
- name: run-checks
tags:
- run-checks
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 18
NODE_LTS_VERSION: 22
- func: install dependencies
- func: run checks
- name: check-typescript-oldest
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 18
NODE_LTS_VERSION: 22
- func: install dependencies
- func: "run typescript"
vars:
@@ -144,7 +236,7 @@ tasks:
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 18
NODE_LTS_VERSION: 22
- func: install dependencies
- func: "run typescript"
vars:
@@ -154,17 +246,73 @@ tasks:
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 18
NODE_LTS_VERSION: 22
- func: install dependencies
- func: "run typescript"
vars:
TS_VERSION: "next"
TRY_COMPILING_LIBRARY: "false"
- name: run-granular-benchmarks
commands:
- func: fetch source
vars:
# This needs to stay pinned at Node v18.16.0 for consistency across perf runs.
NODE_LTS_VERSION: v18.16.0
NPM_VERSION: 9
- func: install dependencies
vars:
NPM_VERSION: 9
- func: run granular benchmarks
vars:
WARMUP: 1000
ITERATIONS: 1000
- func: perf send
vars:
TARGET_FILE: ./test/bench/etc/resultsCollectedMeans.json
- name: run-custom-benchmarks
commands:
- func: fetch source
vars:
# This needs to stay pinned at Node v18.16.0 for consistency across perf runs.
NODE_LTS_VERSION: v18.16.0
NPM_VERSION: 9
- func: install dependencies
vars:
NPM_VERSION: 9
- func: run custom benchmarks
- func: perf send
vars:
TARGET_FILE: ./customBenchmarkResults.json
- name: run-spec-benchmarks
commands:
- func: fetch source
vars:
# This needs to stay pinned at Node v18.16.0 for consistency across perf runs.
NODE_LTS_VERSION: v18.16.0
NPM_VERSION: 9
- func: install dependencies
vars:
NPM_VERSION: 9
- func: run spec benchmarks
- func: perf send
vars:
TARGET_FILE: ./bsonBench.json
- name: check-eslint-plugin
commands:
- func: fetch source
vars:
NODE_LTS_VERSION: 22
- func: install dependencies
- func: run eslint plugin tests

buildvariants:
- name: linux
display_name: RHEL 8.0
run_on: rhel80-small
tasks: [".node", ".web", "check-eslint-plugin"]
- name: linux-zseries
display_name: RHEL 9.0 zSeries
run_on: rhel9-zseries-small
tasks: [".node", ".web"]
- name: lint
display_name: lint
@@ -174,3 +322,11 @@ buildvariants:
- check-typescript-oldest
- check-typescript-current
- check-typescript-next
- bundling-tests
- name: perf
display_name: RHEL 9.0 perf
run_on: rhel90-dbx-perf-large
tasks:
- run-granular-benchmarks
- run-spec-benchmarks
- run-custom-benchmarks
9 changes: 0 additions & 9 deletions .evergreen/init-nvm.sh

This file was deleted.

Loading