diff --git a/package.json b/package.json index b17b646..bc34213 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "eslint": "^7.27.0", "glob": "^7.1.7", "husky": ">=6", + "less": "^4.1.3", "lint-staged": ">=10", "mocha": "^8.4.0", "prettier": "^2.3.2", diff --git a/src/CompletionProvider.ts b/src/CompletionProvider.ts index 842bb81..feb01bf 100644 --- a/src/CompletionProvider.ts +++ b/src/CompletionProvider.ts @@ -78,7 +78,7 @@ export class CSSModuleCompletionProvider implements CompletionItemProvider { return Promise.resolve([]); } - const classNames = await getAllClassNames(importPath, field); + const classNames = await getAllClassNames(importPath, field, document); return Promise.resolve( classNames.map((_class) => { @@ -88,7 +88,7 @@ export class CSSModuleCompletionProvider implements CompletionItemProvider { } if (isKebabCaseClassName(name)) { return createBracketCompletionItem(name, position); - } + } return new CompletionItem(name, CompletionItemKind.Variable); }) ); diff --git a/src/test/constant.ts b/src/test/constant.ts index 0f92d65..c77e8e3 100644 --- a/src/test/constant.ts +++ b/src/test/constant.ts @@ -7,3 +7,4 @@ export const SAMPLE_JS_FILE = path.join(FIXTURES_PATH, "sample.jsx"); export const STYLUS_JS_FILE = path.join(FIXTURES_PATH, "stylus.jsx"); export const JUMP_PRECISE_DEF_FILE = path.join(FIXTURES_PATH, "jumpDef.jsx"); export const SPREAD_SYNTAX_FILE = path.join(FIXTURES_PATH, "spread-syntax", "index.js"); +export const LESS_JS_FILE = path.join(FIXTURES_PATH,"less-css.jsx") diff --git a/src/test/fixtures/less-css.jsx b/src/test/fixtures/less-css.jsx new file mode 100644 index 0000000..db6448d --- /dev/null +++ b/src/test/fixtures/less-css.jsx @@ -0,0 +1,5 @@ +import styles from "./less-css.less"; + +console.log(styles['container-header-body']); + +styles.container diff --git a/src/test/fixtures/less-css.less b/src/test/fixtures/less-css.less new file mode 100644 index 0000000..22e837b --- /dev/null +++ b/src/test/fixtures/less-css.less @@ -0,0 +1,7 @@ +.container { + &-header{ + &-body{} + } +} + +// 3 css item diff --git a/src/test/suite/CompletionProvider.test.ts b/src/test/suite/CompletionProvider.test.ts index 11ae347..66dcd26 100644 --- a/src/test/suite/CompletionProvider.test.ts +++ b/src/test/suite/CompletionProvider.test.ts @@ -3,13 +3,18 @@ import * as vscode from "vscode"; import { CSSModuleCompletionProvider } from "../../CompletionProvider"; import { CamelCaseValues } from "../../options"; -import { SAMPLE_JS_FILE, STYLUS_JS_FILE } from "../constant"; +import { LESS_JS_FILE, SAMPLE_JS_FILE, STYLUS_JS_FILE } from "../constant"; import { readOptions } from "../utils"; const uri = vscode.Uri.file(SAMPLE_JS_FILE); const uri2 = vscode.Uri.file(STYLUS_JS_FILE); +const lessUri = vscode.Uri.file(LESS_JS_FILE); -function testCompletion(position: vscode.Position, itemCount: number, fixtureFile?: vscode.Uri) { +function testCompletion( + position: vscode.Position, + itemCount: number, + fixtureFile?: vscode.Uri +) { return vscode.workspace.openTextDocument(fixtureFile || uri).then((text) => { const provider = new CSSModuleCompletionProvider(readOptions()); return provider.provideCompletionItems(text, position).then((items) => { @@ -101,7 +106,8 @@ test("test camelCase:false style and kebab-case completion", () => { return Promise.resolve( testCompletionWithCase(position, false, [ (items) => assert.strictEqual(1, items.length), - (items) => assert.strictEqual(`['sidebar_without-header']`, items[0].insertText), + (items) => + assert.strictEqual(`['sidebar_without-header']`, items[0].insertText), ]) ).catch((err) => { assert.ok(false, `error in OpenTextDocument ${err}`); @@ -131,3 +137,10 @@ test("test camelCase:dashes style completion", () => { assert.ok(false, `error in OpenTextDocument ${err}`); }); }); + +// test("test .less extname less completion", () => { +// const position = new vscode.Position(5, 7); +// return Promise.resolve(testCompletion(position, 3, lessUri)).catch((err) => { +// assert.ok(false, `error in OpenTextDocument ${err}`); +// }); +// }); diff --git a/src/utils/index.ts b/src/utils/index.ts index f352505..9327c15 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,6 +1,15 @@ -import { Position, TextDocument, CompletionItem, CompletionItemKind, TextEdit, Range } from "vscode"; +import { + Position, + TextDocument, + CompletionItem, + CompletionItemKind, + TextEdit, + Range, + workspace, +} from "vscode"; import * as fse from "fs-extra"; import * as _ from "lodash"; +import { join } from "path"; export function getCurrentLine( document: TextDocument, @@ -9,23 +18,65 @@ export function getCurrentLine( return document.getText(document.lineAt(position).range); } +// https://github.com/microsoft/vscode-eslint/blob/main/server/src/eslintServer.ts +// This makes loading work in a plain NodeJS and a WebPacked environment +declare const __webpack_require__: typeof require; +declare const __non_webpack_require__: typeof require; +export function loadNodeModule(moduleName: string): T | undefined { + const r = + typeof __webpack_require__ === "function" + ? __non_webpack_require__ + : require; + try { + return r(moduleName); + } catch (err: any) { + console.log(err); + } + return undefined; +} + /** * @TODO Refact by new Tokenizer */ -export async function getAllClassNames(filePath: string, keyword: string): Promise { +export async function getAllClassNames( + filePath: string, + keyword: string, + document: TextDocument +): Promise { // check file exists, if not just return [] const filePathStat = await fse.stat(filePath); if (!filePathStat.isFile()) { return []; } - const content = await fse.readFile(filePath, { encoding: "utf8" }); + let content = await fse.readFile(filePath, { encoding: "utf8" }); let matchLineRegexp = /.*[,{]/g; - // experimental stylus support - if (filePath.endsWith(".styl") ||filePath.endsWith(".stylus")) { - matchLineRegexp = /\..*/g + // experimental stylus support + if (filePath.endsWith(".styl") || filePath.endsWith(".stylus")) { + matchLineRegexp = /\..*/g; } + + if (filePath.endsWith(".less")) { + const lessModulePath = join( + workspace.getWorkspaceFolder(document.uri).uri.fsPath, + "node_modules", + "less" + ); + const less = loadNodeModule(lessModulePath) as any; + if (less) { + // remove all @import + content = content.replace(/@import.+;/g, ""); + // replace all variable to other value + content = content.replace(/@.+/g, "unset"); + try { + content = (await less.render(content)).css; + } catch (error) { + console.log(error); + } + } + } + const lines = content.match(matchLineRegexp); if (lines === null) { return []; @@ -36,7 +87,9 @@ export async function getAllClassNames(filePath: string, keyword: string): Promi return []; } - const uniqNames = _.uniq(classNames).map((item) => item.slice(1)).filter((item) => !/^[0-9]/.test(item)); + const uniqNames = _.uniq(classNames) + .map((item) => item.slice(1)) + .filter((item) => !/^[0-9]/.test(item)); return keyword !== "" ? uniqNames.filter((item) => item.indexOf(keyword) !== -1) : uniqNames; @@ -53,19 +106,33 @@ export function dashesCamelCase(str: string): string { /** * check kebab-case classname */ -export function isKebabCaseClassName (className: string): boolean { - return className?.includes('-'); +export function isKebabCaseClassName(className: string): boolean { + return className?.includes("-"); } /** * BracketCompletionItem Factory */ -export function createBracketCompletionItem (className: string, position: Position): CompletionItem { - const completionItem = new CompletionItem(className, CompletionItemKind.Variable); +export function createBracketCompletionItem( + className: string, + position: Position +): CompletionItem { + const completionItem = new CompletionItem( + className, + CompletionItemKind.Variable + ); completionItem.detail = `['${className}']`; - completionItem.documentation = "kebab-casing may cause unexpected behavior when trying to access style.class-name as a dot notation. You can still work around kebab-case with bracket notation (eg. style['class-name']) but style.className is cleaner."; + completionItem.documentation = + "kebab-casing may cause unexpected behavior when trying to access style.class-name as a dot notation. You can still work around kebab-case with bracket notation (eg. style['class-name']) but style.className is cleaner."; completionItem.insertText = `['${className}']`; - completionItem.additionalTextEdits = [new TextEdit(new Range(new Position(position.line, position.character - 1), - new Position(position.line, position.character)), '')]; + completionItem.additionalTextEdits = [ + new TextEdit( + new Range( + new Position(position.line, position.character - 1), + new Position(position.line, position.character) + ), + "" + ), + ]; return completionItem; } diff --git a/yarn.lock b/yarn.lock index 11a0d53..5b526f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -514,6 +514,13 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +copy-anything@^2.0.1: + version "2.0.6" + resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.6.tgz#092454ea9584a7b7ad5573062b2a87f5900fc480" + integrity sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw== + dependencies: + is-what "^3.14.1" + core-util-is@~1.0.0: version "1.0.2" resolved "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -545,6 +552,13 @@ debug@4, debug@4.3.1, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1: dependencies: ms "2.1.2" +debug@^3.2.6: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + decamelize@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" @@ -598,6 +612,13 @@ enquirer@^2.3.5, enquirer@^2.3.6: dependencies: ansi-colors "^4.1.1" +errno@^0.1.1: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -979,6 +1000,13 @@ husky@>=6: resolved "https://registry.npm.taobao.org/husky/download/husky-6.0.0.tgz?cache=0&sync_timestamp=1617004245593&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhusky%2Fdownload%2Fhusky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e" integrity sha1-gQ8RhprfUWBMMupXftvDd9f5MZ4= +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + ignore@^4.0.6: version "4.0.6" resolved "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -989,6 +1017,11 @@ ignore@^5.1.4: resolved "https://registry.npm.taobao.org/ignore/download/ignore-5.1.8.tgz?cache=0&sync_timestamp=1590809289115&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fignore%2Fdownload%2Fignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha1-8VCotQo0KJsz4i9YiavU2AFvDlc= +image-size@~0.5.0: + version "0.5.5" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" + integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ== + import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.3.0.tgz?cache=0&sync_timestamp=1608469579940&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -1090,6 +1123,11 @@ is-unicode-supported@^0.1.0: resolved "https://registry.npm.taobao.org/is-unicode-supported/download/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha1-PybHaoCVk7Ur+i7LVxDtJ3m1Iqc= +is-what@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1" + integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA== + isarray@~1.0.0: version "1.0.0" resolved "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1155,6 +1193,23 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +less@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/less/-/less-4.1.3.tgz#175be9ddcbf9b250173e0a00b4d6920a5b770246" + integrity sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA== + dependencies: + copy-anything "^2.0.1" + parse-node-version "^1.0.1" + tslib "^2.3.0" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + make-dir "^2.1.0" + mime "^1.4.1" + needle "^3.1.0" + source-map "~0.6.0" + levn@^0.4.1: version "0.4.1" resolved "https://registry.npm.taobao.org/levn/download/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -1266,6 +1321,14 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.nlark.com/merge-stream/download/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -1284,6 +1347,11 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.1" picomatch "^2.2.3" +mime@^1.4.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.nlark.com/mimic-fn/download/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -1351,7 +1419,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3: +ms@2.1.3, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -1366,6 +1434,15 @@ natural-compare@^1.4.0: resolved "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= +needle@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-3.2.0.tgz#07d240ebcabfd65c76c03afae7f6defe6469df44" + integrity sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ== + dependencies: + debug "^3.2.6" + iconv-lite "^0.6.3" + sax "^1.2.4" + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -1442,6 +1519,11 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse-node-version@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" + integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -1472,6 +1554,11 @@ picomatch@^2.2.3: resolved "https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz?cache=0&sync_timestamp=1621648246651&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpicomatch%2Fdownload%2Fpicomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" integrity sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI= +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + please-upgrade-node@^3.2.0: version "3.2.0" resolved "https://registry.nlark.com/please-upgrade-node/download/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" @@ -1499,6 +1586,11 @@ progress@^2.0.0: resolved "https://registry.npm.taobao.org/progress/download/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha1-foz42PW48jnBvGi+tOt4Vn1XLvg= +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== + punycode@^2.1.0: version "2.1.1" resolved "https://registry.nlark.com/punycode/download/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -1607,11 +1699,26 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1589129103371&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha1-mR7GnSluAxN0fVm9/St0XDX4go0= +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.nlark.com/semver-compare/download/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= +semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + semver@^7.2.1, semver@^7.3.5: version "7.3.5" resolved "https://registry.npm.taobao.org/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" @@ -1671,6 +1778,11 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" +source-map@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.nlark.com/sprintf-js/download/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -1798,6 +1910,11 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA= +tslib@^2.3.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.npm.taobao.org/tsutils/download/tsutils-3.21.0.tgz?cache=0&sync_timestamp=1615138205781&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftsutils%2Fdownload%2Ftsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"