Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge thqby 2.5.4 #634

Closed
wants to merge 66 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
9adb1a2
Update package-lock.json
mark-wiemer Aug 2, 2024
e60b909
Add recommended extensions
mark-wiemer Aug 2, 2024
d486ad9
Add @vscode/test-web^0.0.56
mark-wiemer Aug 2, 2024
302e1d7
Add test-data folder
mark-wiemer Aug 2, 2024
4ad661d
Merge pull request #3 from mark-wiemer-org/users/markwiemer/tests
mark-wiemer Aug 11, 2024
30bc8a3
Merge branch 'main' into users/markwiemer/lint
mark-wiemer Aug 11, 2024
a08b48e
Merge pull request #4 from mark-wiemer-org/users/markwiemer/lint
mark-wiemer Aug 11, 2024
299b79a
Add first formatter test (#5)
mark-wiemer Aug 12, 2024
81a3c14
Add grammar test (#6)
mark-wiemer Aug 13, 2024
79b8722
Validate grammar in validate script (#7)
mark-wiemer Aug 13, 2024
d936c0a
Cleanup package.json (#8)
mark-wiemer Aug 18, 2024
c958994
Update build for compositing with AHK++ (#9)
mark-wiemer Aug 18, 2024
bfda9c1
Integrate with parent project (#10)
mark-wiemer Aug 21, 2024
c6272f3
Misc cleanup for AHK++ integration (#11)
mark-wiemer Aug 22, 2024
f7548c0
Document todo removal of ahk2.help
mark-wiemer Aug 22, 2024
d665c1c
Simplify repo validation
mark-wiemer Aug 23, 2024
41b1309
Changes for AHK++ 5.1.1 (#12)
mark-wiemer Aug 28, 2024
2892449
Build with ESBuild (#13)
mark-wiemer Aug 28, 2024
fd70f0e
Remove funding (I'm not thqby!) (#14)
mark-wiemer Aug 28, 2024
5b15827
Format the test files (#15)
mark-wiemer Aug 28, 2024
85bebd3
Add build workflow (#16)
mark-wiemer Aug 28, 2024
0ac4eb3
Remove format from validation (#17)
mark-wiemer Aug 28, 2024
4f5fd5a
Remove dupe commands (#18)
mark-wiemer Aug 28, 2024
877696c
Fix lint (#19)
mark-wiemer Aug 28, 2024
7a3e11a
update commands to match AHK++ style (#20)
mark-wiemer Aug 31, 2024
f205dc2
Update settings and readme (#21)
mark-wiemer Sep 1, 2024
a99fd09
Major trims, minor cleanup, reorganize config (#22)
mark-wiemer Sep 1, 2024
611cef3
Add `showOutputView` config (#23)
mark-wiemer Sep 19, 2024
012bf38
Remove logs, unused package (#24)
mark-wiemer Sep 22, 2024
fddd2e0
Fix syntaxes, rename showOutputView to showOutput (#25)
mark-wiemer Sep 22, 2024
651e79b
Log build mode (#26)
mark-wiemer Sep 23, 2024
7e22224
Merge thqby@main (2.5.2) (#27)
mark-wiemer Sep 23, 2024
b6bd720
Fixup validation errors (#28)
mark-wiemer Sep 23, 2024
0a11ed2
Fixup CI (#29)
mark-wiemer Sep 27, 2024
52aa813
Add Vitest for unit tests (#30)
mark-wiemer Sep 27, 2024
aae4f9e
Remove dupe config file (#31)
mark-wiemer Sep 27, 2024
b10a3ed
Greatly cleanup and works towards ESM (#32)
mark-wiemer Sep 28, 2024
6e22b42
Revert "Greatly cleanup and works towards ESM" (#33)
mark-wiemer Sep 28, 2024
0913281
Revert "Remove dupe config file" (#34)
mark-wiemer Sep 28, 2024
ef35585
Revert "Add Vitest for unit tests" (#35)
mark-wiemer Sep 28, 2024
9d6e812
Fix unhandled commands (#36)
mark-wiemer Sep 28, 2024
02004de
Remove automated tests for clarity (#37)
mark-wiemer Sep 28, 2024
b1057d6
Add unit tests (#38)
mark-wiemer Sep 29, 2024
c2ba5f2
Fix debug commands, remove unused stuffs (#39)
mark-wiemer Sep 29, 2024
2ca2596
Stop running prettier check (#40)
mark-wiemer Sep 29, 2024
f95c668
Merge [email protected] (#41)
mark-wiemer Oct 1, 2024
090fdb3
Merge upstream-main with updated env.ts (#57)
mark-wiemer Oct 7, 2024
e3851c2
Fixup selectSyntaxes command (#59)
mark-wiemer Oct 7, 2024
456dfc3
Format directives are snake_case for compatibility with thqby (#60)
mark-wiemer Oct 7, 2024
4ebf942
Update and pin some dependencies (#61)
mark-wiemer Oct 8, 2024
d7dfd3b
Wrap special chars in double quotes (#62)
mark-wiemer Oct 8, 2024
65ac012
Merge upstream-main (#66)
mark-wiemer Oct 12, 2024
086be1d
(test) Cherry-pick thqby commit (#67)
mark-wiemer Oct 12, 2024
9aa041f
Merge thqby's main branch directly (#68)
mark-wiemer Oct 12, 2024
ac5824b
Merge remote-tracking branch 'upstream/main' into mark-wiemer/merge-t…
mark-wiemer Oct 12, 2024
82b28af
Fixup package lock
mark-wiemer Oct 12, 2024
c3380c4
Merge pull request #69 from mark-wiemer-org/mark-wiemer/merge-thqby
mark-wiemer Oct 12, 2024
f75b53e
Exclude files even when opened (#70)
mark-wiemer Oct 13, 2024
d5a3f83
Respect exclude without requiring restart (#71)
mark-wiemer Oct 16, 2024
297742e
Improve logs, fix LibIncludeType.Disabled (#72)
mark-wiemer Oct 17, 2024
234ebd1
Add GroggyOtter syntax (#73)
mark-wiemer Oct 17, 2024
c05e25e
Fix block style none (#74)
mark-wiemer Oct 19, 2024
16c0722
Add logs to initpathenv (#75)
mark-wiemer Oct 29, 2024
22d94d8
Remove unused function (#76)
mark-wiemer Nov 2, 2024
c1e11db
Merge branch 'thqby-main' into mark-wiemer/merge-2.5.4
mark-wiemer Nov 2, 2024
a6c9fc5
validate:fix
mark-wiemer Nov 2, 2024
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
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Prettier defaults to LF and most files are already saved that way
* text=auto eol=lf
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ github: thqby
custom:
- https://qr.alipay.com/fkx19566u7ctegoppmu5i13
- https://github.com/thqby/vscode-autohotkey2-lsp/raw/main/pic/alipay.jpg
- https://www.paypal.me/thqby
- https://www.paypal.me/thqby
8 changes: 4 additions & 4 deletions .github/workflows/node.js.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Build

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
branches: ["main"]
branches: ['main', 'upstream-main']
workflow_dispatch:
merge_group:

Expand All @@ -27,6 +27,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: 'npm'
- run: npm install
- run: npm run vscode:prepublish
- run: npm run validate:ci
41 changes: 41 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Adapted from GitHub issue comment code by george-gca on 2024-01-16
# https://github.com/prettier/prettier/issues/6885#issuecomment-1894252136

name: Prettier diff

on:
# push:
# branches: ['main']
# pull_request:
# branches: ['main']
workflow_dispatch:
# merge_group:

jobs:
build:
strategy:
matrix:
# AHK is built for Windows only, so we only build on Windows
# As always, if community asks, community shall receive ;)
os: [windows-latest]
node-version: [20.x]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- name: Run Prettier
id: runPrettier
# format is just `prettier --check .`
run: npm run format
- name:
if: ${{ failure() }}
# format:fix is just `prettier --write .`
run: |
npm run format:fix
git diff
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
out
dist
node_modules
.test-data
.vscode-test
.vscode-test-web
*.vsix
scripts/*
server/expr_parser/*
*.js
*.js.map
*.tsbuildinfo
**/out/**/*.d.ts
34 changes: 34 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
out
dist
node_modules
.test-data
.vscode-test
.vscode-test-web
*.vsix
scripts/*
server/expr_parser/*

client/src/browserClientMain.ts
client/src/extension.ts
client/src/test/utils.ts
server/src/ahkProvider.ts
server/src/browserServerMain.ts
server/src/codeActionProvider.ts
server/src/colorProvider.ts
server/src/commandProvider.ts
server/src/common.ts
server/src/completionProvider.ts
server/src/constants.ts
server/src/definitionProvider.ts
server/src/formattingProvider.ts
server/src/hoverProvider.ts
server/src/lexer.ts
server/src/localize.ts
server/src/PEFile.ts
server/src/referencesProvider.ts
server/src/renameProvider.ts
server/src/scriptrunner.ts
server/src/semanticTokensProvider.ts
server/src/server.ts
server/src/signatureProvider.ts
server/src/symbolProvider.ts
20 changes: 11 additions & 9 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ import { defineConfig } from '@vscode/test-cli';
import { execSync } from 'child_process';

let timeout, vscode_path;
if (process.execPath.toLowerCase().endsWith('code.exe'))
timeout = 0;
if (process.execPath.toLowerCase().endsWith('code.exe')) timeout = 0;
else {
try {
const m = execSync('chcp 65001 && reg query HKCR\\vscode\\shell\\open\\command', { encoding: 'utf8' })
.match(/REG_SZ\s+("([^"]+)"|\S+)/);
const m = execSync(
'chcp 65001 && reg query HKCR\\vscode\\shell\\open\\command',
{ encoding: 'utf8' },
).match(/REG_SZ\s+("([^"]+)"|\S+)/);
vscode_path = m[2] || m[1];
} catch { }
} catch {}
}

export default defineConfig({
files: 'client/dist/test/**/*.test.js',
workspaceFolder: 'e2e',
mocha: {
failZero: true,
timeout
timeout: 60_000,
},
useInstallation: vscode_path && {
fromPath: vscode_path
}
});
fromPath: vscode_path,
},
});
38 changes: 38 additions & 0 deletions .vscode/dev.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
// Place ahk2-lsp workspace snippets here.
// Each snippet is defined under a snippet name and has a scope, prefix, body and description.
// Add comma-separated IDs of the languages where the snippet is applicable in the scope field.
// If scope is left empty or omitted, the snippet gets applied to all languages.
// The prefix is what is used to trigger the snippet and the body will be expanded and inserted.
// Possible variables are: $1, $2 for tab stops, $0 for the final cursor position,
// and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same IDs are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Mocha tuple tests": {
"scope": "javascript,typescript",
"prefix": "suite",
"body": [
"suite('$1', () => {",
" const tests: [",
" name: string,",
" args: Parameters<typeof $1>,",
" expected: ReturnType<typeof $1>,",
" ][] = [$0];",

" tests.forEach(([name, args, expected]) =>",
" test(name, () => assert.strictEqual($1(...args), expected)),",
" );",
"});",
],
"description": "Generate tests for Mocha.",
},
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"connor4312.esbuild-problem-matchers",
"dbaeumer.vscode-eslint"
]
}
}
40 changes: 25 additions & 15 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,26 @@
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"preLaunchTask": "npm: watch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/client/dist/**/*.js"
]
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/client/dist/**/*.js"]
},
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client (e2e)",
"runtimeExecutable": "${execPath}",
"preLaunchTask": "npm: build:e2e",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/client/dist/**/*.js"]
},
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client (prod)",
"runtimeExecutable": "${execPath}",
"preLaunchTask": "npm: build",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/client/dist/**/*.js"]
},
{
"type": "node",
Expand All @@ -27,18 +41,17 @@
]
},
{
// Results go to Debug Console (Ctrl+Shift+Y)
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"preLaunchTask": "npm: watch",
"preLaunchTask": "npm: build:e2e",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/client/dist/test/**/*.js"
],
"outFiles": ["${workspaceFolder}/client/dist/test/**/*.js"],
"testConfiguration": "${workspaceFolder}/.vscode-test.mjs"
},
{
Expand All @@ -61,10 +74,7 @@
"compounds": [
{
"name": "Client + Server",
"configurations": [
"Launch Client",
"Attach to Server"
]
"configurations": ["Launch Client", "Attach to Server"]
}
]
}
}
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"git.ignoreLimitWarning": true,
"AutoHotkey2.InterpreterPath": "c:\\Program Files\\AutoHotkey\\v2\\AutoHotkey64.exe"
}
"AutoHotkey2.InterpreterPath": "c:\\Program Files\\AutoHotkey\\v2\\AutoHotkey64.exe",
"typescript.tsdk": "node_modules\\typescript\\lib",
"editor.formatOnSave": true
}
4 changes: 3 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
"script": "watch",
"group": "build",
"isBackground": true,
// Requires connor4312.esbuild-problem-matchers extension
"problemMatcher": "$esbuild-watch"
},
{
"type": "npm",
"script": "watch-web",
"group": "build",
"isBackground": true,
// Requires connor4312.esbuild-problem-matchers extension
"problemMatcher": "$esbuild-watch"
}
]
}
}
Loading
Loading