Commit Graph

29 Commits

Author SHA1 Message Date
Patrick Quist
455d92916a Execution with heaptrack (#5644) 2023-11-07 23:59:40 +01:00
Jeremy Rifkin
60ce06b02f Improve cache handling on the frontend, cache executions on the backend, and improve controls on the exec pane (#5111) 2023-06-11 19:10:30 -04:00
Mats Jun Larsen
633eb82d18 Transition to ECMAScript Modules (#4780)
Makes the Compiler Explorer app, and all the tooling ESM compatible.
Things that have been done:

1. The package.json has `type: module` now
2. All relative imports have a .js ending
3. All directory imports are now directory/index.js to comply with ESM
standards
4. Dependency node-graceful is now imported into tree, because the
package is broken under esm
5. Dependency p-queue has been bumped to 7.x with ESM support
6. Dependency profanities has been bumped to 3.x with ESM support
7. Webpack config is now both ESM and CommonJS compatible
8. Non-ESM compatible imports have been rewritten
9. ESLint configuration has been tweaked to not fail on .js imports
10. Mocha is now hacked together and ran with ts-node-esm
11. Webpack is now hacked together and ran with ts-node-esm
12. Webpack config is now ESM compatible, so that it can be used in the
dev server
13. Cypress code still runs commonjs, and has been excluded from the
tsconfig
14. All sinon mock tests have been commented out, because sinon module
mocks do not work with ESModules (because ESModules are immutable)

A lot of tests are now giving warnings/errors to stdout, yet still pass.
Docenizer codegenerator scripts have been updated, but I did not re-run
them, and instead just changed their code.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-02-27 18:06:38 -06:00
Matt Godbolt
3bc2dbcafc TSify the compiler args (#4692) 2023-02-09 19:34:18 -06:00
Matt Godbolt
f276f73dab First pass at making compile.js into TS (#4313) 2022-11-22 07:27:43 -06:00
Matt Godbolt
f2c1e0bd31 The Grand Reformat (#3643)
* The Grand Reformat

- everything made prettier...literally
- some tweaks to include a few more files, including documentation
- minor changes to format style
- some tiny `// prettier-ignore` changes to keep a few things the way we like them
- a couple of super minor tweaks to embedded document types to ensure they format correctly
2022-05-09 23:13:50 -05:00
partouf
a894faf1eb lintfixes 2022-02-11 00:19:16 +01:00
Yusuf Bham
41853b4a8c Fixes check for empty request body (#3350)
Check `req.body` being empty in addition to `source` being `undefined`.

Closes #3349
2022-02-10 23:43:16 +01:00
partouf
7e294e7473 fix unittest 2021-12-28 14:50:40 +00:00
Patrick Quist
c0a45e754c Add CMake API (#2509)
And multifile support. No UI support.
2021-03-22 22:59:03 +01:00
Patrick Quist
8e2de4b887 Let api compile also detect aliased compilers (#2502)
* initial implementation to look for aliases correctly and test

* refactoring

* lintfix
2021-03-19 12:04:29 +01:00
Matt Godbolt
88d8505cca Count compilations and executions in prom 2020-12-07 22:57:03 -06:00
Matt Godbolt
f68198af9e Reassign copyright to Compiler Explorer Authors (#2233) 2020-09-26 17:50:40 -05:00
Austin Morton
044dcfbf88 Use ES6 Modules (#2132) 2020-09-26 16:59:26 -04:00
Patrick Quist
0f01b99846 Fix curl API (#2184)
* manually parse formdata to be compatible with curl examples

* only parse formdata when /noscript/compile, add unittests

* no need to parse formdata in these cases

* use specific handling per url
2020-09-05 12:22:44 +02:00
Rubén Rincón Blanco
ccff4b9ee5 Add new eslint rules (#2121)
The largest changes here are:
- enforcing single quotes for strings
- enforcing trailing commas where possible

In addition to those we have enabled several eslint plugins:
- plugin:requirejs/recommended, to enforce some conventions in require statements
- plugin:node/recommended, to enforce correct usage of various node.js APIs
- plugin:unicorn/recommended, which contains a pretty mixed bag of useful rules

This PR attempts to not change code behavior when possible.  In cases where fixing
existing code would change semantics, a linting exclusion has been placed in the 
code base to silence the error.  You can find these by searching for `eslint-disable-next-line`.

Co-authored-by: Austin Morton <austinpmorton@gmail.com>
2020-08-04 16:39:02 -04:00
RabsRincon
01740fba5e Fixes undefined backendOptions
If the request sends no compilerOptions,
 we would throw some exceptions

Closes #2036
2020-06-17 22:30:32 +02:00
RabsRincon
b7fc8b1759 Ensure backend options are always generated 2020-06-15 12:47:31 +02:00
Austin Morton
cadbdf59ff Switch to p-queue package, implement compilationEnvTimeoutMs, and improve temp cleanup logging (#1877)
These changes are an attempt to help diagnose a queue halting issue that decreases parallelism and prevents temp dir cleanup.

see #1875
2020-03-07 01:50:49 -05:00
Austin Morton
1b7fe24990 Perform some general maintenance on the test suite (#1840) 2020-02-18 00:03:15 -05:00
Matt Godbolt
42385ec1d4 Security upgrades and test fixes 2019-01-21 15:56:30 -06:00
Rubén
1a33902997 Merge compilerProps functions to a general case one (#956)
* Merge both compilerProps functions to general case

* Move compilerProps to lib/properties.js

It's now its own class, which takes a languages object + the ceProps
function to calMove compilerProps to lib/properties.js

* Add compilerProps behvaiour tests

* Add unknown language test
2018-06-19 10:09:44 +02:00
RabsRincon
2f6cd42e46 Add --noCache EXTRA_ARGA to disable caching
Also changes the way compilation-env works, by only having 1 for
	all compilers, instead of 1 for each. This should decrease
	memory usage as we now better enforce a maximum cache size.

Library UI got a tiny enchancement, but I'm 0% sure about it so let
	me know if this is worse!

Closes #801 #605
2018-03-05 18:31:48 +01:00
RabsRincon
6ef87b5ef9 Fix copyright dates and normalize text 2018-02-27 14:58:21 +01:00
RabsRincon
d493dfb7cc Format code 2018-01-18 19:46:02 +01:00
RabsRincon
a54faefb4c ES6fy compilers inheritance 2018-01-18 19:43:10 +01:00
RabsRincon
fc75208dac New year, new date 2018-01-01 16:44:04 +01:00
Matt Godbolt
87afc3aa67 Add tests for language selection 2017-12-22 07:55:17 -06:00
Matt Godbolt
d359122371 Move compile handler, add tests 2017-12-22 07:03:29 -06:00