Commit Graph

819 Commits

Author SHA1 Message Date
Asger F
c4eeda1560 JS: Bump EXTRACTOR_VERSION 2024-04-17 08:34:26 +02:00
Rasmus Wriedt Larsen
16e2ac898f JS: Parser: Remove direct this.strict assignment 2024-04-09 14:58:14 +02:00
Rasmus Wriedt Larsen
1985dd629d JS: Parser: Never run in strict mode
This initial change is a bit of a hacky way to achieve our goals (since
it doesn't rewrite all the uses of this.strict), but it is easy to
understand is correct. Let's accept test changes NOW, and ensure that
later changes don't change things further.
2024-04-09 14:37:07 +02:00
erik-krogh
6be0ed1dc3 narrow the version specifier used for TypeScript 2024-03-12 13:42:58 +01:00
erik-krogh
9f410eb2d6 Merge branch 'main' into ts-54 2024-03-11 18:07:52 +01:00
Rasmus Lerchedahl Petersen
d73f43477f update ts to released version 54 2024-03-11 16:32:19 +01:00
Cornelius Riemenschneider
e9b5394cd5 JS: Remove empty build target.
The `resources` folder never existed, this was probably introduced
as a copy-paste mistake. Remove the rule.
2024-02-26 15:26:44 +01:00
erik-krogh
0056067a17 Merge branch 'main' into ts-54 2024-02-25 21:20:43 +01:00
erik-krogh
083f56921c update to 5.4.1-rc 2024-02-25 21:20:41 +01:00
Paolo Tranquilli
61bfe7e520 Bazel: rename internal module to semmle_code 2024-02-21 16:51:39 +01:00
Paolo Tranquilli
32d6c5ac3d Javascript: fix project layout for bazel tests
On Windows, the project layout needs to match `codeql~override`, while
on POSIX we must keep on matching `ql`. We work around this by using
`*ql*` in the project layout, which matches both.
2024-02-16 17:10:20 +01:00
Paolo Tranquilli
1626344560 Merge branch 'main' into redsun82/bzlmod 2024-02-16 17:10:02 +01:00
Cornelius Riemenschneider
798a1e250e Move the JS java tests to be a proper java_test target.
Previously, we had a `sh_test` wrapping the `java_test` to do some setup.
This was extremely brittle on Windows, and relied on getting a deploy
jar from `java_test`. This breaks when updating to Bazel 7, where the
ability to get a deploy jar from `java_test` was removed.
Therefore, we now do all the test setup in `AllTests.java` instead.
This is much cleaner, and shouldn't break as easily.
2024-02-15 17:02:28 +01:00
Paolo Tranquilli
53539226a8 Bazel: use internal codeql module 2024-02-12 14:27:55 +01:00
Rasmus Lerchedahl Petersen
f275531542 Add support for TS 5.4-beta 2024-02-02 11:03:44 +01:00
Erik Krogh Kristensen
d782bd9b1f Merge pull request #13624 from jorgectf/seclab/dotjs
JS: Add `dot.js` support
2024-01-11 14:57:19 +01:00
erik-krogh
06c1fff770 address review comments 2024-01-10 13:53:54 +01:00
erik-krogh
d0fcb7d1ed faster TypeScript extraction by not having to compute the "type-string" for a type every time 2024-01-09 15:30:55 +01:00
Jorge
f8cfd698fa Merge branch 'main' into seclab/dotjs 2023-12-19 10:44:52 +01:00
erik-krogh
0db788bb10 use direct string comparison instead, that doesn't crash on invalid values 2023-12-14 14:50:17 +01:00
erik-krogh
5e91b2f5bc fix the parsing of boolean environment variables in the TypeScript extractor 2023-12-14 14:40:10 +01:00
erik-krogh
72e99b5b9d rename extractor environment variable to CODEQL_EXTRACTOR_JAVASCRIPT_OPTION_SKIP_TYPES 2023-12-14 12:52:49 +01:00
erik-krogh
896432b646 add environment variable to skip extraction of types in TypeScript 2023-12-12 12:25:00 +01:00
erik-krogh
cf31ef4960 make sure reset() is called when manually invoking the TS extractor, so environment-variables are read 2023-12-12 10:51:09 +01:00
erik-krogh
c246a9c12c move TypeVarDepth further up, so its declared before it's used 2023-12-12 10:34:42 +01:00
erik-krogh
13a01e1545 fix a this reference
`this` didn't refer to anything specific, and it was in fact `undefined` in the context it was invoked. There was already a  `let typeTable = this;` further up (where `this` refers to the class instance), so I used `typeTable`.
2023-12-12 10:32:31 +01:00
erik-krogh
ca95a6e9cf exclude all the lib.d.ts files when running the TS extractor directly
e.g. the `lib.es5.d.ts` file was not excluded
2023-12-12 10:29:09 +01:00
Jorge
8abd1d9855 Merge branch 'main' into seclab/dotjs 2023-11-30 19:42:18 +01:00
Jorge
91bc043f30 Add .html.dot to Autobuild.java 2023-11-30 19:38:24 +01:00
erik-krogh
5611a3e417 use exact version 2023-11-20 20:48:51 +01:00
erik-krogh
10b3efa667 update to the stable version of TypeScript 5.3 2023-11-20 20:32:24 +01:00
erik-krogh
dde9a7cd7e Merge branch 'main' into ts53-ts 2023-11-20 20:31:00 +01:00
Cornelius Riemenschneider
97fd2033f1 Take our node, not the one that comes first on the PATH. 2023-11-09 22:00:00 +01:00
Cornelius Riemenschneider
b4ec13235d Address review. 2023-11-09 09:40:29 +01:00
Cornelius Riemenschneider
6b37d2009b Merge branch 'main' into criemen/js-bazel 2023-11-08 16:11:47 +01:00
Erik Krogh Kristensen
f643fd7d74 Merge pull request #14716 from erik-krogh/invalid-main
JS: catch when the main: path is invalid on Windows
2023-11-08 08:33:58 +01:00
erik-krogh
ae577d1e44 catch when the main: path is invalid on Windows 2023-11-07 17:42:21 +01:00
Jorge
b08d57a85f Add {{! to TEMPLATE_EXPR_OPENING_TAG 2023-11-06 20:40:00 +00:00
Cornelius Riemenschneider
be02512dfe Add a build system for the junit tests.
This is a bit more complicated than our usual setup, as we both need to
unzip the typescript parser wrapper, and make node accessible on the path.
2023-11-06 17:58:28 +01:00
Cornelius Riemenschneider
52fcc5f435 Export test data directories. 2023-11-06 13:47:56 +01:00
Cornelius Riemenschneider
63854e36b4 Use the TestPaths helper to lookup files. 2023-11-06 13:47:56 +01:00
Cornelius Riemenschneider
a773532d07 Refactor JS test suite to be more in line with other Java projects.
Therefore, we move the test suite out of the `src` directory.
2023-11-06 13:47:56 +01:00
Cornelius Riemenschneider
6c7ea86a12 Introduce a bazel-based build for the entire JS pack. 2023-11-06 13:47:56 +01:00
Cornelius Riemenschneider
465eb00228 More fine-grained dependency on internal extractors. 2023-11-06 13:44:28 +01:00
Arthur Baars
7f4bcdfa64 Rename test files 2023-11-06 13:38:33 +01:00
Arthur Baars
eecf32db4d Add tests for deprecated 'assert' syntax 2023-11-06 13:38:33 +01:00
Arthur Baars
3d45944649 Rename 'assertions' to 'attributes' in JS extractor 2023-11-06 13:38:32 +01:00
Arthur Baars
bd62ec294e Support TS 5.3 import attributes (previously import assertions) 2023-11-06 13:38:32 +01:00
Arthur Baars
1067dd9dd3 Auto-format 2023-11-06 13:38:32 +01:00
Arthur Baars
ec075f8fbe Upgrade typescript to 5.3.1-rc 2023-11-06 13:38:24 +01:00