diff --git a/.vscode/launch.json b/.vscode/launch.json index befd8c5..35cd038 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,7 +11,7 @@ "request": "launch", "args": ["--extensionDevelopmentPath=${workspaceFolder}"], "outFiles": ["${workspaceFolder}/dist/**/*.js"], - "preLaunchTask": "${defaultBuildTask}" + "preLaunchTask": "webpack" } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 2368197..1976503 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -5,10 +5,10 @@ "tasks": [ { "type": "npm", - "script": "webpack-dev", + "script": "compile", "problemMatcher": [], - "label": "npm: webpack-dev", - "detail": "webpack --mode development --watch" + "label": "webpack", + "detail": "webpack" } ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 05a0cfe..f64b486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## [v2.1.6](https://github.com/Power-Maverick/DataverseDevTools-VSCode/compare/v2.1.5...v2.1.6) +## [v2.2.1](https://github.com/Power-Maverick/DataverseDevTools-VSCode/compare/v2.1.9...v2.2.1) + +### Merged + +- Bug Fixes Nov 2024 [`#175`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/pull/175) + +### Commits + +- Update Node.js version and add package-lock.json to .gitignore [`1bba90f`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/1bba90fb71a181c185a01a49af74fcc8fcada019) +- Update .gitignore and package.json [`1c478b3`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/1c478b37d3be134d1ce47e762c4e535e2a2dd7d4) +- Remove package-lock.json from .gitignore [`2ab2fc0`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/2ab2fc0ce191f5944ec0d07d91cf0e9db09216d8) + +## [v2.1.9](https://github.com/Power-Maverick/DataverseDevTools-VSCode/compare/v2.1.6...v2.1.9) - 2023-10-08 + +### Merged + +- v.2.1.9 [`#142`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/pull/142) +- v2.1.8 [`#141`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/pull/141) +- Reverted to old unbundled version with package upgrades [`#140`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/pull/140) + +### Commits + +- Reverted package.json changes [`12336c5`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/12336c52952e562a00e98118f216bac9f245c4f5) +- Fix the release pipeline [`dbad453`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/dbad45385a54f809a009cc4794176cf74859d2bc) +- Update readme with current issue notification [`d3cdf46`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/d3cdf46d08576b1e248d8ab8766dfb28fd35f2ac) + +## [v2.1.6](https://github.com/Power-Maverick/DataverseDevTools-VSCode/compare/v2.1.5...v2.1.6) - 2023-10-07 + +### Merged + +- v2.1.6 [`#138`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/pull/138) ### Commits - Convert to a bundle and disable Azure login [`4b0cde1`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/4b0cde18ebe8d4a4b99546bffee28154a0b0425b) +- Updated the changelog [`ccc6bb5`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/ccc6bb57cd79c13d1f0458c90fa1e302e1cab10d) +- Fix the build yml file [`4ab4378`](https://github.com/Power-Maverick/DataverseDevTools-VSCode/commit/4ab437874b755d52c400704dd031c598c1dba9a7) ## [v2.1.5](https://github.com/Power-Maverick/DataverseDevTools-VSCode/compare/v2.1.4...v2.1.5) - 2023-10-07 diff --git a/README.md b/README.md index cbea957..acb6d81 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,6 @@ Support -> CURRENTLY TOOL IS FACING SOME ISSUES WITH THE LATEST VSCODE VERSION AND I AM ACTIVELY TRYING TO RESOLVE IT. There is an open discussion created with VS Code team which you can find [here](https://github.com/microsoft/vscode-discussions/discussions/859#discussion-5711556) - > Do check-out the [planned features](#-planned-features) list. We need your help to complete these planned features. **Table of contents** diff --git a/package-lock.json b/package-lock.json index 30d2773..388f4a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dataverse-devtools", - "version": "2.1.17", + "version": "2.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dataverse-devtools", - "version": "2.1.17", + "version": "2.2.0", "dependencies": { "@azure/identity": "^3.0.0", "@azure/identity-vscode": "^1.0.0", @@ -18,7 +18,7 @@ "conditional-reduce": "^1.2.0", "dayjs": "^1.10.7", "dts-dom": "^3.6.0", - "fast-xml-parser": "^4.3.2", + "fast-xml-parser": "^4.5.0", "fs-extra": "^10.0.0", "lodash": "^4.17.21", "mobx": "6.3.2", @@ -2732,9 +2732,9 @@ "dev": true }, "node_modules/fast-xml-parser": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.2.tgz", - "integrity": "sha512-rmrXUXwbJedoXkStenj1kkljNF7ugn5ZjR9FJcwmCfcCbtOMDghPajbc+Tck6vE6F5XsDmx+Pr2le9fw8+pXBg==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz", + "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==", "funding": [ { "type": "github", diff --git a/package.json b/package.json index 491520c..07e7597 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dataverse-devtools", "displayName": "Dataverse DevTools", - "version": "2.2.0", + "version": "2.2.1", "description": "The all-in-one tool to develop code for Dataverse/Dynamics 365. Helps you connect to a Dataverse environment, generate TypeScript definitions for entities, create different type of Dataverse-specific projects and much more.", "publisher": "danish-naglekar", "author": { @@ -24,12 +24,10 @@ }, "main": "./dist/extension.js", "scripts": { + "compile": "webpack --mode development", + "watch": "webpack --mode development --watch", "vscode:prepublish": "npm run package", - "compile": "webpack", - "watch": "webpack --watch", "package": "webpack --mode production --devtool hidden-source-map", - "compile-tests": "tsc -p . --outDir out", - "watch-tests": "tsc -p . -w --outDir out", "pretest": "npm run compile-tests && npm run compile && npm run lint", "lint": "eslint src --ext ts", "test": "vscode-test", @@ -584,7 +582,7 @@ "conditional-reduce": "^1.2.0", "dayjs": "^1.10.7", "dts-dom": "^3.6.0", - "fast-xml-parser": "^4.3.2", + "fast-xml-parser": "^4.5.0", "fs-extra": "^10.0.0", "lodash": "^4.17.21", "mobx": "6.3.2", diff --git a/src/helpers/errorHandler.ts b/src/helpers/errorHandler.ts index 947aa7d..bebf8f1 100644 --- a/src/helpers/errorHandler.ts +++ b/src/helpers/errorHandler.ts @@ -19,12 +19,21 @@ export class ErrorHandler { var reportMessage = `VSCode version: ${vscode.version}. \nExtension version: ${extension.packageJSON.version}. \nError occured in ${cmd} command. \nError code: ${err.code}. \nError message: ${err.message}. \nError stack: ${err.stack}.`; var sId = vscode.env.sessionId; await openUri( - `https://github.com/Power-Maverick/DataverseDevTools-VSCode/issues/new?assignees=Power-Maverick&labels=bug%2Ctriage&template=issue-form-bug.yaml&title=%5BBug%5D%3A+&logs=${decodeURI( + `https://github.com/Power-Maverick/DataverseDevTools-VSCode/issues/new?assignees=Power-Maverick&labels=bug%2Ctriage&template=issue-form-bug.yaml&title=%5BBug%5D:%20Error%20in%20${cmd}+&logs=${decodeURI( reportMessage, )}&sessionid=${sId}`, ); } }); - this.reporter.sendTelemetryErrorEvent(err, { command: cmd }); + // All errors are logged to customEvent telemetry + this.reporter.sendTelemetryErrorEvent(cmd, { + command: cmd, + vscodeVersion: vscode.version, + extensionVersion: extension.packageJSON.version, + errorCode: err.code, + errorMessage: err.message, + errorStack: err.stack, + sessionId: vscode.env.sessionId, + }); } } diff --git a/src/helpers/webResourceHelper.ts b/src/helpers/webResourceHelper.ts index 6ba5f01..9446384 100644 --- a/src/helpers/webResourceHelper.ts +++ b/src/helpers/webResourceHelper.ts @@ -1,18 +1,18 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import * as vscode from "vscode"; +import { reduce } from "conditional-reduce"; import * as path from "path"; +import * as vscode from "vscode"; +import { WebResourceType, wrDefinitionsStoreKey } from "../utils/Constants"; +import { ErrorMessages } from "../utils/ErrorMessages"; +import { decodeFromBase64, encodeToBase64, extractGuid } from "../utils/ExtensionMethods"; import { copyFolderOrFile, createTempDirectory, getFileExtension, getFileName, getRelativeFilePath, getWorkspaceFolder, readFileAsBase64Sync, readFileSync, writeFileSync } from "../utils/FileSystem"; -import { jsonToXML, xmlToJSON } from "../utils/Parsers"; import { ILinkerFile, ILinkerRes, ISmartMatchRecord, IWebResource, IWebResources } from "../utils/Interfaces"; -import { DataverseHelper } from "./dataverseHelper"; -import { State } from "../utils/State"; -import { smartMatchStoreKey, WebResourceType, wrDefinitionsStoreKey } from "../utils/Constants"; +import { jsonToXML, xmlToJSON } from "../utils/Parsers"; import { Placeholders } from "../utils/Placeholders"; -import { ErrorMessages } from "../utils/ErrorMessages"; -import { reduce } from "conditional-reduce"; -import { decodeFromBase64, encodeToBase64, extractGuid } from "../utils/ExtensionMethods"; -import { ViewBase } from "../views/ViewBase"; +import { State } from "../utils/State"; import { SmartMatchView } from "../views/SmartMatchView"; +import { ViewBase } from "../views/ViewBase"; +import { DataverseHelper } from "./dataverseHelper"; export class WebResourceHelper { private vsstate: State; @@ -563,7 +563,7 @@ export class WebResourceHelper { xslt: () => WebResourceType.xsl, ico: () => WebResourceType.ico, svg: () => WebResourceType.svg, - resx: () => WebResourceType.resx + resx: () => WebResourceType.resx, }); const wrContent = encodeToBase64(readFileSync(fullPath)); diff --git a/src/utils/Parsers.ts b/src/utils/Parsers.ts index ef05d8b..db0ffb4 100644 --- a/src/utils/Parsers.ts +++ b/src/utils/Parsers.ts @@ -14,6 +14,7 @@ const options = { export function xmlToJSON(xmlData: string): T { const parser = new XMLParser(options); var jsonObj: T = parser.parse(xmlData); + (jsonObj as any)["?xml"]["@_version"] = "1.0"; return jsonObj; }