Skip to content

Commit

Permalink
Update to node 10 (#5203)
Browse files Browse the repository at this point in the history
* Update to node 10
* Disable code coverage
* Update TS
* Update to 10.5 due to issues with other versions
* Fixes to tests
* Force exit
* Exit early
* Remove coverage from debugger tests
* Add news entry file
  • Loading branch information
DonJayamanne committed Apr 12, 2019
1 parent 36eb10b commit 48a608e
Show file tree
Hide file tree
Showing 18 changed files with 190 additions and 111 deletions.
1 change: 1 addition & 0 deletions .nvmrc
@@ -0,0 +1 @@
v10.5.0
9 changes: 2 additions & 7 deletions .travis.yml
Expand Up @@ -59,8 +59,8 @@ before_install: |
fi
git clone https://github.com/creationix/nvm.git ./.nvm
source ./.nvm/nvm.sh
nvm install 8.9.1
nvm use 8.9.1
nvm install 10.5.0
nvm use 10.5.0
npm install npm@latest -g
npm install -g vsce
export CI_PYTHON_PATH=`which python`
Expand All @@ -75,24 +75,19 @@ install:
script:
- if [ $UNIT_TEST == "true" ]; then
npx gulp compile;
npm run cover:enable;
npm run test:unittests:cover;
fi
- if [ $DEBUGGER_TEST_RELEASE == "true" ]; then
npm run cover:enable;
npm run testDebugger --silent;
fi
- npm run debugger-coverage
- if [ $FUNCTIONAL_TEST == "true" ]; then
python -m pip install --upgrade -r ./build/functional-test-requirements.txt;
npm run test:functional:cover;
fi
- if [ $SINGLE_WORKSPACE_TEST == "true" ]; then
npm run cover:enable;
npm run testSingleWorkspace --silent;
fi
- if [ $MULTIROOT_WORKSPACE_TEST == "true" ]; then
npm run cover:enable;
npm run testMultiWorkspace --silent;
fi
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && "$PERFORMANCE_TEST" == "true" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -19,7 +19,7 @@

### Prerequisites

1. Node.js (>= 8.9.1, < 9.0.0)
1. Node.js 10.x
1. Python 2.7 or later (required only for testing the extension and running unit tests)
1. Windows, macOS, or Linux
1. Visual Studio Code
Expand Down
19 changes: 0 additions & 19 deletions build/ci/templates/test_phases.yml
Expand Up @@ -112,25 +112,6 @@ steps:
displayName: 'code hygiene'
condition: and(succeeded(), contains(variables['TestsToRun'], 'runHygiene'))
# Enable test coverage reporting for all subsequent tests (typescript-based)
#
# Example command line (windows pwsh):
# > npm run cover:enable
- bash: |
npm run cover:enable
displayName: 'Enable coverage reporting'
# Run the typescript unit tests.
#
# This will only run if the string 'testUnitTests' exists in variable `TestsToRun`
#
# Example command line (windows pwsh):
# > npm run test:unittests
- bash: |
npm run test:unittests:cover
displayName: 'run test:unittest'
condition: and(succeeded(), contains(variables['TestsToRun'], 'testUnitTests'))
# Upload the test results to Azure DevOps to facilitate test reporting in their UX.
- task: PublishTestResults@2
displayName: 'Publish test:unittest results'
Expand Down
2 changes: 1 addition & 1 deletion build/ci/vscode-python-ci.yaml
Expand Up @@ -14,7 +14,7 @@ pr: none
# Variables that are available for the entire pipeline.
variables:
PythonVersion: '3.7'
NodeVersion: '8.11.2'
NodeVersion: '10.5.0'
NpmVersion: 'latest'
MOCHA_FILE: '$(Build.ArtifactStagingDirectory)/test-junit.xml' # All test files will write their JUnit xml output to this file, clobbering the last time it was written.
MOCHA_REPORTER_JUNIT: true # Use the mocha-multi-reporters and send output to both console (spec) and JUnit (mocha-junit-reporter).
Expand Down
2 changes: 1 addition & 1 deletion build/ci/vscode-python-nightly-ci.yaml
Expand Up @@ -13,7 +13,7 @@ pr: none
# Variables that are available for the entire pipeline.
variables:
PythonVersion: '3.7'
NodeVersion: '8.11.2'
NodeVersion: '10.5.0'
NpmVersion: 'latest'
MOCHA_FILE: '$(Build.ArtifactStagingDirectory)/test-junit.xml' # All test files will write their JUnit xml output to this file, clobbering the last time it was written.
MOCHA_REPORTER_JUNIT: true # Use the mocha-multi-reporters and send output to both console (spec) and JUnit (mocha-junit-reporter).
Expand Down
2 changes: 1 addition & 1 deletion build/ci/vscode-python-pr-validation.yaml
Expand Up @@ -16,7 +16,7 @@ trigger: none
# Variables that are available for the entire pipeline.
variables:
PythonVersion: '3.7'
NodeVersion: '8.11.2'
NodeVersion: '10.5.0'
NpmVersion: 'latest'
MOCHA_FILE: '$(Build.ArtifactStagingDirectory)/test-junit.xml' # All test files will write their JUnit xml output to this file, clobbering the last time it was written.
MOCHA_REPORTER_JUNIT: true # Use the mocha-multi-reporters and send output to both console (spec) and JUnit (mocha-junit-reporter).
Expand Down
1 change: 1 addition & 0 deletions news/3 Code Health/1138.md
@@ -0,0 +1 @@
Update to use `Node` version `10.5.0`.
167 changes: 164 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Expand Up @@ -41,7 +41,7 @@
"theme": "dark"
},
"engines": {
"vscode": "^1.31.0"
"vscode": "^1.33.0"
},
"keywords": [
"python",
Expand Down Expand Up @@ -2297,9 +2297,9 @@
"postinstall": "node ./node_modules/vscode/bin/install && node ./build/ci/postInstall.js",
"test": "node ./out/test/standardTest.js && node ./out/test/multiRootTest.js",
"test:unittests": "mocha --require source-map-support/register --opts ./build/.mocha.unittests.opts",
"test:unittests:cover": "nyc --nycrc-path ./build/.nycrc npm run test:unittests",
"test:unittests:cover": "npm run test:unittests",
"test:functional": "mocha --require source-map-support/register --opts ./build/.mocha.functional.opts",
"test:functional:cover": "nyc --nycrc-path ./build/.nycrc npm run test:functional",
"test:functional:cover": "npm run test:functional",
"testDebugger": "node ./out/test/debuggerTest.js",
"testSingleWorkspace": "node ./out/test/standardTest.js",
"testMultiWorkspace": "node ./out/test/multiRootTest.js",
Expand Down Expand Up @@ -2482,10 +2482,11 @@
"tslint-microsoft-contrib": "^5.0.3",
"typed-react-markdown": "^0.1.0",
"typemoq": "^2.1.0",
"typescript": "^3.2.2",
"typescript": "^3.4.3",
"typescript-formatter": "^7.1.0",
"url-loader": "^1.1.1",
"uuid": "^3.3.2",
"vsce": "^1.59.0",
"vscode": "^1.1.30",
"vscode-debugadapter-testsupport": "^1.27.0",
"webpack": "^4.20.2",
Expand Down

0 comments on commit 48a608e

Please sign in to comment.