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
11 changes: 6 additions & 5 deletions .claude/commands/package-vsix.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ argument-hint: [patch|minor|major]
Build a private VSIX release. Version bump (empty = no bump): $ARGUMENTS

1. Confirm `package.json` has `"private": true`. **Never run `vsce publish` or `ovsx publish`.**
2. If a bump was requested, update `version` with `npm version <bump> --no-git-tag-version`
and add a dated entry to `CHANGELOG.md` summarizing changes since the last version.
2. Version bumps for released builds go through the Release workflow (CONTRIBUTING.md › Releases),
which keeps `VERSION`, `package.json` and both changelogs in sync. For a local test build, do not bump.
3. Run, stopping at the first failure: `npm run check-types`, `npm run lint`, `npm run test:unit`, `npm test`.
4. Run `npm run package` (production esbuild bundle, minified, no source maps).
5. Run `npx @vscode/vsce ls` and verify only `dist/`, `package.json`, `README.md`, `CHANGELOG.md`, `LICENSE`
and declared assets are included. Fix `.vscodeignore` if anything else appears.
6. Run `npx @vscode/vsce package --no-dependencies`.
5. Run `npx @vscode/vsce ls --no-dependencies` and verify only the bundles, manifest, `package.nls*.json`, `l10n/`,
grammar/language configuration, `images/icon.png`, `README.md`, `docs/CHANGELOG.vsix.md`, `LICENSE.md` and
`THIRD_PARTY_NOTICES.md` are included (CI enforces the same list). Fix `.vscodeignore` if anything else appears.
6. Run `npx @vscode/vsce package --no-dependencies --changelog-path docs/CHANGELOG.vsix.md`.
7. Report the `.vsix` file name, its size, and the install command: `code --install-extension <file>.vsix`.
4 changes: 2 additions & 2 deletions .claude/rules/extension-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Applies to code running in the VS Code extension host.

## Configuration
- All reads go through `src/client/config.ts`, which exposes typed getters whose defaults mirror `package.json`.
- React to changes with `workspace.onDidChangeConfiguration` and `e.affectsConfiguration('<extension-name>.<key>')`.
- React to changes with `workspace.onDidChangeConfiguration` and `e.affectsConfiguration('ieLua.<key>')`.
- Settings the server needs are forwarded via `synchronize.configurationSection` or answered through
`workspace/configuration` requests — never re-read ad hoc.

## Logging
- One `window.createOutputChannel('<Extension Name>', { log: true })` shared across the client.
- One `window.createOutputChannel('IE Lua', { log: true })` shared across the client.
- Never `console.log` in shipped code.

## Don'ts
Expand Down
3 changes: 2 additions & 1 deletion .claude/rules/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ paths:
## Integration Tests (`test/integration/`)
- Run inside VS Code through `@vscode/test-cli` + `@vscode/test-electron` (`npm test`).
- Open fixtures from `test/fixtures/` — never depend on the developer's own workspace or settings.
- Await activation explicitly: `await vscode.extensions.getExtension('<publisher>.<name>')!.activate()`.
- Await activation explicitly: `await vscode.extensions.getExtension('infinity-engine-tools.ie-lua-language-server')!.activate()`
(or the `activateExtension()` helper in `test/integration/helpers.ts`).
- For LSP features, wait for a concrete signal (diagnostics changed, provider returned) instead of fixed `sleep`s.
- Clean up: close editors and restore any settings changed during the test.

Expand Down
9 changes: 8 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
"Bash(git diff:*)",
"Bash(git log:*)",
"WebFetch(domain:code.visualstudio.com)",
"WebFetch(domain:microsoft.github.io)"
"WebFetch(domain:microsoft.github.io)",
"Bash(npm run check-l10n)",
"Bash(npm run notices)",
"Bash(npm run notices -- --check)",
"Bash(npm run build:wasm -- --check)",
"Bash(npx vsce ls --no-dependencies)",
"Bash(npx @vscode/vsce ls --no-dependencies)"
],
"ask": [
"Bash(npm install:*)",
Expand All @@ -31,6 +37,7 @@
"deny": [
"Bash(npx @vscode/vsce publish:*)",
"Bash(vsce publish:*)",
"Bash(npx vsce publish:*)",
"Bash(npx ovsx publish:*)",
"Bash(ovsx publish:*)",
"Bash(npm publish:*)",
Expand Down
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# https://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
# Two trailing spaces are a hard line break in Markdown.
trim_trailing_whitespace = false

[*.{c,h}]
indent_style = space
indent_size = 4

[*.py]
indent_size = 4

[Makefile]
indent_style = tab

# Infinity Engine .menu files use tabs; keep test fixtures faithful to the format.
[*.menu]
indent_style = tab
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Normalize all text to LF in the repository and working tree.
* text=auto eol=lf

# Windows-only scripts keep CRLF.
*.bat text eol=crlf
*.cmd text eol=crlf

# Binary assets.
*.png binary
*.jpg binary
*.ico binary
*.wasm binary
*.vsix binary
*.blend binary

# Generated or vendored content: collapsed in diffs, excluded from language stats.
third_party/lua52/dist/** linguist-generated=true
data/eeex/**.json linguist-generated=true
package-lock.json linguist-generated=true -diff

# Third-party upstream sources.
third_party/** linguist-vendored=true
37 changes: 37 additions & 0 deletions .github/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# CLAUDE.md — GitHub automation (`.github/`)

Scoped notes for workflows, Dependabot and templates. The root `CLAUDE.md` still applies.

## Workflow conventions

- **Pin every action to a full commit SHA** with the version as a comment
(`uses: actions/checkout@<sha> # v7.0.1`). Resolve SHAs with
`gh api repos/<owner>/<repo>/commits/<tag> --jq .sha`; never type them from memory.
- **Every job has `timeout-minutes`** sized to about 2–3× its normal duration. A run that gets
near its timeout is a bug to investigate (cache miss, download, hang), not a reason to raise it.
- **Least privilege:** workflow-level `permissions: contents: read`; jobs add only what they need,
each with a comment saying why.
- **No workflow-level `paths:` filters on required checks** (`ci.yml`, `commitlint.yml`): a skipped
workflow never reports and blocks merging. Skip inside the workflow instead (`changes` job).
- **Clear failures:** scripts print `::error title=…::<what failed and how to fix it>` (with `file=`
when known). tsc and ESLint output is annotated by setup-node's problem matchers.
- **Untrusted input** (PR titles, branch names, metadata outputs) goes through `env:`, never
directly into `run:` with `${{ }}`.
- **Pull requests opened with `GITHUB_TOKEN`** (release, docs sync) do not trigger `pull_request`
workflows; such jobs must `gh workflow run ci.yml --ref <branch>` and the same for
`commitlint.yml`. Both workflows therefore keep their `workflow_dispatch` trigger.
- Lint workflows before committing: `actionlint` (https://github.com/rhysd/actionlint).

## Map

| Workflow | Trigger | Purpose |
| --- | --- | --- |
| `ci.yml` | PR, push to main, dispatch | checks, VSIX artifact, integration tests (min + stable VS Code), WASM reproducibility |
| `commitlint.yml` | PR, dispatch | Conventional Commits for commits and PR title (Dependabot exempt) |
| `codeql.yml` | PR, push, weekly | code scanning (`actions`, `javascript-typescript`) |
| `release.yml` | dispatch → PR; push of `VERSION` | prepare release PR; publish GitHub release (environment `release`) |
| `dependabot-automerge.yml` | Dependabot PR | auto-merge low-risk updates after required checks |
| `eeex-docs-sync*.yml` | weekly, staggered | refresh `data/eeex/*.json` from the published EEex docs |
| `stale.yml` | weekly | stale issues/PRs |

Required status checks on `main` (repository ruleset): the jobs of `ci.yml` and `commitlint.yml`.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Default owner for everything in the repository.
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
* @4Luke4
73 changes: 73 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Bug report
description: Something does not work as described.
title: "[Bug]: "
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a problem. **Security issues:** please do not use this form;
follow [SECURITY.md](https://github.com/4Luke4/IE-Lua-Language-Server/blob/main/SECURITY.md) instead.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: What did you do, what did you expect, and what happened instead?
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Minimal example
description: The smallest `.lua` or `.menu` content that shows the problem. Please do not paste files from the games themselves; write a short example instead.
render: lua
validations:
required: true
- type: input
id: version
attributes:
label: Extension version
description: "VS Code: Extensions view › IE Lua Language Server. Other editors: the version of the release you downloaded."
placeholder: "0.1.0"
validations:
required: true
- type: dropdown
id: editor
attributes:
label: Editor
options:
- VS Code
- Sublime Text
- Neovim
- Emacs
- JetBrains IDE
- Helix
- Kate
- Notepad++
- Geany
- Other
validations:
required: true
- type: input
id: editor-version
attributes:
label: Editor version and operating system
placeholder: "VS Code 1.143.1, Windows 11"
validations:
required: true
- type: dropdown
id: mode
attributes:
label: Validation mode (ieLua.validate.mode)
options:
- save (default)
- type
- saveAndType
- manual
- I don't know
- type: textarea
id: logs
attributes:
label: Logs
description: "VS Code: View › Output › IE Lua. Other editors: the language server log."
render: text
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Report a security vulnerability
url: https://github.com/4Luke4/IE-Lua-Language-Server/security/advisories/new
about: Please report security problems privately, not as public issues.
- name: Using the server in other editors
url: https://github.com/4Luke4/IE-Lua-Language-Server/tree/main/docs/editors
about: Setup guides for Sublime Text, Neovim, Emacs, JetBrains IDEs, Helix, Zed, Kate, Notepad++ and Geany.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Feature request
description: Suggest an improvement or a new feature.
title: "[Feature]: "
labels: [enhancement]
body:
- type: textarea
id: problem
attributes:
label: What problem would this solve?
description: Describe what you are trying to do and what makes it hard today.
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
description: How would you like it to work? Examples of Lua or `.menu` code are welcome.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives you have considered
- type: dropdown
id: editor
attributes:
label: Editor
multiple: true
options:
- VS Code
- Sublime Text
- Neovim
- Emacs
- JetBrains IDE
- Helix
- Zed
- Kate
- Notepad++
- Geany
- Other
40 changes: 40 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 10
commit-message:
prefix: build
include: scope
labels: [dependencies]
ignore:
# Must equal engines.vscode; both are bumped together by hand (CLAUDE.md §5).
- dependency-name: "@types/vscode"
# Must match the Node.js major of the oldest supported VS Code (Electron 29 → Node 20).
- dependency-name: "@types/node"
update-types: ["version-update:semver-major"]
groups:
# One pull request for all low-risk development tooling updates.
dev-dependencies:
dependency-type: development
update-types: [minor, patch]
# vscode-languageclient/-server/-protocol must keep matching versions.
language-server:
patterns: ["vscode-languageclient", "vscode-languageserver", "vscode-languageserver-*"]

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
commit-message:
prefix: ci
include: scope
labels: [dependencies]
groups:
actions:
patterns: ["*"]
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
The title becomes the squash-merge commit message, so it must follow
Conventional Commits (https://www.conventionalcommits.org/en/v1.0.0/), e.g.
"feat(server): validate .menu expressions". See CONTRIBUTING.md.
-->

## What and why

<!-- What does this change, and why is it needed? Link issues with "Closes #123". -->

## How it was tested

<!-- Commands run, new tests, manual checks (editor + OS). -->

## Checklist

- [ ] `npm run check-types`, `npm run lint` and `npm run test:unit` pass
- [ ] `npm test` (integration) passes, if activation, commands, settings or the LSP wiring changed
- [ ] New logic has unit tests; new commands/settings have an integration test
- [ ] User-facing strings use `vscode.l10n.t()` / `package.nls.json`, and `npm run check-l10n` passes
- [ ] `CHANGELOG.md` and `docs/CHANGELOG.vsix.md` have entries under `[Unreleased]` (if users notice the change)
- [ ] No setting key or command ID was renamed (breaking change), or it is called out above
Loading
Loading