From b40d37016af48a2bde3268175f056b573304ceaf Mon Sep 17 00:00:00 2001 From: Elazar Date: Wed, 12 Jan 2022 15:13:08 +0200 Subject: [PATCH 01/13] delete compiled files from repository --- .gitignore | 1 + dist/extension.js | 2 -- dist/extension.js.map | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 dist/extension.js delete mode 100644 dist/extension.js.map diff --git a/.gitignore b/.gitignore index 0d94a32..dda9b14 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ HOWTO-publish.md .vscode/tasks.json node_modules/ +dist/ .vsixmanifest vsc-todo-highlight.code-workspace todo-highlight.code-workspace diff --git a/dist/extension.js b/dist/extension.js deleted file mode 100644 index e92f8dc..0000000 --- a/dist/extension.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var t={891:(t,e,n)=>{var o=n(496),r=n(37),i=o.window,a=o.workspace,s="$(checklist)",u="$(zap)",l={"TODO:":{text:"TODO:",color:"#fff",backgroundColor:"#ffbd2a",overviewRulerColor:"rgba(255,189,42,0.8)"},"FIXME:":{text:"FIXME:",color:"#fff",backgroundColor:"#f06292",overviewRulerColor:"rgba(240,98,146,0.8)"}},c={color:"#2196f3",backgroundColor:"#ffeb3b"};function g(t){return Array.isArray(t)?"{"+t.join(",")+"}":"string"==typeof t?t:""}function h(t,e,n,o){for(var r=t.uri.toString(),i=r.substring(7,r.length),a=0;a500&&(l=l.substring(0,500).trim()+"...");var c=d(r,i,s,a,u),g={uri:c.uri,label:l,detail:c.relativePath,lineNum:a,fileName:c.absPath,startCol:c.startCol,endCol:c.endCol};n.push(g),e[i].push(g)}}}function p(t){if(i.outputChannel)if(i.outputChannel.clear(),0!==t.length){var e=a.getConfiguration("todohighlight").get("toggleURI",!1),n=r.platform();t.forEach((function(t,o){var r=["#"+(o+1)+"\t"+t.uri+"#"+(t.lineNum+1),"#"+(o+1)+"\t"+t.uri+":"+(t.lineNum+1)+":"+(t.startCol+1)],a=0;"linux"!=n&&"darwin"!=n||(a=1),e&&(a=+!a),i.outputChannel.appendLine(r[a]),i.outputChannel.appendLine("\t"+t.label+"\n")})),i.outputChannel.show()}else i.showInformationMessage("No results. (Not included file types and individual files are not searched.)")}function f(t,e){return t.substring(t.indexOf(e[0]),t.length)}function d(t,e,n,o,r){var i=a.rootPath+"/",s=e.replace(i,""),u=n.indexOf(r[0]);return{uri:t,absPath:e,relativePath:s+" "+(o+1)+":"+(u+1),startCol:u,endCol:n.length}}function v(t){i.processing=!0,m(s,"0"),console.log("todohighlight err:",t)}function m(t,e,n){i.statusBarItem&&(i.statusBarItem.text=`${t} ${e}`||"",n&&(i.statusBarItem.tooltip=n),i.statusBarItem.show())}function x(t){return t.replace(/\(\?<[=|!][^)]*\)/g,"").replace(/((?:[^\\]{1}|^)(?:(?:[\\]{2})+)?)(\((?!\?[:|=|!]))([^)]*)(\))/g,"$1$2?:$3$4")}t.exports={DEFAULT_STYLE:c,getAssembledData:function(t,e,n){var o,r={},i=[];return t.forEach((t=>{var o=(t="string"==typeof t?{text:t}:t).text;o&&(n||(o=o.toUpperCase()),"TODO:"!=o&&"FIXME:"!=o||(t=Object.assign({},l[o],t)),r[o]=Object.assign({},c,e,t),t.regex&&i.push(i.pattern||o))})),i&&(o=i.join("|")),Object.keys(l).filter((t=>!o||!t.match(new RegExp(o)))).forEach((t=>{r[t]||(r[t]=Object.assign({},c,e,l[t]))})),r},chooseAnnotationType:function(t){return i.showQuickPick(t,{})},searchAnnotations:function(t,e,n){var o=a.getConfiguration("todohighlight"),r=g(o.get("include"))||"{**/*}",s=g(o.get("exclude")),l=o.get("maxFilesForSearch",5120),c=" Searching...";i.processing=!0,m(u,c),a.findFiles(r,s,l).then((function(o){if(o&&0!==o.length)for(var r=o.length,s=0,l=0,g={},p=[],f=0;f9){let e=/(?{"use strict";t.exports=require("vscode")},37:t=>{"use strict";t.exports=require("os")}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}var o,r,i,a,s,u={};o=u,r=n(496),i=n(891),a=r.window,s=r.workspace,o.activate=function(t){var e,n,o,u,l,c,g=null,h=a.activeTextEditor,p=t.workspaceState,f=s.getConfiguration("todohighlight");function d(){if(h&&h.document){for(var t,n=h.document.getText(),i={};t=u.exec(n);){var s=h.document.positionAt(t.index),g=h.document.positionAt(t.index+t[0].length),p={range:new r.Range(s,g)},d=t[0];let n=t.slice(1).indexOf(d);d=Object.keys(o)[n]||d,e||(d=d.toUpperCase()),i[d]?i[d].push(p):i[d]=[p],c.trim()&&!o[d]&&(o[d]=a.createTextEditorDecorationType(l))}Object.keys(o).forEach((t=>{var e=f.get("isEnable")&&i[t]?i[t]:[],n=o[t];h.setDecorations(n,e)}))}}function v(t){var s=t.get("defaultStyle");c=t.get("keywordsPattern"),e=t.get("isCaseSensitive",!0),a.statusBarItem||(a.statusBarItem=i.createStatusBarItem()),a.outputChannel||(a.outputChannel=a.createOutputChannel("TodoHighlight")),o={},c.trim()?(l=Object.assign({},i.DEFAULT_STYLE,s,{overviewRulerLane:r.OverviewRulerLane.Right}),u=c):(n=i.getAssembledData(t.get("keywords"),s,e),Object.keys(n).forEach((t=>{e||(t=t.toUpperCase());var i=Object.assign({},{overviewRulerLane:r.OverviewRulerLane.Right},n[t]);i.overviewRulerColor||(i.overviewRulerColor=i.backgroundColor),o[t]=a.createTextEditorDecorationType(i)})),u=Object.keys(n).map((t=>{if(!n[t].regex)return`(${i.escapeRegExp(t)})`;let e=n[t].regex.pattern||t;return`(${i.escapeRegExpGroups(e)})`})).join("|")),u=new RegExp(u,"gi"),e&&(u=new RegExp(u,"g"))}function m(){g&&clearTimeout(g),g=setTimeout(d,0)}v(f),t.subscriptions.push(r.commands.registerCommand("todohighlight.toggleHighlight",(function(){f.update("isEnable",!f.get("isEnable"),!0).then((function(){m()}))}))),t.subscriptions.push(r.commands.registerCommand("todohighlight.listAnnotations",(function(){if(c.trim())i.searchAnnotations(p,u,i.annotationsFound);else{if(!n)return;var t=Object.keys(n);t.unshift("ALL"),i.chooseAnnotationType(t).then((function(t){if(t){var n=u;"ALL"!=t&&(t=i.escapeRegExp(t),n=new RegExp(t,e?"g":"gi")),i.searchAnnotations(p,n,i.annotationsFound)}}))}}))),t.subscriptions.push(r.commands.registerCommand("todohighlight.showOutputChannel",(function(){var t=p.get("annotationList",[]);i.showOutputChannel(t)}))),h&&m(),a.onDidChangeActiveTextEditor((function(t){h=t,t&&m()}),null,t.subscriptions),s.onDidChangeTextDocument((function(t){h&&t.document===h.document&&m()}),null,t.subscriptions),s.onDidChangeConfiguration((function(){(f=s.getConfiguration("todohighlight")).get("isEnable")&&(v(f),m())}),null,t.subscriptions)},module.exports=u})(); -//# sourceMappingURL=extension.js.map \ No newline at end of file diff --git a/dist/extension.js.map b/dist/extension.js.map deleted file mode 100644 index 96831e8..0000000 --- a/dist/extension.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"extension.js","mappings":"2BAAA,IAAIA,EAAS,EAAQ,KACjBC,EAAK,EAAQ,IACbC,EAASF,EAAOE,OAChBC,EAAYH,EAAOG,UAEnBC,EAAc,eACdC,EAAU,SAGVC,EAAmB,CACnB,QAAS,CACLC,KAAM,QACNC,MAAO,OACPC,gBAAiB,UACjBC,mBAAoB,wBAExB,SAAU,CACNH,KAAM,SACNC,MAAO,OACPC,gBAAiB,UACjBC,mBAAoB,yBAIxBC,EAAgB,CAChBH,MAAO,UACPC,gBAAiB,WAmDrB,SAASG,EAAUC,GACf,OAAOC,MAAMC,QAAQF,GACjB,IAAMA,EAAOG,KAAK,KAAO,IACL,iBAAVH,EAAqBA,EAAS,GA2DhD,SAASI,EAAuBC,EAAMC,EAAaC,EAAgBC,GAI/D,IAHA,IAAIC,EAAYJ,EAAKK,IAAIC,WACrBC,EAAkBH,EAAUI,UAAU,EAAGJ,EAAUK,QAE9CC,EAAO,EAAGA,EAAOV,EAAKW,UAAWD,IAAQ,CAC9C,IAAIE,EAAWZ,EAAKa,OAAOH,GAAMrB,KAC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AKvEqB,EAAQsC,cAAcpI,KAAKhD,EAAOqL,SAASC,gBAAgB,mCAAmC,WAC1F,IAAIlK,EAAiBiF,EAAe9C,IAAI,iBAAkB,IAC1DqF,EAAK3F,kBAAkB7B,OAGvBgI,GACA6B,IAGJ/K,EAAOwL,6BAA4B,SAAUC,GACzCvC,EAAeuC,EACXA,GACAV,MAEL,KAAMnC,EAAQsC,eAEjBjL,EAAUyL,yBAAwB,SAAUC,GACpCzC,GAAgByC,EAAMtC,WAAaH,EAAaG,UAChD0B,MAEL,KAAMnC,EAAQsC,eAEjBjL,EAAU2L,0BAAyB,YAC/BvF,EAAWpG,EAAUmD,iBAAiB,kBAGxBC,IAAI,cAElBkH,EAAKlE,GACL0E,OACD,KAAMnC,EAAQsC,gB","sources":[".././src/util.js","../external commonjs \"vscode\"","../external node-commonjs \"os\"","../webpack/bootstrap",".././src/extension.js"],"sourcesContent":["var vscode = require('vscode');\nvar os = require(\"os\");\nvar window = vscode.window;\nvar workspace = vscode.workspace;\n\nvar defaultIcon = '$(checklist)';\nvar zapIcon = '$(zap)';\nvar defaultMsg = '0';\n\nvar DEFAULT_KEYWORDS = {\n \"TODO:\": {\n text: \"TODO:\",\n color: '#fff',\n backgroundColor: '#ffbd2a',\n overviewRulerColor: 'rgba(255,189,42,0.8)'\n },\n \"FIXME:\": {\n text: \"FIXME:\",\n color: '#fff',\n backgroundColor: '#f06292',\n overviewRulerColor: 'rgba(240,98,146,0.8)'\n }\n};\n\nvar DEFAULT_STYLE = {\n color: \"#2196f3\",\n backgroundColor: \"#ffeb3b\",\n};\n\nfunction getAssembledData(keywords, customDefaultStyle, isCaseSensitive) {\n var result = {}, regex = [], reg;\n keywords.forEach((v) => {\n v = typeof v == 'string' ? { text: v } : v;\n var text = v.text;\n if (!text) return;//NOTE: in case of the text is empty\n\n if (!isCaseSensitive) {\n text = text.toUpperCase();\n }\n\n if (text == 'TODO:' || text == 'FIXME:') {\n v = Object.assign({}, DEFAULT_KEYWORDS[text], v);\n }\n result[text] = Object.assign({}, DEFAULT_STYLE, customDefaultStyle, v);\n\n if (v.regex) {\n regex.push(regex.pattern||text);\n }\n })\n\n if (regex) {\n reg = regex.join('|');\n }\n\n // Don't override existing regex keywords with matching defaults\n Object.keys(DEFAULT_KEYWORDS).filter(v => {\n if (reg) {\n if (v.match(new RegExp(reg))) {\n return false;\n }\n }\n\n return true;\n }).forEach(v => {\n if (!result[v]) {\n result[v] = Object.assign({}, DEFAULT_STYLE, customDefaultStyle, DEFAULT_KEYWORDS[v]);\n }\n });\n\n return result;\n}\n\nfunction chooseAnnotationType(availableAnnotationTypes) {\n return window.showQuickPick(availableAnnotationTypes, {});\n}\n\n//get the include/exclude config\nfunction getPathes(config) {\n return Array.isArray(config) ?\n '{' + config.join(',') + '}'\n : (typeof config == 'string' ? config : '');\n}\n\nfunction searchAnnotations(workspaceState, pattern, callback) {\n\n var settings = workspace.getConfiguration('todohighlight');\n var includePattern = getPathes(settings.get('include')) || '{**/*}';\n var excludePattern = getPathes(settings.get('exclude'));\n var limitationForSearch = settings.get('maxFilesForSearch', 5120);\n\n var statusMsg = ` Searching...`;\n\n window.processing = true;\n\n setStatusMsg(zapIcon, statusMsg);\n\n workspace.findFiles(includePattern, excludePattern, limitationForSearch).then(function (files) {\n\n if (!files || files.length === 0) {\n callback({ message: 'No files found' });\n return;\n }\n\n var totalFiles = files.length,\n progress = 0,\n times = 0,\n annotations = {},\n annotationList = [];\n\n function file_iterated() {\n times++;\n progress = Math.floor(times / totalFiles * 100);\n\n setStatusMsg(zapIcon, progress + '% ' + statusMsg);\n\n if (times === totalFiles || window.manullyCancel) {\n window.processing = true;\n workspaceState.update('annotationList', annotationList);\n callback(null, annotations, annotationList);\n }\n }\n\n for (var i = 0; i < totalFiles; i++) {\n\n workspace.openTextDocument(files[i]).then(function (file) {\n searchAnnotationInFile(file, annotations, annotationList, pattern);\n file_iterated();\n }, function (err) {\n errorHandler(err);\n file_iterated();\n });\n\n }\n \n }, function (err) {\n errorHandler(err);\n });\n}\n\nfunction searchAnnotationInFile(file, annotations, annotationList, regexp) {\n var fileInUri = file.uri.toString();\n var pathWithoutFile = fileInUri.substring(7, fileInUri.length);\n\n for (var line = 0; line < file.lineCount; line++) {\n var lineText = file.lineAt(line).text;\n var match = lineText.match(regexp);\n if (match !== null) {\n if (!annotations.hasOwnProperty(pathWithoutFile)) {\n annotations[pathWithoutFile] = [];\n }\n var content = getContent(lineText, match);\n if (content.length > 500) {\n content = content.substring(0, 500).trim() + '...';\n }\n var locationInfo = getLocationInfo(fileInUri, pathWithoutFile, lineText, line, match);\n\n var annotation = {\n uri: locationInfo.uri,\n label: content,\n detail: locationInfo.relativePath,\n lineNum: line,\n fileName: locationInfo.absPath,\n startCol: locationInfo.startCol,\n endCol: locationInfo.endCol\n };\n annotationList.push(annotation);\n annotations[pathWithoutFile].push(annotation);\n }\n }\n}\n\nfunction annotationsFound(err, annotations, annotationList) {\n if (err) {\n console.log('todohighlight err:', err);\n setStatusMsg(defaultIcon, defaultMsg);\n return;\n }\n\n var resultNum = annotationList.length;\n var tooltip = resultNum + ' result(s) found';\n setStatusMsg(defaultIcon, resultNum, tooltip);\n showOutputChannel(annotationList);\n}\n\nfunction showOutputChannel(data) {\n if (!window.outputChannel) return;\n window.outputChannel.clear();\n\n if (data.length === 0) {\n window.showInformationMessage('No results. (Not included file types and individual files are not searched.)');\n return;\n }\n\n var settings = workspace.getConfiguration('todohighlight');\n var toggleURI = settings.get('toggleURI', false);\n var platform = os.platform();\n\n data.forEach(function (v, i) {\n // due to an issue of vscode(https://github.com/Microsoft/vscode/issues/586), in order to make file path clickable within the output channel,the file path differs from platform\n var patternA = '#' + (i + 1) + '\\t' + v.uri + '#' + (v.lineNum + 1);\n var patternB = '#' + (i + 1) + '\\t' + v.uri + ':' + (v.lineNum + 1) + ':' + (v.startCol + 1);\n var patterns = [patternA, patternB];\n\n //for windows\n var patternType = 0;\n if (platform == \"linux\" || platform == \"darwin\") {\n // for linux & mac\n patternType = 1;\n }\n if (toggleURI) {\n //toggle the pattern\n patternType = +!patternType;\n }\n window.outputChannel.appendLine(patterns[patternType]);\n window.outputChannel.appendLine('\\t' + v.label + '\\n');\n });\n window.outputChannel.show();\n}\n\nfunction getContent(lineText, match) {\n return lineText.substring(lineText.indexOf(match[0]), lineText.length);\n};\n\nfunction getLocationInfo(fileInUri, pathWithoutFile, lineText, line, match) {\n var rootPath = workspace.rootPath + '/';\n var outputFile = pathWithoutFile.replace(rootPath, '');\n var startCol = lineText.indexOf(match[0]);\n var endCol = lineText.length;\n var location = outputFile + ' ' + (line + 1) + ':' + (startCol + 1);\n\n return {\n uri: fileInUri,\n absPath: pathWithoutFile,\n relativePath: location,\n startCol: startCol,\n endCol: endCol\n };\n};\n\nfunction createStatusBarItem() {\n var statusBarItem = window.createStatusBarItem(vscode.StatusBarAlignment.Left);\n statusBarItem.text = defaultIcon + defaultMsg;\n statusBarItem.tooltip = 'List annotations';\n statusBarItem.command = 'todohighlight.showOutputChannel';\n return statusBarItem;\n};\n\nfunction errorHandler(err) {\n window.processing = true;\n setStatusMsg(defaultIcon, defaultMsg);\n console.log('todohighlight err:', err);\n}\n\nfunction setStatusMsg(icon, msg, tooltip) {\n if (window.statusBarItem) {\n window.statusBarItem.text = `${icon} ${msg}` || '';\n if (tooltip) {\n window.statusBarItem.tooltip = tooltip;\n }\n window.statusBarItem.show();\n }\n}\n\nfunction escapeRegExp(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nfunction escapeRegExpGroups(s) {\n // Lookbehind assertions (\"(? 9.0) {\n let grpPattern = /(? {\n var rangeOption = settings.get('isEnable') && matches[v] ? matches[v] : [];\n var decorationType = decorationTypes[v];\n activeEditor.setDecorations(decorationType, rangeOption);\n })\n }\n\n function init(settings) {\n var customDefaultStyle = settings.get('defaultStyle');\n keywordsPattern = settings.get('keywordsPattern');\n isCaseSensitive = settings.get('isCaseSensitive', true);\n\n if (!window.statusBarItem) {\n window.statusBarItem = util.createStatusBarItem();\n }\n if (!window.outputChannel) {\n window.outputChannel = window.createOutputChannel('TodoHighlight');\n }\n\n decorationTypes = {};\n\n if (keywordsPattern.trim()) {\n styleForRegExp = Object.assign({}, util.DEFAULT_STYLE, customDefaultStyle, {\n overviewRulerLane: vscode.OverviewRulerLane.Right\n });\n\n pattern = keywordsPattern;\n } else {\n assembledData = util.getAssembledData(settings.get('keywords'), customDefaultStyle, isCaseSensitive);\n Object.keys(assembledData).forEach((v) => {\n if (!isCaseSensitive) {\n v = v.toUpperCase()\n }\n\n var mergedStyle = Object.assign({}, {\n overviewRulerLane: vscode.OverviewRulerLane.Right\n }, assembledData[v]);\n\n if (!mergedStyle.overviewRulerColor) {\n // use backgroundColor as the default overviewRulerColor if not specified by the user setting\n mergedStyle.overviewRulerColor = mergedStyle.backgroundColor;\n }\n\n decorationTypes[v] = window.createTextEditorDecorationType(mergedStyle);\n });\n\n // Give each keyword a group in the pattern\n pattern = Object.keys(assembledData).map((v) => {\n if (!assembledData[v].regex) {\n return `(${util.escapeRegExp(v)})`;\n }\n\n let p = assembledData[v].regex.pattern || v;\n // Ignore unescaped parantheses to avoid messing with our groups\n return `(${util.escapeRegExpGroups(p)})`\n }).join('|');\n }\n\n pattern = new RegExp(pattern, 'gi');\n if (isCaseSensitive) {\n pattern = new RegExp(pattern, 'g');\n }\n\n }\n\n function triggerUpdateDecorations() {\n timeout && clearTimeout(timeout);\n timeout = setTimeout(updateDecorations, 0);\n }\n}\n\nexports.activate = activate;\n"],"names":["vscode","os","window","workspace","defaultIcon","zapIcon","DEFAULT_KEYWORDS","text","color","backgroundColor","overviewRulerColor","DEFAULT_STYLE","getPathes","config","Array","isArray","join","searchAnnotationInFile","file","annotations","annotationList","regexp","fileInUri","uri","toString","pathWithoutFile","substring","length","line","lineCount","lineText","lineAt","match","hasOwnProperty","content","getContent","trim","locationInfo","getLocationInfo","annotation","label","detail","relativePath","lineNum","fileName","absPath","startCol","endCol","push","showOutputChannel","data","outputChannel","clear","toggleURI","getConfiguration","get","platform","forEach","v","i","patterns","patternType","appendLine","show","showInformationMessage","indexOf","rootPath","outputFile","replace","errorHandler","err","processing","setStatusMsg","console","log","icon","msg","tooltip","statusBarItem","escapeRegExpGroupsLegacy","s","module","exports","getAssembledData","keywords","customDefaultStyle","isCaseSensitive","reg","result","regex","toUpperCase","Object","assign","pattern","keys","filter","RegExp","chooseAnnotationType","availableAnnotationTypes","showQuickPick","searchAnnotations","workspaceState","callback","settings","includePattern","excludePattern","limitationForSearch","statusMsg","findFiles","then","files","totalFiles","progress","times","openTextDocument","file_iterated","message","Math","floor","manullyCancel","update","annotationsFound","resultNum","createStatusBarItem","StatusBarAlignment","Left","command","escapeRegExp","escapeRegExpGroups","parseFloat","process","version","grpPattern","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","util","activate","context","assembledData","decorationTypes","styleForRegExp","keywordsPattern","timeout","activeEditor","activeTextEditor","updateDecorations","document","getText","matches","exec","startPos","positionAt","index","endPos","decoration","range","Range","matchedValue","patternIndex","slice","createTextEditorDecorationType","rangeOption","decorationType","setDecorations","init","createOutputChannel","overviewRulerLane","OverviewRulerLane","Right","mergedStyle","map","p","triggerUpdateDecorations","clearTimeout","setTimeout","subscriptions","commands","registerCommand","unshift","annotationType","searchPattern","onDidChangeActiveTextEditor","editor","onDidChangeTextDocument","event","onDidChangeConfiguration"],"sourceRoot":""} \ No newline at end of file From a6afe156f1b1b5a1ad65638eec0ca71688d9ec1a Mon Sep 17 00:00:00 2001 From: Elazar Date: Thu, 13 Jan 2022 21:55:29 +0200 Subject: [PATCH 02/13] init --- .gitignore | 1 + .vscode/launch.json | 22 +++ .vscode/settings.json | 10 ++ dist/extension.js | 2 - dist/extension.js.map | 1 - package.json | 6 +- src/config-utils.ts | 151 +++++++++++++++++++++ src/config.ts | 93 +++++++++++++ src/{extension.js => extension.ts} | 122 +++++++++-------- src/{util.js => util.ts} | 209 +++++++++++++++-------------- tsconfig.json | 20 +++ webpack.config.js | 2 +- 12 files changed, 479 insertions(+), 160 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json delete mode 100644 dist/extension.js delete mode 100644 dist/extension.js.map create mode 100644 src/config-utils.ts create mode 100644 src/config.ts rename src/{extension.js => extension.ts} (51%) rename src/{util.js => util.ts} (50%) create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index 0d94a32..dda9b14 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ HOWTO-publish.md .vscode/tasks.json node_modules/ +dist/ .vsixmanifest vsc-todo-highlight.code-workspace todo-highlight.code-workspace diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..9f4edaf --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +// A launch configuration that compiles the extension and then opens it inside a new window +// Use IntelliSense to learn about possible attributes. +// Hover to view descriptions of existing attributes. +// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run Extension", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}", + ], + "outFiles": [ + "${workspaceFolder}/dist/**/*.js" + ], + "preLaunchTask": "npm: webpack" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b5c729f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "files.exclude": { + "out": false // set this to true to hide the "out" folder with the compiled JS files + }, + "search.exclude": { + "out": true // set this to false to include "out" folder in search results + }, + "npm.packageManager": "npm", +} \ No newline at end of file diff --git a/dist/extension.js b/dist/extension.js deleted file mode 100644 index e92f8dc..0000000 --- a/dist/extension.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var t={891:(t,e,n)=>{var o=n(496),r=n(37),i=o.window,a=o.workspace,s="$(checklist)",u="$(zap)",l={"TODO:":{text:"TODO:",color:"#fff",backgroundColor:"#ffbd2a",overviewRulerColor:"rgba(255,189,42,0.8)"},"FIXME:":{text:"FIXME:",color:"#fff",backgroundColor:"#f06292",overviewRulerColor:"rgba(240,98,146,0.8)"}},c={color:"#2196f3",backgroundColor:"#ffeb3b"};function g(t){return Array.isArray(t)?"{"+t.join(",")+"}":"string"==typeof t?t:""}function h(t,e,n,o){for(var r=t.uri.toString(),i=r.substring(7,r.length),a=0;a500&&(l=l.substring(0,500).trim()+"...");var c=d(r,i,s,a,u),g={uri:c.uri,label:l,detail:c.relativePath,lineNum:a,fileName:c.absPath,startCol:c.startCol,endCol:c.endCol};n.push(g),e[i].push(g)}}}function p(t){if(i.outputChannel)if(i.outputChannel.clear(),0!==t.length){var e=a.getConfiguration("todohighlight").get("toggleURI",!1),n=r.platform();t.forEach((function(t,o){var r=["#"+(o+1)+"\t"+t.uri+"#"+(t.lineNum+1),"#"+(o+1)+"\t"+t.uri+":"+(t.lineNum+1)+":"+(t.startCol+1)],a=0;"linux"!=n&&"darwin"!=n||(a=1),e&&(a=+!a),i.outputChannel.appendLine(r[a]),i.outputChannel.appendLine("\t"+t.label+"\n")})),i.outputChannel.show()}else i.showInformationMessage("No results. (Not included file types and individual files are not searched.)")}function f(t,e){return t.substring(t.indexOf(e[0]),t.length)}function d(t,e,n,o,r){var i=a.rootPath+"/",s=e.replace(i,""),u=n.indexOf(r[0]);return{uri:t,absPath:e,relativePath:s+" "+(o+1)+":"+(u+1),startCol:u,endCol:n.length}}function v(t){i.processing=!0,m(s,"0"),console.log("todohighlight err:",t)}function m(t,e,n){i.statusBarItem&&(i.statusBarItem.text=`${t} ${e}`||"",n&&(i.statusBarItem.tooltip=n),i.statusBarItem.show())}function x(t){return t.replace(/\(\?<[=|!][^)]*\)/g,"").replace(/((?:[^\\]{1}|^)(?:(?:[\\]{2})+)?)(\((?!\?[:|=|!]))([^)]*)(\))/g,"$1$2?:$3$4")}t.exports={DEFAULT_STYLE:c,getAssembledData:function(t,e,n){var o,r={},i=[];return t.forEach((t=>{var o=(t="string"==typeof t?{text:t}:t).text;o&&(n||(o=o.toUpperCase()),"TODO:"!=o&&"FIXME:"!=o||(t=Object.assign({},l[o],t)),r[o]=Object.assign({},c,e,t),t.regex&&i.push(i.pattern||o))})),i&&(o=i.join("|")),Object.keys(l).filter((t=>!o||!t.match(new RegExp(o)))).forEach((t=>{r[t]||(r[t]=Object.assign({},c,e,l[t]))})),r},chooseAnnotationType:function(t){return i.showQuickPick(t,{})},searchAnnotations:function(t,e,n){var o=a.getConfiguration("todohighlight"),r=g(o.get("include"))||"{**/*}",s=g(o.get("exclude")),l=o.get("maxFilesForSearch",5120),c=" Searching...";i.processing=!0,m(u,c),a.findFiles(r,s,l).then((function(o){if(o&&0!==o.length)for(var r=o.length,s=0,l=0,g={},p=[],f=0;f9){let e=/(?{"use strict";t.exports=require("vscode")},37:t=>{"use strict";t.exports=require("os")}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}var o,r,i,a,s,u={};o=u,r=n(496),i=n(891),a=r.window,s=r.workspace,o.activate=function(t){var e,n,o,u,l,c,g=null,h=a.activeTextEditor,p=t.workspaceState,f=s.getConfiguration("todohighlight");function d(){if(h&&h.document){for(var t,n=h.document.getText(),i={};t=u.exec(n);){var s=h.document.positionAt(t.index),g=h.document.positionAt(t.index+t[0].length),p={range:new r.Range(s,g)},d=t[0];let n=t.slice(1).indexOf(d);d=Object.keys(o)[n]||d,e||(d=d.toUpperCase()),i[d]?i[d].push(p):i[d]=[p],c.trim()&&!o[d]&&(o[d]=a.createTextEditorDecorationType(l))}Object.keys(o).forEach((t=>{var e=f.get("isEnable")&&i[t]?i[t]:[],n=o[t];h.setDecorations(n,e)}))}}function v(t){var s=t.get("defaultStyle");c=t.get("keywordsPattern"),e=t.get("isCaseSensitive",!0),a.statusBarItem||(a.statusBarItem=i.createStatusBarItem()),a.outputChannel||(a.outputChannel=a.createOutputChannel("TodoHighlight")),o={},c.trim()?(l=Object.assign({},i.DEFAULT_STYLE,s,{overviewRulerLane:r.OverviewRulerLane.Right}),u=c):(n=i.getAssembledData(t.get("keywords"),s,e),Object.keys(n).forEach((t=>{e||(t=t.toUpperCase());var i=Object.assign({},{overviewRulerLane:r.OverviewRulerLane.Right},n[t]);i.overviewRulerColor||(i.overviewRulerColor=i.backgroundColor),o[t]=a.createTextEditorDecorationType(i)})),u=Object.keys(n).map((t=>{if(!n[t].regex)return`(${i.escapeRegExp(t)})`;let e=n[t].regex.pattern||t;return`(${i.escapeRegExpGroups(e)})`})).join("|")),u=new RegExp(u,"gi"),e&&(u=new RegExp(u,"g"))}function m(){g&&clearTimeout(g),g=setTimeout(d,0)}v(f),t.subscriptions.push(r.commands.registerCommand("todohighlight.toggleHighlight",(function(){f.update("isEnable",!f.get("isEnable"),!0).then((function(){m()}))}))),t.subscriptions.push(r.commands.registerCommand("todohighlight.listAnnotations",(function(){if(c.trim())i.searchAnnotations(p,u,i.annotationsFound);else{if(!n)return;var t=Object.keys(n);t.unshift("ALL"),i.chooseAnnotationType(t).then((function(t){if(t){var n=u;"ALL"!=t&&(t=i.escapeRegExp(t),n=new RegExp(t,e?"g":"gi")),i.searchAnnotations(p,n,i.annotationsFound)}}))}}))),t.subscriptions.push(r.commands.registerCommand("todohighlight.showOutputChannel",(function(){var t=p.get("annotationList",[]);i.showOutputChannel(t)}))),h&&m(),a.onDidChangeActiveTextEditor((function(t){h=t,t&&m()}),null,t.subscriptions),s.onDidChangeTextDocument((function(t){h&&t.document===h.document&&m()}),null,t.subscriptions),s.onDidChangeConfiguration((function(){(f=s.getConfiguration("todohighlight")).get("isEnable")&&(v(f),m())}),null,t.subscriptions)},module.exports=u})(); -//# sourceMappingURL=extension.js.map \ No newline at end of file diff --git a/dist/extension.js.map b/dist/extension.js.map deleted file mode 100644 index 96831e8..0000000 --- a/dist/extension.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,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,GACxBA,EAAUgC,WAAW7B,EAAmB,GAjK5CmB,EAAKlE,GAELuC,EAAQsC,cAAcpI,KAAKhD,EAAOqL,SAASC,gBAAgB,iCAAiC,WACxF/E,EAASiB,OAAO,YAAajB,EAAShD,IAAI,aAAa,GAAMsD,MAAK,WAC9DoE,WAIRnC,EAAQsC,cAAcpI,KAAKhD,EAAOqL,SAASC,gBAAgB,iCAAiC,WACxF,GAAIpC,EAAgB9G,OAChBwG,EAAKxC,kBAAkBC,EAAgBR,EAAS+C,EAAKnB,sBAClD,CACH,IAAKsB,EAAe,OACpB,IAAI7C,EAA2BP,OAAOG,KAAKiD,GAC3C7C,EAAyBqF,QAAQ,OACjC3C,EAAK3C,qBAAqBC,GAA0BW,MAAK,SAAU2E,GAC/D,GAAKA,EAAL,CACA,IAAIC,EAAgB5F,EACE,OAAlB2F,IACAA,EAAiB5C,EAAKb,aAAayD,GACnCC,EAAgB,IAAIzF,OAAOwF,EAAgBlG,EAAkB,IAAM,OAEvEsD,EAAKxC,kBAAkBC,EAAgBoF,EAAe7C,EAAKnB,2BAKvEqB,EAAQsC,cAAcpI,KAAKhD,EAAOqL,SAASC,gBAAgB,mCAAmC,WAC1F,IAAIlK,EAAiBiF,EAAe9C,IAAI,iBAAkB,IAC1DqF,EAAK3F,kBAAkB7B,OAGvBgI,GACA6B,IAGJ/K,EAAOwL,6BAA4B,SAAUC,GACzCvC,EAAeuC,EACXA,GACAV,MAEL,KAAMnC,EAAQsC,eAEjBjL,EAAUyL,yBAAwB,SAAUC,GACpCzC,GAAgByC,EAAMtC,WAAaH,EAAaG,UAChD0B,MAEL,KAAMnC,EAAQsC,eAEjBjL,EAAU2L,0BAAyB,YAC/BvF,EAAWpG,EAAUmD,iBAAiB,kBAGxBC,IAAI,cAElBkH,EAAKlE,GACL0E,OACD,KAAMnC,EAAQsC,gB","sources":[".././src/util.js","../external commonjs \"vscode\"","../external node-commonjs \"os\"","../webpack/bootstrap",".././src/extension.js"],"sourcesContent":["var vscode = require('vscode');\nvar os = require(\"os\");\nvar window = vscode.window;\nvar workspace = vscode.workspace;\n\nvar defaultIcon = '$(checklist)';\nvar zapIcon = '$(zap)';\nvar defaultMsg = '0';\n\nvar DEFAULT_KEYWORDS = {\n \"TODO:\": {\n text: \"TODO:\",\n color: '#fff',\n backgroundColor: '#ffbd2a',\n overviewRulerColor: 'rgba(255,189,42,0.8)'\n },\n \"FIXME:\": {\n text: \"FIXME:\",\n color: '#fff',\n backgroundColor: '#f06292',\n overviewRulerColor: 'rgba(240,98,146,0.8)'\n }\n};\n\nvar DEFAULT_STYLE = {\n color: \"#2196f3\",\n backgroundColor: \"#ffeb3b\",\n};\n\nfunction getAssembledData(keywords, customDefaultStyle, isCaseSensitive) {\n var result = {}, regex = [], reg;\n keywords.forEach((v) => {\n v = typeof v == 'string' ? { text: v } : v;\n var text = v.text;\n if (!text) return;//NOTE: in case of the text is empty\n\n if (!isCaseSensitive) {\n text = text.toUpperCase();\n }\n\n if (text == 'TODO:' || text == 'FIXME:') {\n v = Object.assign({}, DEFAULT_KEYWORDS[text], v);\n }\n result[text] = Object.assign({}, DEFAULT_STYLE, customDefaultStyle, v);\n\n if (v.regex) {\n regex.push(regex.pattern||text);\n }\n })\n\n if (regex) {\n reg = regex.join('|');\n }\n\n // Don't override existing regex keywords with matching defaults\n Object.keys(DEFAULT_KEYWORDS).filter(v => {\n if (reg) {\n if (v.match(new RegExp(reg))) {\n return false;\n }\n }\n\n return true;\n }).forEach(v => {\n if (!result[v]) {\n result[v] = Object.assign({}, DEFAULT_STYLE, customDefaultStyle, DEFAULT_KEYWORDS[v]);\n }\n });\n\n return result;\n}\n\nfunction chooseAnnotationType(availableAnnotationTypes) {\n return window.showQuickPick(availableAnnotationTypes, {});\n}\n\n//get the include/exclude config\nfunction getPathes(config) {\n return Array.isArray(config) ?\n '{' + config.join(',') + '}'\n : (typeof config == 'string' ? config : '');\n}\n\nfunction searchAnnotations(workspaceState, pattern, callback) {\n\n var settings = workspace.getConfiguration('todohighlight');\n var includePattern = getPathes(settings.get('include')) || '{**/*}';\n var excludePattern = getPathes(settings.get('exclude'));\n var limitationForSearch = settings.get('maxFilesForSearch', 5120);\n\n var statusMsg = ` Searching...`;\n\n window.processing = true;\n\n setStatusMsg(zapIcon, statusMsg);\n\n workspace.findFiles(includePattern, excludePattern, limitationForSearch).then(function (files) {\n\n if (!files || files.length === 0) {\n callback({ message: 'No files found' });\n return;\n }\n\n var totalFiles = files.length,\n progress = 0,\n times = 0,\n annotations = {},\n annotationList = [];\n\n function file_iterated() {\n times++;\n progress = Math.floor(times / totalFiles * 100);\n\n setStatusMsg(zapIcon, progress + '% ' + statusMsg);\n\n if (times === totalFiles || window.manullyCancel) {\n window.processing = true;\n workspaceState.update('annotationList', annotationList);\n callback(null, annotations, annotationList);\n }\n }\n\n for (var i = 0; i < totalFiles; i++) {\n\n workspace.openTextDocument(files[i]).then(function (file) {\n searchAnnotationInFile(file, annotations, annotationList, pattern);\n file_iterated();\n }, function (err) {\n errorHandler(err);\n file_iterated();\n });\n\n }\n \n }, function (err) {\n errorHandler(err);\n });\n}\n\nfunction searchAnnotationInFile(file, annotations, annotationList, regexp) {\n var fileInUri = file.uri.toString();\n var pathWithoutFile = fileInUri.substring(7, fileInUri.length);\n\n for (var line = 0; line < file.lineCount; line++) {\n var lineText = file.lineAt(line).text;\n var match = lineText.match(regexp);\n if (match !== null) {\n if (!annotations.hasOwnProperty(pathWithoutFile)) {\n annotations[pathWithoutFile] = [];\n }\n var content = getContent(lineText, match);\n if (content.length > 500) {\n content = content.substring(0, 500).trim() + '...';\n }\n var locationInfo = getLocationInfo(fileInUri, pathWithoutFile, lineText, line, match);\n\n var annotation = {\n uri: locationInfo.uri,\n label: content,\n detail: locationInfo.relativePath,\n lineNum: line,\n fileName: locationInfo.absPath,\n startCol: locationInfo.startCol,\n endCol: locationInfo.endCol\n };\n annotationList.push(annotation);\n annotations[pathWithoutFile].push(annotation);\n }\n }\n}\n\nfunction annotationsFound(err, annotations, annotationList) {\n if (err) {\n console.log('todohighlight err:', err);\n setStatusMsg(defaultIcon, defaultMsg);\n return;\n }\n\n var resultNum = annotationList.length;\n var tooltip = resultNum + ' result(s) found';\n setStatusMsg(defaultIcon, resultNum, tooltip);\n showOutputChannel(annotationList);\n}\n\nfunction showOutputChannel(data) {\n if (!window.outputChannel) return;\n window.outputChannel.clear();\n\n if (data.length === 0) {\n window.showInformationMessage('No results. (Not included file types and individual files are not searched.)');\n return;\n }\n\n var settings = workspace.getConfiguration('todohighlight');\n var toggleURI = settings.get('toggleURI', false);\n var platform = os.platform();\n\n data.forEach(function (v, i) {\n // due to an issue of vscode(https://github.com/Microsoft/vscode/issues/586), in order to make file path clickable within the output channel,the file path differs from platform\n var patternA = '#' + (i + 1) + '\\t' + v.uri + '#' + (v.lineNum + 1);\n var patternB = '#' + (i + 1) + '\\t' + v.uri + ':' + (v.lineNum + 1) + ':' + (v.startCol + 1);\n var patterns = [patternA, patternB];\n\n //for windows\n var patternType = 0;\n if (platform == \"linux\" || platform == \"darwin\") {\n // for linux & mac\n patternType = 1;\n }\n if (toggleURI) {\n //toggle the pattern\n patternType = +!patternType;\n }\n window.outputChannel.appendLine(patterns[patternType]);\n window.outputChannel.appendLine('\\t' + v.label + '\\n');\n });\n window.outputChannel.show();\n}\n\nfunction getContent(lineText, match) {\n return lineText.substring(lineText.indexOf(match[0]), lineText.length);\n};\n\nfunction getLocationInfo(fileInUri, pathWithoutFile, lineText, line, match) {\n var rootPath = workspace.rootPath + '/';\n var outputFile = pathWithoutFile.replace(rootPath, '');\n var startCol = lineText.indexOf(match[0]);\n var endCol = lineText.length;\n var location = outputFile + ' ' + (line + 1) + ':' + (startCol + 1);\n\n return {\n uri: fileInUri,\n absPath: pathWithoutFile,\n relativePath: location,\n startCol: startCol,\n endCol: endCol\n };\n};\n\nfunction createStatusBarItem() {\n var statusBarItem = window.createStatusBarItem(vscode.StatusBarAlignment.Left);\n statusBarItem.text = defaultIcon + defaultMsg;\n statusBarItem.tooltip = 'List annotations';\n statusBarItem.command = 'todohighlight.showOutputChannel';\n return statusBarItem;\n};\n\nfunction errorHandler(err) {\n window.processing = true;\n setStatusMsg(defaultIcon, defaultMsg);\n console.log('todohighlight err:', err);\n}\n\nfunction setStatusMsg(icon, msg, tooltip) {\n if (window.statusBarItem) {\n window.statusBarItem.text = `${icon} ${msg}` || '';\n if (tooltip) {\n window.statusBarItem.tooltip = tooltip;\n }\n window.statusBarItem.show();\n }\n}\n\nfunction escapeRegExp(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nfunction escapeRegExpGroups(s) {\n // Lookbehind assertions (\"(? 9.0) {\n let grpPattern = /(? {\n var rangeOption = settings.get('isEnable') && matches[v] ? matches[v] : [];\n var decorationType = decorationTypes[v];\n activeEditor.setDecorations(decorationType, rangeOption);\n })\n }\n\n function init(settings) {\n var customDefaultStyle = settings.get('defaultStyle');\n keywordsPattern = settings.get('keywordsPattern');\n isCaseSensitive = settings.get('isCaseSensitive', true);\n\n if (!window.statusBarItem) {\n window.statusBarItem = util.createStatusBarItem();\n }\n if (!window.outputChannel) {\n window.outputChannel = window.createOutputChannel('TodoHighlight');\n }\n\n decorationTypes = {};\n\n if (keywordsPattern.trim()) {\n styleForRegExp = Object.assign({}, util.DEFAULT_STYLE, customDefaultStyle, {\n overviewRulerLane: vscode.OverviewRulerLane.Right\n });\n\n pattern = keywordsPattern;\n } else {\n assembledData = util.getAssembledData(settings.get('keywords'), customDefaultStyle, isCaseSensitive);\n Object.keys(assembledData).forEach((v) => {\n if (!isCaseSensitive) {\n v = v.toUpperCase()\n }\n\n var mergedStyle = Object.assign({}, {\n overviewRulerLane: vscode.OverviewRulerLane.Right\n }, assembledData[v]);\n\n if (!mergedStyle.overviewRulerColor) {\n // use backgroundColor as the default overviewRulerColor if not specified by the user setting\n mergedStyle.overviewRulerColor = mergedStyle.backgroundColor;\n }\n\n decorationTypes[v] = window.createTextEditorDecorationType(mergedStyle);\n });\n\n // Give each keyword a group in the pattern\n pattern = Object.keys(assembledData).map((v) => {\n if (!assembledData[v].regex) {\n return `(${util.escapeRegExp(v)})`;\n }\n\n let p = assembledData[v].regex.pattern || v;\n // Ignore unescaped parantheses to avoid messing with our groups\n return `(${util.escapeRegExpGroups(p)})`\n }).join('|');\n }\n\n pattern = new RegExp(pattern, 'gi');\n if (isCaseSensitive) {\n pattern = new RegExp(pattern, 'g');\n }\n\n }\n\n function triggerUpdateDecorations() {\n timeout && clearTimeout(timeout);\n timeout = setTimeout(updateDecorations, 0);\n }\n}\n\nexports.activate = activate;\n"],"names":["vscode","os","window","workspace","defaultIcon","zapIcon","DEFAULT_KEYWORDS","text","color","backgroundColor","overviewRulerColor","DEFAULT_STYLE","getPathes","config","Array","isArray","join","searchAnnotationInFile","file","annotations","annotationList","regexp","fileInUri","uri","toString","pathWithoutFile","substring","length","line","lineCount","lineText","lineAt","match","hasOwnProperty","content","getContent","trim","locationInfo","getLocationInfo","annotation","label","detail","relativePath","lineNum","fileName","absPath","startCol","endCol","push","showOutputChannel","data","outputChannel","clear","toggleURI","getConfiguration","get","platform","forEach","v","i","patterns","patternType","appendLine","show","showInformationMessage","indexOf","rootPath","outputFile","replace","errorHandler","err","processing","setStatusMsg","console","log","icon","msg","tooltip","statusBarItem","escapeRegExpGroupsLegacy","s","module","exports","getAssembledData","keywords","customDefaultStyle","isCaseSensitive","reg","result","regex","toUpperCase","Object","assign","pattern","keys","filter","RegExp","chooseAnnotationType","availableAnnotationTypes","showQuickPick","searchAnnotations","workspaceState","callback","settings","includePattern","excludePattern","limitationForSearch","statusMsg","findFiles","then","files","totalFiles","progress","times","openTextDocument","file_iterated","message","Math","floor","manullyCancel","update","annotationsFound","resultNum","createStatusBarItem","StatusBarAlignment","Left","command","escapeRegExp","escapeRegExpGroups","parseFloat","process","version","grpPattern","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","util","activate","context","assembledData","decorationTypes","styleForRegExp","keywordsPattern","timeout","activeEditor","activeTextEditor","updateDecorations","document","getText","matches","exec","startPos","positionAt","index","endPos","decoration","range","Range","matchedValue","patternIndex","slice","createTextEditorDecorationType","rangeOption","decorationType","setDecorations","init","createOutputChannel","overviewRulerLane","OverviewRulerLane","Right","mergedStyle","map","p","triggerUpdateDecorations","clearTimeout","setTimeout","subscriptions","commands","registerCommand","unshift","annotationType","searchPattern","onDidChangeActiveTextEditor","editor","onDidChangeTextDocument","event","onDidChangeConfiguration"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index 206c668..40f991b 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,7 @@ "scripts": { "vscode:prepublish": "webpack --mode production", "webpack": "webpack --mode development", - "webpack-dev": "webpack --mode development --watch", - "postinstall": "node ./node_modules/vscode/bin/install" + "webpack-dev": "webpack --mode development --watch" }, "badges": [ { @@ -272,9 +271,10 @@ "devDependencies": { "@types/mocha": "^2.2.32", "@types/node": "^6.0.40", - "@types/vscode": "^1.0.0", + "@types/vscode": "^1.63.1", "eslint": "^7.18.0", "mocha": "^8.2.0", + "ts-loader": "^9.2.6", "typescript": "^4.1.2", "webpack-cli": "^4.x.x" }, diff --git a/src/config-utils.ts b/src/config-utils.ts new file mode 100644 index 0000000..acf52ea --- /dev/null +++ b/src/config-utils.ts @@ -0,0 +1,151 @@ +import { ConfigurationScope, ConfigurationTarget, workspace } from 'vscode'; + +type InspectReturnValue = { + key: string; + defaultValue?: C[K]; + globalValue?: C[K]; + workspaceValue?: C[K]; + workspaceFolderValue?: C[K]; + defaultLanguageValue?: C[K]; + globalLanguageValue?: C[K]; + workspaceLanguageValue?: C[K]; + workspaceFolderLanguageValue?: C[K]; + languageIds?: string[]; +}; + +export function ConfigurationGetter( + section: string +) { + return ( + subsection: K, + scope?: ConfigurationScope | null, + defaultValue?: C[K] + ) => { + const config = workspace.getConfiguration(section, scope); + // @ts-expect-error subsection is always of type string, though the compiler doesn't see it + return config.get(subsection, defaultValue); + }; +} + +export function ConfigurationInspector( + section: string +) { + return ( + subsection: K, + scope?: ConfigurationScope | null + ): InspectReturnValue => { + const config = workspace.getConfiguration(section, scope); + // @ts-expect-error subsection is always of type string, though the compiler doesn't see it + return config.inspect(subsection); + }; +} + +export function ConfigurationSetter( + section: string +) { + return ( + subsection: K, + value: C[K], + scope?: ConfigurationScope | null, + configurationTarget?: boolean | ConfigurationTarget | null, + overrideInLanguage?: boolean + ) => { + const config = workspace.getConfiguration(section, scope); + return config.update( + // @ts-expect-error subsection is always of type string, though the compiler doesn't see it + subsection, + value, + configurationTarget, + overrideInLanguage + ); + }; +} + +interface IGet { + get( + subsection: K, + scope?: ConfigurationScope | null + ): C[K] | undefined; + get( + subsection: K, + scope: ConfigurationScope | null | undefined, + defaultValue: C[K] + ): C[K]; +} + +interface IInspect { + inspect( + subsection: K + ): InspectReturnValue | undefined; +} + +interface IUpdate { + update( + subsection: K, + value: C[K], + scope?: ConfigurationScope, + configurationTarget?: boolean | ConfigurationTarget, + overrideInLanguage?: boolean + ): Thenable; +} + +export class VSCodeConfigurations + implements IGet, IUpdate, IInspect +{ + private _get: ( + subsection: K, + scope?: ConfigurationScope | null, + defaultValue?: C[K] + ) => C[K] | undefined; + private _inspect: ( + subsection: K + ) => InspectReturnValue; + private _update: ( + subsection: K, + value: C[K], + scope?: ConfigurationScope | null, + configurationTarget?: boolean | ConfigurationTarget | null, + overrideInLanguage?: boolean + ) => Thenable; + + constructor(readonly section: string) { + this._get = ConfigurationGetter(section); + this._update = ConfigurationSetter(section); + this._inspect = ConfigurationInspector(section); + } + + update( + subsection: K, + value: C[K], + scope?: ConfigurationScope, + configurationTarget?: boolean | ConfigurationTarget, + overrideInLanguage?: boolean + ): Thenable { + return this._update( + subsection, + value, + scope, + configurationTarget, + overrideInLanguage + ); + } + + inspect( + subsection: K + ): InspectReturnValue | undefined { + return this._inspect(subsection); + } + + get( + subsection: K, + scope?: ConfigurationScope | null + ): C[K] | undefined; + get( + subsection: K, + scope: ConfigurationScope | null | undefined, + defaultValue: C[K] + ): C[K]; + get(subsection: any, scope?: any, defaultValue?: any) { + return this._get(subsection, scope, defaultValue); + } +} diff --git a/src/config.ts b/src/config.ts new file mode 100644 index 0000000..1566391 --- /dev/null +++ b/src/config.ts @@ -0,0 +1,93 @@ +import { ConfigurationScope, ConfigurationTarget, workspace } from 'vscode'; +import { VSCodeConfigurations } from './config-utils'; + +export interface Style { + /** + * The background color for the highlight. + */ + backgroundColor?: string; + /** + * The border style for the highlight, as a CSS string. + */ + border?: string; + /** + * The text color. + */ + color?: string; + /** + * The style for the cursor shown over the highlight, as a CSS property. + */ + cursor?: string; + /** + * If true, then the whole line is highlighted, not just the matching text. + */ + isWholeLine?: boolean; + /** + * The color of the ruler mark on the scroll bar. + */ + overviewRulerColor?: string; +} + +export interface TextKeyword extends Style { + /** + * Custom text to be highlighted. + */ + text: string; +} +export interface RegExpKeyword extends Style { + /** + * name of the regexp keyword. + */ + text: string; + regex: { + /** + * The RegEx pattern to use for matching instead of the text value. REMEMBER to escape any backslashes in your regexp (using \\ instead of single backslash). + */ + pattern: string; + }; +} + +export type Keyword = TextKeyword | RegExpKeyword; + +export interface TODOHighlightConfig { + /** + * Enable or disable the highlighting + */ + isEnable: boolean; + /** + * Specify whether the keywords are case sensitive or not + */ + isCaseSensitive: boolean; + /** + * If the file path within the output channel is not clickable, set this to true to toggle the path patten between `#` and `::` + */ + toggleURI: boolean; + /* + * An array of keywords, and their CSS to customise how they look. See all available properties in the [VSCode doc on DecorationRenderOptions](https://code.visualstudio.com/api/references/vscode-api#DecorationRenderOptions) section. + */ + keywords: (string | Keyword)[]; + /** + * Specify keywords via RegExp instead of `todohighlight.keywords` one by one. NOTE that if this present, `todohighlight.keywords` will be ignored. REMEMBER to escapse any backslashes in your regexp (using \\ instead of single backslash). + */ + keywordsPattern: string; + /** + * Default style for all customized keywords. See all available properties in the [VSCode doc on DecorationRenderOptions](https://code.visualstudio.com/api/references/vscode-api#DecorationRenderOptions) section. + */ + defaultStyle: Style; + /** + * Glob patterns that defines the files to search for. Only include files you need, DO NOT USE `{** /*.*}` for both performance and to avoid binary files. + */ + include: string[]; + /** + * Glob pattern that defines files and folders to exclude while listing annotations. + */ + exclude: string[]; + /** + * Max files for searching + */ + maxFilesForSearch: number; +} + + +const EXTENSION = 'todohighlight'; +export const configurations = new VSCodeConfigurations(EXTENSION); diff --git a/src/extension.js b/src/extension.ts similarity index 51% rename from src/extension.js rename to src/extension.ts index b79bdec..96df489 100644 --- a/src/extension.js +++ b/src/extension.ts @@ -4,21 +4,27 @@ * NOTE: each decoration type has a unique key, the highlight and clear highight functionality are based on it */ -var vscode = require('vscode'); -var util = require('./util'); -var window = vscode.window; -var workspace = vscode.workspace; +import * as vscode from 'vscode'; +import { window, workspace } from 'vscode'; +import { configurations, Keyword, Style } from './config'; +import { annotationsFound, chooseAnnotationType, createStatusBarItem, DEFAULT_STYLE, escapeRegExp, escapeRegExpGroups, getAssembledData, globalState, isRegexKeyword, isTextKeyword, searchAnnotations } from './util'; -function activate(context) { +function activate(context: vscode.ExtensionContext) { - var timeout = null; - var activeEditor = window.activeTextEditor; - var isCaseSensitive, assembledData, decorationTypes, pattern, styleForRegExp, keywordsPattern; - var workspaceState = context.workspaceState; + let timeout: NodeJS.Timer | null = null; + let activeEditor = window.activeTextEditor; + let isCaseSensitive: boolean | undefined; + let assembledData: { [key: string]: Keyword }; + let decorationTypes: { [x: string]: vscode.TextEditorDecorationType; }; + let pattern: RegExp; + let styleForRegExp: vscode.DecorationRenderOptions; + let keywordsPattern: string; - var settings = workspace.getConfiguration('todohighlight'); + let workspaceState = context.workspaceState; - init(settings); + const settings = workspace.getConfiguration('todohighlight'); + + init(); context.subscriptions.push(vscode.commands.registerCommand('todohighlight.toggleHighlight', function () { settings.update('isEnable', !settings.get('isEnable'), true).then(function () { @@ -28,26 +34,26 @@ function activate(context) { context.subscriptions.push(vscode.commands.registerCommand('todohighlight.listAnnotations', function () { if (keywordsPattern.trim()) { - util.searchAnnotations(workspaceState, pattern, util.annotationsFound); + searchAnnotations(workspaceState, pattern, annotationsFound); } else { if (!assembledData) return; - var availableAnnotationTypes = Object.keys(assembledData); + let availableAnnotationTypes = Object.keys(assembledData); availableAnnotationTypes.unshift('ALL'); - util.chooseAnnotationType(availableAnnotationTypes).then(function (annotationType) { + chooseAnnotationType(availableAnnotationTypes).then(function (annotationType) { if (!annotationType) return; - var searchPattern = pattern; + let searchPattern = pattern; if (annotationType != 'ALL') { - annotationType = util.escapeRegExp(annotationType); + annotationType = escapeRegExp(annotationType); searchPattern = new RegExp(annotationType, isCaseSensitive ? 'g' : 'gi'); } - util.searchAnnotations(workspaceState, searchPattern, util.annotationsFound); + searchAnnotations(workspaceState, searchPattern, annotationsFound); }); } })); context.subscriptions.push(vscode.commands.registerCommand('todohighlight.showOutputChannel', function () { - var annotationList = workspaceState.get('annotationList', []); - util.showOutputChannel(annotationList); + let annotationList = workspaceState.get('annotationList', []); + showOutputChannel(annotationList); })); if (activeEditor) { @@ -68,33 +74,30 @@ function activate(context) { }, null, context.subscriptions); workspace.onDidChangeConfiguration(function () { - settings = workspace.getConfiguration('todohighlight'); - //NOTE: if disabled, do not re-initialize the data or we will not be able to clear the style immediatly via 'toggle highlight' command - if (!settings.get('isEnable')) return; + if (!configurations.get('isEnable')) return; - init(settings); + init(); triggerUpdateDecorations(); }, null, context.subscriptions); function updateDecorations() { - if (!activeEditor || !activeEditor.document) { return; } - var text = activeEditor.document.getText(); - var matches = {}, match; + let text = activeEditor.document.getText(); + let matches: { [key: string]: any; } = {}, match; while (match = pattern.exec(text)) { - var startPos = activeEditor.document.positionAt(match.index); - var endPos = activeEditor.document.positionAt(match.index + match[0].length); + const startPos = activeEditor.document.positionAt(match.index); + const endPos = activeEditor.document.positionAt(match.index + match[0].length); - var decoration = { + const decoration = { range: new vscode.Range(startPos, endPos) }; - var matchedValue = match[0]; - let patternIndex = match.slice(1).indexOf(matchedValue); + let matchedValue = match[0]; + const patternIndex = match.slice(1).indexOf(matchedValue); matchedValue = Object.keys(decorationTypes)[patternIndex] || matchedValue; if (!isCaseSensitive) { @@ -113,40 +116,41 @@ function activate(context) { } Object.keys(decorationTypes).forEach(v => { - var rangeOption = settings.get('isEnable') && matches[v] ? matches[v] : []; - var decorationType = decorationTypes[v]; - activeEditor.setDecorations(decorationType, rangeOption); + let rangeOption = settings.get('isEnable') && matches[v] ? matches[v] : []; + let decorationType = decorationTypes[v]; + activeEditor!.setDecorations(decorationType, rangeOption); // FIXME: remove `!`. activeEditor is defined. for some reason, TS doesn't see it. }) } - function init(settings) { - var customDefaultStyle = settings.get('defaultStyle'); - keywordsPattern = settings.get('keywordsPattern'); - isCaseSensitive = settings.get('isCaseSensitive', true); + function init() { + const customDefaultStyle = configurations.get('defaultStyle', null, DEFAULT_STYLE); + keywordsPattern = configurations.get('keywordsPattern', null, ""); + isCaseSensitive = configurations.get('isCaseSensitive', null, true); - if (!window.statusBarItem) { - window.statusBarItem = util.createStatusBarItem(); + if (!globalState.statusBarItem) { + globalState.statusBarItem = createStatusBarItem(); } - if (!window.outputChannel) { - window.outputChannel = window.createOutputChannel('TodoHighlight'); + if (!globalState.outputChannel) { + globalState.outputChannel = window.createOutputChannel('TodoHighlight'); } decorationTypes = {}; + let stringPattern: string; if (keywordsPattern.trim()) { - styleForRegExp = Object.assign({}, util.DEFAULT_STYLE, customDefaultStyle, { + styleForRegExp = Object.assign({}, DEFAULT_STYLE, customDefaultStyle, { overviewRulerLane: vscode.OverviewRulerLane.Right }); - pattern = keywordsPattern; + stringPattern = keywordsPattern; } else { - assembledData = util.getAssembledData(settings.get('keywords'), customDefaultStyle, isCaseSensitive); + assembledData = getAssembledData(configurations.get('keywords', null, []), customDefaultStyle, isCaseSensitive); Object.keys(assembledData).forEach((v) => { if (!isCaseSensitive) { v = v.toUpperCase() } - var mergedStyle = Object.assign({}, { + const mergedStyle = Object.assign({}, { overviewRulerLane: vscode.OverviewRulerLane.Right }, assembledData[v]); @@ -159,20 +163,23 @@ function activate(context) { }); // Give each keyword a group in the pattern - pattern = Object.keys(assembledData).map((v) => { - if (!assembledData[v].regex) { - return `(${util.escapeRegExp(v)})`; + stringPattern = Object.keys(assembledData).map((v) => { + const keyword = assembledData[v]; + if (isRegexKeyword(keyword)) { + const p = keyword.regex.pattern ?? v; + // Ignore unescaped parantheses to avoid messing with our groups + return `(${escapeRegExpGroups(p)})` + } + else { + return `(${escapeRegExp(v)})`; } - - let p = assembledData[v].regex.pattern || v; - // Ignore unescaped parantheses to avoid messing with our groups - return `(${util.escapeRegExpGroups(p)})` }).join('|'); } - pattern = new RegExp(pattern, 'gi'); if (isCaseSensitive) { - pattern = new RegExp(pattern, 'g'); + pattern = new RegExp(stringPattern, 'g'); + } else { + pattern = new RegExp(stringPattern, 'gi'); } } @@ -184,3 +191,8 @@ function activate(context) { } exports.activate = activate; + +function showOutputChannel(annotationList: never[]) { + throw new Error('Function not implemented.'); +} + diff --git a/src/util.js b/src/util.ts similarity index 50% rename from src/util.js rename to src/util.ts index c1418c9..011cb64 100644 --- a/src/util.js +++ b/src/util.ts @@ -1,13 +1,13 @@ -var vscode = require('vscode'); -var os = require("os"); -var window = vscode.window; -var workspace = vscode.workspace; +import * as vscode from 'vscode'; +import { window, workspace } from 'vscode'; +import * as os from 'os'; +import { configurations, Keyword, RegExpKeyword, Style, TextKeyword } from './config'; -var defaultIcon = '$(checklist)'; -var zapIcon = '$(zap)'; -var defaultMsg = '0'; +const defaultIcon = '$(checklist)'; +const zapIcon = '$(zap)'; +const defaultMsg = '0'; -var DEFAULT_KEYWORDS = { +const DEFAULT_KEYWORDS: { [key: string]: Keyword } = { "TODO:": { text: "TODO:", color: '#fff', @@ -22,35 +22,52 @@ var DEFAULT_KEYWORDS = { } }; -var DEFAULT_STYLE = { +export const DEFAULT_STYLE = { color: "#2196f3", backgroundColor: "#ffeb3b", }; -function getAssembledData(keywords, customDefaultStyle, isCaseSensitive) { - var result = {}, regex = [], reg; +// FIXME: globalState replaces `window` in the original code. +export const globalState: + { + processing: boolean; + statusBarItem: vscode.StatusBarItem | null; + outputChannel: vscode.OutputChannel | null; + manullyCancel: boolean; + } = { + processing: false, + statusBarItem: null, + outputChannel: null, + manullyCancel: false +}; + +export function isTextKeyword(v: any): v is TextKeyword { + return v && v.text && v.regex === undefined; +} + +export function isRegexKeyword(v: any): v is RegExpKeyword { + return v && v.regex; +} + +export function getAssembledData(keywords: (string | Keyword)[], customDefaultStyle: Style, isCaseSensitive: boolean): { [key: string]: Keyword } { + const result: Record = {}; + const regex: string[] = []; keywords.forEach((v) => { v = typeof v == 'string' ? { text: v } : v; - var text = v.text; - if (!text) return;//NOTE: in case of the text is empty - - if (!isCaseSensitive) { - text = text.toUpperCase(); - } + const text = isCaseSensitive ? v.text : v.text.toUpperCase(); + if (!text) return; //NOTE: in case of the text is empty if (text == 'TODO:' || text == 'FIXME:') { v = Object.assign({}, DEFAULT_KEYWORDS[text], v); } result[text] = Object.assign({}, DEFAULT_STYLE, customDefaultStyle, v); - if (v.regex) { - regex.push(regex.pattern||text); + if (isRegexKeyword(v)) { + regex.push(v.regex.pattern ?? text); } }) - if (regex) { - reg = regex.join('|'); - } + const reg = regex ? regex.join('|') : undefined; // Don't override existing regex keywords with matching defaults Object.keys(DEFAULT_KEYWORDS).filter(v => { @@ -70,27 +87,25 @@ function getAssembledData(keywords, customDefaultStyle, isCaseSensitive) { return result; } -function chooseAnnotationType(availableAnnotationTypes) { +export function chooseAnnotationType(availableAnnotationTypes: string[]) { return window.showQuickPick(availableAnnotationTypes, {}); } //get the include/exclude config -function getPathes(config) { - return Array.isArray(config) ? - '{' + config.join(',') + '}' - : (typeof config == 'string' ? config : ''); +function getPathes(config: string[] | string) { + return Array.isArray(config) ? '{' + config.join(',') + '}' : config; } -function searchAnnotations(workspaceState, pattern, callback) { +export function searchAnnotations(workspaceState: vscode.Memento, pattern: RegExp, + callback: (err: {message: string} | null, annotations?: {[key:string] : Annotation}, annotationList?: Annotation[]) => void) { - var settings = workspace.getConfiguration('todohighlight'); - var includePattern = getPathes(settings.get('include')) || '{**/*}'; - var excludePattern = getPathes(settings.get('exclude')); - var limitationForSearch = settings.get('maxFilesForSearch', 5120); + let includePattern = getPathes(configurations.get('include', null, [])) || '{**/*}'; + let excludePattern = getPathes(configurations.get('exclude', null, [])); + let limitationForSearch = configurations.get('maxFilesForSearch', null, 5120); - var statusMsg = ` Searching...`; + let statusMsg = ` Searching...`; - window.processing = true; + globalState.processing = true; setStatusMsg(zapIcon, statusMsg); @@ -101,11 +116,11 @@ function searchAnnotations(workspaceState, pattern, callback) { return; } - var totalFiles = files.length, + let totalFiles = files.length, progress = 0, times = 0, annotations = {}, - annotationList = []; + annotationList: Annotation[] = []; function file_iterated() { times++; @@ -113,14 +128,14 @@ function searchAnnotations(workspaceState, pattern, callback) { setStatusMsg(zapIcon, progress + '% ' + statusMsg); - if (times === totalFiles || window.manullyCancel) { - window.processing = true; + if (times === totalFiles || globalState.manullyCancel) { + globalState.processing = true; workspaceState.update('annotationList', annotationList); callback(null, annotations, annotationList); } } - for (var i = 0; i < totalFiles; i++) { + for (let i = 0; i < totalFiles; i++) { workspace.openTextDocument(files[i]).then(function (file) { searchAnnotationInFile(file, annotations, annotationList, pattern); @@ -131,30 +146,40 @@ function searchAnnotations(workspaceState, pattern, callback) { }); } - + }, function (err) { errorHandler(err); }); } -function searchAnnotationInFile(file, annotations, annotationList, regexp) { - var fileInUri = file.uri.toString(); - var pathWithoutFile = fileInUri.substring(7, fileInUri.length); +interface Annotation { + uri: string; + label: string; + detail: string; + lineNum: number; + fileName: string; + startCol: number; + endCol: number; +}; + +function searchAnnotationInFile(file: vscode.TextDocument, annotations: { [key: string]: Annotation[] }, annotationList: Annotation[], regexp: RegExp) { + let fileInUri = file.uri.toString(); + let pathWithoutFile = fileInUri.substring(7, fileInUri.length); - for (var line = 0; line < file.lineCount; line++) { - var lineText = file.lineAt(line).text; - var match = lineText.match(regexp); + for (let line = 0; line < file.lineCount; line++) { + let lineText = file.lineAt(line).text; + let match = lineText.match(regexp); if (match !== null) { if (!annotations.hasOwnProperty(pathWithoutFile)) { annotations[pathWithoutFile] = []; } - var content = getContent(lineText, match); + let content = getContent(lineText, match); if (content.length > 500) { content = content.substring(0, 500).trim() + '...'; } - var locationInfo = getLocationInfo(fileInUri, pathWithoutFile, lineText, line, match); + let locationInfo = getLocationInfo(fileInUri, pathWithoutFile, lineText, line, match); - var annotation = { + let annotation: Annotation = { uri: locationInfo.uri, label: content, detail: locationInfo.relativePath, @@ -169,40 +194,41 @@ function searchAnnotationInFile(file, annotations, annotationList, regexp) { } } -function annotationsFound(err, annotations, annotationList) { +export function annotationsFound(err: {message: string} | null, annotations?: any, annotationList?: Annotation[]) { if (err) { console.log('todohighlight err:', err); setStatusMsg(defaultIcon, defaultMsg); return; } + if(!annotationList) return; - var resultNum = annotationList.length; - var tooltip = resultNum + ' result(s) found'; - setStatusMsg(defaultIcon, resultNum, tooltip); + const resultNum = annotationList.length; + const tooltip = resultNum + ' result(s) found'; + setStatusMsg(defaultIcon, `${resultNum}`, tooltip); showOutputChannel(annotationList); } -function showOutputChannel(data) { - if (!window.outputChannel) return; - window.outputChannel.clear(); +function showOutputChannel(data: Annotation[]) { + if (!globalState.outputChannel) return; + globalState.outputChannel.clear(); if (data.length === 0) { window.showInformationMessage('No results. (Not included file types and individual files are not searched.)'); return; } - var settings = workspace.getConfiguration('todohighlight'); - var toggleURI = settings.get('toggleURI', false); - var platform = os.platform(); + let settings = workspace.getConfiguration('todohighlight'); + let toggleURI = settings.get('toggleURI', false); + let platform = os.platform(); data.forEach(function (v, i) { // due to an issue of vscode(https://github.com/Microsoft/vscode/issues/586), in order to make file path clickable within the output channel,the file path differs from platform - var patternA = '#' + (i + 1) + '\t' + v.uri + '#' + (v.lineNum + 1); - var patternB = '#' + (i + 1) + '\t' + v.uri + ':' + (v.lineNum + 1) + ':' + (v.startCol + 1); - var patterns = [patternA, patternB]; + let patternA = '#' + (i + 1) + '\t' + v.uri + '#' + (v.lineNum + 1); + let patternB = '#' + (i + 1) + '\t' + v.uri + ':' + (v.lineNum + 1) + ':' + (v.startCol + 1); + let patterns = [patternA, patternB]; //for windows - var patternType = 0; + let patternType = 0; if (platform == "linux" || platform == "darwin") { // for linux & mac patternType = 1; @@ -211,22 +237,22 @@ function showOutputChannel(data) { //toggle the pattern patternType = +!patternType; } - window.outputChannel.appendLine(patterns[patternType]); - window.outputChannel.appendLine('\t' + v.label + '\n'); + globalState.outputChannel!.appendLine(patterns[patternType]); // FIXME: outputChannel is defined. TS does not see it. + globalState.outputChannel!.appendLine('\t' + v.label + '\n'); // FIXME: outputChannel is defined. TS does not see it. }); - window.outputChannel.show(); + globalState.outputChannel.show(); } -function getContent(lineText, match) { +function getContent(lineText: string, match: string[]) { return lineText.substring(lineText.indexOf(match[0]), lineText.length); }; -function getLocationInfo(fileInUri, pathWithoutFile, lineText, line, match) { - var rootPath = workspace.rootPath + '/'; - var outputFile = pathWithoutFile.replace(rootPath, ''); - var startCol = lineText.indexOf(match[0]); - var endCol = lineText.length; - var location = outputFile + ' ' + (line + 1) + ':' + (startCol + 1); +function getLocationInfo(fileInUri: string, pathWithoutFile: string, lineText: string, line: number, match: string[]) { + const rootPath = workspace.rootPath + '/'; // TODO: rootPath is deprecated. + const outputFile = pathWithoutFile.replace(rootPath, ''); + const startCol = lineText.indexOf(match[0]); + const endCol = lineText.length; + const location = outputFile + ' ' + (line + 1) + ':' + (startCol + 1); return { uri: fileInUri, @@ -237,35 +263,35 @@ function getLocationInfo(fileInUri, pathWithoutFile, lineText, line, match) { }; }; -function createStatusBarItem() { - var statusBarItem = window.createStatusBarItem(vscode.StatusBarAlignment.Left); +export function createStatusBarItem() { + let statusBarItem = window.createStatusBarItem(vscode.StatusBarAlignment.Left); statusBarItem.text = defaultIcon + defaultMsg; statusBarItem.tooltip = 'List annotations'; statusBarItem.command = 'todohighlight.showOutputChannel'; return statusBarItem; }; -function errorHandler(err) { - window.processing = true; +function errorHandler(err: Error) { + globalState.processing = true; setStatusMsg(defaultIcon, defaultMsg); console.log('todohighlight err:', err); } -function setStatusMsg(icon, msg, tooltip) { - if (window.statusBarItem) { - window.statusBarItem.text = `${icon} ${msg}` || ''; +function setStatusMsg(icon: string, msg: string, tooltip?: string) { + if (globalState.statusBarItem) { + globalState.statusBarItem.text = `${icon} ${msg}` || ''; if (tooltip) { - window.statusBarItem.tooltip = tooltip; + globalState.statusBarItem.tooltip = tooltip; } - window.statusBarItem.show(); + globalState.statusBarItem.show(); } } -function escapeRegExp(s) { +export function escapeRegExp(s: string) { return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } -function escapeRegExpGroups(s) { +export function escapeRegExpGroups(s: string) { // Lookbehind assertions ("(? 9.0) { let grpPattern = /(? https://webpack.js.org/configuration/node/ - entry: './src/extension.js', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/ + entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/ output: { // the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/ path: path.resolve(__dirname, 'dist'), From e631dbbd4832b7c649e83774e03eaf345541f0fb Mon Sep 17 00:00:00 2001 From: Elazar Date: Fri, 14 Jan 2022 07:25:40 +0200 Subject: [PATCH 03/13] change Style to DecorationRenderOptions --- src/config.ts | 34 ++++------------------------------ src/extension.ts | 4 ++-- src/util.ts | 6 +++--- 3 files changed, 9 insertions(+), 35 deletions(-) diff --git a/src/config.ts b/src/config.ts index 1566391..89ed182 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,40 +1,14 @@ -import { ConfigurationScope, ConfigurationTarget, workspace } from 'vscode'; +import { DecorationRenderOptions } from 'vscode'; import { VSCodeConfigurations } from './config-utils'; -export interface Style { - /** - * The background color for the highlight. - */ - backgroundColor?: string; - /** - * The border style for the highlight, as a CSS string. - */ - border?: string; - /** - * The text color. - */ - color?: string; - /** - * The style for the cursor shown over the highlight, as a CSS property. - */ - cursor?: string; - /** - * If true, then the whole line is highlighted, not just the matching text. - */ - isWholeLine?: boolean; - /** - * The color of the ruler mark on the scroll bar. - */ - overviewRulerColor?: string; -} -export interface TextKeyword extends Style { +export interface TextKeyword extends DecorationRenderOptions { /** * Custom text to be highlighted. */ text: string; } -export interface RegExpKeyword extends Style { +export interface RegExpKeyword extends DecorationRenderOptions { /** * name of the regexp keyword. */ @@ -73,7 +47,7 @@ export interface TODOHighlightConfig { /** * Default style for all customized keywords. See all available properties in the [VSCode doc on DecorationRenderOptions](https://code.visualstudio.com/api/references/vscode-api#DecorationRenderOptions) section. */ - defaultStyle: Style; + defaultStyle: DecorationRenderOptions; /** * Glob patterns that defines the files to search for. Only include files you need, DO NOT USE `{** /*.*}` for both performance and to avoid binary files. */ diff --git a/src/extension.ts b/src/extension.ts index 96df489..8824088 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import { window, workspace } from 'vscode'; -import { configurations, Keyword, Style } from './config'; -import { annotationsFound, chooseAnnotationType, createStatusBarItem, DEFAULT_STYLE, escapeRegExp, escapeRegExpGroups, getAssembledData, globalState, isRegexKeyword, isTextKeyword, searchAnnotations } from './util'; +import { configurations, Keyword } from './config'; +import { annotationsFound, chooseAnnotationType, createStatusBarItem, DEFAULT_STYLE, escapeRegExp, escapeRegExpGroups, getAssembledData, globalState, isRegexKeyword, searchAnnotations } from './util'; function activate(context: vscode.ExtensionContext) { diff --git a/src/util.ts b/src/util.ts index 011cb64..3808e80 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,7 +1,7 @@ import * as vscode from 'vscode'; -import { window, workspace } from 'vscode'; +import { DecorationRenderOptions, window, workspace } from 'vscode'; import * as os from 'os'; -import { configurations, Keyword, RegExpKeyword, Style, TextKeyword } from './config'; +import { configurations, Keyword, RegExpKeyword, TextKeyword } from './config'; const defaultIcon = '$(checklist)'; const zapIcon = '$(zap)'; @@ -49,7 +49,7 @@ export function isRegexKeyword(v: any): v is RegExpKeyword { return v && v.regex; } -export function getAssembledData(keywords: (string | Keyword)[], customDefaultStyle: Style, isCaseSensitive: boolean): { [key: string]: Keyword } { +export function getAssembledData(keywords: (string | Keyword)[], customDefaultStyle: DecorationRenderOptions, isCaseSensitive: boolean): { [key: string]: Keyword } { const result: Record = {}; const regex: string[] = []; keywords.forEach((v) => { From 93b79d7f2ab7caf5fd44ed8e2b6495a5ee90d52d Mon Sep 17 00:00:00 2001 From: Elazar Date: Sun, 16 Jan 2022 18:35:19 +0200 Subject: [PATCH 04/13] make configurations more sensible --- src/config-utils.ts | 151 -------------------------------------------- src/config.ts | 32 ++++++++-- src/extension.ts | 11 ++-- src/util.ts | 17 ++--- 4 files changed, 43 insertions(+), 168 deletions(-) delete mode 100644 src/config-utils.ts diff --git a/src/config-utils.ts b/src/config-utils.ts deleted file mode 100644 index acf52ea..0000000 --- a/src/config-utils.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { ConfigurationScope, ConfigurationTarget, workspace } from 'vscode'; - -type InspectReturnValue = { - key: string; - defaultValue?: C[K]; - globalValue?: C[K]; - workspaceValue?: C[K]; - workspaceFolderValue?: C[K]; - defaultLanguageValue?: C[K]; - globalLanguageValue?: C[K]; - workspaceLanguageValue?: C[K]; - workspaceFolderLanguageValue?: C[K]; - languageIds?: string[]; -}; - -export function ConfigurationGetter( - section: string -) { - return ( - subsection: K, - scope?: ConfigurationScope | null, - defaultValue?: C[K] - ) => { - const config = workspace.getConfiguration(section, scope); - // @ts-expect-error subsection is always of type string, though the compiler doesn't see it - return config.get(subsection, defaultValue); - }; -} - -export function ConfigurationInspector( - section: string -) { - return ( - subsection: K, - scope?: ConfigurationScope | null - ): InspectReturnValue => { - const config = workspace.getConfiguration(section, scope); - // @ts-expect-error subsection is always of type string, though the compiler doesn't see it - return config.inspect(subsection); - }; -} - -export function ConfigurationSetter( - section: string -) { - return ( - subsection: K, - value: C[K], - scope?: ConfigurationScope | null, - configurationTarget?: boolean | ConfigurationTarget | null, - overrideInLanguage?: boolean - ) => { - const config = workspace.getConfiguration(section, scope); - return config.update( - // @ts-expect-error subsection is always of type string, though the compiler doesn't see it - subsection, - value, - configurationTarget, - overrideInLanguage - ); - }; -} - -interface IGet { - get( - subsection: K, - scope?: ConfigurationScope | null - ): C[K] | undefined; - get( - subsection: K, - scope: ConfigurationScope | null | undefined, - defaultValue: C[K] - ): C[K]; -} - -interface IInspect { - inspect( - subsection: K - ): InspectReturnValue | undefined; -} - -interface IUpdate { - update( - subsection: K, - value: C[K], - scope?: ConfigurationScope, - configurationTarget?: boolean | ConfigurationTarget, - overrideInLanguage?: boolean - ): Thenable; -} - -export class VSCodeConfigurations - implements IGet, IUpdate, IInspect -{ - private _get: ( - subsection: K, - scope?: ConfigurationScope | null, - defaultValue?: C[K] - ) => C[K] | undefined; - private _inspect: ( - subsection: K - ) => InspectReturnValue; - private _update: ( - subsection: K, - value: C[K], - scope?: ConfigurationScope | null, - configurationTarget?: boolean | ConfigurationTarget | null, - overrideInLanguage?: boolean - ) => Thenable; - - constructor(readonly section: string) { - this._get = ConfigurationGetter(section); - this._update = ConfigurationSetter(section); - this._inspect = ConfigurationInspector(section); - } - - update( - subsection: K, - value: C[K], - scope?: ConfigurationScope, - configurationTarget?: boolean | ConfigurationTarget, - overrideInLanguage?: boolean - ): Thenable { - return this._update( - subsection, - value, - scope, - configurationTarget, - overrideInLanguage - ); - } - - inspect( - subsection: K - ): InspectReturnValue | undefined { - return this._inspect(subsection); - } - - get( - subsection: K, - scope?: ConfigurationScope | null - ): C[K] | undefined; - get( - subsection: K, - scope: ConfigurationScope | null | undefined, - defaultValue: C[K] - ): C[K]; - get(subsection: any, scope?: any, defaultValue?: any) { - return this._get(subsection, scope, defaultValue); - } -} diff --git a/src/config.ts b/src/config.ts index 89ed182..c388f2c 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,5 +1,4 @@ -import { DecorationRenderOptions } from 'vscode'; -import { VSCodeConfigurations } from './config-utils'; +import { ConfigurationTarget, DecorationRenderOptions, workspace, WorkspaceConfiguration } from 'vscode'; export interface TextKeyword extends DecorationRenderOptions { @@ -62,6 +61,31 @@ export interface TODOHighlightConfig { maxFilesForSearch: number; } +export class TODOHighlightConfiguration { + readonly section = 'todohighlight'; + get config(): WorkspaceConfiguration { + return workspace.getConfiguration(this.section); + } -const EXTENSION = 'todohighlight'; -export const configurations = new VSCodeConfigurations(EXTENSION); + update( + subsection: K, + value: TODOHighlightConfig[K], + configurationTarget?: boolean | ConfigurationTarget, + overrideInLanguage?: boolean + ): Thenable { + return this.config.update(subsection, value, configurationTarget, overrideInLanguage); + } + + get( + subsection: K, + ): TODOHighlightConfig[K] | undefined; + get( + subsection: K, + defaultValue: TODOHighlightConfig[K], + ): TODOHighlightConfig[K]; + get(subsection: any, defaultValue?: any) { + return this.config.get(subsection, defaultValue); + } +} + +export const configurations = new TODOHighlightConfiguration(); diff --git a/src/extension.ts b/src/extension.ts index 8824088..3041650 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -6,7 +6,8 @@ import * as vscode from 'vscode'; import { window, workspace } from 'vscode'; -import { configurations, Keyword } from './config'; +import { configurations } from './config'; +import type { Keyword } from './config'; import { annotationsFound, chooseAnnotationType, createStatusBarItem, DEFAULT_STYLE, escapeRegExp, escapeRegExpGroups, getAssembledData, globalState, isRegexKeyword, searchAnnotations } from './util'; function activate(context: vscode.ExtensionContext) { @@ -123,9 +124,9 @@ function activate(context: vscode.ExtensionContext) { } function init() { - const customDefaultStyle = configurations.get('defaultStyle', null, DEFAULT_STYLE); - keywordsPattern = configurations.get('keywordsPattern', null, ""); - isCaseSensitive = configurations.get('isCaseSensitive', null, true); + const customDefaultStyle = configurations.get('defaultStyle', DEFAULT_STYLE); + keywordsPattern = configurations.get('keywordsPattern', ""); + isCaseSensitive = configurations.get('isCaseSensitive', true); if (!globalState.statusBarItem) { globalState.statusBarItem = createStatusBarItem(); @@ -144,7 +145,7 @@ function activate(context: vscode.ExtensionContext) { stringPattern = keywordsPattern; } else { - assembledData = getAssembledData(configurations.get('keywords', null, []), customDefaultStyle, isCaseSensitive); + assembledData = getAssembledData(configurations.get('keywords', []), customDefaultStyle, isCaseSensitive); Object.keys(assembledData).forEach((v) => { if (!isCaseSensitive) { v = v.toUpperCase() diff --git a/src/util.ts b/src/util.ts index 3808e80..432366e 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,7 +1,8 @@ import * as vscode from 'vscode'; import { DecorationRenderOptions, window, workspace } from 'vscode'; import * as os from 'os'; -import { configurations, Keyword, RegExpKeyword, TextKeyword } from './config'; +import { configurations } from './config'; +import type { Keyword, RegExpKeyword, TextKeyword } from './config'; const defaultIcon = '$(checklist)'; const zapIcon = '$(zap)'; @@ -96,12 +97,12 @@ function getPathes(config: string[] | string) { return Array.isArray(config) ? '{' + config.join(',') + '}' : config; } -export function searchAnnotations(workspaceState: vscode.Memento, pattern: RegExp, - callback: (err: {message: string} | null, annotations?: {[key:string] : Annotation}, annotationList?: Annotation[]) => void) { +export function searchAnnotations(workspaceState: vscode.Memento, pattern: RegExp, + callback: (err: { message: string } | null, annotations?: { [key: string]: Annotation }, annotationList?: Annotation[]) => void) { - let includePattern = getPathes(configurations.get('include', null, [])) || '{**/*}'; - let excludePattern = getPathes(configurations.get('exclude', null, [])); - let limitationForSearch = configurations.get('maxFilesForSearch', null, 5120); + let includePattern = getPathes(configurations.get('include', [])) || '{**/*}'; + let excludePattern = getPathes(configurations.get('exclude', [])); + let limitationForSearch = configurations.get('maxFilesForSearch', 5120); let statusMsg = ` Searching...`; @@ -194,13 +195,13 @@ function searchAnnotationInFile(file: vscode.TextDocument, annotations: { [key: } } -export function annotationsFound(err: {message: string} | null, annotations?: any, annotationList?: Annotation[]) { +export function annotationsFound(err: { message: string } | null, annotations?: any, annotationList?: Annotation[]) { if (err) { console.log('todohighlight err:', err); setStatusMsg(defaultIcon, defaultMsg); return; } - if(!annotationList) return; + if (!annotationList) return; const resultNum = annotationList.length; const tooltip = resultNum + ' result(s) found'; From 6b220742b5f36278cc5404f4c499308dfcfb36c4 Mon Sep 17 00:00:00 2001 From: jonz94 Date: Tue, 29 Mar 2022 09:22:12 +0800 Subject: [PATCH 05/13] Correct small typo on README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ec47e6..8d689d1 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ An example of a custom configuration, showing a range of the different features: /** * Positive lookbehind (`(?<=...)`) is only supported in Node.js v9 and up. * If your VSCode version is built on an earlier version the example above may not work. Simple tests: - * Shouldm't work: note deNOTEd NOTEing + * Shouldn't work: note deNOTEd NOTEing * Should work: NOTE: "NOTE:" **/ }, From 3b8805c64c664c140dae0d6d2a794bc2782c821d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 01:46:29 +0000 Subject: [PATCH 06/13] Bump terser from 5.7.2 to 5.14.2 Bumps [terser](https://github.com/terser/terser) from 5.7.2 to 5.14.2. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 158 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 129 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index f59b95e..39b8b62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -179,6 +179,58 @@ "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", "dev": true }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", + "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@types/eslint": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", @@ -2730,9 +2782,9 @@ } }, "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -2850,13 +2902,14 @@ } }, "node_modules/terser": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.2.tgz", - "integrity": "sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", + "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", "dependencies": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.19" + "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" @@ -2907,19 +2960,22 @@ "randombytes": "^2.1.0" } }, + "node_modules/terser/node_modules/acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, - "node_modules/terser/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "engines": { - "node": ">= 8" - } - }, "node_modules/test": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/test/-/test-0.6.0.tgz", @@ -3623,6 +3679,49 @@ "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", "dev": true }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" + }, + "@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + }, + "@jridgewell/trace-mapping": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", + "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "@types/eslint": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", @@ -5535,9 +5634,9 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -5629,24 +5728,25 @@ "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==" }, "terser": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.2.tgz", - "integrity": "sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", + "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", "requires": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.19" + "source-map-support": "~0.5.20" }, "dependencies": { + "acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==" + }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" } } }, From 01e5ae3c22d7e8fdf26cb4900064b32fb559252e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 21:57:18 +0000 Subject: [PATCH 07/13] Bump nth-check from 2.0.0 to 2.1.1 Bumps [nth-check](https://github.com/fb55/nth-check) from 2.0.0 to 2.1.1. - [Release notes](https://github.com/fb55/nth-check/releases) - [Commits](https://github.com/fb55/nth-check/compare/v2.0.0...v2.1.1) --- updated-dependencies: - dependency-name: nth-check dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39b8b62..87e8b77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2199,9 +2199,9 @@ } }, "node_modules/nth-check": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", - "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dependencies": { "boolbase": "^1.0.0" }, @@ -5222,9 +5222,9 @@ } }, "nth-check": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", - "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "requires": { "boolbase": "^1.0.0" } From fcab1bf0c54cbde9f035a59e6c2522a1f571e5bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 21:57:21 +0000 Subject: [PATCH 08/13] Bump ansi-regex from 3.0.0 to 3.0.1 Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39b8b62..100939e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -521,9 +521,9 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" @@ -3383,9 +3383,9 @@ } }, "node_modules/wide-align/node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true, "engines": { "node": ">=4" @@ -3979,9 +3979,9 @@ "integrity": "sha1-iQMBvVhBRi/TnAt3Ca/R9SUUMzE=" }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -6073,9 +6073,9 @@ }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "dev": true }, "is-fullwidth-code-point": { From 19234827b0edba7a914527948fddad266adbba11 Mon Sep 17 00:00:00 2001 From: farwyler <1705805+farwyler@users.noreply.github.com> Date: Fri, 28 Oct 2022 17:46:34 +0200 Subject: [PATCH 09/13] creates diagnostics for open files --- README.md | 4 +++- package.json | 11 +++++++++++ src/extension.js | 31 +++++++++++++++++++++++++++++++ src/util.js | 16 +++++++++++++--- 4 files changed, 58 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9ec47e6..41ff674 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ To customize the keywords and other settings, command + , | | type | default | description | | ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | todohighlight.isEnable | boolean | true | Toggle the highlight, default is true. | +| todohighlight.enableDiagnostics | boolean | true | Enable creating diagnostic entries for open files in the problems view. Default is false. | | todohighlight.isCaseSensitive | boolean | true | Whether the keywords are case sensitive or not. | | todohighlight.keywords | array | N/A | An array of keywords that will be highlighted. You can also specify the style for each keyword here, and a more advanced regex to detect the item to highlight. See example below for more information. | | todohighlight.keywordsPattern | string | N/A | Specify keywords via regex instead of `todohighlight.keywords` one by one. NB: if this is present, `todohighlight.keywords` will be ignored. Remember to escape the backslash if there's any in your regex (using \\ (double backslash) instead of single backslash). | @@ -76,7 +77,8 @@ An example of a custom configuration, showing a range of the different features: "color": "red", "border": "1px solid red", "borderRadius": "2px", // NOTE: use borderRadius along with `border` or you will see nothing change - "backgroundColor": "rgba(0,0,0,.2)" + "backgroundColor": "rgba(0,0,0,.2)", + "diagnosticSeverity": "warning" // Set diagnostic severity to `none`, `information`, `warning` or `error` }, { "text": "TODO(string):", // with a regex pattern defined, this setting isn't used, but is useful as a name for this section diff --git a/package.json b/package.json index 206c668..c8e0896 100644 --- a/package.json +++ b/package.json @@ -154,6 +154,12 @@ "overviewRulerColor": { "type": "string", "description": "The color of the ruler mark on the scroll bar." + }, + "diagnosticSeverity": { + "type": "string", + "default": "information", + "enum": ["none", "error", "warning", "information"], + "description": "If enabled, set the diagnostic severity in the problems view." } }, "required": [ @@ -265,6 +271,11 @@ "type": "number", "default": 5120, "description": "Max files for searching" + }, + "todohighlight.enableDiagnostics": { + "type": "boolean", + "default": false, + "description": "Enable creating entries in the problems view." } } } diff --git a/src/extension.js b/src/extension.js index b79bdec..f99aa4f 100644 --- a/src/extension.js +++ b/src/extension.js @@ -50,6 +50,9 @@ function activate(context) { util.showOutputChannel(annotationList); })); + var diagnostics = vscode.languages.createDiagnosticCollection('todohighlight'); + context.subscriptions.push(diagnostics); + if (activeEditor) { triggerUpdateDecorations(); } @@ -67,6 +70,10 @@ function activate(context) { } }, null, context.subscriptions); + workspace.onDidCloseTextDocument(function (event) { + diagnostics.set(event.document, []) + }, null, context.subscriptions); + workspace.onDidChangeConfiguration(function () { settings = workspace.getConfiguration('todohighlight'); @@ -77,12 +84,27 @@ function activate(context) { triggerUpdateDecorations(); }, null, context.subscriptions); + function createDiagnostic(document, range, match, matchedValue) { + var lineText = document.lineAt(range.start).text; + var content = util.getContent(lineText, match); + if (content.length > 160) { + content = content.substring(0, 160).trim() + '...'; + } + var severity = assembledData[matchedValue]?.diagnosticSeverity; + if (severity !== null && severity !== undefined) { + return new vscode.Diagnostic(range, content, severity); + } + } + function updateDecorations() { if (!activeEditor || !activeEditor.document) { return; } + var problems = []; + var postDiagnostics = settings.get('isEnable') && settings.get('enableDiagnostics'); + var text = activeEditor.document.getText(); var matches = {}, match; while (match = pattern.exec(text)) { @@ -97,6 +119,13 @@ function activate(context) { let patternIndex = match.slice(1).indexOf(matchedValue); matchedValue = Object.keys(decorationTypes)[patternIndex] || matchedValue; + if (postDiagnostics) { + var problem = createDiagnostic(activeEditor.document, decoration.range, match, matchedValue); + if (problem) { + problems.push(problem); + } + } + if (!isCaseSensitive) { matchedValue = matchedValue.toUpperCase(); } @@ -117,6 +146,8 @@ function activate(context) { var decorationType = decorationTypes[v]; activeEditor.setDecorations(decorationType, rangeOption); }) + + diagnostics.set(activeEditor.document.uri, problems); } function init(settings) { diff --git a/src/util.js b/src/util.js index c1418c9..555cfa1 100644 --- a/src/util.js +++ b/src/util.js @@ -7,18 +7,26 @@ var defaultIcon = '$(checklist)'; var zapIcon = '$(zap)'; var defaultMsg = '0'; +var SeverityMap = { + 'error': vscode.DiagnosticSeverity.Error, + 'warning': vscode.DiagnosticSeverity.Warning, + 'information': vscode.DiagnosticSeverity.Information +}; + var DEFAULT_KEYWORDS = { "TODO:": { text: "TODO:", color: '#fff', backgroundColor: '#ffbd2a', - overviewRulerColor: 'rgba(255,189,42,0.8)' + overviewRulerColor: 'rgba(255,189,42,0.8)', + diagnosticSeverity: 'error' }, "FIXME:": { text: "FIXME:", color: '#fff', backgroundColor: '#f06292', - overviewRulerColor: 'rgba(240,98,146,0.8)' + overviewRulerColor: 'rgba(240,98,146,0.8)', + diagnosticSeverity: 'warning' } }; @@ -41,6 +49,7 @@ function getAssembledData(keywords, customDefaultStyle, isCaseSensitive) { if (text == 'TODO:' || text == 'FIXME:') { v = Object.assign({}, DEFAULT_KEYWORDS[text], v); } + v.diagnosticSeverity = SeverityMap[v.diagnosticSeverity] result[text] = Object.assign({}, DEFAULT_STYLE, customDefaultStyle, v); if (v.regex) { @@ -292,5 +301,6 @@ module.exports = { showOutputChannel, escapeRegExp, escapeRegExpGroups, - escapeRegExpGroupsLegacy + escapeRegExpGroupsLegacy, + getContent }; From 700c865a54974c928f9e76d4d537e1274bbb4284 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Oct 2022 12:47:20 +0000 Subject: [PATCH 10/13] Bump nanoid and mocha Bumps [nanoid](https://github.com/ai/nanoid) to 3.3.3 and updates ancestor dependency [mocha](https://github.com/mochajs/mocha). These dependencies need to be updated together. Updates `nanoid` from 3.1.20 to 3.3.3 - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.1.20...3.3.3) Updates `mocha` from 8.4.0 to 10.1.0 - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v8.4.0...v10.1.0) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect - dependency-name: mocha dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- package-lock.json | 435 +++++++++++++++++----------------------------- package.json | 2 +- 2 files changed, 158 insertions(+), 279 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ed14ab..f4f66c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@types/node": "^6.0.40", "@types/vscode": "^1.0.0", "eslint": "^7.18.0", - "mocha": "^8.2.0", + "mocha": "^10.1.0", "typescript": "^4.1.2", "webpack-cli": "^4.x.x" }, @@ -276,12 +276,6 @@ "integrity": "sha512-wZt3VTmzYrgZ0l/3QmEbCq4KAJ71K3/hmMQ/nfpv84oH8e81KKwPEoQ5v8dNCxfHFVJ1JabHKmCvqdYOoVm1Ow==", "dev": true }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -758,24 +752,30 @@ } }, "node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "glob-parent": "~5.1.0", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, "optionalDependencies": { - "fsevents": "~2.3.1" + "fsevents": "~2.3.2" } }, "node_modules/chrome-trace-event": { @@ -888,9 +888,9 @@ } }, "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1468,9 +1468,9 @@ } }, "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1523,15 +1523,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -1767,6 +1758,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1929,15 +1932,19 @@ "dev": true }, "node_modules/log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "dependencies": { - "chalk": "^4.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lru-cache": { @@ -2033,43 +2040,39 @@ } }, "node_modules/mocha": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", - "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, "dependencies": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.1.6", - "growl": "1.10.5", + "glob": "7.2.0", "he": "1.2.0", - "js-yaml": "4.0.0", - "log-symbols": "4.0.0", - "minimatch": "3.0.4", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.1.20", - "serialize-javascript": "5.0.1", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.0", + "workerpool": "6.2.1", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" }, "bin": { "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "mocha": "bin/mocha.js" }, "engines": { - "node": ">= 10.12.0" + "node": ">= 14.0.0" }, "funding": { "type": "opencollective", @@ -2082,33 +2085,19 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "balanced-match": "^1.0.0" } }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { "argparse": "^2.0.1" @@ -2117,6 +2106,18 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2150,9 +2151,9 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, "node_modules/nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, "bin": { "nanoid": "bin/nanoid.cjs" @@ -2399,9 +2400,9 @@ "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" @@ -2534,9 +2535,9 @@ } }, "node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { "picomatch": "^2.2.1" @@ -2696,10 +2697,9 @@ } }, "node_modules/serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", - "dev": true, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dependencies": { "randombytes": "^2.1.0" } @@ -2952,14 +2952,6 @@ } } }, - "node_modules/terser-webpack-plugin/node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/terser/node_modules/acorn": { "version": "8.7.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", @@ -3373,58 +3365,6 @@ "node": ">= 8" } }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/wide-align/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/wildcard": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", @@ -3441,9 +3381,9 @@ } }, "node_modules/workerpool": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "node_modules/wrap-ansi": { @@ -3767,12 +3707,6 @@ "integrity": "sha512-wZt3VTmzYrgZ0l/3QmEbCq4KAJ71K3/hmMQ/nfpv84oH8e81KKwPEoQ5v8dNCxfHFVJ1JabHKmCvqdYOoVm1Ow==", "dev": true }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, "@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -4151,19 +4085,19 @@ } }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" } }, "chrome-trace-event": { @@ -4252,9 +4186,9 @@ "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==" }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -4677,9 +4611,9 @@ "dev": true }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4717,12 +4651,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4882,6 +4810,12 @@ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5013,12 +4947,13 @@ "dev": true }, "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "chalk": "^4.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, "lru-cache": { @@ -5092,33 +5027,29 @@ } }, "mocha": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", - "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.1.6", - "growl": "1.10.5", + "glob": "7.2.0", "he": "1.2.0", - "js-yaml": "4.0.0", - "log-symbols": "4.0.0", - "minimatch": "3.0.4", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.1.20", - "serialize-javascript": "5.0.1", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.0", + "workerpool": "6.2.1", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" @@ -5130,32 +5061,33 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } + "balanced-match": "^1.0.0" } }, "js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { "argparse": "^2.0.1" } }, + "minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -5185,9 +5117,9 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, "natural-compare": { @@ -5373,9 +5305,9 @@ "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pkg-dir": { @@ -5468,9 +5400,9 @@ } }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -5569,10 +5501,9 @@ } }, "serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", - "dev": true, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "requires": { "randombytes": "^2.1.0" } @@ -5761,16 +5692,6 @@ "serialize-javascript": "^6.0.0", "source-map": "^0.6.1", "terser": "^5.7.2" - }, - "dependencies": { - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "requires": { - "randombytes": "^2.1.0" - } - } } }, "test": { @@ -6063,48 +5984,6 @@ "isexe": "^2.0.0" } }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "wildcard": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", @@ -6118,9 +5997,9 @@ "dev": true }, "workerpool": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "wrap-ansi": { diff --git a/package.json b/package.json index c8e0896..d5028e2 100644 --- a/package.json +++ b/package.json @@ -285,7 +285,7 @@ "@types/node": "^6.0.40", "@types/vscode": "^1.0.0", "eslint": "^7.18.0", - "mocha": "^8.2.0", + "mocha": "^10.1.0", "typescript": "^4.1.2", "webpack-cli": "^4.x.x" }, From 06d929f309f4bff938a8c5a3b89f8516aa934002 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Oct 2022 12:47:21 +0000 Subject: [PATCH 11/13] Bump markdown-it and vsce Bumps [markdown-it](https://github.com/markdown-it/markdown-it) to 12.3.2 and updates ancestor dependency [vsce](https://github.com/Microsoft/vsce). These dependencies need to be updated together. Updates `markdown-it` from 10.0.0 to 12.3.2 - [Release notes](https://github.com/markdown-it/markdown-it/releases) - [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md) - [Commits](https://github.com/markdown-it/markdown-it/compare/10.0.0...12.3.2) Updates `vsce` from 1.96.3 to 2.13.0 - [Release notes](https://github.com/Microsoft/vsce/releases) - [Commits](https://github.com/Microsoft/vsce/compare/v1.96.3...v2.13.0) --- updated-dependencies: - dependency-name: markdown-it dependency-type: indirect - dependency-name: vsce dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package-lock.json | 847 +++++++++++++++++++++++++++++++++++++++------- package.json | 2 +- 2 files changed, 725 insertions(+), 124 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ed14ab..1b66967 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "neo-async": "^2.6.2", "test": "^0.6.0", - "vsce": "^1.77.0", + "vsce": "^2.13.0", "webpack": "^5.52.0" }, "devDependencies": { @@ -561,6 +561,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -588,6 +589,25 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -597,6 +617,16 @@ "node": ">=8" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -651,6 +681,29 @@ "url": "https://opencollective.com/browserslist" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", @@ -778,6 +831,11 @@ "fsevents": "~2.3.1" } }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, "node_modules/chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", @@ -916,16 +974,41 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "node_modules/denodeify": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", - "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=" + "node_modules/detect-libc": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "engines": { + "node": ">=8" + } }, "node_modules/diff": { "version": "5.0.0", @@ -1010,6 +1093,14 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/enhanced-resolve": { "version": "5.8.2", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", @@ -1305,6 +1396,14 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "engines": { + "node": ">=6" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1403,6 +1502,11 @@ "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", "dev": true }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1467,6 +1571,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, "node_modules/glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -1571,6 +1680,17 @@ "he": "bin/he" } }, + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/htmlparser2": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", @@ -1598,6 +1718,25 @@ "node": ">=10.17.0" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -1662,6 +1801,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "node_modules/interpret": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", @@ -1844,6 +1988,16 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "node_modules/keytar": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", + "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^4.3.0", + "prebuild-install": "^7.0.1" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -1875,9 +2029,9 @@ } }, "node_modules/linkify-it": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", "dependencies": { "uc.micro": "^1.0.1" } @@ -1905,11 +2059,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -1944,7 +2093,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -1953,13 +2101,13 @@ } }, "node_modules/markdown-it": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", - "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", "dependencies": { - "argparse": "^1.0.7", - "entities": "~2.0.0", - "linkify-it": "^2.0.0", + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" }, @@ -1967,15 +2115,23 @@ "markdown-it": "bin/markdown-it.js" } }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, "node_modules/markdown-it/node_modules/entities": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", - "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } }, "node_modules/mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" }, "node_modules/merge-stream": { "version": "2.0.0", @@ -2021,6 +2177,17 @@ "node": ">=6" } }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -2032,6 +2199,19 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, "node_modules/mocha": { "version": "8.4.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", @@ -2161,6 +2341,11 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -2172,6 +2357,22 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, + "node_modules/node-abi": { + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.28.0.tgz", + "integrity": "sha512-fRlDb4I0eLcQeUvGq7IY3xHrSb0c9ummdvDSYWfT9+LKP+3jCKw/tKoqaM7r1BAoiAC6GtwyjaGnOz6B3OtF+A==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", + "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==" + }, "node_modules/node-releases": { "version": "1.1.75", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", @@ -2257,31 +2458,6 @@ "node": ">= 0.8.0" } }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dependencies": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -2474,6 +2650,31 @@ "node": ">=8" } }, + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -2492,6 +2693,15 @@ "node": ">=0.4.0" } }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -2522,6 +2732,28 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/read": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", @@ -2533,6 +2765,19 @@ "node": ">=0.8" } }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", @@ -2663,6 +2908,11 @@ } ] }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, "node_modules/schema-utils": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", @@ -2684,7 +2934,6 @@ "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -2756,6 +3005,49 @@ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", @@ -2793,7 +3085,16 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } }, "node_modules/string-width": { "version": "4.2.2", @@ -2901,6 +3202,32 @@ "node": ">=6" } }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/terser": { "version": "5.14.2", "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", @@ -3026,6 +3353,17 @@ "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -3092,9 +3430,14 @@ } }, "node_modules/url-join": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", - "integrity": "sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg=" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/v8-compile-cache": { "version": "2.3.0", @@ -3103,36 +3446,36 @@ "dev": true }, "node_modules/vsce": { - "version": "1.96.3", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.96.3.tgz", - "integrity": "sha512-s3qPnDk0jcbN5FHwBDGGDcFCBeFDbiZ+RS5YGzXtZF1GPoVts6VAOa/iM37MXD+itaiXObvmrEvanrJKshEr+A==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-2.13.0.tgz", + "integrity": "sha512-t1otQ2lqyi5Y/G6qUl9BEc561nEIYrZbLT8k+R1SoZaKNa6gaehaLGQG5zvB524YPGZOVvbOBzAXoO7Mor1J5g==", "dependencies": { "azure-devops-node-api": "^11.0.1", "chalk": "^2.4.2", "cheerio": "^1.0.0-rc.9", "commander": "^6.1.0", - "denodeify": "^1.2.1", "glob": "^7.0.6", + "hosted-git-info": "^4.0.2", + "keytar": "^7.7.0", "leven": "^3.1.0", - "lodash": "^4.17.15", - "markdown-it": "^10.0.0", + "markdown-it": "^12.3.2", "mime": "^1.3.4", "minimatch": "^3.0.3", - "osenv": "^0.1.3", "parse-semver": "^1.1.1", "read": "^1.0.7", "semver": "^5.1.0", "tmp": "^0.2.1", "typed-rest-client": "^1.8.4", - "url-join": "^1.1.0", + "url-join": "^4.0.1", + "xml2js": "^0.4.23", "yauzl": "^2.3.1", "yazl": "^2.2.2" }, "bin": { - "vsce": "out/vsce" + "vsce": "vsce" }, "engines": { - "node": ">= 10" + "node": ">= 14" } }, "node_modules/vsce/node_modules/ansi-styles": { @@ -3468,6 +3811,26 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "engines": { + "node": ">=4.0" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -3480,8 +3843,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yargs": { "version": "16.2.0", @@ -4007,6 +4369,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -4031,12 +4394,27 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -4078,6 +4456,15 @@ "node-releases": "^1.1.75" } }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", @@ -4166,6 +4553,11 @@ "readdirp": "~3.5.0" } }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, "chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", @@ -4266,16 +4658,29 @@ "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "requires": { + "mimic-response": "^3.1.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "denodeify": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", - "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=" + "detect-libc": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==" }, "diff": { "version": "5.0.0", @@ -4336,6 +4741,14 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, "enhanced-resolve": { "version": "5.8.2", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", @@ -4551,6 +4964,11 @@ "strip-final-newline": "^2.0.0" } }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4631,6 +5049,11 @@ "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", "dev": true }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4676,6 +5099,11 @@ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -4747,6 +5175,14 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, "htmlparser2": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", @@ -4764,6 +5200,11 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -4810,6 +5251,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "interpret": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", @@ -4946,6 +5392,15 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "keytar": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", + "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", + "requires": { + "node-addon-api": "^4.3.0", + "prebuild-install": "^7.0.1" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4968,9 +5423,9 @@ } }, "linkify-it": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", "requires": { "uc.micro": "^1.0.1" } @@ -4989,11 +5444,6 @@ "p-locate": "^5.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -5025,34 +5475,38 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "requires": { "yallist": "^4.0.0" } }, "markdown-it": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", - "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", "requires": { - "argparse": "^1.0.7", - "entities": "~2.0.0", - "linkify-it": "^2.0.0", + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" }, "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, "entities": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", - "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" } } }, "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==" }, "merge-stream": { "version": "2.0.0", @@ -5083,6 +5537,11 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -5091,6 +5550,16 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==" + }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, "mocha": { "version": "8.4.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", @@ -5190,6 +5659,11 @@ "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", "dev": true }, + "napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -5201,6 +5675,19 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, + "node-abi": { + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.28.0.tgz", + "integrity": "sha512-fRlDb4I0eLcQeUvGq7IY3xHrSb0c9ummdvDSYWfT9+LKP+3jCKw/tKoqaM7r1BAoiAC6GtwyjaGnOz6B3OtF+A==", + "requires": { + "semver": "^7.3.5" + } + }, + "node-addon-api": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", + "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==" + }, "node-releases": { "version": "1.1.75", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", @@ -5265,25 +5752,6 @@ "word-wrap": "^1.2.3" } }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -5426,6 +5894,25 @@ } } }, + "prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "requires": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -5438,6 +5925,15 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -5459,6 +5955,24 @@ "safe-buffer": "^5.1.0" } }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==" + } + } + }, "read": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", @@ -5467,6 +5981,16 @@ "mute-stream": "~0.0.4" } }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "readdirp": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", @@ -5549,6 +6073,11 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, "schema-utils": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", @@ -5563,7 +6092,6 @@ "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, "requires": { "lru-cache": "^6.0.0" } @@ -5617,6 +6145,21 @@ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + }, + "simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "requires": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", @@ -5645,7 +6188,16 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } }, "string-width": { "version": "4.2.2", @@ -5727,6 +6279,29 @@ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==" }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, "terser": { "version": "5.14.2", "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", @@ -5814,6 +6389,14 @@ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5864,9 +6447,14 @@ } }, "url-join": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", - "integrity": "sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg=" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "v8-compile-cache": { "version": "2.3.0", @@ -5875,28 +6463,28 @@ "dev": true }, "vsce": { - "version": "1.96.3", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.96.3.tgz", - "integrity": "sha512-s3qPnDk0jcbN5FHwBDGGDcFCBeFDbiZ+RS5YGzXtZF1GPoVts6VAOa/iM37MXD+itaiXObvmrEvanrJKshEr+A==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/vsce/-/vsce-2.13.0.tgz", + "integrity": "sha512-t1otQ2lqyi5Y/G6qUl9BEc561nEIYrZbLT8k+R1SoZaKNa6gaehaLGQG5zvB524YPGZOVvbOBzAXoO7Mor1J5g==", "requires": { "azure-devops-node-api": "^11.0.1", "chalk": "^2.4.2", "cheerio": "^1.0.0-rc.9", "commander": "^6.1.0", - "denodeify": "^1.2.1", "glob": "^7.0.6", + "hosted-git-info": "^4.0.2", + "keytar": "^7.7.0", "leven": "^3.1.0", - "lodash": "^4.17.15", - "markdown-it": "^10.0.0", + "markdown-it": "^12.3.2", "mime": "^1.3.4", "minimatch": "^3.0.3", - "osenv": "^0.1.3", "parse-semver": "^1.1.1", "read": "^1.0.7", "semver": "^5.1.0", "tmp": "^0.2.1", "typed-rest-client": "^1.8.4", - "url-join": "^1.1.0", + "url-join": "^4.0.1", + "xml2js": "^0.4.23", "yauzl": "^2.3.1", "yazl": "^2.2.2" }, @@ -6139,6 +6727,20 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" + }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -6148,8 +6750,7 @@ "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "yargs": { "version": "16.2.0", diff --git a/package.json b/package.json index c8e0896..84ca9f7 100644 --- a/package.json +++ b/package.json @@ -297,7 +297,7 @@ "dependencies": { "neo-async": "^2.6.2", "test": "^0.6.0", - "vsce": "^1.77.0", + "vsce": "^2.13.0", "webpack": "^5.52.0" } } From be5528186c7e640e986917952edbb9017d415e9f Mon Sep 17 00:00:00 2001 From: alkatar21 <61387986+alkatar21@users.noreply.github.com> Date: Sat, 29 Oct 2022 15:54:02 +0200 Subject: [PATCH 12/13] Followup: Fix wrong syntax --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c8e0896..39c08e2 100644 --- a/package.json +++ b/package.json @@ -168,20 +168,20 @@ } ] }, - "default": { - "TODO:": { + "default": [ + { "text": "TODO:", "color": "#fff", "backgroundColor": "#ffbd2a", "overviewRulerColor": "rgba(255,189,42,0.8)" }, - "FIXME:": { + { "text": "FIXME:", "color": "#fff", "backgroundColor": "#f06292", "overviewRulerColor": "rgba(240,98,146,0.8)" } - } + ] }, "todohighlight.keywordsPattern": { "type": "string", @@ -190,7 +190,7 @@ }, "todohighlight.defaultStyle": { "type": "object", - "description": "Default style for all customized keywords. See all available properties in the [VSCode doc on DecorationRenderOptions](https://code.visualstudio.com/api/references/vscode-api#DecorationRenderOptions) section.", + "markdownDescription": "Default style for all customized keywords. See all available properties in the [VSCode doc on DecorationRenderOptions](https://code.visualstudio.com/api/references/vscode-api#DecorationRenderOptions) section.", "$comment": "The selection of properties for autocompletion are the same as for todohighlight.keywords.", "properties": { "backgroundColor": { From 4e1b4aac87a3615c0dfe3082ec2f143baffbd98b Mon Sep 17 00:00:00 2001 From: Elazar Cohen Date: Wed, 2 Nov 2022 22:51:03 +0200 Subject: [PATCH 13/13] update config --- src/config.ts | 4 ++++ src/extension.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 4773b17..32ffe10 100644 --- a/src/config.ts +++ b/src/config.ts @@ -75,6 +75,10 @@ export interface TODOHighlightConfig { * Max files for searching */ maxFilesForSearch: number; + /** + * Enable creating entries in the problems view. + */ + enableDiagnostics: boolean; } export class TODOHighlightConfiguration { diff --git a/src/extension.ts b/src/extension.ts index 6aa35bd..218f8cf 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -23,7 +23,7 @@ function activate(context: vscode.ExtensionContext) { let workspaceState = context.workspaceState; - const settings = workspace.getConfiguration('todohighlight'); + const settings = configurations; init();