Skip to content

Commit

Permalink
chore: setup pipeline with vscode-js-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
maciekstosio committed Dec 16, 2024
1 parent c2c0e78 commit e131888
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/typecheck-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ jobs:
cache: "npm"
cache-dependency-path: packages/vscode-extension/package-lock.json

- name: Install submodule node dependencies
working-directory: ${{ env.SUBMODULE_DIRECTORY }}
run: npm i

- name: Install node dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
run: npm i
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@
"typecheck": "tsc --noEmit",
"format": "prettier --write --list-different src",
"build:tests": "tsc --project tsconfig.test.json",
"test": "npm run build:extension-code && npm run build:webview && npm run build:tests && vscode-test"
"test": "npm run build:extension-code && npm run build:webview && npm run build:tests && vscode-test",
"preinstall": "cd ../vscode-js-debug && npm install && npx tsc"
},
"devDependencies": {
"vscode-js-debug": "file:../vscode-js-debug",
Expand Down
16 changes: 8 additions & 8 deletions packages/vscode-extension/src/debugging/DebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ import {
Source,
StackFrame,
} from "@vscode/debugadapter";
import { DebugProtocol } from "@vscode/debugprotocol";
import Cdp from "vscode-js-debug/src/cdp/api";
import { AnyObject } from "vscode-js-debug/src/adapter/objectPreview/betterTypes";
import { DebugProtocol } from "@vscode/debugprotocol";
import {Cdp} from "vscode-js-debug/out/cdp/index";
import { AnyObject } from "vscode-js-debug/out/adapter/objectPreview/betterTypes";
import {
messageFormatters,
previewAsObject,
previewRemoteObject,
} from "vscode-js-debug/src/adapter/objectPreview";
import { formatMessage as externalFormatMessage } from "vscode-js-debug/src/adapter/messageFormat";
import { PreviewContextType } from "vscode-js-debug/src/adapter/objectPreview/contexts";
} from "vscode-js-debug/out/adapter/objectPreview";
import { formatMessage } from "vscode-js-debug/out/adapter/messageFormat";
import { PreviewContextType } from "vscode-js-debug/out/adapter/objectPreview/contexts";
import { Logger } from "../Logger";
import {
inferDAPScopePresentationHintFromCDPType,
Expand Down Expand Up @@ -156,8 +156,8 @@ export class DebugAdapter extends DebugSession {
async formatDefaultString(args: ReadonlyArray<Cdp.Runtime.RemoteObject>) {
const useMessageFormat = args.length > 1 && args[0].type === "string";
const formatResult = useMessageFormat
? externalFormatMessage(args[0].value, args.slice(1) as AnyObject[], messageFormatters)
: externalFormatMessage("", args as AnyObject[], messageFormatters);
? formatMessage(args[0].value, args.slice(1) as AnyObject[], messageFormatters)
: formatMessage("", args as AnyObject[], messageFormatters);

const output = formatResult.result + "\n";

Expand Down
2 changes: 1 addition & 1 deletion packages/vscode-extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"outDir": "out",
"lib": ["es6", "dom", "ESNext"],
"sourceMap": true,
"rootDirs": ["src", "../vscode-js-debug"],
"rootDir": "src",
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
Expand Down

0 comments on commit e131888

Please sign in to comment.