From 3762a98af0977f2163d09563c7dd85a5e96d00e2 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Wed, 31 Mar 2021 22:02:03 +0200 Subject: [PATCH 1/3] Fix dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This package includes `yaml-language-server` in its build. This means it’s not a runtime dependency, but it belongs in `devDependencies`. The runtime bundle does depend on the dependencies specified in `resolveSkip` in `scripts/bundle-esm.js`. These packages have been added as direct dependencies instead. --- package.json | 6 ++++-- yarn.lock | 14 +++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b5bf5f3..e36c887 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,8 @@ "url": "https://github.com/pengx17/monaco-yaml/issues" }, "dependencies": { - "yaml-language-server": "^0.11.1" + "js-yaml": "^4.0.0", + "yaml-ast-parser-custom-tags": "^0.0.43" }, "devDependencies": { "husky": "^5.2.0", @@ -47,7 +48,8 @@ "requirejs": "^2.3.6", "rimraf": "^2.6.2", "typescript": "^4.2.3", - "uglify-es": "^3.3.9" + "uglify-es": "^3.3.9", + "yaml-language-server": "^0.11.1" }, "prettier": { "singleQuote": true, diff --git a/yarn.lock b/yarn.lock index 53a185f..f472460 100644 --- a/yarn.lock +++ b/yarn.lock @@ -87,6 +87,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -455,6 +460,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -957,7 +969,7 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -yaml-ast-parser-custom-tags@0.0.43: +yaml-ast-parser-custom-tags@0.0.43, yaml-ast-parser-custom-tags@^0.0.43: version "0.0.43" resolved "https://registry.yarnpkg.com/yaml-ast-parser-custom-tags/-/yaml-ast-parser-custom-tags-0.0.43.tgz#46968145ce4e24cb03c3312057f0f141b93a7d02" integrity sha512-R5063FF/JSAN6qXCmylwjt9PcDH6M0ExEme/nJBzLspc6FJDmHHIqM7xh2WfEmsTJqClF79A9VkXjkAqmZw9SQ== From 5fd08c73edc72f6973abf2f8b6205a439dd7c478 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Wed, 31 Mar 2021 22:07:29 +0200 Subject: [PATCH 2/3] Update prettier to match yaml-language-server Since both yaml-language-server and prettier are included in the bundle, their versions should match for best compatibility. Also code has been formatted using the updated prettier. --- examples/umd/index.html | 10 +++++---- package.json | 6 +++--- scripts/bundle-umd.js | 2 +- src/languageFeatures.ts | 46 ++++++++++++++++++++--------------------- src/workerManager.ts | 6 +++--- src/yamlWorker.ts | 4 ++-- yarn.lock | 5 ----- 7 files changed, 38 insertions(+), 41 deletions(-) diff --git a/examples/umd/index.html b/examples/umd/index.html index 9e9786f..de65adf 100644 --- a/examples/umd/index.html +++ b/examples/umd/index.html @@ -15,7 +15,7 @@