-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
6 changed files
with
116 additions
and
163 deletions.
There are no files selected for viewing
This file contains 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 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,21 @@ | ||
#! /usr/bin/env bash | ||
|
||
export PATH="/opt/mongodbtoolchain/v2/bin:$PATH" | ||
NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" | ||
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm" | ||
|
||
if [[ "$OS" == "Windows_NT" ]]; then | ||
NVM_HOME=$(cygpath -w "$NVM_DIR") | ||
export NVM_HOME | ||
NVM_SYMLINK=$(cygpath -w "$NODE_ARTIFACTS_PATH/bin") | ||
export NVM_SYMLINK | ||
NVM_ARTIFACTS_PATH=$(cygpath -w "$NODE_ARTIFACTS_PATH/bin") | ||
export NVM_ARTIFACTS_PATH | ||
PATH=$(cygpath $NVM_SYMLINK):$(cygpath $NVM_HOME):$PATH | ||
export PATH | ||
echo "updated path on windows PATH=$PATH" | ||
else | ||
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" | ||
fi | ||
|
||
export NODE_OPTIONS="--trace-deprecation --trace-warnings" |
This file contains 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 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,30 @@ | ||
#!/usr/bin/env bash | ||
set -o errexit # Exit the script with error if any of the commands fail | ||
|
||
# source "${PROJECT_DIRECTORY}/.evergreen/init-nvm.sh" | ||
|
||
set -o xtrace | ||
|
||
function get_current_ts_version { | ||
node -e "console.log(require('./package-lock.json').dependencies.typescript.version)" | ||
} | ||
|
||
CURRENT_TS_VERSION=$(get_current_ts_version) | ||
|
||
export TSC="./node_modules/typescript/bin/tsc" | ||
export TS_VERSION=${TS_VERSION:=$CURRENT_TS_VERSION} | ||
|
||
npm install --no-save --force typescript@"$TS_VERSION" | ||
|
||
echo "Typescript $($TSC -v)" | ||
|
||
# check resolution uses the default latest types | ||
echo "import * as BSON from '.'" > file.ts && node $TSC --noEmit --traceResolution file.ts | grep 'bson.d.ts' && rm file.ts | ||
|
||
# check compilation | ||
rm -rf node_modules/@types/eslint # not a dependency we use, but breaks the build :( | ||
node $TSC bson.d.ts | ||
|
||
if [[ $TRY_COMPILING_LIBRARY != "false" ]]; then | ||
npm run build:ts | ||
fi |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.