Skip to content

Commit 4b17304

Browse files
Merge pull request #1136 from msivasubramaniaan/move-to-npm-and-remove-yarn-dependency
removed yarn dependency and added NPM
2 parents db9fc02 + 2b5c630 commit 4b17304

File tree

11 files changed

+10972
-5049
lines changed

11 files changed

+10972
-5049
lines changed

.github/workflows/CI.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ jobs:
3333

3434
# Run install dependencies
3535
- name: Install dependencies
36-
run: yarn
36+
run: npm ci
3737

3838
# Build extension
3939
- name: Run build
40-
run: yarn build
40+
run: npm run build
4141

4242
# Run tests
4343
- name: Run Test
4444
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
4545
with:
46-
run: yarn test
46+
run: npm test
4747

4848
# Run UI tests
4949
- name: Run UI Test
5050
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
5151
with:
52-
run: yarn run ui-test
52+
run: npm run ui-test
5353
options: -screen 0 1920x1080x24
5454

5555
#Package vsix

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ jobs:
4141
node-version: 20
4242
- name: Install dependencies
4343
run: |
44-
npm install -g typescript "yarn" "@vscode/vsce" "ovsx"
44+
npm install -g typescript "@vscode/vsce" "ovsx"
4545
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
4646
- name: Build vscode-yaml
4747
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
4848
with:
4949
run: |
50-
yarn install
51-
yarn run build
52-
yarn run check-dependencies
50+
npm ci
51+
npm run build
52+
npm run check-dependencies
5353
- name: Run Unit Tests
5454
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
5555
with:
56-
run: yarn test --silent
56+
run: npm test --silent
5757
- name: Package
5858
run: |
5959
vsce package -o vscode-yaml-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix
@@ -90,7 +90,7 @@ jobs:
9090
node-version: 20
9191
- name: Install dependencies
9292
run: |
93-
npm install -g typescript "yarn" "@vscode/vsce" "ovsx"
93+
npm install -g typescript "@vscode/vsce" "ovsx"
9494
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
9595
- name: Download VSIX Artifacts
9696
uses: actions/download-artifact@v4

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ dist/
66
test/testFixture/.vscode
77
*.vsix
88
.DS_Store
9-
test-resources
10-
yarn-error.log
9+
test-resources/
10+
yarn.lock
11+
.yarnrc

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// the command is a shell script
1010
"type": "shell",
1111
// we run the custom npm script "compile" as defined in package.json
12-
"command": "yarn run compile",
12+
"command": "npm run compile",
1313
// show the output window only if unrecognized errors occur.
1414
"presentation": {
1515
"reveal": "never"
@@ -32,7 +32,7 @@
3232
// the command is a shell script
3333
"type": "shell",
3434
// we run the custom npm script "compile" as defined in package.json
35-
"command": "yarn test-compile",
35+
"command": "npm run test-compile",
3636
// show the output window only if unrecognized errors occur.
3737
"presentation": {
3838
"reveal": "never"

.yarnrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ All contributions are welcome!
4848

4949
3. Open the `vscode-yaml` folder in VSCode, and then add the `yaml-language-server` project to the workspace using `File -> Add Folder to Workspace...`.
5050

51-
4. Run `yarn install` in both directories to initialize `node_modules` dependencies.
51+
4. Run `npm run install` in both directories to initialize `node_modules` dependencies.
5252

5353
5. To run the language server in VSCode, click `View -> Debug`, then from the drop down menu beside the green arrow select `Launch Extension (vscode-yaml)`, click the arrow, and a new VSCode window should load with the YAML LS running.
5454

Jenkinsfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
def installBuildRequirements(){
44
def nodeHome = tool 'nodejs-lts'
55
env.PATH="${env.PATH}:${nodeHome}/bin"
6-
sh "npm install --global yarn"
76
sh "npm install --global vsce"
87
}
98

109
def buildVscodeExtension(){
11-
sh "yarn install"
12-
sh "yarn run vscode:prepublish"
10+
sh "npm run install"
11+
sh "npm run vscode:prepublish"
1312
}
1413

1514
node('rhel8'){
@@ -22,13 +21,13 @@ node('rhel8'){
2221
installBuildRequirements()
2322

2423
stage 'Build vscode-yaml'
25-
sh "yarn install"
26-
sh "yarn run build"
27-
sh "yarn run check-dependencies"
24+
sh "npm run install"
25+
sh "npm run build"
26+
sh "npm run check-dependencies"
2827

2928
stage 'Test vscode-yaml for staging'
3029
wrap([$class: 'Xvnc']) {
31-
sh "yarn test --silent"
30+
sh "npm test --silent"
3231
}
3332

3433
stage "Package vscode-yaml"

0 commit comments

Comments
 (0)