Skip to content

Commit

Permalink
Move from npm to Yarn for markdown tests (PowerShell#9312)
Browse files Browse the repository at this point in the history
Yarn is better because...
* it validates package checksums
* it has emojis 🤟
* it is faster and employs better caching
  • Loading branch information
RDIL authored and TravisEz13 committed Apr 10, 2019
1 parent 46a6299 commit 2d87948
Show file tree
Hide file tree
Showing 4 changed files with 2,601 additions and 3,426 deletions.
6 changes: 6 additions & 0 deletions .vsts-ci/misc-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
condition: succeededOrFailed()
- bash: |
curl -o- --progress-bar -L https://yarnpkg.com/install.sh | bash
displayName: Bootstrap Yarn
condition: succeededOrFailed()
- bash: |
# Installing globally with yarn is a pain, please don't try
sudo npm install -g markdown-spellcheck@0.11.0
# Sometimes this folder is left behind with root permissions and is needed by later npm installs which don't need sudo
sudo rm -rf ~/.npm/_cacache
Expand Down
5 changes: 3 additions & 2 deletions test/common/markdown/markdown.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ Describe 'Common Tests - Validate Markdown Files' -Tag 'CI' {
{
$NpmInstalled = "Installed"
Write-Verbose -Message "NPM is checking Gulp is installed. This may take a few moments." -Verbose
start-nativeExecution { npm install --silent }
start-nativeExecution { npm install 'gulp@4.0.0' --silent }
start-nativeExecution { yarn }
start-nativeExecution { yarn add gulp@4.0.0 }
if(!(Get-Command -Name 'gulp' -ErrorAction SilentlyContinue))
{
start-nativeExecution {
# Installing globally with yarn is a pain, please don't try it
sudo npm install -g 'gulp@4.0.0' --silent
# Sometimes this folder is left behind with root permissions and is needed by later NPM installs which don't need sudo
sudo rm -rf ~/.npm/_cacache
Expand Down

0 comments on commit 2d87948

Please sign in to comment.