Skip to content

Commit a813d8b

Browse files
committed
Merge remote-tracking branch 'origin/main' into upgrade-web-tree-sitter-0.25.x
2 parents 0db0576 + 7c30881 commit a813d8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+9886
-7766
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "bun" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build.yaml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,26 @@ on:
88
release:
99
types:
1010
- created
11+
12+
permissions: {}
13+
1114
jobs:
1215
test:
1316
name: "Test"
1417
runs-on: ubuntu-latest
1518
steps:
1619
- uses: actions/checkout@v4
17-
- uses: oven-sh/setup-bun@v2
20+
with:
21+
persist-credentials: false
22+
23+
- if: ${{ github.event_name == 'release' }}
24+
uses: oven-sh/setup-bun@v2
25+
with:
26+
no-cache: true
27+
28+
- if: ${{ github.event_name != 'release' }}
29+
uses: oven-sh/setup-bun@v2
30+
1831

1932
- run: bun install
2033

@@ -31,7 +44,16 @@ jobs:
3144
runs-on: ubuntu-latest
3245
steps:
3346
- uses: actions/checkout@v4
34-
- uses: oven-sh/setup-bun@v2
47+
with:
48+
persist-credentials: false
49+
50+
- if: ${{ github.event_name == 'release' }}
51+
uses: oven-sh/setup-bun@v2
52+
with:
53+
no-cache: true
54+
55+
- if: ${{ github.event_name != 'release' }}
56+
uses: oven-sh/setup-bun@v2
3557

3658
- run: bun install
3759

@@ -58,7 +80,16 @@ jobs:
5880
runs-on: ubuntu-latest
5981
steps:
6082
- uses: actions/checkout@v4
61-
- uses: oven-sh/setup-bun@v2
83+
with:
84+
persist-credentials: false
85+
86+
- if: ${{ github.event_name == 'release' }}
87+
uses: oven-sh/setup-bun@v2
88+
with:
89+
no-cache: true
90+
91+
- if: ${{ github.event_name != 'release' }}
92+
uses: oven-sh/setup-bun@v2
6293

6394
- run: bun install
6495
- run: bun build-webview

.github/workflows/pages.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ on:
44
push:
55
branches: "main"
66

7+
permissions: {}
8+
79
jobs:
810
build:
911
name: "Build Demo site"
1012
runs-on: ubuntu-latest
1113
steps:
1214
- uses: actions/checkout@v4
15+
with:
16+
persist-credentials: false
1317
- uses: oven-sh/setup-bun@v2
18+
with:
19+
no-cache: true
1420

1521
- run: bun install
1622

.github/workflows/zizmor.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: GitHub Actions Security Analysis with zizmor 🌈
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
jobs:
10+
zizmor:
11+
name: zizmor latest via PyPI
12+
runs-on: ubuntu-latest
13+
permissions:
14+
security-events: write
15+
# required for workflows in private repositories
16+
contents: read
17+
actions: read
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
23+
24+
- name: Install the latest version of uv
25+
uses: astral-sh/setup-uv@v5
26+
27+
- name: Run zizmor 🌈
28+
run: uvx zizmor --format sarif . > results.sarif
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Upload SARIF file
33+
uses: github/codeql-action/upload-sarif@v3
34+
with:
35+
sarif_file: results.sarif
36+
category: zizmor

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- Python catch-all cases in match statements are now detected.
12+
When a catch-all is found the "no-match-found" edge is removed,
13+
and cases after the catch-all are removed as dead code.
14+
- C++ learned `co_yield` and `co_return`
15+
- Python learned `assert`
16+
17+
### Fixed
18+
19+
- Comment-tests now fail if an unsupported test type is present instead of passing silently.
20+
- Python `match` statements no longer break when a comment is present at their top-level
21+
- `throw` and `raise` statements now cause `finally` block duplication like `return` statements.
22+
23+
### Changed
24+
25+
- In flat-switch mode, fallthrough now goes to the case-node, not the consequence-node.
26+
This produces cleaner, more readable graphs even if it is less correct.
27+
928
## [0.0.14] - 2025-02-17
1029

1130
### Added

biome.jsonc

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,25 @@
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"ignore": [
11-
"./dist",
12-
"*.svelte",
13-
"src/test/commentTestSamples",
14-
"src/demo/src/assets"
15-
]
10+
"ignore": ["./dist", "src/test/commentTestSamples", "src/demo/src/assets"]
1611
},
12+
"overrides": [
13+
{
14+
"include": ["*.svelte"],
15+
"linter": {
16+
"rules": {
17+
"style": {
18+
// I want to keep variables typed explicitly in some cases, like Svelte exports.
19+
"noInferrableTypes": "off",
20+
// Disable some checks so biome doesn't crash.
21+
// https://biomejs.dev/internals/language-support/#html-super-languages-support
22+
"useConst": "off",
23+
"useImportType": "off"
24+
}
25+
}
26+
}
27+
}
28+
],
1729
"formatter": {
1830
"enabled": true,
1931
"indentStyle": "space"

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"@types/object-hash": "^3.0.6",
99
"@types/vscode": "^1.94.0",
1010
"@vscode/vsce": "^3.1.1",
11-
"esbuild": "^0.20.2",
11+
"esbuild": "^0.25.0",
1212
"esbuild-plugin-copy": "^2.1.1",
13-
"graphology": "^0.25.4",
13+
"graphology": "^0.26.0",
1414
"graphology-operators": "^1.6.0",
1515
"graphology-traversal": "^0.3.1",
1616
"lru-cache": "^11.0.2",
@@ -35,9 +35,7 @@
3535
"eslint": "^9.12.0",
3636
"graphology-utils": "^2.5.2",
3737
"lz-string": "^1.5.0",
38-
"oxlint": "0.13.2",
39-
"prettier": "3.3.3",
40-
"prettier-plugin-svelte": "^3.2.7",
38+
"oxlint": "0.15.13",
4139
"svelte": "^4.2.19",
4240
"svelte-awesome-color-picker": "^3.1.4",
4341
"svelte-codemirror-editor": "^1.4.1",
@@ -73,10 +71,8 @@
7371
"build-webview": "bun run --cwd src/webview/ vite build",
7472
"oxlint-fix": "bunx oxlint --ignore-path=oxlint-ignore.txt --fix -D correctness -D perf -D suspicious -A no-await-in-loop",
7573
"oxlint-ci": "bunx oxlint --ignore-path=oxlint-ignore.txt -D correctness -D perf -D suspicious -A no-await-in-loop",
76-
"prettier-format": "bunx prettier **/*.svelte --write",
77-
"prettier-check": "bunx prettier **/*.svelte --check",
78-
"lint": "bunx biome check --fix && bun oxlint-fix && bun prettier-format && bunx eslint --fix && bunx tsc --noEmit && bun typedoc",
79-
"ci": "bunx biome ci && bun oxlint-ci && bun prettier-check && bunx eslint && bunx tsc --noEmit && bun typedoc",
74+
"lint": "bunx biome check --fix && bun oxlint-fix && bunx eslint --fix && bunx tsc --noEmit && bun typedoc",
75+
"ci": "bunx biome ci && bun oxlint-ci && bunx eslint && bunx tsc --noEmit && bun typedoc",
8076
"generate-parsers": "bun run ./scripts/generate-parsers.ts",
8177
"typedoc": "bunx typedoc --treatWarningsAsErrors"
8278
},

prettier.config.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

scripts/render-function.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ async function main() {
7272
colors: {
7373
type: "string",
7474
},
75+
dot: {
76+
type: "string",
77+
},
7578
},
7679
strict: true,
7780
allowPositionals: true,
@@ -136,7 +139,13 @@ async function main() {
136139

137140
const colorScheme = await getColorScheme(values.colors);
138141

139-
const svg = graphviz.dot(graphToDot(cfg, false, colorScheme));
142+
const dot = graphToDot(cfg, false, colorScheme);
143+
144+
if (values.dot) {
145+
await Bun.write(values.dot, dot);
146+
}
147+
148+
const svg = graphviz.dot(dot);
140149

141150
if (values.out) {
142151
await Bun.write(values.out, svg);

scripts/render-graph.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ async function main() {
2222
colors: {
2323
type: "string",
2424
},
25+
dot: {
26+
type: "string",
27+
},
2528
},
2629
});
2730

@@ -50,7 +53,13 @@ async function main() {
5053
const colorScheme = await getColorScheme(values.colors);
5154

5255
const graphviz = await Graphviz.load();
53-
const svg = graphviz.dot(graphToDot(cfg, false, colorScheme));
56+
const dot = graphToDot(cfg, false, colorScheme);
57+
58+
if (values.dot) {
59+
await Bun.write(values.dot, dot);
60+
}
61+
62+
const svg = graphviz.dot(dot);
5463
console.log(svg);
5564
}
5665

0 commit comments

Comments
 (0)