Skip to content

Commit 63279f3

Browse files
committed
lint
1 parent b125cb5 commit 63279f3

File tree

3 files changed

+4
-37
lines changed

3 files changed

+4
-37
lines changed

.evergreen/install-dependencies.sh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,8 @@ nvm use --lts
4343

4444
set -o xtrace
4545

46-
47-
48-
# setup npm cache in a local directory
49-
cat <<EOT > .npmrc
50-
devdir=${NPM_CACHE_DIR}/.node-gyp
51-
init-module=${NPM_CACHE_DIR}/.npm-init.js
52-
cache=${NPM_CACHE_DIR}
53-
tmp=${NPM_TMP_DIR}
54-
registry=https://registry.npmjs.org
55-
EOT
56-
5746
# install node dependencies
58-
# npm prepare runs after install and will compile the library
59-
# TODO(NODE-3555): rollup dependencies for node polyfills have broken peerDeps. We can remove this flag once we've removed them.
60-
npm install --legacy-peer-deps
47+
npm install
6148

6249
set +o xtrace
6350
echo "Running: nvm use ${NODE_VERSION}"

.evergreen/run-typescript.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -o errexit # Exit the script with error if any of the commands fail
33

4-
# source "${PROJECT_DIRECTORY}/.evergreen/init-nvm.sh"
4+
source "${PROJECT_DIRECTORY}/.evergreen/init-nvm.sh"
55

66
set -o xtrace
77

@@ -19,7 +19,7 @@ npm install --no-save --force typescript@"$TS_VERSION"
1919
echo "Typescript $($TSC -v)"
2020

2121
# check resolution uses the default latest types
22-
echo "import * as BSON from '.'" > file.ts && node $TSC --noEmit --traceResolution file.ts | grep 'bson.d.ts' && rm file.ts
22+
echo "import * as BSON from '.'" > file.ts && node $TSC --emitDeclarationOnly --traceResolution file.ts | grep 'bson.d.ts' && rm file.ts
2323

2424
# check compilation
2525
rm -rf node_modules/@types/eslint # not a dependency we use, but breaks the build :(

rollup.config.mjs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,6 @@ const tsConfig = {
3030
};
3131
const input = 'src/index.ts';
3232

33-
const defaultName = 'BSON';
34-
35-
const cjsImport = `const nodejsRandomBytes = (() => {
36-
try {
37-
return require('crypto').randomBytes;
38-
}
39-
catch {
40-
return nodejsMathRandomBytes;
41-
}
42-
})();`;
43-
44-
const esmImport = `const nodejsRandomBytes = await (async () => {
45-
try {
46-
return (await import('node:crypto')).randomBytes;
47-
}
48-
catch {
49-
return nodejsMathRandomBytes;
50-
}
51-
})();`;
52-
5333
/** @type {import('rollup').RollupOptions} */
5434
const config = [
5535
{
@@ -65,7 +45,7 @@ const config = [
6545
{
6646
file: 'lib/bson.bundle.js',
6747
format: 'iife',
68-
name: defaultName,
48+
name: 'BSON',
6949
exports: 'named',
7050
indent: false,
7151
sourcemap: true

0 commit comments

Comments
 (0)