@groma/scanner-react 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.
- package/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/index.js +169879 -0
- package/dist/lib.d.ts +20 -0
- package/dist/lib.decorators.d.ts +382 -0
- package/dist/lib.decorators.legacy.d.ts +20 -0
- package/dist/lib.dom.asynciterable.d.ts +18 -0
- package/dist/lib.dom.d.ts +45125 -0
- package/dist/lib.dom.iterable.d.ts +18 -0
- package/dist/lib.es2015.collection.d.ts +150 -0
- package/dist/lib.es2015.core.d.ts +595 -0
- package/dist/lib.es2015.d.ts +26 -0
- package/dist/lib.es2015.generator.d.ts +75 -0
- package/dist/lib.es2015.iterable.d.ts +603 -0
- package/dist/lib.es2015.promise.d.ts +79 -0
- package/dist/lib.es2015.proxy.d.ts +126 -0
- package/dist/lib.es2015.reflect.d.ts +142 -0
- package/dist/lib.es2015.symbol.d.ts +44 -0
- package/dist/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/dist/lib.es2016.array.include.d.ts +114 -0
- package/dist/lib.es2016.d.ts +19 -0
- package/dist/lib.es2016.full.d.ts +21 -0
- package/dist/lib.es2016.intl.d.ts +29 -0
- package/dist/lib.es2017.arraybuffer.d.ts +19 -0
- package/dist/lib.es2017.d.ts +24 -0
- package/dist/lib.es2017.date.d.ts +29 -0
- package/dist/lib.es2017.full.d.ts +21 -0
- package/dist/lib.es2017.intl.d.ts +42 -0
- package/dist/lib.es2017.object.d.ts +47 -0
- package/dist/lib.es2017.sharedmemory.d.ts +133 -0
- package/dist/lib.es2017.string.d.ts +43 -0
- package/dist/lib.es2017.typedarrays.d.ts +51 -0
- package/dist/lib.es2018.asyncgenerator.d.ts +75 -0
- package/dist/lib.es2018.asynciterable.d.ts +51 -0
- package/dist/lib.es2018.d.ts +22 -0
- package/dist/lib.es2018.full.d.ts +22 -0
- package/dist/lib.es2018.intl.d.ts +81 -0
- package/dist/lib.es2018.promise.d.ts +28 -0
- package/dist/lib.es2018.regexp.d.ts +35 -0
- package/dist/lib.es2019.array.d.ts +77 -0
- package/dist/lib.es2019.d.ts +22 -0
- package/dist/lib.es2019.full.d.ts +22 -0
- package/dist/lib.es2019.intl.d.ts +21 -0
- package/dist/lib.es2019.object.d.ts +31 -0
- package/dist/lib.es2019.string.d.ts +35 -0
- package/dist/lib.es2019.symbol.d.ts +22 -0
- package/dist/lib.es2020.bigint.d.ts +763 -0
- package/dist/lib.es2020.d.ts +25 -0
- package/dist/lib.es2020.date.d.ts +40 -0
- package/dist/lib.es2020.full.d.ts +22 -0
- package/dist/lib.es2020.intl.d.ts +472 -0
- package/dist/lib.es2020.number.d.ts +26 -0
- package/dist/lib.es2020.promise.d.ts +45 -0
- package/dist/lib.es2020.sharedmemory.d.ts +97 -0
- package/dist/lib.es2020.string.d.ts +42 -0
- package/dist/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/dist/lib.es2021.d.ts +21 -0
- package/dist/lib.es2021.full.d.ts +22 -0
- package/dist/lib.es2021.intl.d.ts +164 -0
- package/dist/lib.es2021.promise.d.ts +46 -0
- package/dist/lib.es2021.string.d.ts +31 -0
- package/dist/lib.es2021.weakref.d.ts +76 -0
- package/dist/lib.es2022.array.d.ts +119 -0
- package/dist/lib.es2022.d.ts +23 -0
- package/dist/lib.es2022.error.d.ts +73 -0
- package/dist/lib.es2022.full.d.ts +22 -0
- package/dist/lib.es2022.intl.d.ts +143 -0
- package/dist/lib.es2022.object.d.ts +24 -0
- package/dist/lib.es2022.regexp.d.ts +37 -0
- package/dist/lib.es2022.string.d.ts +23 -0
- package/dist/lib.es2023.array.d.ts +922 -0
- package/dist/lib.es2023.collection.d.ts +19 -0
- package/dist/lib.es2023.d.ts +20 -0
- package/dist/lib.es2023.full.d.ts +22 -0
- package/dist/lib.es2023.intl.d.ts +62 -0
- package/dist/lib.es2024.arraybuffer.d.ts +63 -0
- package/dist/lib.es2024.collection.d.ts +27 -0
- package/dist/lib.es2024.d.ts +24 -0
- package/dist/lib.es2024.full.d.ts +22 -0
- package/dist/lib.es2024.object.d.ts +27 -0
- package/dist/lib.es2024.promise.d.ts +33 -0
- package/dist/lib.es2024.regexp.d.ts +23 -0
- package/dist/lib.es2024.sharedmemory.d.ts +66 -0
- package/dist/lib.es2024.string.d.ts +27 -0
- package/dist/lib.es2025.collection.d.ts +94 -0
- package/dist/lib.es2025.d.ts +23 -0
- package/dist/lib.es2025.float16.d.ts +443 -0
- package/dist/lib.es2025.full.d.ts +22 -0
- package/dist/lib.es2025.intl.d.ts +200 -0
- package/dist/lib.es2025.iterator.d.ts +146 -0
- package/dist/lib.es2025.promise.d.ts +32 -0
- package/dist/lib.es2025.regexp.d.ts +30 -0
- package/dist/lib.es5.d.ts +4599 -0
- package/dist/lib.es6.d.ts +21 -0
- package/dist/lib.esnext.array.d.ts +33 -0
- package/dist/lib.esnext.collection.d.ts +47 -0
- package/dist/lib.esnext.d.ts +27 -0
- package/dist/lib.esnext.date.d.ts +21 -0
- package/dist/lib.esnext.decorators.d.ts +26 -0
- package/dist/lib.esnext.disposable.d.ts +191 -0
- package/dist/lib.esnext.error.d.ts +22 -0
- package/dist/lib.esnext.full.d.ts +22 -0
- package/dist/lib.esnext.intl.d.ts +107 -0
- package/dist/lib.esnext.sharedmemory.d.ts +23 -0
- package/dist/lib.esnext.temporal.d.ts +485 -0
- package/dist/lib.esnext.typedarrays.d.ts +90 -0
- package/dist/lib.scripthost.d.ts +320 -0
- package/dist/lib.webworker.asynciterable.d.ts +18 -0
- package/dist/lib.webworker.d.ts +15606 -0
- package/dist/lib.webworker.importscripts.d.ts +21 -0
- package/dist/lib.webworker.iterable.d.ts +18 -0
- package/package.json +43 -0
- package/typescript-LICENSE.txt +55 -0
- package/typescript-ThirdPartyNoticeText.txt +193 -0
- package/validation.md +72 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alex Gavrilescu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# React scanner
|
|
2
|
+
|
|
3
|
+
The React scanner connects a directly supplied JSX callback prop to calls on
|
|
4
|
+
the component's destructured parameter. Enable it alongside the TypeScript scanner.
|
|
5
|
+
Core selects relationships from the combined evidence and keeps one owner per
|
|
6
|
+
physical source file.
|
|
7
|
+
|
|
8
|
+
## Build and install
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
bun install --frozen-lockfile --ignore-scripts
|
|
12
|
+
bun plugins/scanners/react/build.ts
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
From the project being scanned:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
groma scanner add /absolute/path/to/groma/plugins/scanners/react/dist/package
|
|
19
|
+
groma scanner check
|
|
20
|
+
groma scan
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The private prototype package bundles TypeScript 6.0.3 and its standard-library
|
|
24
|
+
declarations. the TypeScript scanner's 7.1 SDK is unchanged. No consumer build
|
|
25
|
+
or installation script is required. Public naming and publication are separate
|
|
26
|
+
release decisions.
|
|
27
|
+
|
|
28
|
+
Install the application's declared dependencies and React types with its
|
|
29
|
+
package manager and lockfile. The scanner reads the root `tsconfig.json` through
|
|
30
|
+
the TypeScript compiler and inventories its owned TSX source files. Missing
|
|
31
|
+
React dependencies, invalid configuration, syntax errors, and semantic errors
|
|
32
|
+
in those TSX files fail preparation with instructions. It does not claim to
|
|
33
|
+
type-check unrelated server source files. It does not run application code.
|
|
34
|
+
|
|
35
|
+
## Evidence and tooling
|
|
36
|
+
|
|
37
|
+
[React documents callback props](https://react.dev/learn/responding-to-events).
|
|
38
|
+
[TypeScript owns JSX parsing and checking](https://www.typescriptlang.org/docs/handbook/jsx.html),
|
|
39
|
+
project membership, imported component identities, and source symbols.
|
|
40
|
+
The adapter uses the maintained JavaScript compiler API pinned to 6.0.3;
|
|
41
|
+
[TypeScript 6.0](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html)
|
|
42
|
+
retains the established compiler API. The plugin does not recreate language
|
|
43
|
+
name or type resolution.
|
|
44
|
+
|
|
45
|
+
A component must resolve to a source function or a `const` arrow/function value
|
|
46
|
+
in the inventoried TSX files. Its first parameter must directly destructure the
|
|
47
|
+
callback prop. The JSX attribute must supply an identifier resolving directly
|
|
48
|
+
to a source function or `const` arrow/function value. Calls are matched to the
|
|
49
|
+
exact compiler symbol of that destructured parameter. Each concrete JSX
|
|
50
|
+
attribute has a separate binding; nested calls belong to their nearest function.
|
|
51
|
+
|
|
52
|
+
Operation, call, and attribute positions are original zero-based UTF-16 offsets;
|
|
53
|
+
lines are one-based. The named prop supplies the existing `member` field.
|
|
54
|
+
Ordinary TypeScript can remain unresolved while React supplies this binding.
|
|
55
|
+
No compiler objects or raw graph are persisted.
|
|
56
|
+
|
|
57
|
+
In OKF, the result remains readable Code links and relationship rows. In C4,
|
|
58
|
+
React components remain source evidence, not automatic architecture components
|
|
59
|
+
or a new containment level. Core owns interpretation and curated ownership.
|
|
60
|
+
|
|
61
|
+
## Limits
|
|
62
|
+
|
|
63
|
+
This revision qualifies the Backlog.md CleanupModal success callback. It does
|
|
64
|
+
not analyze hooks, state stores, routing, server components, class components,
|
|
65
|
+
component wrappers, callback forwarding, returned functions, mutable values,
|
|
66
|
+
DOM dispatch, or arbitrary callback expressions. JSX spreads and unsupported
|
|
67
|
+
direct bindings produce `unsupported-react-binding` diagnostics and no certain
|
|
68
|
+
claim. Components that cannot resolve to a supported source function do not
|
|
69
|
+
establish a callback interaction.
|
|
70
|
+
|
|
71
|
+
TSX and TypeScript edits use the existing watch lifecycle. All enabled scanners
|
|
72
|
+
must complete before architecture changes. See [validation](validation.md) for
|
|
73
|
+
the executed artifact checks and remaining release gates.
|