@graphpilot-oss/graphpilot 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/CHANGELOG.md +73 -126
  2. package/README.md +359 -101
  3. package/dist/cli.js +20 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/indexer.js +3 -3
  6. package/dist/indexer.js.map +1 -1
  7. package/dist/init.d.ts +28 -0
  8. package/dist/init.js +112 -0
  9. package/dist/init.js.map +1 -0
  10. package/dist/interactions.d.ts +5 -4
  11. package/dist/interactions.js +0 -0
  12. package/dist/interactions.js.map +1 -1
  13. package/dist/mcp.js +126 -46
  14. package/dist/mcp.js.map +1 -1
  15. package/dist/repo-resolve.d.ts +47 -0
  16. package/dist/repo-resolve.js +195 -0
  17. package/dist/repo-resolve.js.map +1 -0
  18. package/dist/storage.js +10 -1
  19. package/dist/storage.js.map +1 -1
  20. package/dist/validation.js +30 -4
  21. package/dist/validation.js.map +1 -1
  22. package/dist/watcher.d.ts +10 -0
  23. package/dist/watcher.js +70 -7
  24. package/dist/watcher.js.map +1 -1
  25. package/examples/README.md +105 -0
  26. package/examples/claude-code/README.md +125 -0
  27. package/examples/claude-code/claude-routing.md +102 -0
  28. package/examples/claude-code/claude_config.json +8 -0
  29. package/examples/cline/.clinerules +39 -0
  30. package/examples/cline/README.md +104 -0
  31. package/examples/cline/cline_mcp_settings.json +10 -0
  32. package/examples/continue/.continuerules +39 -0
  33. package/examples/continue/README.md +98 -0
  34. package/examples/continue/config.json +13 -0
  35. package/examples/cursor/.cursorrules +39 -0
  36. package/examples/cursor/README.md +98 -0
  37. package/examples/cursor/mcp.json +11 -0
  38. package/examples/windsurf/.windsurfrules +39 -0
  39. package/examples/windsurf/README.md +85 -0
  40. package/examples/windsurf/mcp_config.json +8 -0
  41. package/package.json +12 -3
  42. package/.editorconfig +0 -15
  43. package/.github/CODEOWNERS +0 -22
  44. package/.github/FUNDING.yml +0 -1
  45. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -33
  46. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  47. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -23
  48. package/.github/PULL_REQUEST_TEMPLATE.md +0 -19
  49. package/.github/dependabot.yml +0 -15
  50. package/.github/workflows/ci.yml +0 -62
  51. package/.github/workflows/release.yml +0 -50
  52. package/.prettierignore +0 -19
  53. package/.prettierrc.json +0 -20
  54. package/CODE_OF_CONDUCT.md +0 -83
  55. package/CONTRIBUTING.md +0 -111
  56. package/bench/README.md +0 -544
  57. package/bench/results/agent-tier-2026-05-22.md +0 -28
  58. package/bench/results/agent-tier-summary.md +0 -44
  59. package/bench/results/baseline-tier-2026-05-22.md +0 -23
  60. package/bench/results/baseline.json +0 -810
  61. package/bench/results/baseline.md +0 -28
  62. package/bench/run-agent-tier-automated.ts +0 -234
  63. package/bench/run-agent-tier.md +0 -125
  64. package/bench/run-baseline-tier.ts +0 -200
  65. package/bench/run.ts +0 -210
  66. package/bench/runner-baseline.ts +0 -177
  67. package/bench/runner-graphpilot.ts +0 -131
  68. package/bench/score-agent-tier.ts +0 -191
  69. package/bench/score.ts +0 -59
  70. package/bench/tasks.ts +0 -236
  71. package/dist/provenance.d.ts +0 -74
  72. package/dist/provenance.js +0 -95
  73. package/dist/provenance.js.map +0 -1
  74. package/docs/architecture.md +0 -311
  75. package/docs/limitations.md +0 -156
  76. package/docs/mcp-setup.md +0 -231
  77. package/docs/quickstart.md +0 -202
  78. package/eslint.config.js +0 -148
  79. package/lefthook.yml +0 -81
  80. package/pnpm-workspace.yaml +0 -6
  81. package/scripts/smoke-stdio.mjs +0 -97
  82. package/src/cli.ts +0 -171
  83. package/src/edges.ts +0 -202
  84. package/src/git.ts +0 -255
  85. package/src/graph-schema.ts +0 -229
  86. package/src/impact.ts +0 -218
  87. package/src/indexer.ts +0 -152
  88. package/src/interactions.ts +0 -0
  89. package/src/mcp.ts +0 -652
  90. package/src/parser.ts +0 -138
  91. package/src/provenance.ts +0 -115
  92. package/src/query.ts +0 -148
  93. package/src/redact.ts +0 -122
  94. package/src/storage.ts +0 -115
  95. package/src/symbols.ts +0 -173
  96. package/src/validation.ts +0 -69
  97. package/src/validators.ts +0 -253
  98. package/src/watcher.ts +0 -383
  99. package/tests/edges.test.ts +0 -175
  100. package/tests/fixtures/sample.ts +0 -32
  101. package/tests/git.test.ts +0 -303
  102. package/tests/graph-schema.test.ts +0 -321
  103. package/tests/impact.test.ts +0 -454
  104. package/tests/interactions.test.ts +0 -180
  105. package/tests/lint-policy.test.ts +0 -106
  106. package/tests/mcp-stdio.test.ts +0 -171
  107. package/tests/mcp.test.ts +0 -335
  108. package/tests/parser.test.ts +0 -31
  109. package/tests/provenance.test.ts +0 -132
  110. package/tests/query.test.ts +0 -160
  111. package/tests/redact.test.ts +0 -167
  112. package/tests/security.test.ts +0 -144
  113. package/tests/symbols.test.ts +0 -78
  114. package/tests/validators.test.ts +0 -193
  115. package/tests/watcher.test.ts +0 -250
  116. package/tsconfig.json +0 -18
@@ -0,0 +1,39 @@
1
+ # GraphPilot routing rules for Cursor
2
+
3
+ This repo has a GraphPilot structural code-graph available via MCP. Use it before grep on structural questions.
4
+
5
+ ## When the user asks any of:
6
+
7
+ - "who calls X" / "what uses X" / "where is X called from"
8
+ - "what does X call" / "what does X depend on"
9
+ - "rename X — what breaks" / "impact of changing X" / "what depends on X"
10
+ - "find function X" / "where is X defined" / "list all interfaces"
11
+
12
+ → **Use the graphpilot MCP tools BEFORE grep or reading files.**
13
+
14
+ | Question kind | Tool to call |
15
+ | ---------------------- | ------------------------------------------------------- |
16
+ | Define / locate symbol | `gp_recall({ query, substring?, path? })` |
17
+ | Callers / callees | `gp_callers({ symbol, direction, path? })` |
18
+ | Blast radius / rename | `gp_impact({ symbol, depth?, path? })` |
19
+ | PR-scoped blast radius | `gp_impact({ symbol, since: 'main', path? })` |
20
+ | Index health probe | `gp_stats({ path? })` |
21
+ | Refresh after edits | `gp_index({ path? })` |
22
+
23
+ ## When NOT to use GraphPilot
24
+
25
+ Fall back to grep / read for:
26
+
27
+ - Comments, JSDoc, string literals, error messages
28
+ - Config files (package.json, tsconfig.json, .env)
29
+ - Markdown / docs
30
+ - Languages other than TypeScript / JavaScript
31
+ - Git history (blame, log)
32
+
33
+ ## After heavy editing
34
+
35
+ After ~10+ file edits, call `gp_index` once before further structural questions, or run `graphpilot watch` in a side terminal for sub-10 ms incremental updates.
36
+
37
+ ## Citing evidence
38
+
39
+ Every GraphPilot response carries `file:line @ sha` anchors. When citing results to the user, **include the anchor verbatim** — it's verifiable: the user can jump to that line and the code will match.
@@ -0,0 +1,98 @@
1
+ # Cursor + GraphPilot
2
+
3
+ Step-by-step install of GraphPilot as an MCP server inside Cursor.
4
+
5
+ ## 1. Build GraphPilot
6
+
7
+ ```bash
8
+ git clone https://github.com/graphpilot-oss/graphpilot.git
9
+ cd graphpilot && pnpm install && pnpm build
10
+ ```
11
+
12
+ ## 2. Open Cursor's MCP config
13
+
14
+ Two ways:
15
+
16
+ - **UI:** Press `Cmd/Ctrl + ,` → search "MCP" → "Edit MCP config"
17
+ - **File:** open `~/.cursor/mcp.json` directly (create it if it doesn't exist)
18
+
19
+ Paste the contents of [`mcp.json`](./mcp.json) and replace `/absolute/path/to/graphpilot/` with the real path on your machine:
20
+
21
+ ```jsonc
22
+ {
23
+ "mcpServers": {
24
+ "graphpilot": {
25
+ "command": "node",
26
+ "args": ["/absolute/path/to/graphpilot/dist/cli.js", "mcp"],
27
+ "env": {
28
+ "GRAPHPILOT_ROOT": "${workspaceFolder}",
29
+ },
30
+ },
31
+ },
32
+ }
33
+ ```
34
+
35
+ `${workspaceFolder}` lets GraphPilot find the index when the agent omits `path` (MCP cwd is often your home directory, not the repo).
36
+
37
+ Post-npm:
38
+
39
+ ```jsonc
40
+ {
41
+ "mcpServers": {
42
+ "graphpilot": {
43
+ "command": "npx",
44
+ "args": ["graphpilot", "mcp"],
45
+ },
46
+ },
47
+ }
48
+ ```
49
+
50
+ ## 3. Verify
51
+
52
+ Settings → MCP. `graphpilot` should show as **Connected** with 5 tools listed.
53
+
54
+ If it shows red after the config change, click the refresh icon next to it — Cursor sometimes caches MCP server state.
55
+
56
+ ## 4. Index a repo
57
+
58
+ ```bash
59
+ node /abs/path/to/graphpilot/dist/cli.js index .
60
+ ```
61
+
62
+ ## 5. Auto-routing via `.cursorrules`
63
+
64
+ Drop [`.cursorrules`](./.cursorrules) into the root of the repo you indexed. It tells Cursor's agent to reach for GraphPilot on structural questions automatically. Re-open the workspace to pick it up.
65
+
66
+ Try:
67
+
68
+ ```text
69
+ Who calls authenticate in this repo?
70
+
71
+ What breaks if I rename parseFile?
72
+ ```
73
+
74
+ You should see Cursor invoke `gp_callers` / `gp_impact` in its tool-use trace.
75
+
76
+ ## 6. Keep the index fresh
77
+
78
+ In a side terminal:
79
+
80
+ ```bash
81
+ node /abs/path/to/graphpilot/dist/cli.js watch .
82
+ ```
83
+
84
+ ## Troubleshooting
85
+
86
+ | Symptom | Fix |
87
+ | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
88
+ | Server shows red in Settings → MCP | Click the refresh icon. If still red, run `node dist/cli.js mcp` in a terminal — inspect stderr. |
89
+ | `.cursorrules` ignored | Cursor reads it on workspace open. Close and reopen the folder. |
90
+ | Tool calls return "no index" | Add `"env": { "GRAPHPILOT_ROOT": "${workspaceFolder}" }` to MCP config (see `mcp.json`), or copy project `.cursor/mcp.json`. Cursor also sends workspace roots automatically. |
91
+
92
+ ## Files in this folder
93
+
94
+ | File | Purpose |
95
+ | -------------------------------- | -------------------------------------------------------------------- |
96
+ | [`README.md`](./README.md) | This walkthrough |
97
+ | [`mcp.json`](./mcp.json) | Sample `~/.cursor/mcp.json` — copy the `mcpServers` block into yours |
98
+ | [`.cursorrules`](./.cursorrules) | Routing template — copy to your indexed repo's root for auto-routing |
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "graphpilot": {
4
+ "command": "node",
5
+ "args": ["/absolute/path/to/graphpilot/dist/cli.js", "mcp"],
6
+ "env": {
7
+ "GRAPHPILOT_ROOT": "${workspaceFolder}"
8
+ }
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,39 @@
1
+ # GraphPilot routing rules for Windsurf
2
+
3
+ This repo has a GraphPilot structural code-graph available via MCP. Use it before grep on structural questions.
4
+
5
+ ## When the user asks any of:
6
+
7
+ - "who calls X" / "what uses X" / "where is X called from"
8
+ - "what does X call" / "what does X depend on"
9
+ - "rename X — what breaks" / "impact of changing X" / "what depends on X"
10
+ - "find function X" / "where is X defined" / "list all interfaces"
11
+
12
+ → **Use the graphpilot MCP tools BEFORE grep or reading files.**
13
+
14
+ | Question kind | Tool to call |
15
+ | ---------------------- | ------------------------------------------------------- |
16
+ | Define / locate symbol | `gp_recall({ query, substring?, path? })` |
17
+ | Callers / callees | `gp_callers({ symbol, direction, path? })` |
18
+ | Blast radius / rename | `gp_impact({ symbol, depth?, path? })` |
19
+ | PR-scoped blast radius | `gp_impact({ symbol, since: 'main', path? })` |
20
+ | Index health probe | `gp_stats({ path? })` |
21
+ | Refresh after edits | `gp_index({ path? })` |
22
+
23
+ ## When NOT to use GraphPilot
24
+
25
+ Fall back to grep / read for:
26
+
27
+ - Comments, JSDoc, string literals, error messages
28
+ - Config files (package.json, tsconfig.json, .env)
29
+ - Markdown / docs
30
+ - Languages other than TypeScript / JavaScript
31
+ - Git history (blame, log)
32
+
33
+ ## After heavy editing
34
+
35
+ After ~10+ file edits, call `gp_index` once before further structural questions, or run `graphpilot watch` in a side terminal for sub-10 ms incremental updates.
36
+
37
+ ## Citing evidence
38
+
39
+ Every GraphPilot response carries `file:line @ sha` anchors. When citing results to the user, **include the anchor verbatim** — it's verifiable: the user can jump to that line and the code will match.
@@ -0,0 +1,85 @@
1
+ # Windsurf (Codeium) + GraphPilot
2
+
3
+ Step-by-step install of GraphPilot as an MCP server inside Windsurf.
4
+
5
+ ## 1. Build GraphPilot
6
+
7
+ ```bash
8
+ git clone https://github.com/graphpilot-oss/graphpilot.git
9
+ cd graphpilot && pnpm install && pnpm build
10
+ ```
11
+
12
+ ## 2. Edit Windsurf's MCP config
13
+
14
+ ```
15
+ ~/.codeium/windsurf/mcp_config.json
16
+ ```
17
+
18
+ Create it if it doesn't exist. Paste the contents of [`mcp_config.json`](./mcp_config.json) and replace `/absolute/path/to/graphpilot/` with the real path:
19
+
20
+ ```jsonc
21
+ {
22
+ "mcpServers": {
23
+ "graphpilot": {
24
+ "command": "node",
25
+ "args": ["/absolute/path/to/graphpilot/dist/cli.js", "mcp"],
26
+ },
27
+ },
28
+ }
29
+ ```
30
+
31
+ Post-npm:
32
+
33
+ ```jsonc
34
+ {
35
+ "mcpServers": {
36
+ "graphpilot": {
37
+ "command": "npx",
38
+ "args": ["graphpilot", "mcp"],
39
+ },
40
+ },
41
+ }
42
+ ```
43
+
44
+ ## 3. Restart Windsurf
45
+
46
+ Fully quit and reopen. The Cascade panel reads MCP config on launch.
47
+
48
+ ## 4. Verify
49
+
50
+ Open the **Cascade** panel — the MCP tools list should include the five `gp_*` tools (`gp_index`, `gp_recall`, `gp_callers`, `gp_impact`, `gp_stats`).
51
+
52
+ ## 5. Index a repo
53
+
54
+ ```bash
55
+ node /abs/path/to/graphpilot/dist/cli.js index .
56
+ ```
57
+
58
+ ## 6. Try it
59
+
60
+ ```text
61
+ Use graphpilot to find who calls authenticate.
62
+
63
+ What breaks if I rename parseFile? Use gp_impact.
64
+ ```
65
+
66
+ ## 7. Keep the index fresh
67
+
68
+ ```bash
69
+ node /abs/path/to/graphpilot/dist/cli.js watch .
70
+ ```
71
+
72
+ ## Troubleshooting
73
+
74
+ | Symptom | Fix |
75
+ | ------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
76
+ | MCP tools list is empty | Verify JSON syntax with `python -m json.tool ~/.codeium/windsurf/mcp_config.json`. Then restart Windsurf. |
77
+ | Server shows but tools fail with "no index" | Pass an explicit `path: "/abs/repo"` to the tool, or `gp_index` first. |
78
+ | Native module errors on launch | `pnpm approve-builds --all && pnpm rebuild` in the graphpilot dir. Use Node 22 LTS if on 23+. |
79
+
80
+ ## Files in this folder
81
+
82
+ | File | Purpose |
83
+ | -------------------------------------- | ------------------------------------------------------------------------ |
84
+ | [`README.md`](./README.md) | This walkthrough |
85
+ | [`mcp_config.json`](./mcp_config.json) | Sample `~/.codeium/windsurf/mcp_config.json` — copy the block into yours |
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "graphpilot": {
4
+ "command": "node",
5
+ "args": ["/absolute/path/to/graphpilot/dist/cli.js", "mcp"]
6
+ }
7
+ }
8
+ }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.0.1",
6
+ "version": "0.1.0",
7
7
  "description": "Structural memory for coding agents.",
8
8
  "license": "Apache-2.0",
9
9
  "repository": {
@@ -15,10 +15,18 @@
15
15
  "url": "https://github.com/graphpilot-oss/graphpilot/issues"
16
16
  },
17
17
  "type": "module",
18
- "main": "./dist/index.js",
19
18
  "bin": {
20
19
  "graphpilot": "./dist/cli.js"
21
20
  },
21
+ "files": [
22
+ "dist/",
23
+ "assets/",
24
+ "examples/",
25
+ "README.md",
26
+ "LICENSE",
27
+ "CHANGELOG.md",
28
+ "SECURITY.md"
29
+ ],
22
30
  "engines": {
23
31
  "node": ">=20"
24
32
  },
@@ -51,6 +59,7 @@
51
59
  "format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mjs,cjs,json,yml,yaml,md}\"",
52
60
  "typecheck": "tsc --noEmit",
53
61
  "check": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm test",
54
- "bench": "tsx bench/run.ts"
62
+ "bench": "tsx bench/run.ts",
63
+ "bench:scale": "tsx bench/run-scale.ts"
55
64
  }
56
65
  }
package/.editorconfig DELETED
@@ -1,15 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = space
5
- indent_size = 2
6
- end_of_line = lf
7
- charset = utf-8
8
- trim_trailing_whitespace = true
9
- insert_final_newline = true
10
-
11
- [*.md]
12
- trim_trailing_whitespace = false
13
-
14
- [Makefile]
15
- indent_style = tab
@@ -1,22 +0,0 @@
1
- # CODEOWNERS — auto-request review on every PR.
2
- #
3
- # Syntax: <path-glob> <reviewer> [<reviewer>...]
4
- # Reviewers are GitHub handles (no @) or team slugs (@org/team).
5
- #
6
- # Order matters: the LAST matching rule wins. Default rule first, then
7
- # overrides for paths that should pull in specific reviewers.
8
- #
9
- # Docs: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-security/customizing-your-repository/about-code-owners
10
-
11
- # Default: solo maintainer reviews everything.
12
- * @codeakki
13
-
14
- # When co-maintainers join, add area-specific rules. For example:
15
- #
16
- # /src/mcp/ @codeakki @some-mcp-expert
17
- # /src/parser/ @codeakki @some-tree-sitter-expert
18
- # /docs/ @codeakki @docs-lead
19
- # /bench/ @codeakki @benchmark-owner
20
- # /.github/ @codeakki # workflow changes are sensitive
21
- #
22
- # Until then, the default rule is enough.
@@ -1 +0,0 @@
1
- github: [codeakki]
@@ -1,33 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Something is broken or behaving unexpectedly
4
- title: 'bug: '
5
- labels: bug
6
- ---
7
-
8
- ## Describe the bug
9
-
10
- A clear description of what's wrong.
11
-
12
- ## Reproduction
13
-
14
- Steps to reproduce:
15
-
16
- 1. Run `...`
17
- 2. ...
18
- 3. ...
19
-
20
- ## Expected behavior
21
-
22
- What you expected to happen instead.
23
-
24
- ## Environment
25
-
26
- - OS: [macOS / Linux / Windows + version]
27
- - Node version: output of `node -v`
28
- - GraphPilot version: output of `node dist/cli.js --version` (or commit SHA)
29
- - MCP client (if relevant): [Claude Code / Cursor / Windsurf / ...]
30
-
31
- ## Additional context
32
-
33
- Logs, screenshots, or a minimal repo that reproduces the issue.
@@ -1,5 +0,0 @@
1
- blank_issues_enabled: false
2
- contact_links:
3
- - name: Discussion / Question
4
- url: https://github.com/graphpilot-oss/graphpilot/discussions
5
- about: Ask questions or share ideas in Discussions instead of opening an issue.
@@ -1,23 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest a new feature or improvement
4
- title: 'feat: '
5
- labels: enhancement
6
- ---
7
-
8
- ## What problem does this solve?
9
-
10
- Describe the real-world task or pain point that motivates this feature.
11
- "My coding agent struggles with X" is more useful than "GraphPilot should support X."
12
-
13
- ## Proposed solution
14
-
15
- What you'd like to see. Rough sketch is fine.
16
-
17
- ## Alternatives considered
18
-
19
- What workarounds have you tried? Any other tools that solve this well?
20
-
21
- ## Additional context
22
-
23
- Links, screenshots, examples.
@@ -1,19 +0,0 @@
1
- ## What
2
-
3
- Brief description of the change.
4
-
5
- ## Why
6
-
7
- What problem does this solve? Link to issue: closes #...
8
-
9
- ## How
10
-
11
- Brief explanation of the approach. Anything reviewers should look at carefully?
12
-
13
- ## Checklist
14
-
15
- - [ ] Tests added/updated
16
- - [ ] Documentation updated if user-facing behavior changed
17
- - [ ] `CHANGELOG.md` updated under `[Unreleased]`
18
- - [ ] CI passes (`pnpm build && pnpm test`)
19
- - [ ] Commit message follows [Conventional Commits](https://www.conventionalcommits.org)
@@ -1,15 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: '/'
5
- schedule:
6
- interval: weekly
7
- open-pull-requests-limit: 5
8
- groups:
9
- dev-dependencies:
10
- dependency-type: development
11
-
12
- - package-ecosystem: github-actions
13
- directory: '/'
14
- schedule:
15
- interval: monthly
@@ -1,62 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches: [main]
7
-
8
- jobs:
9
- lint:
10
- name: lint (ESLint — enforces no-network in src/, T12)
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v6
14
- - uses: pnpm/action-setup@v6
15
- - uses: actions/setup-node@v6
16
- with:
17
- node-version: 22
18
- cache: pnpm
19
- - run: pnpm install --frozen-lockfile
20
- - run: pnpm typecheck
21
- - run: pnpm lint
22
-
23
- test:
24
- name: test (${{ matrix.os }}, node ${{ matrix.node }})
25
- needs: lint
26
- strategy:
27
- fail-fast: false
28
- matrix:
29
- os: [ubuntu-latest, macos-latest, windows-latest]
30
- node: [20, 22]
31
- runs-on: ${{ matrix.os }}
32
- steps:
33
- - uses: actions/checkout@v6
34
-
35
- - uses: pnpm/action-setup@v6
36
-
37
- - uses: actions/setup-node@v6
38
- with:
39
- node-version: ${{ matrix.node }}
40
- cache: pnpm
41
-
42
- - name: Install dependencies
43
- run: pnpm install --frozen-lockfile
44
-
45
- - name: Build
46
- run: pnpm build
47
-
48
- - name: Test
49
- run: pnpm test
50
-
51
- audit:
52
- name: audit
53
- runs-on: ubuntu-latest
54
- steps:
55
- - uses: actions/checkout@v6
56
- - uses: pnpm/action-setup@v6
57
- - uses: actions/setup-node@v6
58
- with:
59
- node-version: 22
60
- cache: pnpm
61
- - run: pnpm install --frozen-lockfile
62
- - run: pnpm audit --audit-level=high
@@ -1,50 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- permissions:
9
- contents: write
10
- id-token: write
11
-
12
- jobs:
13
- publish:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: actions/checkout@v6
17
-
18
- - uses: pnpm/action-setup@v6
19
-
20
- - uses: actions/setup-node@v6
21
- with:
22
- node-version: 22
23
- cache: pnpm
24
- registry-url: 'https://registry.npmjs.org'
25
-
26
- - run: pnpm install --frozen-lockfile
27
-
28
- - run: pnpm run check
29
-
30
- - run: pnpm build
31
-
32
- # Test tags (e.g. v0.0.1-test) publish under --tag test, not latest
33
- - name: Publish (test tag)
34
- if: contains(github.ref_name, '-test')
35
- run: pnpm publish --no-git-checks --tag test
36
- env:
37
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38
-
39
- # Real releases publish normally with provenance
40
- - name: Publish (release)
41
- if: "!contains(github.ref_name, '-test')"
42
- run: pnpm publish --no-git-checks --provenance
43
- env:
44
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
45
-
46
- # Only create a GitHub Release for real tags, not test ones
47
- - uses: softprops/action-gh-release@v3
48
- if: "!contains(github.ref_name, '-test')"
49
- with:
50
- generate_release_notes: true
package/.prettierignore DELETED
@@ -1,19 +0,0 @@
1
- # Don't reformat:
2
- node_modules/
3
- dist/
4
- coverage/
5
-
6
- # Lockfiles + generated data are not human-edited.
7
- pnpm-lock.yaml
8
- package-lock.json
9
- yarn.lock
10
-
11
- # Benchmark output is generated by `pnpm bench` — prettier would
12
- # pointlessly reformat the JSON every run.
13
- bench/results/
14
-
15
- # Private notes are not part of the project, don't touch.
16
- .notes/
17
-
18
- # CLAUDE.md is per-developer + gitignored, leave alone.
19
- CLAUDE.md
package/.prettierrc.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "semi": true,
3
- "singleQuote": true,
4
- "trailingComma": "all",
5
- "printWidth": 100,
6
- "tabWidth": 2,
7
- "useTabs": false,
8
- "arrowParens": "always",
9
- "endOfLine": "lf",
10
- "bracketSpacing": true,
11
- "overrides": [
12
- {
13
- "files": "*.md",
14
- "options": {
15
- "proseWrap": "preserve",
16
- "printWidth": 80
17
- }
18
- }
19
- ]
20
- }