Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 'next' version of yaml-ls #378

Merged
merged 4 commits into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ node('rhel8'){
stage 'Build vscode-yaml'
sh "npm install"
sh "npm run build"
sh "npm run check-dependencies"

stage 'Test vscode-yaml for staging'
wrap([$class: 'Xvnc']) {
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
},
"scripts": {
"build": "npm run clean && npm run lint && npm run vscode:prepublish",
"check-dependencies": "node .scripts/check-dependencies.js",
"clean": "rimraf out",
"compile": "tsc -watch -p ./",
"format": "prettier --write .",
Expand Down Expand Up @@ -184,6 +185,6 @@
"vscode-languageclient": "5.2.1",
"vscode-nls": "^3.2.1",
"vscode-uri": "^2.0.3",
"yaml-language-server": "0.11.1"
"yaml-language-server": "next"
}
}
21 changes: 21 additions & 0 deletions scripts/check-dependencies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Red Hat, Inc. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */

//check package.json do not have dependency with 'next' version

/* eslint-disable @typescript-eslint/no-var-requires */

const exit = require('process').exit;
const dependencies = require('../package.json').dependencies;

for (const dep in dependencies) {
if (Object.prototype.hasOwnProperty.call(dependencies, dep)) {
const version = dependencies[dep];
if (version === 'next') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a general filter across all dependencies. I do not think we would want next as a version on anything but if we do, then this would prevent the release.
Do we want it broad or specific?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that release with next version is good idea, for any dependency. Because it is a tag, not a some specific version, and real version behind that tag may change, and you may ged unpredictable behaviour in future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I just want us to be intentional in what we do.

console.error(`Dependency ${dep} has "${version}" version, please change it to fixed version`);
exit(1);
}
}
}