Skip to content

Commit bc412b8

Browse files
authored
Merge branch 'redhat-developer:main' into patch-1
2 parents 10f2a42 + 81449fb commit bc412b8

File tree

14 files changed

+11081
-5046
lines changed

14 files changed

+11081
-5046
lines changed

.github/workflows/CI.yaml

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

3434
# Run install dependencies
3535
- name: Install dependencies
36-
run: yarn
36+
run: npm ci
37+
38+
# Install latest yaml-language-server
39+
- name: Update yaml-language-server
40+
run: npm i yaml-language-server@next
3741

3842
# Build extension
3943
- name: Run build
40-
run: yarn build
44+
run: npm run build
4145

4246
# Run tests
4347
- name: Run Test
4448
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
4549
with:
46-
run: yarn test
50+
run: npm test
4751

4852
# Run UI tests
4953
- name: Run UI Test
5054
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
5155
with:
52-
run: yarn run ui-test
56+
run: npm run ui-test
5357
options: -screen 0 1920x1080x24
5458

5559
#Package vsix

.github/workflows/release.yml

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: release
22

33
on:
4+
schedule:
5+
- cron: '0 8 * * *'
46
workflow_dispatch:
57
inputs:
68
publishPreRelease:
@@ -29,8 +31,39 @@ on:
2931
default: 'true'
3032

3133
jobs:
34+
35+
should-build-change:
36+
runs-on: ubuntu-latest
37+
outputs:
38+
repo-cache-hit: ${{ steps.cache-last-commit.outputs.cache-hit }}
39+
steps:
40+
- uses: actions/checkout@v4
41+
with:
42+
repository: "redhat-developer/vscode-yaml"
43+
fetch-depth: 2
44+
path: vscode-yaml
45+
- uses: actions/checkout@v4
46+
with:
47+
repository: "redhat-developer/yaml-language-server"
48+
fetch-depth: 2
49+
path: yaml-language-server
50+
- run: |
51+
pushd vscode-yaml
52+
git rev-parse HEAD >> ../lastCommit
53+
popd
54+
pushd yaml-language-server
55+
git rev-parse HEAD >> ../lastCommit
56+
- name: Check New Changes
57+
id: cache-last-commit
58+
uses: actions/cache@v4
59+
with:
60+
path: lastCommit
61+
key: lastCommit-${{ hashFiles('lastCommit') }}
62+
3263
packaging-job:
3364
runs-on: ubuntu-latest
65+
needs: should-build-change
66+
if: ${{ needs.should-build-change.outputs.repo-cache-hit != 'true' || github.event_name != 'schedule' }}
3467
steps:
3568
- name: Checkout vscode-yaml
3669
uses: actions/checkout@v4
@@ -39,24 +72,33 @@ jobs:
3972
with:
4073
path: release
4174
node-version: 20
75+
- name: Set version to prerelease version
76+
run: |
77+
node ./scripts/change-version-to-prerelease.mjs
78+
echo "publishPreReleaseFlag=--pre-release" >> $GITHUB_ENV
79+
if: ${{ github.event_name == 'schedule' || inputs.publishPreRelease == 'true'}}
4280
- name: Install dependencies
4381
run: |
44-
npm install -g typescript "yarn" "@vscode/vsce" "ovsx"
82+
npm install -g typescript "@vscode/vsce" "ovsx"
4583
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
84+
# Install latest yaml-language-server in the case of a prerelease
85+
- name: Update yaml-language-server
86+
if: ${{ github.event_name == 'schedule' || inputs.publishPreRelease == 'true'}}
87+
run: npm i yaml-language-server@next
4688
- name: Build vscode-yaml
4789
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
4890
with:
4991
run: |
50-
yarn install
51-
yarn run build
52-
yarn run check-dependencies
92+
npm ci
93+
npm run build
94+
npm run check-dependencies
5395
- name: Run Unit Tests
5496
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 #v1.0.1
5597
with:
56-
run: yarn test --silent
98+
run: npm test --silent
5799
- name: Package
58100
run: |
59-
vsce package -o vscode-yaml-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix
101+
vsce package ${{ env.publishPreReleaseFlag }} -o vscode-yaml-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix
60102
sha256sum *.vsix > vscode-yaml-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix.sha256
61103
ls -lash *.vsix *.sha256
62104
- name: Upload VSIX Artifacts
@@ -70,7 +112,7 @@ jobs:
70112
uses: "marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0"
71113
with:
72114
repo_token: "${{ secrets.GITHUB_TOKEN }}"
73-
automatic_release_tag: "${{ env.EXT_VERSION }}"
115+
automatic_release_tag: "${{ github.event_name != 'schedule' && inputs.publishPreRelease != 'true' && env.EXT_VERSION || null }}"
74116
draft: true
75117
files: |
76118
vscode-yaml-${{ env.EXT_VERSION }}-${{github.run_number}}*.vsix
@@ -88,9 +130,13 @@ jobs:
88130
uses: actions/setup-node@v4
89131
with:
90132
node-version: 20
133+
- name: Set version to prerelease version
134+
run: |
135+
node ./scripts/change-version-to-prerelease.mjs
136+
if: ${{ github.event_name == 'schedule' || inputs.publishPreRelease == 'true'}}
91137
- name: Install dependencies
92138
run: |
93-
npm install -g typescript "yarn" "@vscode/vsce" "ovsx"
139+
npm install -g typescript "@vscode/vsce" "ovsx"
94140
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
95141
- name: Download VSIX Artifacts
96142
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"

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ CONTRIBUTING.md
2020
.vscode-test-web/**
2121
**/**.vsix
2222
**/**.tar.gz
23+
test-resources
2324
!node_modules/prettier/index.js
2425
!node_modules/prettier/third-party.js
2526
!node_modules/prettier/parser-yaml.js

.yarnrc

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

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
### 1.19.0
2+
- Feat: Support formatting docker-compose.yml by default [#1071](https://github.com/redhat-developer/yaml-language-server/issues/1071)
3+
- Feat: Support statically registering format support [#1062](https://github.com/redhat-developer/yaml-language-server/pull/1062)
4+
- Feat: Support localization in the YAML language server [#1081](https://github.com/redhat-developer/yaml-language-server/issues/1081)
5+
- Feat: Migrated to NPM [#1097](https://github.com/redhat-developer/yaml-language-server/issues/1097)
6+
- Feat: Add formatting option to remove trailing comma [#1112](https://github.com/redhat-developer/vscode-yaml/issues/1112)
7+
- Fix: OpenAPI 3.0.0 specification is treated as invalid [#752](https://github.com/redhat-developer/yaml-language-server/issues/752)
8+
- Fix: YAML Language Server checks against JSON Schema Draft 7 instead of the defined one [#780](https://github.com/redhat-developer/yaml-language-server/issues/780)
9+
- Fix: Numbers in comments should not break schema validation [#922](https://github.com/redhat-developer/yaml-language-server/issues/922)
10+
- Fix: Make enum values easier to read on hover [#982](https://github.com/redhat-developer/yaml-language-server/issues/982)
11+
- Fix: No more quickfix for indent with tab [#1052](https://github.com/redhat-developer/yaml-language-server/issues/1052)
12+
- Fix: QuickFix for "flow sequence forbidden" leaves in trailing `]` [#1060](https://github.com/redhat-developer/yaml-language-server/issues/1060)
13+
- Fix: YAML conversion does not resolve aliases correctly [#1075](https://github.com/redhat-developer/yaml-language-server/issues/1075)
14+
- Fix: Fix enum values to be unique [#1028](https://github.com/redhat-developer/yaml-language-server/pull/1028)
15+
- Fix: Using bool values in enum and const generates a validation error for valid values [#1078](https://github.com/redhat-developer/yaml-language-server/issues/1078)
16+
- Fix: improve enum value descriptions for merged enum lists [#1085](https://github.com/redhat-developer/yaml-language-server/pull/1085)
17+
- Fix: Array of const completion [#1092](https://github.com/redhat-developer/yaml-language-server/pull/1092)
18+
- Fix: Error for missing anchor (unidentified alias) broken since 1.0 [#1098](https://github.com/redhat-developer/vscode-yaml/issues/1098)
19+
- Fix: Invalid tab indentation error [#1110](https://github.com/redhat-developer/vscode-yaml/issues/1110)
20+
- Fix: Validation shows false negative errors if using boolean with const [#1116](https://github.com/redhat-developer/vscode-yaml/issues/1116)
21+
- Fix: Broken link to JSON Schema website [#1113](https://github.com/redhat-developer/yaml-language-server/pull/1113)
22+
- Fix: GitHub Actions release process was broken [#1127](https://github.com/redhat-developer/yaml-language-server/pull/1127), [#1128](https://github.com/redhat-developer/yaml-language-server/issues/1128)
23+
- Bump: ajv version [#1067](https://github.com/redhat-developer/yaml-language-server/pull/1067)
24+
25+
Thanks to [Trevor Dixon](https://github.com/trevordixon), [David Lechner](https://github.com/dlech), [pjsk-stripe](https://github.com/pjsk-stripe), [Lucy Dryaeva
26+
](https://github.com/ShadiestGoat), [Kosta](https://github.com/Kosta-Github) and [August Johansson ](https://github.com/webdevred) for your contributions.
27+
128
### 1.18.0
229
- Feat: Do not suggest propertyNames if doNotSuggest is true [#1045](https://github.com/redhat-developer/yaml-language-server/pull/1045)
330
- Feat: Exclude not suggest properties from possible properties error [#1051](https://github.com/redhat-developer/yaml-language-server/pull/1051)

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)