diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 49eb172..d51defc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,13 +1,12 @@ --- -name: Bug report +name: Issue report about: Create a report to help us improve -title: '' -labels: bug -assignees: '' - +title: "" +labels: "" +assignees: "" --- -## 🐞 Bug Summary +## Issue Summary Describe the issue you're experiencing with the core module, such as a rule not behaving as expected, incorrect scan output, or problems with configuration or parsing. @@ -25,7 +24,7 @@ Steps to reproduce the bug: ## ✅ Expected Behavior -Describe what *should* have happened. Be specific about expected rule evaluation or output. +Describe what _should_ have happened. Be specific about expected rule evaluation or output. --- @@ -41,11 +40,9 @@ If applicable, include: ## 📋 Environment +- **Used via**: [Direct, VS Code extension, Salesforce CLI plugin] - **OS**: [e.g. macOS Ventura, Ubuntu 22.04] -- **Node.js Version**: [e.g. 18.16.0] -- **NPM Version**: [e.g. 9.5.1] - **Module Version**: [e.g. `lightning-flow-scanner-core` v1.4.0] -- **Used via**: [Direct, VS Code extension, Salesforce CLI plugin] --- @@ -55,4 +52,4 @@ Any other details? Paste relevant error logs, stack traces, or screenshots that --- -> ⚠️ Note: If this issue affects the **VS Code Extension** or **Salesforce CLI Plugin**, please file it in the relevant repository instead. +> ⚠️ Note: If this issue affects only one platform, such as the **VS Code Extension** or **Salesforce CLI Plugin**, please file it in the relevant repository instead. diff --git a/.github/ISSUE_TEMPLATE/rule-request.md b/.github/ISSUE_TEMPLATE/rule-request.md index 3583cbb..80b90e0 100644 --- a/.github/ISSUE_TEMPLATE/rule-request.md +++ b/.github/ISSUE_TEMPLATE/rule-request.md @@ -1,23 +1,19 @@ --- name: Rule request about: Suggest a new static analysis rule for flows -title: '' +title: "" labels: new rule -assignees: '' - +assignees: "" --- -**Is your rule request related to a specific problem or anti-pattern? Please describe.** +**Is your rule request related to a specific problem or anti-pattern? Please describe.** A clear and concise description of the issue this rule should detect. For example: "Flows using 'Get Records' with 'store all fields' should be flagged." -**Describe the rule you'd like to see** +**Describe the rule you'd like to see** Outline the behavior the rule should enforce or detect. -**Describe alternatives you've considered** -If there's another way to enforce this pattern today, mention it here. - -**Example flow behavior (optional)** +**Example flow behavior (optional)** If you can, describe or attach an example Flow structure or metadata where this rule would apply. -**Additional context** +**Additional context** Add any other context, links to docs, or notes relevant to the rule idea. diff --git a/.gitignore b/.gitignore index c479a28..fe146d9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,6 @@ node_modules **/.DS_Store .DS_Store -# IDE files -.vscode/** - .yarn/** **.gz *.log diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..54d2907 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + + // List of extensions which should be recommended for users of this workspace. + "recommendations": ["Orta.vscode-jest"], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..ab80315 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,30 @@ +{ + "version": "1.0.0", + "configurations": [ + { + "command": "npm test", + "name": "Run npm test", + "request": "launch", + "type": "node-terminal" + }, + { + "type": "node", + "name": "vscode-jest-tests.v2.lightning-flow-scanner-core", + "request": "launch", + "args": [ + "test", + "--", + "--runInBand", + "--watchAll=false", + "--testNamePattern", + "${jest.testNamePattern}", + "--runTestsByPath", + "${jest.testFile}" + ], + "cwd": "${workspaceFolder}/lightning-flow-scanner-core", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "runtimeExecutable": "npm" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cc38d70 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "jest.runMode": "on-demand" +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d36019..d2ae83f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ If it's more specific like a bug or a new feature—use [GitHub Issues](https:// ###### Core Engine - For issues or requests related to the core functionality of the scanner, use the following links to submit your request: -- [Bug Report](https://github.com/Flow-Scanner/lightning-flow-scanner-core/issues/new?template=bug_report.md): Report a bug or issue +- [Report Issue](https://github.com/Flow-Scanner/lightning-flow-scanner-core/issues/new?template=bug_report.md): Report a bug or issue. - [Rule Request](https://github.com/Flow-Scanner/lightning-flow-scanner-core/issues/new?template=rule-request.md): Submit a request for a new rule. - [Features/Other](https://github.com/Flow-Scanner/lightning-flow-scanner-core/issues/new): Suggest a new feature. diff --git a/SECURITY.md b/SECURITY.md index bcaadf1..76220ba 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -18,8 +18,6 @@ This project collects zero user data. No credentials, PII, payment info, or heal We actively track and maintain an up-to-date inventory of all third-party dependencies to ensure security and compatibility. Our dependencies include: -| Package | License | Purpose | - +| Package | License | Purpose | | ------------- | ---------------------------------------------------------------------- | ----------------------- | - | `xmlbuilder2` | [MIT](https://github.com/oozcitak/xmlbuilder2/blob/master/LICENSE.txt) | XML builder for Node.js | diff --git a/package-lock.json b/package-lock.json index e3bfb80..68db1a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,21 @@ { "name": "lightning-flow-scanner-core", - "version": "5.9.6", + "version": "5.9.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "lightning-flow-scanner-core", - "version": "5.9.6", + "version": "5.9.7", "license": "MIT", "dependencies": { "xmlbuilder2": "^3.1.1" }, "devDependencies": { "@jest/types": "30.0.1", - "@swc-node/jest": "1.8.13", + "@swc-node/jest": "1.9.1", "@swc/cli": "0.7.7", - "@swc/core": "1.12.7", + "@swc/core": "1.13.5", "@swc/helpers": "0.5.17", "@types/jest": "29.5.14", "@types/node": "22.15.30", @@ -28,12 +28,12 @@ "eslint-plugin-sonarjs": "3.0.4", "husky": "9.1.7", "jest": "30.0.3", - "lint-staged": "16.1.2", + "lint-staged": "^16.1.2", "prettier": "3.6.2", "ts-node": "10.9.2", "typescript": "5.8.3", "typescript-eslint": "8.35.0", - "vite": "6.3.5", + "vite": "6.4.1", "vite-plugin-node-polyfills": "0.23.0", "vitest": "3.2.4" }, @@ -1954,13 +1954,15 @@ } }, "node_modules/@swc-node/jest": { - "version": "1.8.13", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@swc-node/jest/-/jest-1.9.1.tgz", + "integrity": "sha512-UEHdzD8Ni5hcBZWzfYfZjw9aX+XI5rq6nMAIxjClCtZKtR3iZiXIr3JSEBmVpJ/eHEMriaYl1Q9Tk8sSW0tlRw==", "dev": true, "license": "MIT", "dependencies": { - "@node-rs/xxhash": "^1.7.3", - "@swc-node/core": "^1.13.3", - "@swc-node/register": "^1.10.10" + "@node-rs/xxhash": "^1.7.6", + "@swc-node/core": "^1.14.1", + "@swc-node/register": "^1.11.1" }, "funding": { "type": "github", @@ -2069,13 +2071,15 @@ } }, "node_modules/@swc/core": { - "version": "1.12.7", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.13.5.tgz", + "integrity": "sha512-WezcBo8a0Dg2rnR82zhwoR6aRNxeTGfK5QCD6TQ+kg3xx/zNT02s/0o+81h/3zhvFSB24NtqEr8FTw88O5W/JQ==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.23" + "@swc/types": "^0.1.24" }, "engines": { "node": ">=10" @@ -2085,16 +2089,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.12.7", - "@swc/core-darwin-x64": "1.12.7", - "@swc/core-linux-arm-gnueabihf": "1.12.7", - "@swc/core-linux-arm64-gnu": "1.12.7", - "@swc/core-linux-arm64-musl": "1.12.7", - "@swc/core-linux-x64-gnu": "1.12.7", - "@swc/core-linux-x64-musl": "1.12.7", - "@swc/core-win32-arm64-msvc": "1.12.7", - "@swc/core-win32-ia32-msvc": "1.12.7", - "@swc/core-win32-x64-msvc": "1.12.7" + "@swc/core-darwin-arm64": "1.13.5", + "@swc/core-darwin-x64": "1.13.5", + "@swc/core-linux-arm-gnueabihf": "1.13.5", + "@swc/core-linux-arm64-gnu": "1.13.5", + "@swc/core-linux-arm64-musl": "1.13.5", + "@swc/core-linux-x64-gnu": "1.13.5", + "@swc/core-linux-x64-musl": "1.13.5", + "@swc/core-win32-arm64-msvc": "1.13.5", + "@swc/core-win32-ia32-msvc": "1.13.5", + "@swc/core-win32-x64-msvc": "1.13.5" }, "peerDependencies": { "@swc/helpers": ">=0.5.17" @@ -2106,7 +2110,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.12.7", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.13.5.tgz", + "integrity": "sha512-lKNv7SujeXvKn16gvQqUQI5DdyY8v7xcoO3k06/FJbHJS90zEwZdQiMNRiqpYw/orU543tPaWgz7cIYWhbopiQ==", "cpu": [ "arm64" ], @@ -2120,6 +2126,159 @@ "node": ">=10" } }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.13.5.tgz", + "integrity": "sha512-ILd38Fg/w23vHb0yVjlWvQBoE37ZJTdlLHa8LRCFDdX4WKfnVBiblsCU9ar4QTMNdeTBEX9iUF4IrbNWhaF1Ng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.13.5.tgz", + "integrity": "sha512-Q6eS3Pt8GLkXxqz9TAw+AUk9HpVJt8Uzm54MvPsqp2yuGmY0/sNaPPNVqctCX9fu/Nu8eaWUen0si6iEiCsazQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.13.5.tgz", + "integrity": "sha512-aNDfeN+9af+y+M2MYfxCzCy/VDq7Z5YIbMqRI739o8Ganz6ST+27kjQFd8Y/57JN/hcnUEa9xqdS3XY7WaVtSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.13.5.tgz", + "integrity": "sha512-9+ZxFN5GJag4CnYnq6apKTnnezpfJhCumyz0504/JbHLo+Ue+ZtJnf3RhyA9W9TINtLE0bC4hKpWi8ZKoETyOQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.13.5.tgz", + "integrity": "sha512-WD530qvHrki8Ywt/PloKUjaRKgstQqNGvmZl54g06kA+hqtSE2FTG9gngXr3UJxYu/cNAjJYiBifm7+w4nbHbA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.13.5.tgz", + "integrity": "sha512-Luj8y4OFYx4DHNQTWjdIuKTq2f5k6uSXICqx+FSabnXptaOBAbJHNbHT/06JZh6NRUouaf0mYXN0mcsqvkhd7Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.13.5.tgz", + "integrity": "sha512-cZ6UpumhF9SDJvv4DA2fo9WIzlNFuKSkZpZmPG1c+4PFSEMy5DFOjBSllCvnqihCabzXzpn6ykCwBmHpy31vQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.13.5.tgz", + "integrity": "sha512-C5Yi/xIikrFUzZcyGj9L3RpKljFvKiDMtyDzPKzlsDrKIw2EYY+bF88gB6oGY5RGmv4DAX8dbnpRAqgFD0FMEw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.13.5.tgz", + "integrity": "sha512-YrKdMVxbYmlfybCSbRtrilc6UA8GF5aPmGKBdPvjrarvsmf4i7ZHGCEnLtfOMd3Lwbs2WUZq3WdMbozYeLU93Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, "node_modules/@swc/counter": { "version": "0.1.3", "dev": true, @@ -5456,6 +5615,21 @@ "dev": true, "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "dev": true, @@ -7964,8 +8138,9 @@ }, "node_modules/lint-staged": { "version": "16.1.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.1.2.tgz", + "integrity": "sha512-sQKw2Si2g9KUZNY3XNvRuDq4UJqpHwF0/FQzZR2M7I5MvtpWvibikCjUVJzZdGE0ByurEl3KQNvsGetd1ty1/Q==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^5.4.1", "commander": "^14.0.0", @@ -11180,7 +11355,9 @@ } }, "node_modules/vite": { - "version": "6.3.5", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", + "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index bd29e3b..7e255b8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lightning-flow-scanner-core", "description": "A purpose-built engine to assess and enhance Salesforce Flow automations for best practices, security, governor limits, and performance issues.", - "version": "5.9.6", + "version": "5.9.7", "main": "index.js", "types": "index.d.ts", "engines": { @@ -39,9 +39,9 @@ }, "devDependencies": { "@jest/types": "30.0.1", - "@swc-node/jest": "1.8.13", + "@swc-node/jest": "1.9.1", "@swc/cli": "0.7.7", - "@swc/core": "1.12.7", + "@swc/core": "1.13.5", "@swc/helpers": "0.5.17", "@types/jest": "29.5.14", "@types/node": "22.15.30", @@ -54,12 +54,12 @@ "eslint-plugin-sonarjs": "3.0.4", "husky": "9.1.7", "jest": "30.0.3", - "lint-staged": "16.1.2", + "lint-staged": "^16.1.2", "prettier": "3.6.2", "ts-node": "10.9.2", "typescript": "5.8.3", "typescript-eslint": "8.35.0", - "vite": "6.3.5", + "vite": "6.4.1", "vite-plugin-node-polyfills": "0.23.0", "vitest": "3.2.4" }, diff --git a/readme.md b/readme.md index 068b8dc..384457a 100644 --- a/readme.md +++ b/readme.md @@ -227,4 +227,4 @@ _Attempts to apply automatic fixes where available._ Your local core module will now replace the installed dependency and update automatically on rebuild. -Want to help improve Lightning Flow Scanner? See our [Contributing Guidelines](https://github.com/Flow-Scanner/lightning-flow-scanner-core/blob/main/CONTRIBUTING.md). +###### Want to help improve Lightning Flow Scanner? See our [Contributing Guidelines](https://github.com/Flow-Scanner/lightning-flow-scanner-core/blob/main/CONTRIBUTING.md).