@suss/adapter-python 0.33.0 → 0.34.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.
- package/README.md +11 -11
- package/dist/index.cjs +6264 -2830
- package/dist/index.d.cts +509 -284
- package/dist/index.d.ts +509 -284
- package/dist/index.js +5829 -2358
- package/grammar/README.md +26 -23
- package/package.json +10 -9
package/grammar/README.md
CHANGED
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
`tree-sitter-python.wasm` is the compiled Python grammar for
|
|
4
4
|
[web-tree-sitter](https://www.npmjs.com/package/web-tree-sitter). It is
|
|
5
|
-
a checked
|
|
6
|
-
by path at run time (`Language.load(...)`),
|
|
7
|
-
disk next to the compiled adapter
|
|
8
|
-
its own core `.wasm` next to its JS.
|
|
5
|
+
a binary checked into the repository, and the build does not produce
|
|
6
|
+
it. `src/parser.ts` loads it by path at run time (`Language.load(...)`),
|
|
7
|
+
so the file has to exist on disk next to the compiled adapter. This is
|
|
8
|
+
the same way `web-tree-sitter` ships its own core `.wasm` next to its JS.
|
|
9
9
|
|
|
10
|
-
The adapter depends only on `web-tree-sitter
|
|
11
|
-
bindings
|
|
12
|
-
`tree-sitter-python` npm package
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
The adapter depends only on `web-tree-sitter`, which is pure WASM with
|
|
11
|
+
no native bindings and no install script. It does not depend on the
|
|
12
|
+
`tree-sitter-python` npm package. That package's `install` script runs
|
|
13
|
+
`node-gyp-build` to load a native binding, which this adapter does not
|
|
14
|
+
need, and the language-adapters proposal rules out that kind of native
|
|
15
|
+
toolchain dependency. This file is the one part of that package v0
|
|
16
|
+
needs, copied out on its own.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The provenance is recorded here so that a grammar bump is a deliberate
|
|
19
|
+
change someone can check:
|
|
19
20
|
|
|
20
21
|
- Source: `tree-sitter-python` npm package, version `0.23.6`.
|
|
21
22
|
- File: `tree-sitter-python.wasm` from the package root (built by that
|
|
@@ -23,15 +24,17 @@ Provenance, so a grammar bump is a deliberate, checkable act:
|
|
|
23
24
|
- SHA-256: `8c93692fb368e288a5824cee55773c9b3602804f513bda48c97661e52e9c2da2`.
|
|
24
25
|
|
|
25
26
|
tree-sitter-python is MIT-licensed. [`NOTICE`](./NOTICE) in this
|
|
26
|
-
directory reproduces its copyright and permission notice in full
|
|
27
|
-
ships in the published tarball alongside the `.wasm` file
|
|
28
|
-
under `grammar/`, which the package's `files` field includes
|
|
29
|
-
attribution its license requires travels with the binary it
|
|
27
|
+
directory reproduces its copyright and permission notice in full. It
|
|
28
|
+
ships in the published tarball alongside the `.wasm` file, because both
|
|
29
|
+
live under `grammar/`, which the package's `files` field includes. The
|
|
30
|
+
attribution its license requires therefore travels with the binary it
|
|
31
|
+
covers.
|
|
30
32
|
|
|
31
|
-
To pick up a newer grammar
|
|
32
|
-
extract it
|
|
33
|
-
hash above, check `NOTICE` still matches that version's
|
|
34
|
-
and re-run the adapter's test suite. A grammar change
|
|
35
|
-
restructures a node type used in `src/ast.ts` will fail
|
|
36
|
-
|
|
37
|
-
proposal) is the
|
|
33
|
+
To pick up a newer grammar, run `npm pack tree-sitter-python@<version>`
|
|
34
|
+
and extract it. Copy `tree-sitter-python.wasm` here, update the version
|
|
35
|
+
and hash above, check that `NOTICE` still matches that version's
|
|
36
|
+
`LICENSE` file, and re-run the adapter's test suite. A grammar change
|
|
37
|
+
that renames or restructures a node type used in `src/ast.ts` will fail
|
|
38
|
+
loudly there. Over the longer term, the fuzzer's parse-failure-rate
|
|
39
|
+
reporting (per the language-adapters proposal) is the signal for when a
|
|
40
|
+
bump is needed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suss/adapter-python",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Read a Python codebase with suss and check what each FastAPI or Flask route returns against the clients, specs and infrastructure that depend on it.",
|
|
6
6
|
"keywords": [
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"license": "Apache-2.0",
|
|
17
17
|
"author": "Nimbus Cloud AI LLC",
|
|
18
|
-
"homepage": "https://
|
|
18
|
+
"homepage": "https://suss.sh",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "git+https://github.com/nimbuscloud-ai/suss.git",
|
|
@@ -49,13 +49,14 @@
|
|
|
49
49
|
"typecheck": "tsc --noEmit"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@suss/behavioral-ir": "0.
|
|
53
|
-
"@suss/datalog": "0.
|
|
54
|
-
"@suss/extractor": "0.
|
|
55
|
-
"@suss/ir-core": "0.
|
|
56
|
-
"@suss/resolution": "0.
|
|
57
|
-
"@suss/sql": "0.
|
|
58
|
-
"@suss/values": "0.
|
|
52
|
+
"@suss/behavioral-ir": "0.34.0",
|
|
53
|
+
"@suss/datalog": "0.34.0",
|
|
54
|
+
"@suss/extractor": "0.34.0",
|
|
55
|
+
"@suss/ir-core": "0.34.0",
|
|
56
|
+
"@suss/resolution": "0.34.0",
|
|
57
|
+
"@suss/sql": "0.34.0",
|
|
58
|
+
"@suss/values": "0.34.0",
|
|
59
|
+
"smol-toml": "^1.4.2",
|
|
59
60
|
"web-tree-sitter": "^0.26.11"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|