Skip to content

Commit c2942b3

Browse files
committed
JS: delete various outdated deprecations
1 parent e0fefce commit c2942b3

File tree

21 files changed

+0
-565
lines changed

21 files changed

+0
-565
lines changed

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,6 @@ module API {
153153
*/
154154
DataFlow::SourceNode asSource() { Impl::use(this, result) }
155155

156-
/** DEPRECATED. This predicate has been renamed to `asSource`. */
157-
deprecated DataFlow::SourceNode getAnImmediateUse() { result = this.asSource() }
158-
159-
/** DEPRECATED. This predicate has been renamed to `getAValueReachableFromSource`. */
160-
deprecated DataFlow::Node getAUse() { result = this.getAValueReachableFromSource() }
161-
162156
/**
163157
* Gets a call to the function represented by this API component.
164158
*/
@@ -212,12 +206,6 @@ module API {
212206
*/
213207
DataFlow::Node getAValueReachingSink() { result = Impl::trackDefNode(this.asSink()) }
214208

215-
/** DEPRECATED. This predicate has been renamed to `asSink`. */
216-
deprecated DataFlow::Node getARhs() { result = this.asSink() }
217-
218-
/** DEPRECATED. This predicate has been renamed to `getAValueReachingSink`. */
219-
deprecated DataFlow::Node getAValueReachingRhs() { result = this.getAValueReachingSink() }
220-
221209
/**
222210
* Gets a node representing member `m` of this API component.
223211
*
@@ -622,12 +610,6 @@ module API {
622610
bindingset[this]
623611
EntryPoint() { any() }
624612

625-
/** DEPRECATED. This predicate has been renamed to `getASource`. */
626-
deprecated DataFlow::SourceNode getAUse() { none() }
627-
628-
/** DEPRECATED. This predicate has been renamed to `getASink`. */
629-
deprecated DataFlow::SourceNode getARhs() { none() }
630-
631613
/** Gets a data-flow node where a value enters the current codebase through this entry-point. */
632614
DataFlow::SourceNode getASource() { none() }
633615

javascript/ql/lib/semmle/javascript/dataflow/DataFlow.qll

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,6 @@ module DataFlow {
138138
CallGraph::getABoundFunctionReference(result, boundArgs, _).flowsTo(this)
139139
}
140140

141-
/**
142-
* DEPRECATED: Use `DataFlow::ParameterNode::flowsTo()` instead.
143-
* Holds if this expression may refer to the initial value of parameter `p`.
144-
*/
145-
deprecated predicate mayReferToParameter(Parameter p) {
146-
parameterNode(p).(SourceNode).flowsTo(this)
147-
}
148-
149141
/**
150142
* Holds if this element is at the specified location.
151143
* The location spans column `startcolumn` of line `startline` to

javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,30 +1150,12 @@ module ClassNode {
11501150
cached
11511151
abstract FunctionNode getStaticMember(string name, MemberKind kind);
11521152

1153-
/**
1154-
* DEPRECATED. Override `getStaticMember` instead.
1155-
*
1156-
* Gets the static method of this class with the given name.
1157-
*/
1158-
cached
1159-
deprecated FunctionNode getStaticMethod(string name) { none() }
1160-
11611153
/**
11621154
* Gets a static member of this class of the given kind.
11631155
*/
11641156
cached
11651157
abstract FunctionNode getAStaticMember(MemberKind kind);
11661158

1167-
/**
1168-
* DEPRECATED. Override `getAStaticMember` instead.
1169-
*
1170-
* Gets a static method of this class.
1171-
*
1172-
* The constructor is not considered a static method.
1173-
*/
1174-
cached
1175-
deprecated FunctionNode getAStaticMethod() { none() }
1176-
11771159
/**
11781160
* Gets a dataflow node representing a class to be used as the super-class
11791161
* of this node.

javascript/ql/lib/semmle/javascript/filters/ClassifyFiles.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ predicate isExternsFile(File f) {
7575
*/
7676
predicate isLibraryFile(File f) { f.getATopLevel() instanceof FrameworkLibraryInstance }
7777

78-
/** DEPRECATED: Alias for isLibraryFile */
79-
deprecated predicate isLibaryFile = isLibraryFile/1;
80-
8178
/**
8279
* Holds if `f` contains template code.
8380
*/

javascript/ql/lib/semmle/javascript/frameworks/AngularJS/AngularJSCore.qll

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -618,27 +618,6 @@ private class JQLiteObject extends JQuery::ObjectSource::Range {
618618
}
619619
}
620620

621-
/**
622-
* DEPRECATED: Use `AngularJSCallNode` instead.
623-
* A call to an AngularJS function.
624-
*
625-
* Used for exposing behavior that is similar to the behavior of other libraries.
626-
*/
627-
deprecated class AngularJSCall extends CallExpr {
628-
AngularJSCallNode node;
629-
630-
AngularJSCall() { this.flow() = node }
631-
632-
/** Holds if `e` is an argument that this call interprets as HTML. */
633-
deprecated predicate interpretsArgumentAsHtml(Expr e) { node.interpretsArgumentAsHtml(e.flow()) }
634-
635-
/** Holds if `e` is an argument that this call stores globally, e.g. in a cookie. */
636-
deprecated predicate storesArgumentGlobally(Expr e) { node.storesArgumentGlobally(e.flow()) }
637-
638-
/** Holds if `e` is an argument that this call interprets as code. */
639-
deprecated predicate interpretsArgumentAsCode(Expr e) { node.interpretsArgumentAsCode(e.flow()) }
640-
}
641-
642621
/**
643622
* A call to an AngularJS function.
644623
*

javascript/ql/lib/semmle/javascript/frameworks/AngularJS/ServiceDefinitions.qll

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -447,21 +447,6 @@ BuiltinServiceReference getBuiltinServiceOfKind(string kind) {
447447
)
448448
}
449449

450-
/**
451-
* DEPRECATED: Use `ServiceRequestNode` instead.
452-
* A request for one or more AngularJS services.
453-
*/
454-
deprecated class ServiceRequest extends Expr {
455-
ServiceRequestNode node;
456-
457-
ServiceRequest() { this.flow() = node }
458-
459-
/** Gets the parameter of this request into which `service` is injected. */
460-
deprecated Parameter getDependencyParameter(ServiceReference service) {
461-
result.flow() = node.getDependencyParameter(service)
462-
}
463-
}
464-
465450
/**
466451
* A request for one or more AngularJS services.
467452
*/

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ module Connect {
118118
override string getCredentialsKind() { result = kind }
119119
}
120120

121-
deprecated class RequestExpr = NodeJSLib::RequestExpr;
122-
123121
class RequestNode = NodeJSLib::RequestNode;
124122

125123
/**

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,6 @@
55

66
import javascript
77

8-
/**
9-
* DEPRECATED: Use `CredentialsNode` instead.
10-
* An expression whose value is used to supply credentials such
11-
* as a user name, a password, or a key.
12-
*/
13-
deprecated class CredentialsExpr extends Expr {
14-
CredentialsNode node;
15-
16-
CredentialsExpr() { node.asExpr() = this }
17-
18-
/**
19-
* Gets a description of the kind of credential this expression is used as,
20-
* such as `"user name"`, `"password"`, `"key"`.
21-
*/
22-
deprecated string getCredentialsKind() { result = node.getCredentialsKind() }
23-
}
24-
258
/**
269
* An expression whose value is used to supply credentials such
2710
* as a user name, a password, or a key.

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

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,6 @@ module Express {
5555
WebpackDevServer::webpackDevServerApp().flowsTo(e)
5656
}
5757

58-
/**
59-
* DEPRECATED: Use `RouterDefinition.ref()` or `RouteSetup` instead.
60-
* An expression that refers to a route.
61-
*/
62-
deprecated class RouteExpr extends MethodCallExpr {
63-
RouteExpr() { isRouter(this.flow()) }
64-
}
65-
6658
/**
6759
* Gets the name of an Express router method that sets up a route.
6860
*/
@@ -145,17 +137,6 @@ module Express {
145137
/** Holds if this is a call `use`, such as `app.use(handler)`. */
146138
predicate isUseCall() { this.getMethodName() = "use" }
147139

148-
/**
149-
* DEPRECATED: Use `getRouteHandlerNode` instead.
150-
* Gets the `n`th handler registered by this setup, with 0 being the first.
151-
*
152-
* This differs from `getARouteHandler` in that the argument expression is
153-
* returned, not its dataflow source.
154-
*/
155-
deprecated Expr getRouteHandlerExpr(int index) {
156-
result = this.getRouteHandlerNode(index).asExpr()
157-
}
158-
159140
/**
160141
* Gets the `n`th handler registered by this setup, with 0 being the first.
161142
*
@@ -174,25 +155,11 @@ module Express {
174155
)
175156
}
176157

177-
/**
178-
* DEPRECATED: Use `getARouteHandlerNode` instead.
179-
* Gets an argument that represents a route handler being registered.
180-
*/
181-
deprecated Expr getARouteHandlerExpr() { result = this.getRouteHandlerExpr(_) }
182-
183158
/**
184159
* Gets an argument that represents a route handler being registered.
185160
*/
186161
DataFlow::Node getARouteHandlerNode() { result = this.getRouteHandlerNode(_) }
187162

188-
/**
189-
* DEPRECATED: Use `getLastRouteHandlerExpr` instead.
190-
* Gets the last argument representing a route handler being registered.
191-
*/
192-
deprecated Expr getLastRouteHandlerExpr() {
193-
result = max(int i | | this.getRouteHandlerExpr(i) order by i)
194-
}
195-
196163
/**
197164
* Gets the last argument representing a route handler being registered.
198165
*/
@@ -294,52 +261,6 @@ module Express {
294261
}
295262
}
296263

297-
/**
298-
* DEPRECATED: Use `RouteHandlerNode` instead.
299-
* An expression used as an Express route handler, such as `submitHandler` below:
300-
* ```
301-
* app.post('/submit', submitHandler)
302-
* ```
303-
*
304-
* Unlike `RouterHandler`, this is the argument passed to a setup, as opposed to
305-
* a function that flows into such an argument.
306-
*/
307-
deprecated class RouteHandlerExpr extends Expr {
308-
RouteHandlerNode node;
309-
310-
RouteHandlerExpr() { this.flow() = node }
311-
312-
/** Gets the setup call that registers this route handler. */
313-
deprecated RouteSetup getSetup() { result = node.getSetup() }
314-
315-
/** Gets the function body of this handler, if it is defined locally. */
316-
deprecated RouteHandler getBody() { result = node.getBody() }
317-
318-
/** Holds if this is not followed by more handlers. */
319-
deprecated predicate isLastHandler() { node.isLastHandler() }
320-
321-
/** Gets a route handler that immediately precedes this in the route stack. */
322-
deprecated Express::RouteHandlerExpr getPreviousMiddleware() {
323-
result = node.getPreviousMiddleware().asExpr()
324-
}
325-
326-
/** Gets a route handler that may follow immediately after this one in its route stack. */
327-
deprecated Express::RouteHandlerExpr getNextMiddleware() {
328-
result = node.getNextMiddleware().asExpr()
329-
}
330-
331-
/**
332-
* Gets a route handler that precedes this one (not necessarily immediately), may handle
333-
* same request method, and matches on the same path or a prefix.
334-
*/
335-
deprecated Express::RouteHandlerExpr getAMatchingAncestor() {
336-
result = node.getAMatchingAncestor().asExpr()
337-
}
338-
339-
/** Gets the router being registered as a sub-router here, if any. */
340-
deprecated RouterDefinition getAsSubRouter() { result = node.getAsSubRouter() }
341-
}
342-
343264
/**
344265
* An expression used as an Express route handler, such as `submitHandler` below:
345266
* ```
@@ -584,29 +505,13 @@ module Express {
584505
override RouteHandler getRouteHandler() { none() } // Not known.
585506
}
586507

587-
/**
588-
* DEPRECATED: Use `ResponseNode` instead.
589-
* An Express response expression.
590-
*/
591-
deprecated class ResponseExpr extends NodeJSLib::ResponseExpr {
592-
ResponseExpr() { this.flow() instanceof ResponseNode }
593-
}
594-
595508
/**
596509
* An Express response expression.
597510
*/
598511
class ResponseNode extends NodeJSLib::ResponseNode {
599512
override ResponseSource src;
600513
}
601514

602-
/**
603-
* DEPRECATED: Use `RequestNode` instead.
604-
* An Express request expression.
605-
*/
606-
deprecated class RequestExpr extends NodeJSLib::RequestExpr {
607-
RequestExpr() { this.flow() instanceof RequestNode }
608-
}
609-
610515
/**
611516
* An Express request expression.
612517
*/

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,6 @@ module Fastify {
154154

155155
override DataFlow::SourceNode getServer() { result = server }
156156

157-
/**
158-
* DEPRECATED: Use `getARouteHandlerNode` instead.
159-
* Gets an argument that represents a route handler being registered.
160-
*/
161-
deprecated DataFlow::Node getARouteHandlerExpr() { result = this.getARouteHandlerNode() }
162-
163157
/** Gets an argument that represents a route handler being registered. */
164158
DataFlow::Node getARouteHandlerNode() {
165159
if methodName = "route"

0 commit comments

Comments
 (0)