Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS: Add library for exporting graphs as type models #15386

Merged
merged 27 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
acef9b7
Dynamic/JS: Add library for exporting models
asgerf Apr 4, 2024
c55e03c
Dynamic/JS: Add support for re-exporting type models
asgerf Apr 4, 2024
348c95e
JS: Add a test case with fluent flow
asgerf Apr 5, 2024
946f0b4
JS: Add test for class with aliases
asgerf Apr 5, 2024
f4e05cc
JS: Add tests with semi-internal class problem
asgerf Apr 5, 2024
ab3c03d
JS: Add test where root export object is a function
asgerf Apr 5, 2024
3022c59
JS: Add access path alias test
asgerf Apr 5, 2024
ef7767b
JS: Add partial test for subclassing
asgerf Apr 5, 2024
9313564
JS: Add subclassing test and fix lack of subclassing handling
asgerf Apr 5, 2024
f2ea88a
JS: Add test showing missing re-export of base class relationship
asgerf Apr 5, 2024
56ebe6c
JS: More re-export logic to handle subclass export
asgerf Apr 5, 2024
29a6145
JS: Add test case showing problem with chains going through internal …
asgerf Apr 5, 2024
81b96a8
JS: Ensure MkClassInstance exists for base classes
asgerf Apr 5, 2024
8cb80d6
JS: Switch from hasLocationInfo to Location
asgerf Apr 8, 2024
8210143
Dynamic: Add hasPrettyName()
asgerf Apr 8, 2024
f5355cf
Dynamic: Sync ApiGraphModels.qll
asgerf Apr 9, 2024
15eabb4
JS: Address review comments
asgerf Apr 12, 2024
330229c
Update javascript/ql/lib/semmle/javascript/frameworks/data/ModelsAsDa…
asgerf Apr 12, 2024
3949ae4
Update shared/mad/codeql/mad/dynamic/GraphExport.qll
asgerf Apr 12, 2024
844b29b
Update shared/mad/codeql/mad/dynamic/GraphExport.qll
asgerf Apr 16, 2024
ee5cb6f
Update shared/mad/codeql/mad/dynamic/GraphExport.qll
asgerf Apr 16, 2024
be64daf
Merge branch 'main' into js/graph-export
asgerf Apr 16, 2024
c0db40d
Merge branch 'js/graph-export' of github.com:asgerf/codeql into js/gr…
asgerf Apr 16, 2024
3335d48
Sync files
asgerf Apr 16, 2024
93a9c62
Merge branch 'main' into js/graph-export
asgerf Apr 17, 2024
5e7026c
JS: Use AccessPath as parameter type
asgerf Apr 17, 2024
3c885f3
JS: Fix bug in MkClassInstance use-nodes
asgerf Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
typeModel
| (aliases).Alias1 | aliases | Member[Alias1] |
asgerf marked this conversation as resolved.
Show resolved Hide resolved
| (aliases).Alias1 | aliases | Member[Alias2] |
| (aliases).Alias1 | aliases | Member[Alias3].Member[x] |
| (aliases).Alias1 | aliases | Member[Alias4].Member[x].Member[x] |
| (aliases).Alias1 | aliases | Member[AliasedClass] |
| (aliases).Alias1.prototype | (aliases).Alias1 | Instance |
| (aliases).Alias1.prototype.foo | (aliases).Alias1.prototype | Member[foo] |
| (reexport).func | reexport | Member[func] |
asgerf marked this conversation as resolved.
Show resolved Hide resolved
| (return-this).FluentInterface | return-this | Member[FluentInterface] |
| (return-this).FluentInterface.prototype | (return-this).FluentInterface | Instance |
Expand All @@ -14,6 +21,7 @@ typeModel
| upstream-lib.XYZ | reexport | Member[x].Member[y].Member[z] |
| upstream-lib.XYZ | reexport | Member[xy].Member[z] |
summaryModel
| (aliases).Alias1.prototype | | | Member[foo].ReturnValue | type |
| (return-this).FluentInterface.prototype | | | Member[bar].ReturnValue | type |
| (return-this).FluentInterface.prototype | | | Member[baz].ReturnValue | type |
| (return-this).FluentInterface.prototype | | | Member[foo].ReturnValue | type |
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export class AliasedClass {
foo() { return this; }
}

export const Alias1 = AliasedClass;
export const Alias2 = AliasedClass;

export const Alias3 = { x: AliasedClass };
export const Alias4 = { x: Alias3 };
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "aliases",
"main": "aliases.js"
}