Skip to content

Commit d8b4bc8

Browse files
committed
JS: Rename EntryPoint.getNode -> getANode
1 parent 33ca557 commit d8b4bc8

File tree

10 files changed

+14
-11
lines changed

10 files changed

+14
-11
lines changed

javascript/ql/lib/semmle/javascript/ApiGraphs.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,10 @@ module API {
389389
abstract DataFlow::Node getARhs();
390390

391391
/** Gets an API-node for this entry point. */
392-
API::Node getNode() { result = root().getASuccessor(Label::entryPoint(this)) }
392+
API::Node getANode() { result = root().getASuccessor(Label::entryPoint(this)) }
393+
394+
/** DEPRECATED. Use `getANode()` instead. */
395+
deprecated API::Node getNode() { result = this.getANode() }
393396
}
394397

395398
/**

javascript/ql/lib/semmle/javascript/frameworks/D3.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module D3 {
2323
or
2424
result = API::moduleImport("d3-node").getInstance().getMember("d3")
2525
or
26-
result = any(D3GlobalEntry i).getNode()
26+
result = any(D3GlobalEntry i).getANode()
2727
}
2828

2929
/**

javascript/ql/lib/semmle/javascript/frameworks/History.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module History {
1717
* Gets a reference to the [`history`](https://npmjs.org/package/history) library.
1818
*/
1919
private API::Node history() {
20-
result = [API::moduleImport("history"), any(HistoryGlobalEntry h).getNode()]
20+
result = [API::moduleImport("history"), any(HistoryGlobalEntry h).getANode()]
2121
}
2222

2323
/**

javascript/ql/lib/semmle/javascript/frameworks/Immutable.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private module Immutable {
2727
API::Node immutableImport() {
2828
result = API::moduleImport("immutable")
2929
or
30-
result = any(ImmutableGlobalEntry i).getNode()
30+
result = any(ImmutableGlobalEntry i).getANode()
3131
}
3232

3333
/**

javascript/ql/lib/semmle/javascript/frameworks/Logging.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private module Console {
4545
*/
4646
private API::Node console() {
4747
result = API::moduleImport("console") or
48-
result = any(ConsoleGlobalEntry e).getNode()
48+
result = any(ConsoleGlobalEntry e).getANode()
4949
}
5050

5151
/**

javascript/ql/lib/semmle/javascript/frameworks/Nest.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ module NestJS {
151151
private API::Node validationPipe() {
152152
result = nestjs().getMember("ValidationPipe")
153153
or
154-
result = any(ValidationNodeEntry e).getNode()
154+
result = any(ValidationNodeEntry e).getANode()
155155
}
156156

157157
/**

javascript/ql/lib/semmle/javascript/frameworks/Redux.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ module Redux {
11111111

11121112
/** A heuristic call to `connect`, recognized by it taking arguments named `mapStateToProps` and `mapDispatchToProps`. */
11131113
private class HeuristicConnectFunction extends ConnectCall {
1114-
HeuristicConnectFunction() { this = any(HeuristicConnectEntryPoint e).getNode().getACall() }
1114+
HeuristicConnectFunction() { this = any(HeuristicConnectEntryPoint e).getANode().getACall() }
11151115

11161116
override API::Node getMapStateToProps() {
11171117
result = getAParameter() and

javascript/ql/lib/semmle/javascript/frameworks/TrustedTypes.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module TrustedTypes {
1919
override DataFlow::Node getARhs() { none() }
2020
}
2121

22-
private API::Node trustedTypesObj() { result = any(TrustedTypesEntry entry).getNode() }
22+
private API::Node trustedTypesObj() { result = any(TrustedTypesEntry entry).getANode() }
2323

2424
/** A call to `trustedTypes.createPolicy`. */
2525
class PolicyCreation extends API::CallNode {

javascript/ql/lib/semmle/javascript/frameworks/Vue.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module Vue {
3535
API::Node vueLibrary() {
3636
result = API::moduleImport("vue")
3737
or
38-
result = any(GlobalVueEntryPoint e).getNode()
38+
result = any(GlobalVueEntryPoint e).getANode()
3939
}
4040

4141
/**
@@ -51,7 +51,7 @@ module Vue {
5151
or
5252
result = vueLibrary().getMember("component").getReturn()
5353
or
54-
result = any(VueFileImportEntryPoint e).getNode()
54+
result = any(VueFileImportEntryPoint e).getANode()
5555
}
5656

5757
/**

javascript/ql/lib/semmle/javascript/frameworks/data/internal/ApiGraphModelsSpecific.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private class GlobalApiEntryPoint extends API::EntryPoint {
6767
* Gets an API node referring to the given global variable (if relevant).
6868
*/
6969
private API::Node getGlobalNode(string globalName) {
70-
result = any(GlobalApiEntryPoint e | e.getGlobal() = globalName).getNode()
70+
result = any(GlobalApiEntryPoint e | e.getGlobal() = globalName).getANode()
7171
}
7272

7373
/** Gets a JavaScript-specific interpretation of the `(package, type, path)` tuple after resolving the first `n` access path tokens. */

0 commit comments

Comments
 (0)