Skip to content

Commit

Permalink
Refactor code, eliminate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robmosca committed Dec 9, 2023
1 parent da7f14a commit b570367
Show file tree
Hide file tree
Showing 21 changed files with 249 additions and 630 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CI
on:
push:
branches:
- "*"
- '*'
pull_request:
branches:
- "main"
- 'main'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 18.18.2
node-version: 18.19.0

- name: Install Pnpm
uses: pnpm/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts = true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
v18.18.2
v18.19.0

5 changes: 5 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
});
11 changes: 6 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint"
]
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner"
]
}
5 changes: 4 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"args": [
"--trace-deprecation",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
Expand Down
32 changes: 16 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
32 changes: 17 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "robotinventor",
"displayName": "robotinventor",
"description": "A Microsoft Visual Studio Code extension to program LEGO® Mindstorms® Robot Inventor in MicroPython",
"version": "0.0.1",
"version": "1.0.0",
"publisher": "robmosca",
"repository": "https://github.com/robmosca/robotinventor-vscode",
"engines": {
Expand All @@ -22,37 +22,37 @@
{
"command": "ri5devBrowser.action.connectDevice",
"title": "Connect to a device",
"category": "ri5dev"
"category": "Robot Inventor"
},
{
"command": "ri5devBrowser.action.disconnectDevice",
"title": "Disconnect",
"category": "ri5dev"
"category": "Robot Inventor"
},
{
"command": "ri5devBrowser.runProgram",
"title": "Run program",
"category": "ri5dev"
"category": "Robot Inventor"
},
{
"command": "ri5devBrowser.stopProgram",
"title": "Stop program",
"category": "ri5dev"
"category": "Robot Inventor"
},
{
"command": "ri5devBrowser.moveProgram",
"title": "Move program",
"category": "ri5dev"
"category": "Robot Inventor"
},
{
"command": "ri5devBrowser.removeProgram",
"title": "Remove program",
"category": "ri5dev"
"category": "Robot Inventor"
},
{
"command": "ri5devBrowser.uploadProgram",
"title": "Upload program",
"category": "ri5dev"
"category": "Robot Inventor"
}
],
"menus": {
Expand Down Expand Up @@ -87,7 +87,7 @@
"explorer": [
{
"id": "ri5devBrowser",
"name": "ri5dev device browser"
"name": "Robot Inventor Device Browser"
}
]
},
Expand All @@ -99,16 +99,18 @@
]
},
"scripts": {
"clean": "rimraf ./out",
"compile": "tsc -p ./",
"coverage": "nyc npm test",
"lint": "eslint src --ext ts",
"pretest": "npm run compile && npm run lint",
"test": "node ./out/test/runTest.js",
"pretest": "pnpm run compile && pnpm run lint",
"test": "vscode-test",
"typecheck": "tsc --noEmit -p ./",
"vscode:prepublish": "npm run compile",
"vscode:prepublish": "pnpm run compile",
"watch": "tsc -watch -p ./"
},
"devDependencies": {
"@electron/rebuild": "^3.4.1",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@types/chai": "^4.2.14",
"@types/glob": "^8.1.0",
Expand All @@ -120,9 +122,10 @@
"@types/vscode": "^1.53.0",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"@vscode/test-cli": "^0.0.4",
"@vscode/test-electron": "^2.3.8",
"chai": "^4.2.0",
"chai-match": "^1.1.1",
"electron-rebuild": "^3.2.9",
"eslint": "^8.55.0",
"glob": "^10.3.10",
"mocha": "^10.2.0",
Expand All @@ -132,8 +135,7 @@
"sinon-chai": "^3.5.0",
"ts-mock-imports": "^1.3.1",
"ts-node": "^10.9.1",
"typescript": "^5.3.3",
"vscode-test": "^1.4.0"
"typescript": "^5.3.3"
},
"dependencies": {
"serialport": "^12.0.0"
Expand Down
Loading

0 comments on commit b570367

Please sign in to comment.