Skip to content

fix: update hard-coded UI5 version to LTS 1.71.49 #1

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
194 changes: 97 additions & 97 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,100 +1,100 @@
{
"name": "root",
"private": true,
"workspaces": {
"packages": [
"packages/*",
"test-packages/*"
],
"nohoist": [
"vscode-ui5-language-assistant/@ui5-language-assistant/language-server",
"vscode-ui5-language-assistant/@ui5-language-assistant/language-server/**"
]
},
"scripts": {
"build:quick": "lerna run compile && lerna run bundle && lerna run package",
"release:version": "lerna version",
"release:publish": "lerna publish from-git --yes",
"ci": "npm-run-all format:validate ci:subpackages coverage:merge legal:*",
"compile": "yarn run clean && tsc --build",
"compile:watch": "yarn run clean && tsc --build --watch",
"format:fix": "prettier --write \"**/*.@(js|ts|json|md)\" --ignore-path=.gitignore",
"format:validate": "prettier --check \"**/*.@(js|ts|json|md)\" --ignore-path=.gitignore",
"lint": "eslint . --ext .ts --fix --max-warnings=0 --ignore-path=.gitignore",
"ci:subpackages": "lerna run ci",
"test": "lerna run test",
"coverage": "lerna run coverage",
"coverage:merge": "node ./scripts/merge-coverage",
"clean": "lerna run clean",
"update-snapshots": "lerna run update-snapshots",
"legal:delete": "lerna exec \"shx rm -rf .reuse LICENSES\" || true",
"legal:copy": "lerna exec \"shx cp -r ../../.reuse .reuse && shx cp -r ../../LICENSES LICENSES\""
},
"devDependencies": {
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@types/chai": "4.2.14",
"@types/deep-equal-in-any-order": "1.0.1",
"@types/fs-extra": "9.0.11",
"@types/klaw-sync": "6.0.0",
"@types/lodash": "4.14.168",
"@types/mocha": "^7.0.2",
"@types/rimraf": "3.0.0",
"@types/sinon": "9.0.10",
"@types/sinon-chai": "3.2.5",
"@typescript-eslint/eslint-plugin": "4.14.0",
"@typescript-eslint/parser": "4.14.0",
"chai": "4.2.0",
"conventional-changelog-cli": "^2.1.1",
"coveralls": "3.1.0",
"cz-conventional-changelog": "3.3.0",
"deep-equal-in-any-order": "^1.0.28",
"eslint": "7.18.0",
"eslint-config-prettier": "7.2.0",
"eslint-plugin-eslint-comments": "3.2.0",
"fs-extra": "9.1.0",
"glob": "7.1.6",
"husky": "4.3.8",
"klaw-sync": "6.0.0",
"lerna": "3.22.1",
"lint-staged": "10.5.3",
"make-dir": "3.1.0",
"mocha": "7.2.0",
"npm-run-all": "4.1.5",
"nyc": "15.1.0",
"prettier": "2.2.1",
"rimraf": "3.0.2",
"shx": "0.3.3",
"simple-git": "2.38.0",
"sinon": "9.2.3",
"sinon-chai": "3.5.0",
"source-map-support": "0.5.19",
"typescript": "3.9.7",
"webpack": "5.36.2",
"webpack-cli": "4.4.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
"name": "root",
"private": true,
"workspaces": {
"packages": [
"packages/*",
"test-packages/*"
],
"nohoist": [
"vscode-ui5-language-assistant/@ui5-language-assistant/language-server",
"vscode-ui5-language-assistant/@ui5-language-assistant/language-server/**"
]
},
"scripts": {
"build:quick": "lerna run compile && lerna run bundle && lerna run package",
"release:version": "lerna version",
"release:publish": "lerna publish from-git --yes",
"ci": "npm-run-all format:validate ci:subpackages coverage:merge legal:*",
"compile": "yarn run clean && tsc --build",
"compile:watch": "yarn run clean && tsc --build --watch",
"format:fix": "prettier --write \"**/*.@(js|ts|json|md)\" --ignore-path=.gitignore",
"format:validate": "prettier --check \"**/*.@(js|ts|json|md)\" --ignore-path=.gitignore",
"lint": "eslint . --ext .ts --fix --max-warnings=0 --ignore-path=.gitignore",
"ci:subpackages": "lerna run ci",
"test": "lerna run test",
"coverage": "lerna run coverage",
"coverage:merge": "node ./scripts/merge-coverage",
"clean": "lerna run clean",
"update-snapshots": "lerna run update-snapshots",
"legal:delete": "lerna exec \"shx rm -rf .reuse LICENSES\" || true",
"legal:copy": "lerna exec \"shx cp -r ../../.reuse .reuse && shx cp -r ../../LICENSES LICENSES\""
},
"devDependencies": {
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@types/chai": "4.2.14",
"@types/deep-equal-in-any-order": "1.0.1",
"@types/fs-extra": "9.0.11",
"@types/klaw-sync": "6.0.0",
"@types/lodash": "4.14.168",
"@types/mocha": "^7.0.2",
"@types/rimraf": "3.0.0",
"@types/sinon": "9.0.10",
"@types/sinon-chai": "3.2.5",
"@typescript-eslint/eslint-plugin": "4.14.0",
"@typescript-eslint/parser": "4.14.0",
"chai": "4.2.0",
"conventional-changelog-cli": "^2.1.1",
"coveralls": "3.1.0",
"cz-conventional-changelog": "3.3.0",
"deep-equal-in-any-order": "^1.0.28",
"eslint": "7.18.0",
"eslint-config-prettier": "7.2.0",
"eslint-plugin-eslint-comments": "3.2.0",
"fs-extra": "9.1.0",
"glob": "7.1.6",
"husky": "4.3.8",
"klaw-sync": "6.0.0",
"lerna": "3.22.1",
"lint-staged": "10.5.3",
"make-dir": "3.1.0",
"mocha": "7.2.0",
"npm-run-all": "4.1.5",
"nyc": "15.1.0",
"prettier": "2.2.1",
"rimraf": "3.0.2",
"shx": "0.3.3",
"simple-git": "2.38.0",
"sinon": "9.2.3",
"sinon-chai": "3.5.0",
"source-map-support": "0.5.19",
"typescript": "3.9.7",
"webpack": "5.36.2",
"webpack-cli": "4.4.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"*.{js,ts,md,json}": [
"prettier --write"
],
"*.{ts}": [
"eslint --fix --max-warnings=0"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
},
"lint-staged": {
"*.{js,ts,md,json}": [
"prettier --write"
],
"*.{ts}": [
"eslint --fix --max-warnings=0"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
}
6 changes: 4 additions & 2 deletions packages/language-server/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ export type FetchResponse = {
ok: boolean;
json: () => Promise<unknown>;
};

export type Fetcher = (url: string) => Promise<FetchResponse>;
export type Fetcher = (
url: string,
options: Record<string, unknown>
) => Promise<FetchResponse>;
138 changes: 70 additions & 68 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,72 @@
{
"name": "@ui5-language-assistant/language-server",
"version": "3.0.1",
"description": "UI5 Language Server",
"keywords": [
"LSP",
"language-server",
"UI5",
"OpenUI5",
"SAPUI5"
],
"files": [
".reuse",
"LICENSES",
"lib/src",
"api.d.ts",
"src"
],
"main": "lib/src/api.js",
"repository": "https://github.com/sap/ui5-language-assistant/",
"license": "Apache-2.0",
"typings": "./api.d.ts",
"engines": {
"node": ">=10.0.0"
},
"dependencies": {
"@sap/swa-for-sapbas-vsx": "1.1.9",
"@ui5-language-assistant/semantic-model": "^3.0.1",
"@ui5-language-assistant/settings": "^3.0.1",
"@ui5-language-assistant/user-facing-text": "^3.0.1",
"@ui5-language-assistant/xml-views-completion": "^3.0.1",
"@ui5-language-assistant/xml-views-quick-fix": "^3.0.1",
"@ui5-language-assistant/xml-views-tooltip": "^3.0.1",
"@ui5-language-assistant/xml-views-validation": "^3.0.1",
"@vscode-logging/logger": "1.2.2",
"@vscode-logging/types": "0.1.3",
"@xml-tools/ast": "5.0.0",
"@xml-tools/ast-position": "2.0.2",
"@xml-tools/parser": "1.0.7",
"assert-never": "1.2.1",
"fs-extra": "9.0.1",
"lodash": "4.17.21",
"node-fetch": "2.6.1",
"vscode-languageserver": "6.1.1",
"vscode-languageserver-textdocument": "1.0.1",
"vscode-uri": "2.1.2"
},
"devDependencies": {
"@types/node-fetch": "2.5.10",
"@types/tmp": "0.2.0",
"@ui5-language-assistant/semantic-model-types": "^3.0.1",
"@ui5-language-assistant/test-utils": "^3.0.1",
"tmp-promise": "3.0.2",
"vscode-languageserver-types": "3.16.0"
},
"scripts": {
"ci": "npm-run-all clean compile lint coverage bundle",
"clean": "rimraf ./dist ./lib ./coverage ./nyc_output",
"compile": "yarn run clean && tsc -p .",
"compile:watch": "tsc -p . --watch",
"lint": "eslint . --ext .ts --max-warnings=0 --ignore-path=../../.gitignore",
"test": "mocha",
"coverage": "nyc mocha",
"update-snapshots": "node ./scripts/update-diagnostics-snapshots",
"bundle": "webpack --mode production"
},
"publishConfig": {
"access": "public"
}
"name": "@ui5-language-assistant/language-server",
"version": "3.0.1",
"description": "UI5 Language Server",
"keywords": [
"LSP",
"language-server",
"UI5",
"OpenUI5",
"SAPUI5"
],
"files": [
".reuse",
"LICENSES",
"lib/src",
"api.d.ts",
"src"
],
"main": "lib/src/api.js",
"repository": "https://github.com/sap/ui5-language-assistant/",
"license": "Apache-2.0",
"typings": "./api.d.ts",
"engines": {
"node": ">=10.0.0"
},
"dependencies": {
"@sap/swa-for-sapbas-vsx": "1.1.9",
"@ui5-language-assistant/semantic-model": "^3.0.1",
"@ui5-language-assistant/settings": "^3.0.1",
"@ui5-language-assistant/user-facing-text": "^3.0.1",
"@ui5-language-assistant/xml-views-completion": "^3.0.1",
"@ui5-language-assistant/xml-views-quick-fix": "^3.0.1",
"@ui5-language-assistant/xml-views-tooltip": "^3.0.1",
"@ui5-language-assistant/xml-views-validation": "^3.0.1",
"@vscode-logging/logger": "1.2.2",
"@vscode-logging/types": "0.1.3",
"@xml-tools/ast": "5.0.0",
"@xml-tools/ast-position": "2.0.2",
"@xml-tools/parser": "1.0.7",
"assert-never": "1.2.1",
"fs-extra": "9.0.1",
"get-proxy": "^2.1.0",
"lodash": "4.17.21",
"node-fetch": "2.6.1",
"simple-proxy-agent": "^1.1.0",
"vscode-languageserver": "6.1.1",
"vscode-languageserver-textdocument": "1.0.1",
"vscode-uri": "2.1.2"
},
"devDependencies": {
"@types/node-fetch": "^2.5.10",
"@types/tmp": "0.2.0",
"@ui5-language-assistant/semantic-model-types": "^3.0.1",
"@ui5-language-assistant/test-utils": "^3.0.1",
"tmp-promise": "3.0.2",
"vscode-languageserver-types": "3.16.0"
},
"scripts": {
"ci": "npm-run-all clean compile lint coverage bundle",
"clean": "rimraf ./dist ./lib ./coverage ./nyc_output",
"compile": "yarn run clean && tsc -p .",
"compile:watch": "tsc -p . --watch",
"lint": "eslint . --ext .ts --max-warnings=0 --ignore-path=../../.gitignore",
"test": "mocha",
"coverage": "nyc mocha",
"update-snapshots": "node ./scripts/update-diagnostics-snapshots",
"bundle": "webpack --mode production"
},
"publishConfig": {
"access": "public"
}
}
17 changes: 14 additions & 3 deletions packages/language-server/src/ui5-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { map } from "lodash";
import fetch from "node-fetch";
import { resolve } from "path";
import { pathExists, lstat, readJson, writeJson, mkdirs } from "fs-extra";

import getProxy from "get-proxy";
import ProxyAgent from "simple-proxy-agent";
import { UI5SemanticModel } from "@ui5-language-assistant/semantic-model-types";
import {
generate,
Expand All @@ -12,7 +13,7 @@ import {
import { Fetcher } from "../api";
import { getLogger } from "./logger";

const DEFAULT_UI5_VERSION = "1.71.14";
const DEFAULT_UI5_VERSION = "1.71.49";

export async function getSemanticModel(
modelCachePath: string | undefined
Expand Down Expand Up @@ -58,7 +59,17 @@ export async function getSemanticModelWithFetcher(
if (apiJson === undefined) {
getLogger().info("No cache found for UI5 lib", { libName });
const url = baseUrl + libName.replace(/\./g, "/") + suffix;
const response = await fetcher(url);
const proxy = getProxy();
const fetchOptions = proxy
? {
agent: new ProxyAgent(proxy, {
// Options, with all defaults
tunnel: true, // If true, will tunnel all HTTPS using CONNECT method
timeout: 5000, // Time in milli-seconds, to maximum wait for proxy connection to establish
}),
}
: {};
const response = await fetcher(url, fetchOptions);
if (response.ok) {
apiJson = await response.json();
await writeToCache(cacheFilePath, apiJson);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function readSnapshotDiagnosticsLSPResponse(
}

const ui5ModelPromise = generateModel({
version: "1.71.14",
version: "1.71.49",
modelGenerator: generate,
});
let ui5Model: UI5SemanticModel | undefined = undefined;
Expand Down
Loading