Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ jobs:

- name: Run tests
working-directory: "squawk-vscode"
run: xvfb-run pnpm run test
run: pnpm run test
5 changes: 0 additions & 5 deletions squawk-vscode/.vscode-test.mjs

This file was deleted.

1 change: 1 addition & 0 deletions squawk-vscode/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
out/**
node_modules/**
src/**
test/**
.gitignore
.yarnrc
esbuild.js
Expand Down
15 changes: 15 additions & 0 deletions squawk-vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,18 @@ With `vsce` installed from NPM (`npm install -g @vscode/vsce`), clone [this repo

Make sure you're on a vscode version >= the one defined in the `package.json`,
otherwise the extension development host won't load the extension.

### Syntax grammar tests

The TextMate grammar in `syntaxes/pgsql.tmLanguage.json` is tested with
`vscode-tmgrammar-test` and `vscode-tmgrammar-snap`.

```bash
pnpm test
# or
pnpm run test:grammar
```

- Add assertion-based fixtures under `test/syntax/`.
- Add snapshot fixtures under `test/snap/`.
- Update snapshot files with `pnpm run test:snap:update`.
15 changes: 7 additions & 8 deletions squawk-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,19 @@
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"package": "node esbuild.js --production",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "pnpm run compile-tests && pnpm run compile",
"check-types": "tsc --noEmit",
"lint": "eslint src",
"test": "vscode-test"
"test": "pnpm run test:grammar",
"test:grammar": "pnpm run test:syntax && pnpm run test:snap",
"test:snap": "vscode-tmgrammar-snap 'test/snap/**/*.sql'",
"test:snap:update": "vscode-tmgrammar-snap --updateSnapshot 'test/snap/**/*.sql'",
"test:syntax": "vscode-tmgrammar-test 'test/syntax/**/*.sql'"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@types/vscode": "^1.101.0",
"@typescript-eslint/eslint-plugin": "^8.41.0",
"@typescript-eslint/parser": "^8.41.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"@vscode/vsce": "^3.6.0",
"esbuild": "^0.25.9",
"eslint": "^9.34.0",
Expand All @@ -148,7 +146,8 @@
"ovsx": "^0.10.5",
"oxfmt": "^0.44.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.41.0"
"typescript-eslint": "^8.41.0",
"vscode-tmgrammar-test": "^0.1.3"
},
"volta": {
"node": "20.19.0",
Expand Down
Loading
Loading