From ea702b183809497aa06b1220ccf647baaf8fdec0 Mon Sep 17 00:00:00 2001 From: Achim Nacke Date: Fri, 13 Dec 2024 15:48:59 +0100 Subject: [PATCH 1/2] Update 4.1.7 The 'Merge post processor' feature does now utilize the include path if specified --- vs-code-extension/CHANGELOG.md | 3 +++ vs-code-extension/out/src/extension.js | 15 ++++++++++----- vs-code-extension/package.json | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/vs-code-extension/CHANGELOG.md b/vs-code-extension/CHANGELOG.md index df2b5d0..f8f9837 100644 --- a/vs-code-extension/CHANGELOG.md +++ b/vs-code-extension/CHANGELOG.md @@ -1,4 +1,7 @@ # Change Log +## 4.1.7 +Fixed: + - The 'Merge post processor' feature does now utilize the include path if specified ## 4.1.6 Changed: - Option 'Download CNC exporting post processor' now redirects to the Fusion post library website diff --git a/vs-code-extension/out/src/extension.js b/vs-code-extension/out/src/extension.js index 65d2a8e..6c9bbd4 100644 --- a/vs-code-extension/out/src/extension.js +++ b/vs-code-extension/out/src/extension.js @@ -253,20 +253,25 @@ function showPostEngineVersion() { } } -/** Merges the post processor with any files with the '.merge.cps' extension in the same directory */ +/** Merges the post processor with any files with the '.merged.cps' extension in the same directory */ function mergePost() { checkPostKernel(); let child = require('child_process').execFile; let parameters = []; postFile = getCpsPath(); - var mergeFile = postFile.split(".cps")[0] + ".merge.cps"; + var mergeFile = postFile.split(".cps")[0] + ".merged.cps"; parameters = [postFile, "--merge", mergeFile]; + + let includePath = vscode.workspace.getConfiguration("AutodeskPostUtility").get('includePath'); + if (fileExists(includePath)) { + parameters.push("--include", includePath); // Set the include path + } try { var _timeout = vscode.workspace.getConfiguration("AutodeskPostUtility").get("timeoutForPostProcessing"); _timeout *= 1000; // convert to milliseconds - child(postExecutable, parameters, { timeout: _timeout }, function (err, data) { - if (err) { - errorMessage("Merge failed."); + child(postExecutable, parameters, { timeout: _timeout }, function (err, stdout, stderr) { + if (stderr) { + errorMessage("Merge failed: " + stderr); } else { message("Merge successful. The merged post can be found in your post processors directory."); } diff --git a/vs-code-extension/package.json b/vs-code-extension/package.json index 18634db..e14b493 100644 --- a/vs-code-extension/package.json +++ b/vs-code-extension/package.json @@ -2,7 +2,7 @@ "name": "hsm-post-processor", "displayName": "Autodesk Fusion Post Processor Utility", "description": "Post processor utility.", - "version": "4.1.6", + "version": "4.1.7", "icon": "res/icons/logo.png", "author": { "name": "Autodesk", From 9729acdf7c3ecc44c820057b1673a2a77943a8b0 Mon Sep 17 00:00:00 2001 From: Achim Nacke Date: Tue, 19 Aug 2025 14:33:38 +0200 Subject: [PATCH 2/2] Updated ESLint rules file. Added setting "useFlatConfig" to make rules file compatible with recent ESLint versions. --- vs-code-extension/CHANGELOG.md | 3 +++ vs-code-extension/out/src/extension.js | 7 ++++--- vs-code-extension/res/.eslintrc.json | 7 ++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/vs-code-extension/CHANGELOG.md b/vs-code-extension/CHANGELOG.md index f8f9837..8ca7bee 100644 --- a/vs-code-extension/CHANGELOG.md +++ b/vs-code-extension/CHANGELOG.md @@ -2,6 +2,9 @@ ## 4.1.7 Fixed: - The 'Merge post processor' feature does now utilize the include path if specified + - Fixed an issue where ESLint did not recognize the embedded rules file. +Updated: + - Updated embedded ESLint rules file. ## 4.1.6 Changed: - Option 'Download CNC exporting post processor' now redirects to the Fusion post library website diff --git a/vs-code-extension/out/src/extension.js b/vs-code-extension/out/src/extension.js index 6c9bbd4..7b2fdad 100644 --- a/vs-code-extension/out/src/extension.js +++ b/vs-code-extension/out/src/extension.js @@ -1247,14 +1247,14 @@ function setEmbeddedEslintRules() { let newEditorConfiguration switch (vscode.workspace.getConfiguration("AutodeskPostUtility").get("useEmbeddedESLintRules")) { case "Disabled": - newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": false}); + newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": "never"}); newEslintConfiguration = Object.assign({}, currentEslintConfiguration.overrideConfigFile, {}); break; case "Show ESLint issues only": - newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": false}); + newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": "never"}); break; case "Show and fix ESLint issues": - newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": true}); + newEditorConfiguration = Object.assign({}, currentEditorConfiguration.codeActionsOnSave, {"source.fixAll.eslint": "explicit"}); break; default: errorMessage("Unknown command for setting useEmbeddedESLintRules.") @@ -1262,6 +1262,7 @@ function setEmbeddedEslintRules() { } vscode.workspace.getConfiguration("eslint").update("options", newEslintConfiguration, true); vscode.workspace.getConfiguration("editor").update("codeActionsOnSave", newEditorConfiguration, true); + vscode.workspace.getConfiguration("eslint").update("useFlatConfig", false, true); } /** diff --git a/vs-code-extension/res/.eslintrc.json b/vs-code-extension/res/.eslintrc.json index 1c0d314..4356104 100644 --- a/vs-code-extension/res/.eslintrc.json +++ b/vs-code-extension/res/.eslintrc.json @@ -150,7 +150,12 @@ "no-magic-numbers": "off", "no-mixed-operators": "off", "no-mixed-requires": "error", - "no-multi-spaces": "off", + "no-multi-spaces": ["error", { + "ignoreEOLComments": true, + "exceptions": { + "Property": true + } + }], "no-multi-str": "off", "no-multiple-empty-lines": [2, { "max": 1