Commit Graph

942 Commits

Author SHA1 Message Date
Max Schaefer
9a00f4d0f0 JavaScript: store YAML locations in yaml_locations table instead of hasLocation. 2019-07-25 16:52:44 +01:00
Max Schaefer
79a7a8c6a7 JavaScript: Update TRAP test outputs. 2019-07-25 16:52:44 +01:00
Max Schaefer
6b3abbbde5 JavaScript: Store JSON locations in json_locations table instead of hasLocation. 2019-07-25 16:52:44 +01:00
Max Schaefer
2df41c43e2 JavaScript: Make name of hasLocation relation in location manager configurable. 2019-07-25 16:52:44 +01:00
Mark Shannon
88f9685d40 Merge rc/1.21 into master 2019-07-18 16:40:32 +01:00
Aditya Sharad
e8bacd2816 Merge rc/1.20 into rc/1.21. 2019-07-11 12:10:21 +01:00
Arthur Baars
9bf0a3f2cd Merge pull request #1547 from Semmle/rc/1.21
Merge rc/1.21 into master
2019-07-05 07:20:28 +02:00
semmle-qlci
44823ca46d Merge pull request #1522 from asger-semmle/ts-stringify-recursive-type-alias
Approved by xiemaisi
2019-07-03 08:25:50 +01:00
semmle-qlci
26fd1b91cf Merge pull request #1485 from esben-semmle/js/fix-yaml-strings
Approved by xiemaisi
2019-07-02 07:00:43 +01:00
Asger F
0c04580b5e JS: fix typo in doc 2019-07-01 13:25:55 +01:00
Asger F
2ab72c4eef JS: Support line breaks in types 2019-07-01 11:46:30 +01:00
Asger F
625cdb8765 JS: Update test output 2019-07-01 11:29:55 +01:00
Asger F
4f05eab3fd JS: Make docs match reality 2019-07-01 11:29:55 +01:00
Asger F
2822e493ae JS: Switch to absolute offsets 2019-07-01 11:29:55 +01:00
Asger F
d6ba1ffa8a JS: Some loc() fixes 2019-07-01 11:29:55 +01:00
Asger F
fd0791bd8c JS: Parse types from original source string 2019-07-01 11:29:55 +01:00
Asger F
a3c7b631f4 JS: Extract type source text with substring 2019-07-01 11:29:55 +01:00
Asger F
edd96b056e JS: Remove redundant source field 2019-07-01 11:29:55 +01:00
Asger F
9403834af5 JS: Include leading star in parsed source 2019-07-01 11:29:55 +01:00
Asger F
9b4bdaecce JS: Remove unneeded replace call 2019-07-01 11:29:55 +01:00
Asger F
aff90b1082 TS: Add a missing semicolon 2019-06-28 10:53:33 +01:00
Asger F
f5569b8b58 TS: Avoid infinite recursion in stringifyType 2019-06-28 10:53:33 +01:00
Esben Sparre Andreasen
4f9a7d0b71 JS: updated expected output for different SnakeYaml version 2019-06-24 09:24:12 +02:00
Max Schaefer
a417884173 JavaScript: Fix potential null-pointer exception in YAML extractor.
`ScalarEvent.getStyle()` is documented as returning `null` for plain
scalars, so we need to handle that specially (cf
https://github.com/Semmle/ql/blob/master/javascript/ql/src/semmle/javascript/YAML.qll#L100
for the corresponding code in the library, which expects plain style to
be encoded as zero).
2019-06-23 21:56:02 +02:00
Esben Sparre Andreasen
6885b5cf1f JS: fix yaml StringIndexOutOfBoundsException 2019-06-21 15:18:56 +02:00
semmle-qlci
59dd3b2fb7 Merge pull request #1477 from asger-semmle/ts-debug-failure-in-tsconfig
Approved by xiemaisi
2019-06-21 12:45:13 +01:00
Max Schaefer
544a55dd0e JavaScript: Fix potential null-pointer exception in YAML extractor.
`ScalarEvent.getStyle()` is documented as returning `null` for plain
scalars, so we need to handle that specially (cf
https://github.com/Semmle/ql/blob/master/javascript/ql/src/semmle/javascript/YAML.qll#L100
for the corresponding code in the library, which expects plain style to
be encoded as zero).
2019-06-20 17:04:47 +01:00
Asger F
52f31dcb07 TS: Rely on ts.sys.readFile for decoding 2019-06-19 11:57:22 +01:00
Asger F
72c0925967 TS: Bump to TypeScript 3.5.1 2019-05-30 11:40:25 +01:00
Max Schaefer
38a38ab780 JavaScript: Make autobuilder fail if no JS/TS code was seen.
In particular, the autobuilder will no longer succeed for projects that
contain HTML or YAML files but no JS/TS code. Further down the line,
this prevents LGTM.com from classifying such projects as "JavaScript"
projects.
2019-05-28 14:43:59 +01:00
semmle-qlci
9fb61d5f26 Merge pull request #1371 from xiemaisi/js/index-xml
Approved by asger-semmle
2019-05-28 14:30:43 +01:00
semmle-qlci
ead59baa0e Merge pull request #1369 from xiemaisi/js/fix-autobuild-test
Approved by asger-semmle
2019-05-28 12:27:17 +01:00
Max Schaefer
7f8f126338 JavaScript: Add support for XML extraction. 2019-05-28 09:44:24 +01:00
Max Schaefer
4992970181 JavaScript: Fix an auto-build test. 2019-05-28 09:44:24 +01:00
Max Schaefer
9ec366cf88 JavaScript: Move support for optional catch to ES2019. 2019-05-10 08:27:25 +01:00
Max Schaefer
d93d68d7f5 JavaScript: Add parser support for Unicode newlines in string literals. 2019-05-10 08:16:20 +01:00
Max Schaefer
86a7fa3abb JavaScript: Make extractor default to ECMA 2019.
Also introduces an enum constant for ECMA 2020 (not used anywhere yet).
2019-05-10 08:09:46 +01:00
Max Schaefer
e0e6224987 Merge pull request #1298 from asger-semmle/full-mode-fixes-rc120
TS: Backport full-mode fixes to rc/1.20
2019-05-03 13:57:47 +01:00
Asger F
5ed3c50dbe TS: Workaround issue with infer types 2019-05-02 13:28:30 +01:00
Asger F
c7300fa197 TS: Add workaround for 'globalThis' getProperties() crash 2019-05-02 13:28:30 +01:00
Asger F
9934996f9b TS: Fix handling of 'export =' 2019-05-02 13:07:29 +01:00
Asger F
15299aba7d TS: Workaround issue with infer types 2019-04-30 16:07:45 +01:00
Asger F
5c8dd7eedd TS: Add workaround for 'globalThis' getProperties() crash 2019-04-30 12:44:58 +01:00
Asger F
686d72c356 TS: Fix handling of 'export =' 2019-04-30 12:41:59 +01:00
Asger F
11c07a3217 TS: Update to TypeScript 3.4.5 2019-04-30 12:41:59 +01:00
Asger F
f99db08542 JS: Update trap files 2019-04-26 16:56:04 +01:00
Asger F
e9fcb670ff JS: Provide source locations for JSDocTypeExpr 2019-04-26 16:56:04 +01:00
Aditya Sharad
4121e7245b TS extractor: Allow the Node.js runtime to be configured via environment variables.
`SEMMLE_TYPESCRIPT_NODE_RUNTIME` can be used to provide the path to the Node.js runtime executable.
If this is omitted, the extractor defaults to the current behaviour of looking for `node` on the PATH.

`SEMMLE_TYPESCRIPT_NODE_RUNTIME_EXTRA_ARGS` can be used to provide additional arguments to the
Node.js runtime. These are passed first, before the arguments supplied by the extractor.

These changes are designed to allow TypeScript extraction in controlled customer environments where
we cannot control the PATH, or must use custom Node.js executables with certain arguments set.
2019-04-23 15:04:14 -07:00
Asger F
fafdd5bbcd TS: Dont extract redirect SourceFiles 2019-04-16 10:17:45 +01:00
semmle-qlci
aeebc3692d Merge pull request #1247 from asger-semmle/tscrash
Approved by xiemaisi
2019-04-16 07:59:02 +01:00