[mod] update libraries
This commit is contained in:
		
							parent
							
								
									95702e6355
								
							
						
					
					
						commit
						1ea5f9481f
					
				
					 5 changed files with 1527 additions and 2451 deletions
				
			
		
							
								
								
									
										3890
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										3890
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										38
									
								
								package.json
									
										
									
									
									
								
							
							
						
						
									
										38
									
								
								package.json
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,14 +1,15 @@
 | 
			
		|||
{
 | 
			
		||||
    "name": "xml",
 | 
			
		||||
    "displayName": "XML Tools",
 | 
			
		||||
    "displayName": "XML Tools for BaseX",
 | 
			
		||||
    "description": "XML Formatting, XQuery, and XPath Tools for Visual Studio Code",
 | 
			
		||||
    "version": "2.5.1",
 | 
			
		||||
    "version": "2.5.2",
 | 
			
		||||
    "preview": false,
 | 
			
		||||
    "publisher": "DotJoshJohnson",
 | 
			
		||||
    "publisher": "quodatum",
 | 
			
		||||
    "author": {
 | 
			
		||||
        "name": "Josh Johnson",
 | 
			
		||||
        "name": "Andy Bunce",
 | 
			
		||||
        "url": "https://github.com/DotJoshJohnson"
 | 
			
		||||
    },
 | 
			
		||||
    "license": "MIT",
 | 
			
		||||
    "galleryBanner": {
 | 
			
		||||
        "color": "#FFFFFF",
 | 
			
		||||
        "theme": "light"
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +24,7 @@
 | 
			
		|||
        "url": "https://github.com/DotJoshJohnson/vscode-xml/issues"
 | 
			
		||||
    },
 | 
			
		||||
    "engines": {
 | 
			
		||||
        "vscode": "^1.22.2"
 | 
			
		||||
        "vscode": "^1.63.0"
 | 
			
		||||
    },
 | 
			
		||||
    "categories": [
 | 
			
		||||
        "Formatters",
 | 
			
		||||
| 
						 | 
				
			
			@ -260,20 +261,25 @@
 | 
			
		|||
    },
 | 
			
		||||
    "scripts": {
 | 
			
		||||
        "vscode:prepublish": "npm run compile",
 | 
			
		||||
        "compile": "npm run lint && tsc -p ./",
 | 
			
		||||
        "compile": "tsc -p ./",
 | 
			
		||||
        "watch": "tsc -watch -p ./",
 | 
			
		||||
        "postinstall": "node ./node_modules/vscode/bin/install",
 | 
			
		||||
        "test": "npm run compile && mocha './out/test/**/*.js'",
 | 
			
		||||
        "test-windows": "npm run compile && mocha ./out/test/**/*.js",
 | 
			
		||||
        "lint": "tslint -p tslint.json --fix"
 | 
			
		||||
        "pretest": "npm run compile && npm run lint",
 | 
			
		||||
        "lint": "eslint src --ext ts",
 | 
			
		||||
        "test": "node ./out/test/runTest.js"
 | 
			
		||||
    },
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@types/mocha": "^2.2.42",
 | 
			
		||||
        "@types/node": "^7.0.43",
 | 
			
		||||
        "@types/xmldom": "^0.1.29",
 | 
			
		||||
        "tslint": "^5.9.1",
 | 
			
		||||
        "typescript": "^2.6.1",
 | 
			
		||||
        "vscode": "^1.1.16"
 | 
			
		||||
        "@types/vscode": "^1.63.0",
 | 
			
		||||
        "@types/glob": "^7.2.0",
 | 
			
		||||
        "@types/mocha": "^9.0.0",
 | 
			
		||||
        "@types/node": "14.x",
 | 
			
		||||
        "@typescript-eslint/eslint-plugin": "^5.9.1",
 | 
			
		||||
        "@typescript-eslint/parser": "^5.9.1",
 | 
			
		||||
        "@types/xmldom": "^0.1.13",
 | 
			
		||||
        "eslint": "^8.6.0",
 | 
			
		||||
        "glob": "^7.2.0",
 | 
			
		||||
        "mocha": "^9.1.3",
 | 
			
		||||
        "typescript": "^4.5.4",
 | 
			
		||||
        "@vscode/test-electron": "^2.0.3"
 | 
			
		||||
    },
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
        "xmldom": "^0.1.27",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,6 @@ import * as fs from "fs";
 | 
			
		|||
 | 
			
		||||
export class TestDataLoader {
 | 
			
		||||
    static load(fileName: string): string {
 | 
			
		||||
        return fs.readFileSync(`${__dirname}/../../../src/test/test-data/${fileName}`, "UTF-8");
 | 
			
		||||
        return fs.readFileSync(`${__dirname}/../../../src/test/test-data/${fileName}`, "utf-8");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,7 +33,7 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
 | 
			
		|||
        return window.activeTextEditor || null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    getTreeItem(element: Node): TreeItem | Thenable<TreeItem> {
 | 
			
		||||
    getTreeItem(element: Element): TreeItem | Thenable<TreeItem> {
 | 
			
		||||
        const enableMetadata = Configuration.enableXmlTreeViewMetadata;
 | 
			
		||||
        const enableSync = Configuration.enableXmlTreeViewCursorSync;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -60,9 +60,9 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
 | 
			
		|||
                    treeItem.label += `children: ${childElements.length}, `;
 | 
			
		||||
                    treeItem.collapsibleState = TreeItemCollapsibleState.Collapsed;
 | 
			
		||||
                }
 | 
			
		||||
                const label = treeItem.label as string;
 | 
			
		||||
                treeItem.label = label.substr(0, label.length - 2) + ")";
 | 
			
		||||
 | 
			
		||||
                treeItem.label = treeItem.label.substr(0, treeItem.label.length - 2);
 | 
			
		||||
                treeItem.label += ")";
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (this._xmlTraverser.hasSimilarSiblings(<Element>element) && enableSync) {
 | 
			
		||||
| 
						 | 
				
			
			@ -134,7 +134,7 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
 | 
			
		|||
            NativeCommands.setContext(constants.contextKeys.xmlTreeViewEnabled, false);
 | 
			
		||||
 | 
			
		||||
            this._xmlDocument = null;
 | 
			
		||||
            this._onDidChangeTreeData.fire();
 | 
			
		||||
            this._onDidChangeTreeData.fire(0);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -162,7 +162,7 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
 | 
			
		|||
            this._xmlTraverser.xmlDocument = this._xmlDocument;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this._onDidChangeTreeData.fire();
 | 
			
		||||
        this._onDidChangeTreeData.fire(0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -108,12 +108,14 @@ export async function executeXQuery(editor: TextEditor, edit: TextEditorEdit): P
 | 
			
		|||
        await ChildProcess.spawn(executable, args);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    catch (error) {
 | 
			
		||||
        if (error.message.search(/[Ll]ine:?\s*\d+/gm) > -1) {
 | 
			
		||||
            const match: RegExpExecArray = /[Ll]ine:?\s*\d+/gm.exec(error.message);
 | 
			
		||||
            const line: number = (Number.parseInt(match[0].replace(/([Ll]ine:?\s*)|\s/, "")) - 1);
 | 
			
		||||
    catch (error ) {
 | 
			
		||||
        let message = "Unknown Error";
 | 
			
		||||
        if (error instanceof Error) { message = error.message; }
 | 
			
		||||
        if (message.search(/[Ll]ine:?\s*\d+/gm) > -1) {
 | 
			
		||||
            const match: RegExpExecArray = /[Ll]ine:?\s*\d+/gm.exec(message);
 | 
			
		||||
            const line: number = (Number.parseInt(match[0].replace(/([Ll]ine:?\s*)|\s/, ""), 10) - 1);
 | 
			
		||||
 | 
			
		||||
            const selection: string = await window.showErrorMessage(error.message, `Go to Line ${line}`);
 | 
			
		||||
            const selection: string = await window.showErrorMessage(message, `Go to Line ${line}`);
 | 
			
		||||
 | 
			
		||||
            if (selection === `Go to Line ${line}`) {
 | 
			
		||||
                editor.revealRange(new Range(line, 0, line, 0));
 | 
			
		||||
| 
						 | 
				
			
			@ -121,7 +123,7 @@ export async function executeXQuery(editor: TextEditor, edit: TextEditorEdit): P
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        else {
 | 
			
		||||
            window.showErrorMessage(error.message);
 | 
			
		||||
            window.showErrorMessage(message);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue