diff --git a/packages/salesforcedx-vscode-apex-replay-debugger/package.json b/packages/salesforcedx-vscode-apex-replay-debugger/package.json index 0b9cd61e71..ade9e6859c 100644 --- a/packages/salesforcedx-vscode-apex-replay-debugger/package.json +++ b/packages/salesforcedx-vscode-apex-replay-debugger/package.json @@ -1,184 +1,28 @@ { - "activationEvents": [ - "onDebugResolve:apex", - "onCommand:extension.replay-debugger.getLogFileName", - "workspaceContains:sfdx-project.json" - ], + "name": "salesforcedx-vscode-apex-replay-debugger", + "displayName": "Apex Replay Debugger", + "description": "Replay Apex execution from Apex Debug Log", + "qna": "https://github.com/forcedotcom/salesforcedx-vscode/issues", "bugs": { "url": "https://github.com/forcedotcom/salesforcedx-vscode/issues" }, + "repository": { + "url": "https://github.com/forcedotcom/salesforcedx-vscode" + }, + "icon": "images/VSCodeApexReplayDebugger.png", + "galleryBanner": { + "color": "#ECECEC", + "theme": "light" + }, + "version": "60.13.0", + "publisher": "salesforce", + "license": "BSD-3-Clause", + "engines": { + "vscode": "^1.82.0" + }, "categories": [ "Debuggers" ], - "contributes": { - "breakpoints": [ - { - "language": "apex" - } - ], - "commands": [ - { - "command": "sf.toggle.checkpoint", - "title": "%sf_toggle_checkpoint%" - }, - { - "command": "sf.create.checkpoints", - "icon": { - "dark": "images/dark/cloud-upload.svg", - "light": "images/light/cloud-upload.svg" - }, - "title": "%sf_update_checkpoints_in_org%", - "when": "sf:project_opened" - }, - { - "command": "sf.launch.replay.debugger.last.logfile", - "title": "%launch_from_last_log_file%" - }, - { - "command": "sf.test.view.debugTests", - "icon": { - "dark": "resources/dark/debug.svg", - "light": "resources/light/debug.svg" - }, - "title": "%run_tests_and_debug%" - }, - { - "command": "sf.test.view.debugSingleTest", - "icon": { - "dark": "resources/dark/debug.svg", - "light": "resources/light/debug.svg" - }, - "title": "%run_single_test_and_debug%" - } - ], - "debuggers": [ - { - "configurationAttributes": { - "launch": { - "properties": { - "logFile": { - "default": "${command:AskForLogFileName}", - "description": "%logfile_text%", - "type": "string" - }, - "required": [ - "logFile" - ], - "stopOnEntry": { - "default": true, - "description": "%stop_on_entry_text%", - "type": "boolean" - }, - "trace": { - "default": false, - "description": "%trace_text%", - "type": [ - "boolean", - "string" - ] - } - } - } - }, - "configurationSnippets": [ - { - "body": { - "logFile": "^\"\\${command:AskForLogFileName}\"", - "name": "%launch_snippet_name%", - "request": "launch", - "stopOnEntry": true, - "trace": true, - "type": "apex-replay" - }, - "description": "%launch_snippet_description_text%", - "label": "%launch_snippet_label_text%" - } - ], - "label": "Apex Replay Debugger", - "languages": [ - "apex" - ], - "program": "./node_modules/@salesforce/salesforcedx-apex-replay-debugger/out/src/adapter/apexReplayDebug.js", - "runtime": "node", - "type": "apex-replay", - "variables": { - "AskForLogFileName": "extension.replay-debugger.getLogFileName" - } - } - ], - "grammars": [ - { - "language": "apexlog", - "path": "./syntaxes/apexlog.tmLanguage.json", - "scopeName": "text.log" - } - ], - "languages": [ - { - "aliases": [ - "ApexLog", - "DebugLog" - ], - "extensions": [ - ".log" - ], - "firstLine": "^\\d{2}.*APEX_CODE,FINEST;.*VISUALFORCE,(FINER|FINEST);.*", - "id": "apexlog" - } - ], - "menus": { - "commandPalette": [ - { - "command": "sf.create.checkpoints", - "when": "sf:project_opened && sf:has_target_org" - }, - { - "command": "sf.toggle.checkpoint", - "when": "sf:project_opened && editorLangId == 'apex'" - }, - { - "command": "sf.launch.replay.debugger.last.logfile", - "when": "sf:project_opened && !inDebugMode" - }, - { - "command": "sf.test.view.debugTests", - "when": "false" - }, - { - "command": "sf.test.view.debugSingleTest", - "when": "false" - } - ], - "view/item/context": [ - { - "command": "sf.test.view.debugTests", - "group": "inline", - "when": "view == sf.test.view && viewItem =~ /apexTestGroup/" - }, - { - "command": "sf.test.view.debugSingleTest", - "group": "inline", - "when": "view == sf.test.view && viewItem =~ /(apexTest)(_.*|\\b)/" - } - ], - "view/title": [ - { - "command": "sf.create.checkpoints", - "group": "navigation", - "when": "view == sf.view.checkpoint && sf:project_opened" - } - ] - }, - "views": { - "debug": [ - { - "id": "sf.view.checkpoint", - "name": "%view_checkpoints%", - "when": "sf:project_opened" - } - ] - } - }, "dependencies": { "@salesforce/apex-node": "6.0.0", "@salesforce/core": "7.3.1", @@ -189,7 +33,6 @@ "request-light": "^0.7.0", "vscode-extension-telemetry": "0.0.17" }, - "description": "Replay Apex execution from Apex Debug Log", "devDependencies": { "@salesforce/salesforcedx-test-utils-vscode": "60.13.0", "@salesforce/ts-sinon": "1.4.0", @@ -216,22 +59,34 @@ "prettier": "3.0.3", "sinon": "^13.0.1" }, - "displayName": "Apex Replay Debugger", - "engines": { - "vscode": "^1.82.0" - }, "extensionDependencies": [ "salesforce.salesforcedx-vscode-apex", "salesforce.salesforcedx-vscode-core" ], - "galleryBanner": { - "color": "#ECECEC", - "theme": "light" + "scripts": { + "bundle:extension": "npm run bundle:extension:build && npm run bundle:extension:copy", + "bundle:extension:copy": "cp ../salesforcedx-apex-replay-debugger/dist/apexreplaydebug.js ./dist/", + "bundle:extension:build": "node ./esbuild.config.js", + "vscode:prepublish": "npm prune --production", + "vscode:package": "ts-node ../../scripts/vsce-bundled-extension.ts", + "vscode:sha256": "node ../../scripts/generate-sha256.js >> ../../SHA256", + "vscode:publish": "node ../../scripts/publish-vsix.js", + "compile": "tsc -p ./", + "lint": "eslint .", + "lint:fix": "npm run lint -- --fix", + "watch": "tsc -watch -p .", + "clean": "shx rm -rf node_modules && shx rm -rf out && shx rm -rf coverage && shx rm -rf .nyc_output", + "test": "npm run test:vscode-integration", + "test:unit": "jest --coverage", + "test:vscode-integration": "node ../../scripts/run-vscode-integration-tests-with-top-level-extensions", + "test:vscode-insiders-integration": "cross-env CODE_VERSION=insiders npm run test:vscode-integration" }, - "icon": "images/VSCodeApexReplayDebugger.png", - "license": "BSD-3-Clause", + "activationEvents": [ + "onDebugResolve:apex", + "onCommand:extension.replay-debugger.getLogFileName", + "workspaceContains:sfdx-project.json" + ], "main": "./out/src", - "name": "salesforcedx-vscode-apex-replay-debugger", "packaging": { "assets": [ "OSSREADME.json", @@ -248,37 +103,182 @@ "./dist/apexreplaydebug.js" ], "packageUpdates": { + "main": "dist/index.js", "dependencies": { "@salesforce/core": "7.3.1", "@salesforce/source-tracking": "6.0.4", "applicationinsights": "1.0.7" }, - "devDependencies": {}, - "main": "dist/index.js" + "devDependencies": {} } }, - "publisher": "salesforce", - "qna": "https://github.com/forcedotcom/salesforcedx-vscode/issues", - "repository": { - "url": "https://github.com/forcedotcom/salesforcedx-vscode" - }, - "scripts": { - "bundle:extension": "npm run bundle:extension:build && npm run bundle:extension:copy", - "bundle:extension:build": "node ./esbuild.config.js", - "bundle:extension:copy": "cp ../salesforcedx-apex-replay-debugger/dist/apexreplaydebug.js ./dist/", - "clean": "shx rm -rf node_modules && shx rm -rf out && shx rm -rf coverage && shx rm -rf .nyc_output", - "compile": "tsc -p ./", - "lint": "eslint .", - "lint:fix": "npm run lint -- --fix", - "test": "npm run test:vscode-integration", - "test:unit": "jest --coverage", - "test:vscode-insiders-integration": "cross-env CODE_VERSION=insiders npm run test:vscode-integration", - "test:vscode-integration": "node ../../scripts/run-vscode-integration-tests-with-top-level-extensions", - "vscode:package": "ts-node ../../scripts/vsce-bundled-extension.ts", - "vscode:prepublish": "npm prune --production", - "vscode:publish": "node ../../scripts/publish-vsix.js", - "vscode:sha256": "node ../../scripts/generate-sha256.js >> ../../SHA256", - "watch": "tsc -watch -p ." - }, - "version": "60.13.0" + "contributes": { + "breakpoints": [ + { + "language": "apex" + } + ], + "languages": [ + { + "id": "apexlog", + "aliases": [ + "ApexLog", + "DebugLog" + ], + "extensions": [ + ".log" + ], + "firstLine": "^\\d{2}.*APEX_CODE,FINEST;.*VISUALFORCE,(FINER|FINEST);.*" + } + ], + "grammars": [ + { + "language": "apexlog", + "scopeName": "text.log", + "path": "./syntaxes/apexlog.tmLanguage.json" + } + ], + "menus": { + "commandPalette": [ + { + "command": "sf.create.checkpoints", + "when": "sf:project_opened && sf:has_target_org" + }, + { + "command": "sf.toggle.checkpoint", + "when": "sf:project_opened && editorLangId == 'apex'" + }, + { + "command": "sf.launch.replay.debugger.last.logfile", + "when": "sf:project_opened && !inDebugMode" + }, + { + "command": "sf.test.view.debugTests", + "when": "false" + }, + { + "command": "sf.test.view.debugSingleTest", + "when": "false" + } + ], + "view/title": [ + { + "command": "sf.create.checkpoints", + "when": "view == sf.view.checkpoint && sf:project_opened", + "group": "navigation" + } + ], + "view/item/context": [ + { + "command": "sf.test.view.debugTests", + "when": "view == sf.test.view && viewItem =~ /apexTestGroup/", + "group": "inline" + }, + { + "command": "sf.test.view.debugSingleTest", + "when": "view == sf.test.view && viewItem =~ /(apexTest)(_.*|\\b)/", + "group": "inline" + } + ] + }, + "commands": [ + { + "command": "sf.toggle.checkpoint", + "title": "%sf_toggle_checkpoint%" + }, + { + "command": "sf.create.checkpoints", + "title": "%sf_update_checkpoints_in_org%", + "icon": { + "light": "images/light/cloud-upload.svg", + "dark": "images/dark/cloud-upload.svg" + }, + "when": "sf:project_opened" + }, + { + "command": "sf.launch.replay.debugger.last.logfile", + "title": "%launch_from_last_log_file%" + }, + { + "command": "sf.test.view.debugTests", + "title": "%run_tests_and_debug%", + "icon": { + "light": "resources/light/debug.svg", + "dark": "resources/dark/debug.svg" + } + }, + { + "command": "sf.test.view.debugSingleTest", + "title": "%run_single_test_and_debug%", + "icon": { + "light": "resources/light/debug.svg", + "dark": "resources/dark/debug.svg" + } + } + ], + "views": { + "debug": [ + { + "id": "sf.view.checkpoint", + "name": "%view_checkpoints%", + "when": "sf:project_opened" + } + ] + }, + "debuggers": [ + { + "type": "apex-replay", + "label": "Apex Replay Debugger", + "program": "./node_modules/@salesforce/salesforcedx-apex-replay-debugger/out/src/adapter/apexReplayDebug.js", + "runtime": "node", + "languages": [ + "apex" + ], + "variables": { + "AskForLogFileName": "extension.replay-debugger.getLogFileName" + }, + "configurationSnippets": [ + { + "label": "%launch_snippet_label_text%", + "description": "%launch_snippet_description_text%", + "body": { + "name": "%launch_snippet_name%", + "type": "apex-replay", + "request": "launch", + "logFile": "^\"\\${command:AskForLogFileName}\"", + "stopOnEntry": true, + "trace": true + } + } + ], + "configurationAttributes": { + "launch": { + "properties": { + "required": [ + "logFile" + ], + "logFile": { + "type": "string", + "description": "%logfile_text%", + "default": "${command:AskForLogFileName}" + }, + "stopOnEntry": { + "type": "boolean", + "description": "%stop_on_entry_text%", + "default": true + }, + "trace": { + "type": [ + "boolean", + "string" + ], + "description": "%trace_text%", + "default": false + } + } + } + } + } + ] + } } diff --git a/packages/salesforcedx-vscode-apex/package.json b/packages/salesforcedx-vscode-apex/package.json index d6e563864a..2d503f165e 100644 --- a/packages/salesforcedx-vscode-apex/package.json +++ b/packages/salesforcedx-vscode-apex/package.json @@ -1,14 +1,245 @@ { - "activationEvents": [ - "workspaceContains:sfdx-project.json" - ], + "name": "salesforcedx-vscode-apex", + "displayName": "Apex", + "description": "Provides code-editing features for the Apex programming language", + "qna": "https://github.com/forcedotcom/salesforcedx-vscode/issues", "bugs": { "url": "https://github.com/forcedotcom/salesforcedx-vscode/issues" }, + "repository": { + "url": "https://github.com/forcedotcom/salesforcedx-vscode" + }, + "icon": "images/VSCodeApex.png", + "galleryBanner": { + "color": "#ECECEC", + "theme": "light" + }, + "version": "60.13.0", + "publisher": "salesforce", + "license": "BSD-3-Clause", + "engines": { + "vscode": "^1.82.0" + }, "categories": [ "Programming Languages" ], + "dependencies": { + "@salesforce/apex-node": "6.0.0", + "@salesforce/apex-tmlanguage": "1.8.0", + "@salesforce/core": "7.3.1", + "@salesforce/salesforcedx-utils-vscode": "60.13.0", + "expand-home-dir": "0.0.3", + "find-java-home": "0.2.0", + "shelljs": "0.8.5", + "vscode-extension-telemetry": "0.0.17", + "vscode-languageclient": "8.1.0" + }, + "devDependencies": { + "@salesforce/salesforcedx-test-utils-vscode": "60.13.0", + "@salesforce/ts-sinon": "1.4.0", + "@types/chai": "4.3.3", + "@types/mocha": "^5", + "@types/node": "^18.11.9", + "@types/shelljs": "^0.7.8", + "@types/sinon": "^2.3.7", + "@types/vscode": "^1.61.2", + "@typescript-eslint/eslint-plugin": "6.9.0", + "@typescript-eslint/parser": "6.9.0", + "chai": "^4.0.2", + "cross-env": "5.2.0", + "esbuild": "^0.19.5", + "eslint": "8.52.0", + "eslint-config-prettier": "9.0.0", + "eslint-plugin-header": "3.1.1", + "eslint-plugin-import": "2.29.0", + "eslint-plugin-jest": "27.5.0", + "eslint-plugin-jest-formatting": "3.1.0", + "eslint-plugin-jsdoc": "46.8.2", + "eslint-plugin-prefer-arrow": "1.2.3", + "mocha": "^10", + "prettier": "3.0.3", + "sinon": "^13.0.1", + "typescript": "^5.2.2", + "vscode-extension-telemetry": "0.0.17" + }, + "extensionDependencies": [ + "salesforce.salesforcedx-vscode-core" + ], + "scripts": { + "bundle:extension": "npm run bundle:extension:build && npm run bundle:extension:copy", + "bundle:extension:copy": "cp ./out/apex-jorje-lsp.jar ./dist/", + "bundle:extension:build": "node ./esbuild.config.js", + "vscode:package": "ts-node ../../scripts/vsce-bundled-extension.ts", + "vscode:sha256": "node ../../scripts/generate-sha256.js >> ../../SHA256", + "vscode:publish": "node ../../scripts/publish-vsix.js", + "compile": "tsc -p ./", + "lint": "eslint .", + "lint:fix": "npm run lint -- --fix", + "watch": "tsc -watch -p .", + "clean": "shx rm -rf node_modules && cd out && node ../../../scripts/clean-all-but-jar.js && shx rm -rf coverage && shx rm -rf .nyc_output", + "copy:files": "shx cp -R ../../node_modules/@salesforce/apex-tmlanguage/grammars .", + "test": "npm run test:vscode-integration", + "test:unit": "jest --coverage", + "test:vscode-integration": "node ../../scripts/run-vscode-integration-tests-with-top-level-extensions", + "test:vscode-insiders-integration": "cross-env CODE_VERSION=insiders npm run test:vscode-integration" + }, + "packaging": { + "assets": [ + "License.txt", + "package.nls.ja.json", + "package.nls.json", + "README.md", + ".vscodeignore", + "OSSREADME.json", + "grammars", + "resources", + "snippets", + "syntaxes", + "images", + "dist" + ], + "packageUpdates": { + "main": "dist/index.js", + "languageServerDir": "dist", + "dependencies": { + "@salesforce/apex-tmlanguage": "1.4.0", + "@salesforce/core": "7.3.1", + "@salesforce/source-tracking": "6.0.4", + "@salesforce/templates": "^60.1.2", + "applicationinsights": "1.0.7", + "shelljs": "0.8.5" + }, + "devDependencies": {} + } + }, + "activationEvents": [ + "workspaceContains:sfdx-project.json" + ], + "main": "./out/src", + "languageServerDir": "out", "contributes": { + "viewsContainers": { + "activitybar": [ + { + "id": "test", + "title": "%test_view_container_title%", + "icon": "media/dep.svg" + } + ] + }, + "views": { + "test": [ + { + "id": "sf.test.view", + "name": "%test_view_name%", + "when": "sf:project_opened" + } + ] + }, + "menus": { + "view/title": [ + { + "command": "sf.test.view.run", + "when": "view == sf.test.view", + "group": "navigation" + }, + { + "command": "sf.test.view.refresh", + "when": "view == sf.test.view", + "group": "navigation" + } + ], + "view/item/context": [ + { + "command": "sf.test.view.showError", + "when": "view == sf.test.view && viewItem =~ /(apexTest|apexTestGroup)_Fail/" + }, + { + "command": "sf.test.view.goToDefinition", + "when": "view == sf.test.view && viewItem =~ /(apexTest|apexTestGroup)(_Pass|_Skip|\\b)/" + }, + { + "command": "sf.test.view.runClassTests", + "when": "view == sf.test.view && viewItem =~ /apexTestGroup/", + "group": "inline" + }, + { + "command": "sf.test.view.runSingleTest", + "when": "view == sf.test.view && viewItem =~ /(apexTest)(_.*|\\b)/", + "group": "inline" + } + ], + "commandPalette": [ + { + "command": "sf.anon.apex.execute.selection", + "when": "sf:project_opened && editorHasSelection && sf:has_target_org" + }, + { + "command": "sf.anon.apex.execute.document", + "when": "sf:project_opened && !editorHasSelection && sf:has_target_org" + }, + { + "command": "sf.apex.log.get", + "when": "sf:project_opened && sf:has_target_org" + }, + { + "command": "sf.apex.test.last.class.run", + "when": "sf:project_opened && sf:has_cached_test_class && sf:has_target_org" + }, + { + "command": "sf.apex.test.class.run", + "when": "false" + }, + { + "command": "sf.apex.test.method.run", + "when": "false" + }, + { + "command": "sf.apex.test.last.method.run", + "when": "sf:project_opened && sf:has_cached_test_method && sf:has_target_org" + }, + { + "command": "sf.apex.test.run", + "when": "sf:project_opened && sf:has_target_org" + }, + { + "command": "sf.apex.test.suite.run", + "when": "sf:project_opened && sf:has_target_org" + }, + { + "command": "sf.apex.test.suite.create", + "when": "sf:project_opened && sf:has_target_org" + }, + { + "command": "sf.apex.test.suite.add", + "when": "sf:project_opened && sf:has_target_org" + }, + { + "command": "sf.test.view.runClassTests", + "when": "false" + }, + { + "command": "sf.test.view.runSingleTest", + "when": "false" + }, + { + "command": "sf.test.view.goToDefinition", + "when": "false" + }, + { + "command": "sf.test.view.showError", + "when": "false" + }, + { + "command": "sf.test.view.run", + "when": "false" + }, + { + "command": "sf.test.view.refresh", + "when": "false" + } + ] + }, "commands": [ { "command": "sf.anon.apex.execute.document", @@ -40,51 +271,51 @@ }, { "command": "sf.test.view.run", + "title": "%run_tests_title%", "icon": { - "dark": "resources/dark/play-button.svg", - "light": "resources/light/play-button.svg" - }, - "title": "%run_tests_title%" + "light": "resources/light/play-button.svg", + "dark": "resources/dark/play-button.svg" + } }, { "command": "sf.test.view.refresh", + "title": "%refresh_test_title%", "icon": { - "dark": "resources/dark/refresh.svg", - "light": "resources/light/refresh.svg" - }, - "title": "%refresh_test_title%" + "light": "resources/light/refresh.svg", + "dark": "resources/dark/refresh.svg" + } }, { "command": "sf.test.view.showError", + "title": "%show_error_title%", "icon": { - "dark": "resources/dark/document/notRun.svg", - "light": "resources/light/document/notRun.svg" - }, - "title": "%show_error_title%" + "light": "resources/light/document/notRun.svg", + "dark": "resources/dark/document/notRun.svg" + } }, { "command": "sf.test.view.goToDefinition", + "title": "%go_to_definition_title%", "icon": { - "dark": "resources/dark/document/notRun.svg", - "light": "resources/light/document/notRun.svg" - }, - "title": "%go_to_definition_title%" + "light": "resources/light/document/notRun.svg", + "dark": "resources/dark/document/notRun.svg" + } }, { "command": "sf.test.view.runClassTests", + "title": "%run_tests_title%", "icon": { - "dark": "resources/dark/play-button.svg", - "light": "resources/light/play-button.svg" - }, - "title": "%run_tests_title%" + "light": "resources/light/play-button.svg", + "dark": "resources/dark/play-button.svg" + } }, { "command": "sf.test.view.runSingleTest", + "title": "%run_single_test_title%", "icon": { - "dark": "resources/dark/play-button.svg", - "light": "resources/light/play-button.svg" - }, - "title": "%run_single_test_title%" + "light": "resources/light/play-button.svg", + "dark": "resources/dark/play-button.svg" + } }, { "command": "sf.apex.test.last.class.run", @@ -104,328 +335,97 @@ } ], "configuration": { + "type": "object", + "title": "%configuration_title%", "properties": { + "salesforcedx-vscode-apex.java.home": { + "type": "string", + "default": null, + "markdownDescription": "%java_home_description%" + }, + "salesforcedx-vscode-apex.java.memory": { + "type": [ + "integer", + "null" + ], + "minimum": 0, + "default": null, + "description": "%java_memory_description%" + }, + "salesforcedx-vscode-apex.enable-semantic-errors": { + "type": "boolean", + "default": false, + "description": "%apex_semantic_errors_description%" + }, + "salesforcedx-vscode-apex.advanced.enable-completion-statistics": { + "type": "boolean", + "default": false, + "description": "%apex_code_completion_stats_description%" + }, "apex.trace.server": { - "default": "off", - "description": "%apex_trace_server_description%", + "type": "string", "enum": [ "verbose", "messages", "off" ], + "default": "off", + "description": "%apex_trace_server_description%", "enumDescriptions": [ "%apex_verbose_level_trace_description%", "%apex_messages_level_trace_description%", "%apex_off_level_trace_description%" - ], - "type": "string" - }, - "salesforcedx-vscode-apex.advanced.enable-completion-statistics": { - "default": false, - "description": "%apex_code_completion_stats_description%", - "type": "boolean" + ] }, "salesforcedx-vscode-apex.disable-warnings-for-missing-coverage": { + "type": "boolean", "default": false, - "description": "%apex_code_disable-warnings-for-missing-coverage%", - "type": "boolean" - }, - "salesforcedx-vscode-apex.enable-semantic-errors": { - "default": false, - "description": "%apex_semantic_errors_description%", - "type": "boolean" - }, - "salesforcedx-vscode-apex.java.home": { - "default": null, - "markdownDescription": "%java_home_description%", - "type": "string" - }, - "salesforcedx-vscode-apex.java.memory": { - "default": null, - "description": "%java_memory_description%", - "minimum": 0, - "type": [ - "integer", - "null" - ] + "description": "%apex_code_disable-warnings-for-missing-coverage%" } - }, - "title": "%configuration_title%", - "type": "object" - }, - "grammars": [ - { - "language": "apex", - "path": "./grammars/apex.tmLanguage", - "scopeName": "source.apex" - }, - { - "language": "apex-anon", - "path": "./grammars/apex.tmLanguage", - "scopeName": "source.apex" } - ], + }, "languages": [ { + "id": "apex", "aliases": [ "Apex", "apex" ], - "configuration": "./syntaxes/apex.configuration.json", "extensions": [ ".cls", ".trigger", ".soql" ], - "id": "apex" + "configuration": "./syntaxes/apex.configuration.json" }, { + "id": "apex-anon", "aliases": [ "Anonymous Apex" ], - "configuration": "./syntaxes/apex.configuration.json", "extensions": [ ".apex" ], - "id": "apex-anon" + "configuration": "./syntaxes/apex.configuration.json" + } + ], + "grammars": [ + { + "language": "apex", + "scopeName": "source.apex", + "path": "./grammars/apex.tmLanguage" + }, + { + "language": "apex-anon", + "scopeName": "source.apex", + "path": "./grammars/apex.tmLanguage" } ], - "menus": { - "commandPalette": [ - { - "command": "sf.anon.apex.execute.selection", - "when": "sf:project_opened && editorHasSelection && sf:has_target_org" - }, - { - "command": "sf.anon.apex.execute.document", - "when": "sf:project_opened && !editorHasSelection && sf:has_target_org" - }, - { - "command": "sf.apex.log.get", - "when": "sf:project_opened && sf:has_target_org" - }, - { - "command": "sf.apex.test.last.class.run", - "when": "sf:project_opened && sf:has_cached_test_class && sf:has_target_org" - }, - { - "command": "sf.apex.test.class.run", - "when": "false" - }, - { - "command": "sf.apex.test.method.run", - "when": "false" - }, - { - "command": "sf.apex.test.last.method.run", - "when": "sf:project_opened && sf:has_cached_test_method && sf:has_target_org" - }, - { - "command": "sf.apex.test.run", - "when": "sf:project_opened && sf:has_target_org" - }, - { - "command": "sf.apex.test.suite.run", - "when": "sf:project_opened && sf:has_target_org" - }, - { - "command": "sf.apex.test.suite.create", - "when": "sf:project_opened && sf:has_target_org" - }, - { - "command": "sf.apex.test.suite.add", - "when": "sf:project_opened && sf:has_target_org" - }, - { - "command": "sf.test.view.runClassTests", - "when": "false" - }, - { - "command": "sf.test.view.runSingleTest", - "when": "false" - }, - { - "command": "sf.test.view.goToDefinition", - "when": "false" - }, - { - "command": "sf.test.view.showError", - "when": "false" - }, - { - "command": "sf.test.view.run", - "when": "false" - }, - { - "command": "sf.test.view.refresh", - "when": "false" - } - ], - "view/item/context": [ - { - "command": "sf.test.view.showError", - "when": "view == sf.test.view && viewItem =~ /(apexTest|apexTestGroup)_Fail/" - }, - { - "command": "sf.test.view.goToDefinition", - "when": "view == sf.test.view && viewItem =~ /(apexTest|apexTestGroup)(_Pass|_Skip|\\b)/" - }, - { - "command": "sf.test.view.runClassTests", - "group": "inline", - "when": "view == sf.test.view && viewItem =~ /apexTestGroup/" - }, - { - "command": "sf.test.view.runSingleTest", - "group": "inline", - "when": "view == sf.test.view && viewItem =~ /(apexTest)(_.*|\\b)/" - } - ], - "view/title": [ - { - "command": "sf.test.view.run", - "group": "navigation", - "when": "view == sf.test.view" - }, - { - "command": "sf.test.view.refresh", - "group": "navigation", - "when": "view == sf.test.view" - } - ] - }, "snippets": [ { "language": "apex", "path": "./snippets/apex.json" } - ], - "views": { - "test": [ - { - "id": "sf.test.view", - "name": "%test_view_name%", - "when": "sf:project_opened" - } - ] - }, - "viewsContainers": { - "activitybar": [ - { - "icon": "media/dep.svg", - "id": "test", - "title": "%test_view_container_title%" - } - ] - } - }, - "dependencies": { - "@salesforce/apex-node": "6.0.0", - "@salesforce/apex-tmlanguage": "1.8.0", - "@salesforce/core": "7.3.1", - "@salesforce/salesforcedx-utils-vscode": "60.13.0", - "expand-home-dir": "0.0.3", - "find-java-home": "0.2.0", - "shelljs": "0.8.5", - "vscode-extension-telemetry": "0.0.17", - "vscode-languageclient": "8.1.0" - }, - "description": "Provides code-editing features for the Apex programming language", - "devDependencies": { - "@salesforce/salesforcedx-test-utils-vscode": "60.13.0", - "@salesforce/ts-sinon": "1.4.0", - "@types/chai": "4.3.3", - "@types/mocha": "^5", - "@types/node": "^18.11.9", - "@types/shelljs": "^0.7.8", - "@types/sinon": "^2.3.7", - "@types/vscode": "^1.61.2", - "@typescript-eslint/eslint-plugin": "6.9.0", - "@typescript-eslint/parser": "6.9.0", - "chai": "^4.0.2", - "cross-env": "5.2.0", - "esbuild": "^0.19.5", - "eslint": "8.52.0", - "eslint-config-prettier": "9.0.0", - "eslint-plugin-header": "3.1.1", - "eslint-plugin-import": "2.29.0", - "eslint-plugin-jest": "27.5.0", - "eslint-plugin-jest-formatting": "3.1.0", - "eslint-plugin-jsdoc": "46.8.2", - "eslint-plugin-prefer-arrow": "1.2.3", - "mocha": "^10", - "prettier": "3.0.3", - "sinon": "^13.0.1", - "typescript": "^5.2.2", - "vscode-extension-telemetry": "0.0.17" - }, - "displayName": "Apex", - "engines": { - "vscode": "^1.82.0" - }, - "extensionDependencies": [ - "salesforce.salesforcedx-vscode-core" - ], - "galleryBanner": { - "color": "#ECECEC", - "theme": "light" - }, - "icon": "images/VSCodeApex.png", - "languageServerDir": "out", - "license": "BSD-3-Clause", - "main": "./out/src", - "name": "salesforcedx-vscode-apex", - "packaging": { - "assets": [ - "License.txt", - "package.nls.ja.json", - "package.nls.json", - "README.md", - ".vscodeignore", - "OSSREADME.json", - "grammars", - "resources", - "snippets", - "syntaxes", - "images", - "dist" - ], - "packageUpdates": { - "dependencies": { - "@salesforce/apex-tmlanguage": "1.4.0", - "@salesforce/core": "7.3.1", - "@salesforce/source-tracking": "6.0.4", - "@salesforce/templates": "^60.1.2", - "applicationinsights": "1.0.7", - "shelljs": "0.8.5" - }, - "devDependencies": {}, - "languageServerDir": "dist", - "main": "dist/index.js" - } - }, - "publisher": "salesforce", - "qna": "https://github.com/forcedotcom/salesforcedx-vscode/issues", - "repository": { - "url": "https://github.com/forcedotcom/salesforcedx-vscode" - }, - "scripts": { - "bundle:extension": "npm run bundle:extension:build && npm run bundle:extension:copy", - "bundle:extension:build": "node ./esbuild.config.js", - "bundle:extension:copy": "cp ./out/apex-jorje-lsp.jar ./dist/", - "clean": "shx rm -rf node_modules && cd out && node ../../../scripts/clean-all-but-jar.js && shx rm -rf coverage && shx rm -rf .nyc_output", - "compile": "tsc -p ./", - "copy:files": "shx cp -R ../../node_modules/@salesforce/apex-tmlanguage/grammars .", - "lint": "eslint .", - "lint:fix": "npm run lint -- --fix", - "test": "npm run test:vscode-integration", - "test:unit": "jest --coverage", - "test:vscode-insiders-integration": "cross-env CODE_VERSION=insiders npm run test:vscode-integration", - "test:vscode-integration": "node ../../scripts/run-vscode-integration-tests-with-top-level-extensions", - "vscode:package": "ts-node ../../scripts/vsce-bundled-extension.ts", - "vscode:publish": "node ../../scripts/publish-vsix.js", - "vscode:sha256": "node ../../scripts/generate-sha256.js >> ../../SHA256", - "watch": "tsc -watch -p ." - }, - "version": "60.13.0" + ] + } } diff --git a/packages/salesforcedx-vscode-lwc/package.json b/packages/salesforcedx-vscode-lwc/package.json index a888c9eae3..1416384600 100644 --- a/packages/salesforcedx-vscode-lwc/package.json +++ b/packages/salesforcedx-vscode-lwc/package.json @@ -1,183 +1,247 @@ { - "activationEvents": [ - "workspaceContains:sfdx-project.json", - "workspaceContains:../workspace-user.xml", - "workspaceContains:**/workspace-user.xml" - ], + "name": "salesforcedx-vscode-lwc", + "displayName": "Lightning Web Components", + "description": "Provides code-editing features for Lightning Web Components", + "qna": "https://github.com/forcedotcom/salesforcedx-vscode/issues", "bugs": { "url": "https://github.com/forcedotcom/salesforcedx-vscode/issues" }, + "repository": { + "url": "https://github.com/forcedotcom/salesforcedx-vscode" + }, + "icon": "images/VSCodeLWC.png", + "galleryBanner": { + "color": "#ECECEC", + "theme": "light" + }, + "version": "60.13.0", + "publisher": "salesforce", + "license": "BSD-3-Clause", + "engines": { + "vscode": "^1.82.0" + }, "categories": [ "Programming Languages" ], - "contributes": { - "commands": [ - { - "command": "sf.lightning.lwc.start", - "title": "%lightning_lwc_start_text%" - }, - { - "command": "sf.lightning.lwc.stop", - "title": "%lightning_lwc_stop_text%" - }, - { - "command": "sf.lightning.lwc.open", - "title": "%lightning_lwc_open_text%" + "dependencies": { + "@salesforce/core": "7.3.1", + "@salesforce/eslint-config-lwc": "3.5.1", + "@salesforce/lightning-lsp-common": "4.8.0", + "@salesforce/lwc-language-server": "4.8.0", + "@salesforce/salesforcedx-utils-vscode": "60.13.0", + "ajv": "6.12.6", + "applicationinsights": "1.0.7", + "jest-editor-support": "^30.1.0", + "jest-regex-util": "^24.9.0", + "rxjs": "^5.4.1", + "strip-ansi": "^5.2.0", + "uuid": "^3.3.3", + "vscode-extension-telemetry": "0.0.17", + "vscode-languageclient": "^5.2.1" + }, + "devDependencies": { + "@salesforce/salesforcedx-test-utils-vscode": "60.13.0", + "@types/chai": "4.3.3", + "@types/mocha": "^5", + "@types/node": "^18.11.9", + "@types/sinon": "^7.5.2", + "@types/uuid": "^3.4.8", + "@types/vscode": "^1.61.2", + "@types/which": "^1.3.1", + "@typescript-eslint/eslint-plugin": "6.9.0", + "@typescript-eslint/parser": "6.9.0", + "chai": "^4.0.2", + "cross-env": "5.2.0", + "esbuild": "^0.19.5", + "eslint": "8.52.0", + "eslint-config-prettier": "9.0.0", + "eslint-plugin-header": "3.1.1", + "eslint-plugin-import": "2.29.0", + "eslint-plugin-jest": "27.5.0", + "eslint-plugin-jest-formatting": "3.1.0", + "eslint-plugin-jsdoc": "46.8.2", + "eslint-plugin-prefer-arrow": "1.2.3", + "mocha": "^10", + "mocha-junit-reporter": "^1.23.3", + "mocha-multi-reporters": "^1.1.7", + "nyc": "^15", + "prettier": "3.0.3", + "sinon": "^13.0.1", + "sinon-chai": "^3.7.0", + "ts-sinon": "^1.0.25", + "typescript": "^5.2.2", + "vscode-uri": "^1.0.8", + "which": "1.3.1" + }, + "extensionDependencies": [ + "dbaeumer.vscode-eslint", + "salesforce.salesforcedx-vscode-core" + ], + "scripts": { + "bundle:extension": "node ./esbuild.config.js", + "vscode:prepublish": "npm prune --production", + "vscode:package": "ts-node ../../scripts/vsce-bundled-extension.ts", + "vscode:sha256": "node ../../scripts/generate-sha256.js >> ../../SHA256", + "vscode:publish": "node ../../scripts/publish-vsix.js", + "compile": "tsc -p ./", + "lint": "eslint .", + "lint:fix": "npm run lint -- --fix", + "watch": "tsc -watch -p .", + "clean": "shx rm -rf node_modules && shx rm -rf out && shx rm -rf coverage && shx rm -rf .nyc_output", + "test": "npm run test:unit && npm run test:vscode-integration", + "test:unit": "jest --coverage", + "test:vscode-integration": "node ../../scripts/download-vscode && node ../../scripts/install-vsix-dependencies dbaeumer.vscode-eslint && node ../../scripts/run-tests-with-recipes", + "test:vscode-insiders-integration": "cross-env CODE_VERSION=insiders npm run test:vscode-integration" + }, + "packaging": { + "assets": [ + "LICENSE.txt", + "package.nls.ja.json", + "package.nls.json", + "README.md", + ".vscodeignore", + "images", + "resources", + "snippets", + "dist" + ], + "packageUpdates": { + "main": "dist/index.js", + "serverPath": [ + "node_modules", + "@salesforce", + "lwc-language-server", + "lib", + "server.js" + ], + "dependencies": { + "@salesforce/core": "7.3.1", + "@salesforce/lightning-lsp-common": "4.8.0", + "@salesforce/lwc-language-server": "4.8.0", + "@salesforce/source-tracking": "6.0.4", + "applicationinsights": "1.0.7" }, + "devDependencies": {} + } + }, + "activationEvents": [ + "workspaceContains:sfdx-project.json", + "workspaceContains:../workspace-user.xml", + "workspaceContains:**/workspace-user.xml" + ], + "main": "./out/src", + "serverPath": [ + "..", + "..", + "node_modules", + "@salesforce", + "lwc-language-server", + "lib", + "server.js" + ], + "contributes": { + "snippets": [ { - "command": "sf.lightning.lwc.preview", - "title": "%lightning_lwc_preview_text%" + "language": "javascript", + "path": "./snippets/lwc-js.json" }, { - "command": "sf.lightning.lwc.test.runAllTests", - "icon": { - "dark": "resources/dark/play-button.svg", - "light": "resources/light/play-button.svg" + "language": "html", + "path": "./snippets/lwc-html.json" + } + ], + "views": { + "test": [ + { + "id": "sf.lightning.lwc.test.view", + "when": "sf:project_opened || sf:internal_dev", + "name": "%lightning_lwc_test_view_name%" + } + ] + }, + "menus": { + "editor/context": [ + { + "command": "sf.lightning.lwc.preview", + "when": "sf:project_opened && resource =~ /.*\\/lwc\\/[^\\/]+(\\/[^\\/]+\\.(html|css|js))?$/" + } + ], + "editor/title": [ + { + "command": "sf.lightning.lwc.test.editorTitle.run", + "when": "sf:lwc_jest_file_focused", + "group": "navigation" }, - "title": "%lightning_lwc_test_run_all_tests_text%" - }, - { - "command": "sf.lightning.lwc.test.refreshTestExplorer", - "icon": { - "dark": "resources/dark/refresh.svg", - "light": "resources/light/refresh.svg" + { + "command": "sf.lightning.lwc.test.editorTitle.debug", + "when": "sf:lwc_jest_file_focused", + "group": "navigation" }, - "title": "%lightning_lwc_test_refresh_test_explorer_text%" - }, - { - "command": "sf.lightning.lwc.test.navigateToTest", - "title": "%lightning_lwc_test_navigate_to_test%" - }, - { - "command": "sf.lightning.lwc.test.file.run", - "icon": { - "dark": "resources/dark/play-button.svg", - "light": "resources/light/play-button.svg" + { + "command": "sf.lightning.lwc.test.editorTitle.startWatching", + "when": "sf:lwc_jest_file_focused && !sf:lwc_jest_is_watching_focused_file", + "group": "navigation" }, - "title": "%lightning_lwc_test_file_run_text%" - }, - { - "command": "sf.lightning.lwc.test.file.debug", - "icon": { - "dark": "resources/dark/debug.svg", - "light": "resources/light/debug.svg" + { + "command": "sf.lightning.lwc.test.editorTitle.stopWatching", + "when": "sf:lwc_jest_file_focused && sf:lwc_jest_is_watching_focused_file", + "group": "navigation" + } + ], + "editor/title/context": [ + { + "command": "sf.lightning.lwc.preview", + "when": "sf:project_opened && resource =~ /.*\\/lwc\\/[^\\/]+(\\/[^\\/]+\\.(html|css|js))?$/" + } + ], + "view/title": [ + { + "command": "sf.lightning.lwc.test.runAllTests", + "when": "view == sf.lightning.lwc.test.view", + "group": "navigation" }, - "title": "%lightning_lwc_test_file_debug_text%" - }, - { - "command": "sf.lightning.lwc.test.case.run", - "icon": { - "dark": "resources/dark/play-button.svg", - "light": "resources/light/play-button.svg" + { + "command": "sf.lightning.lwc.test.refreshTestExplorer", + "when": "view == sf.lightning.lwc.test.view", + "group": "navigation" + } + ], + "view/item/context": [ + { + "command": "sf.lightning.lwc.test.case.run", + "title": "%lightning_lwc_test_case_run_text%", + "when": "view == sf.lightning.lwc.test.view && viewItem =~ /(lwcTest)(_.*|\\b)/", + "group": "inline" }, - "title": "%lightning_lwc_test_case_run_text%" - }, - { - "command": "sf.lightning.lwc.test.case.debug", - "icon": { - "dark": "resources/dark/debug.svg", - "light": "resources/light/debug.svg" + { + "command": "sf.lightning.lwc.test.case.debug", + "title": "%lightning_lwc_test_case_debug_text%", + "when": "view == sf.lightning.lwc.test.view && viewItem =~ /(lwcTest)(_.*|\\b)/", + "group": "inline" }, - "title": "%lightning_lwc_test_case_debug_text%" - }, - { - "command": "sf.lightning.lwc.test.editorTitle.run", - "icon": { - "dark": "resources/dark/play-button.svg", - "light": "resources/light/play-button.svg" + { + "command": "sf.lightning.lwc.test.file.run", + "title": "%lightning_lwc_test_file_run_text%", + "when": "view == sf.lightning.lwc.test.view && viewItem =~ /(lwcTestGroup)(_.*|\\b)/", + "group": "inline" }, - "title": "%lightning_lwc_test_run_current_file_text%" - }, - { - "command": "sf.lightning.lwc.test.editorTitle.debug", - "icon": { - "dark": "resources/dark/debug.svg", - "light": "resources/light/debug.svg" - }, - "title": "%lightning_lwc_test_debug_current_file_text%" - }, - { - "command": "sf.lightning.lwc.test.editorTitle.startWatching", - "icon": { - "dark": "resources/dark/startWatching.svg", - "light": "resources/light/startWatching.svg" - }, - "title": "%lightning_lwc_test_start_watching_text%" - }, - { - "command": "sf.lightning.lwc.test.editorTitle.stopWatching", - "icon": { - "dark": "resources/dark/stopWatching.svg", - "light": "resources/light/stopWatching.svg" - }, - "title": "%lightning_lwc_test_stop_watching_text%" - }, - { - "command": "sf.lightning.lwc.test.stopWatchingAllTests", - "title": "%lightning_lwc_test_stop_watching_all_tests_text%" - } - ], - "configuration": { - "properties": { - "salesforcedx-vscode-lwc.preview.logLevel": { - "default": "warn", - "description": "%lightning_lwc_mobile_log_level%", - "enum": [ - "trace", - "debug", - "info", - "warn", - "error", - "fatal" - ], - "type": "string" - }, - "salesforcedx-vscode-lwc.preview.rememberDevice": { - "default": true, - "description": "%lightning_lwc_remember_device_description%", - "type": "boolean" - } - }, - "title": "%lightning_lwc_preferences%", - "type": "object" - }, - "debuggers": [ - { - "configurationSnippets": [ - { - "body": { - "args": [ - "--", - "--runInBand" - ], - "console": "integratedTerminal", - "cwd": "^\"\\${workspaceFolder}\"", - "disableOptimisticBPs": true, - "internalConsoleOptions": "neverOpen", - "name": "%lightning_lwc_debugger%", - "program": "^\"\\${workspaceFolder}/node_modules/.bin/sf-lwc-jest\"", - "request": "launch", - "type": "node", - "windows": { - "program": "^\"\\${workspaceFolder}/node_modules/@salesforce/sf-lwc-jest/bin/sf-lwc-jest\"" - } - }, - "description": "%lightning_lwc_debugger_desc%", - "label": "%lightning_lwc_debugger%" - } - ], - "label": "%lightning_lwc_debugger%", - "languages": [ - "javascript" - ], - "type": "vscode-lwc-tests" - } - ], - "menus": { - "commandPalette": [ - { - "command": "sf.lightning.lwc.start", - "when": "sf:project_opened" + { + "command": "sf.lightning.lwc.test.file.debug", + "title": "%lightning_lwc_test_file_debug_text%", + "when": "view == sf.lightning.lwc.test.view && viewItem =~ /(lwcTestGroup)(_.*|\\b)/", + "group": "inline" + } + ], + "explorer/context": [ + { + "command": "sf.lightning.lwc.preview", + "when": "sf:project_opened && resource =~ /.*\\/lwc\\/[^\\/]+(\\/[^\\/]+\\.(html|css|js))?$/" + } + ], + "commandPalette": [ + { + "command": "sf.lightning.lwc.start", + "when": "sf:project_opened" }, { "command": "sf.lightning.lwc.stop", @@ -239,265 +303,169 @@ "command": "sf.lightning.lwc.test.stopWatchingAllTests", "when": "sf:project_opened || sf:internal_dev" } - ], - "editor/context": [ - { - "command": "sf.lightning.lwc.preview", - "when": "sf:project_opened && resource =~ /.*\\/lwc\\/[^\\/]+(\\/[^\\/]+\\.(html|css|js))?$/" + ] + }, + "commands": [ + { + "command": "sf.lightning.lwc.start", + "title": "%lightning_lwc_start_text%" + }, + { + "command": "sf.lightning.lwc.stop", + "title": "%lightning_lwc_stop_text%" + }, + { + "command": "sf.lightning.lwc.open", + "title": "%lightning_lwc_open_text%" + }, + { + "command": "sf.lightning.lwc.preview", + "title": "%lightning_lwc_preview_text%" + }, + { + "command": "sf.lightning.lwc.test.runAllTests", + "title": "%lightning_lwc_test_run_all_tests_text%", + "icon": { + "light": "resources/light/play-button.svg", + "dark": "resources/dark/play-button.svg" } - ], - "editor/title": [ - { - "command": "sf.lightning.lwc.test.editorTitle.run", - "group": "navigation", - "when": "sf:lwc_jest_file_focused" - }, - { - "command": "sf.lightning.lwc.test.editorTitle.debug", - "group": "navigation", - "when": "sf:lwc_jest_file_focused" - }, - { - "command": "sf.lightning.lwc.test.editorTitle.startWatching", - "group": "navigation", - "when": "sf:lwc_jest_file_focused && !sf:lwc_jest_is_watching_focused_file" - }, - { - "command": "sf.lightning.lwc.test.editorTitle.stopWatching", - "group": "navigation", - "when": "sf:lwc_jest_file_focused && sf:lwc_jest_is_watching_focused_file" + }, + { + "command": "sf.lightning.lwc.test.refreshTestExplorer", + "title": "%lightning_lwc_test_refresh_test_explorer_text%", + "icon": { + "light": "resources/light/refresh.svg", + "dark": "resources/dark/refresh.svg" } - ], - "editor/title/context": [ - { - "command": "sf.lightning.lwc.preview", - "when": "sf:project_opened && resource =~ /.*\\/lwc\\/[^\\/]+(\\/[^\\/]+\\.(html|css|js))?$/" + }, + { + "command": "sf.lightning.lwc.test.navigateToTest", + "title": "%lightning_lwc_test_navigate_to_test%" + }, + { + "command": "sf.lightning.lwc.test.file.run", + "title": "%lightning_lwc_test_file_run_text%", + "icon": { + "light": "resources/light/play-button.svg", + "dark": "resources/dark/play-button.svg" } - ], - "explorer/context": [ - { - "command": "sf.lightning.lwc.preview", - "when": "sf:project_opened && resource =~ /.*\\/lwc\\/[^\\/]+(\\/[^\\/]+\\.(html|css|js))?$/" + }, + { + "command": "sf.lightning.lwc.test.file.debug", + "title": "%lightning_lwc_test_file_debug_text%", + "icon": { + "light": "resources/light/debug.svg", + "dark": "resources/dark/debug.svg" } - ], - "view/item/context": [ - { - "command": "sf.lightning.lwc.test.case.run", - "group": "inline", - "title": "%lightning_lwc_test_case_run_text%", - "when": "view == sf.lightning.lwc.test.view && viewItem =~ /(lwcTest)(_.*|\\b)/" - }, - { - "command": "sf.lightning.lwc.test.case.debug", - "group": "inline", - "title": "%lightning_lwc_test_case_debug_text%", - "when": "view == sf.lightning.lwc.test.view && viewItem =~ /(lwcTest)(_.*|\\b)/" - }, - { - "command": "sf.lightning.lwc.test.file.run", - "group": "inline", - "title": "%lightning_lwc_test_file_run_text%", - "when": "view == sf.lightning.lwc.test.view && viewItem =~ /(lwcTestGroup)(_.*|\\b)/" - }, - { - "command": "sf.lightning.lwc.test.file.debug", - "group": "inline", - "title": "%lightning_lwc_test_file_debug_text%", - "when": "view == sf.lightning.lwc.test.view && viewItem =~ /(lwcTestGroup)(_.*|\\b)/" + }, + { + "command": "sf.lightning.lwc.test.case.run", + "title": "%lightning_lwc_test_case_run_text%", + "icon": { + "light": "resources/light/play-button.svg", + "dark": "resources/dark/play-button.svg" } - ], - "view/title": [ - { - "command": "sf.lightning.lwc.test.runAllTests", - "group": "navigation", - "when": "view == sf.lightning.lwc.test.view" - }, - { - "command": "sf.lightning.lwc.test.refreshTestExplorer", - "group": "navigation", - "when": "view == sf.lightning.lwc.test.view" + }, + { + "command": "sf.lightning.lwc.test.case.debug", + "title": "%lightning_lwc_test_case_debug_text%", + "icon": { + "light": "resources/light/debug.svg", + "dark": "resources/dark/debug.svg" } - ] - }, - "snippets": [ + }, { - "language": "javascript", - "path": "./snippets/lwc-js.json" + "command": "sf.lightning.lwc.test.editorTitle.run", + "title": "%lightning_lwc_test_run_current_file_text%", + "icon": { + "light": "resources/light/play-button.svg", + "dark": "resources/dark/play-button.svg" + } }, { - "language": "html", - "path": "./snippets/lwc-html.json" + "command": "sf.lightning.lwc.test.editorTitle.debug", + "title": "%lightning_lwc_test_debug_current_file_text%", + "icon": { + "light": "resources/light/debug.svg", + "dark": "resources/dark/debug.svg" + } + }, + { + "command": "sf.lightning.lwc.test.editorTitle.startWatching", + "title": "%lightning_lwc_test_start_watching_text%", + "icon": { + "light": "resources/light/startWatching.svg", + "dark": "resources/dark/startWatching.svg" + } + }, + { + "command": "sf.lightning.lwc.test.editorTitle.stopWatching", + "title": "%lightning_lwc_test_stop_watching_text%", + "icon": { + "light": "resources/light/stopWatching.svg", + "dark": "resources/dark/stopWatching.svg" + } + }, + { + "command": "sf.lightning.lwc.test.stopWatchingAllTests", + "title": "%lightning_lwc_test_stop_watching_all_tests_text%" } ], - "views": { - "test": [ - { - "id": "sf.lightning.lwc.test.view", - "name": "%lightning_lwc_test_view_name%", - "when": "sf:project_opened || sf:internal_dev" - } - ] - } - }, - "debuggers": [ - { - "configurationSnippets": [ - { - "body": { - "args": [ - "--", - "--runInBand" - ], - "console": "integratedTerminal", - "cwd": "^\"\\${workspaceFolder}\"", - "disableOptimisticBPs": true, - "internalConsoleOptions": "neverOpen", - "name": "%lightning_lwc_debugger%", - "program": "^\"\\${workspaceFolder}/node_modules/.bin/sf-lwc-jest\"", - "request": "launch", - "type": "node", - "windows": { - "program": "^\"\\${workspaceFolder}/node_modules/@salesforce/sf-lwc-jest/bin/sf-lwc-jest\"" + "debuggers": [ + { + "type": "vscode-lwc-tests", + "label": "%lightning_lwc_debugger%", + "languages": [ + "javascript" + ], + "configurationSnippets": [ + { + "label": "%lightning_lwc_debugger%", + "description": "%lightning_lwc_debugger_desc%", + "body": { + "name": "%lightning_lwc_debugger%", + "type": "node", + "request": "launch", + "program": "^\"\\${workspaceFolder}/node_modules/.bin/sf-lwc-jest\"", + "args": [ + "--", + "--runInBand" + ], + "cwd": "^\"\\${workspaceFolder}\"", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "disableOptimisticBPs": true, + "windows": { + "program": "^\"\\${workspaceFolder}/node_modules/@salesforce/sf-lwc-jest/bin/sf-lwc-jest\"" + } } - }, - "description": "%lightning_lwc_debugger_desc%", - "label": "%lightning_lwc_debugger%" - } - ], - "label": "%lightning_lwc_debugger%", - "languages": [ - "javascript" - ], - "type": "vscode-lwc-tests" - } - ], - "dependencies": { - "@salesforce/core": "7.3.1", - "@salesforce/eslint-config-lwc": "3.5.1", - "@salesforce/lightning-lsp-common": "4.8.0", - "@salesforce/lwc-language-server": "4.8.0", - "@salesforce/salesforcedx-utils-vscode": "60.13.0", - "ajv": "6.12.6", - "applicationinsights": "1.0.7", - "jest-editor-support": "^30.1.0", - "jest-regex-util": "^24.9.0", - "rxjs": "^5.4.1", - "strip-ansi": "^5.2.0", - "uuid": "^3.3.3", - "vscode-extension-telemetry": "0.0.17", - "vscode-languageclient": "^5.2.1" - }, - "description": "Provides code-editing features for Lightning Web Components", - "devDependencies": { - "@salesforce/salesforcedx-test-utils-vscode": "60.13.0", - "@types/chai": "4.3.3", - "@types/mocha": "^5", - "@types/node": "^18.11.9", - "@types/sinon": "^7.5.2", - "@types/uuid": "^3.4.8", - "@types/vscode": "^1.61.2", - "@types/which": "^1.3.1", - "@typescript-eslint/eslint-plugin": "6.9.0", - "@typescript-eslint/parser": "6.9.0", - "chai": "^4.0.2", - "cross-env": "5.2.0", - "esbuild": "^0.19.5", - "eslint": "8.52.0", - "eslint-config-prettier": "9.0.0", - "eslint-plugin-header": "3.1.1", - "eslint-plugin-import": "2.29.0", - "eslint-plugin-jest": "27.5.0", - "eslint-plugin-jest-formatting": "3.1.0", - "eslint-plugin-jsdoc": "46.8.2", - "eslint-plugin-prefer-arrow": "1.2.3", - "mocha": "^10", - "mocha-junit-reporter": "^1.23.3", - "mocha-multi-reporters": "^1.1.7", - "nyc": "^15", - "prettier": "3.0.3", - "sinon": "^13.0.1", - "sinon-chai": "^3.7.0", - "ts-sinon": "^1.0.25", - "typescript": "^5.2.2", - "vscode-uri": "^1.0.8", - "which": "1.3.1" - }, - "displayName": "Lightning Web Components", - "engines": { - "vscode": "^1.82.0" - }, - "extensionDependencies": [ - "dbaeumer.vscode-eslint", - "salesforce.salesforcedx-vscode-core" - ], - "galleryBanner": { - "color": "#ECECEC", - "theme": "light" - }, - "icon": "images/VSCodeLWC.png", - "license": "BSD-3-Clause", - "main": "./out/src", - "name": "salesforcedx-vscode-lwc", - "packaging": { - "assets": [ - "LICENSE.txt", - "package.nls.ja.json", - "package.nls.json", - "README.md", - ".vscodeignore", - "images", - "resources", - "snippets", - "dist" + } + ] + } ], - "packageUpdates": { - "dependencies": { - "@salesforce/core": "7.3.1", - "@salesforce/lightning-lsp-common": "4.8.0", - "@salesforce/lwc-language-server": "4.8.0", - "@salesforce/source-tracking": "6.0.4", - "applicationinsights": "1.0.7" - }, - "devDependencies": {}, - "main": "dist/index.js", - "serverPath": [ - "node_modules", - "@salesforce", - "lwc-language-server", - "lib", - "server.js" - ] + "configuration": { + "type": "object", + "title": "%lightning_lwc_preferences%", + "properties": { + "salesforcedx-vscode-lwc.preview.rememberDevice": { + "type": "boolean", + "default": true, + "description": "%lightning_lwc_remember_device_description%" + }, + "salesforcedx-vscode-lwc.preview.logLevel": { + "type": "string", + "description": "%lightning_lwc_mobile_log_level%", + "enum": [ + "trace", + "debug", + "info", + "warn", + "error", + "fatal" + ], + "default": "warn" + } + } } - }, - "publisher": "salesforce", - "qna": "https://github.com/forcedotcom/salesforcedx-vscode/issues", - "repository": { - "url": "https://github.com/forcedotcom/salesforcedx-vscode" - }, - "scripts": { - "bundle:extension": "node ./esbuild.config.js", - "clean": "shx rm -rf node_modules && shx rm -rf out && shx rm -rf coverage && shx rm -rf .nyc_output", - "compile": "tsc -p ./", - "lint": "eslint .", - "lint:fix": "npm run lint -- --fix", - "test": "npm run test:unit && npm run test:vscode-integration", - "test:unit": "jest --coverage", - "test:vscode-insiders-integration": "cross-env CODE_VERSION=insiders npm run test:vscode-integration", - "test:vscode-integration": "node ../../scripts/download-vscode && node ../../scripts/install-vsix-dependencies dbaeumer.vscode-eslint && node ../../scripts/run-tests-with-recipes", - "vscode:package": "ts-node ../../scripts/vsce-bundled-extension.ts", - "vscode:prepublish": "npm prune --production", - "vscode:publish": "node ../../scripts/publish-vsix.js", - "vscode:sha256": "node ../../scripts/generate-sha256.js >> ../../SHA256", - "watch": "tsc -watch -p ." - }, - "serverPath": [ - "..", - "..", - "node_modules", - "@salesforce", - "lwc-language-server", - "lib", - "server.js" - ], - "version": "60.13.0" + } }