@suss/adapter-ruby 0.3.2-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/LICENSE +205 -0
- package/README.md +49 -0
- package/dist/index.cjs +927 -0
- package/dist/index.d.cts +256 -0
- package/dist/index.d.ts +256 -0
- package/dist/index.js +869 -0
- package/grammar/NOTICE +28 -0
- package/grammar/README.md +35 -0
- package/grammar/tree-sitter-ruby.wasm +0 -0
- package/package.json +64 -0
package/grammar/NOTICE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
tree-sitter-ruby.wasm in this directory is built from the
|
|
2
|
+
tree-sitter-ruby grammar, version 0.23.1:
|
|
3
|
+
|
|
4
|
+
https://github.com/tree-sitter/tree-sitter-ruby
|
|
5
|
+
|
|
6
|
+
Its license, reproduced in full:
|
|
7
|
+
|
|
8
|
+
The MIT License (MIT)
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2016 Rob Rix
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# grammar/
|
|
2
|
+
|
|
3
|
+
`tree-sitter-ruby.wasm` is the compiled Ruby grammar for
|
|
4
|
+
[web-tree-sitter](https://www.npmjs.com/package/web-tree-sitter). It is
|
|
5
|
+
a checked-in binary asset, not a build output: `src/parser.ts` loads it
|
|
6
|
+
by path at run time (`Language.load(...)`), the same way the Python
|
|
7
|
+
adapter's grammar asset works.
|
|
8
|
+
|
|
9
|
+
The adapter depends only on `web-tree-sitter` (pure WASM, no native
|
|
10
|
+
bindings, no install script). It does not depend on the
|
|
11
|
+
`tree-sitter-ruby` npm package as a runtime dependency, because that
|
|
12
|
+
package's `install` script runs `node-gyp-build` to load a native
|
|
13
|
+
binding, which is unnecessary here and the kind of native-toolchain
|
|
14
|
+
surface the language-adapters proposal rules out. This file is the one
|
|
15
|
+
part of that package v0 actually needs, taken out on its own.
|
|
16
|
+
|
|
17
|
+
Provenance, so a grammar bump is a deliberate, checkable act:
|
|
18
|
+
|
|
19
|
+
- Source: `tree-sitter-ruby` npm package, version `0.23.1`.
|
|
20
|
+
- File: `tree-sitter-ruby.wasm` from the package root (built by that
|
|
21
|
+
package's own `tree-sitter build --wasm`, published pre-built).
|
|
22
|
+
- SHA-256: `09a96427d7c72f0613ed470cd9812223fc4a91d6a9c025c0235cc6bd59ff96f4`.
|
|
23
|
+
|
|
24
|
+
tree-sitter-ruby is MIT-licensed. [`NOTICE`](./NOTICE) in this
|
|
25
|
+
directory reproduces its copyright and permission notice in full, and
|
|
26
|
+
ships in the published tarball alongside the `.wasm` file (both live
|
|
27
|
+
under `grammar/`, which the package's `files` field includes), so the
|
|
28
|
+
attribution its license requires travels with the binary it covers.
|
|
29
|
+
|
|
30
|
+
To pick up a newer grammar: `npm pack tree-sitter-ruby@<version>`,
|
|
31
|
+
extract it, copy `tree-sitter-ruby.wasm` here, update the version and
|
|
32
|
+
hash above, check `NOTICE` still matches that version's `LICENSE` file,
|
|
33
|
+
and re-run the adapter's test suite. A grammar change that renames or
|
|
34
|
+
restructures a node type used in `src/ast.ts` or `src/scope.ts` will
|
|
35
|
+
fail loudly there.
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@suss/adapter-ruby",
|
|
3
|
+
"version": "0.3.2-0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Ruby language adapter for suss, parsing source with tree-sitter (WASM), resolving constant nesting with a lexical binder, and emitting raw extractions for the suss pipeline.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"suss",
|
|
8
|
+
"behavioral-summary",
|
|
9
|
+
"static-analysis",
|
|
10
|
+
"ruby",
|
|
11
|
+
"tree-sitter",
|
|
12
|
+
"ast"
|
|
13
|
+
],
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"author": "Nimbus Cloud AI LLC",
|
|
16
|
+
"homepage": "https://github.com/nimbuscloud-ai/suss/tree/main/packages/adapter/ruby#readme",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/nimbuscloud-ai/suss.git",
|
|
20
|
+
"directory": "packages/adapter/ruby"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/nimbuscloud-ai/suss/issues"
|
|
24
|
+
},
|
|
25
|
+
"main": "./dist/index.cjs",
|
|
26
|
+
"module": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js",
|
|
32
|
+
"require": "./dist/index.cjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"grammar",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsup",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"test:coverage": "vitest run --coverage",
|
|
45
|
+
"lint": "biome check .",
|
|
46
|
+
"lint:fix": "biome check --write .",
|
|
47
|
+
"typecheck": "tsc --noEmit"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@suss/behavioral-ir": "0.3.2",
|
|
51
|
+
"@suss/datalog": "0.3.2",
|
|
52
|
+
"@suss/extractor": "0.3.2",
|
|
53
|
+
"web-tree-sitter": "^0.26.11"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/node": "*",
|
|
57
|
+
"tsup": "*",
|
|
58
|
+
"typescript": "*",
|
|
59
|
+
"vitest": "*"
|
|
60
|
+
},
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
}
|
|
64
|
+
}
|