Commit Graph

39 Commits

Author SHA1 Message Date
Matt Godbolt
9e9e035b28 Rephrase frontend imports (#7824)
- Removes `rootDirs` so all imports will be relative in the frontend
- Updates (and unifies) imports to be `../types/...` etc instead of
relying on "types" being in the rootDir for the frontend.
- Fixes one type that was being picked up from `lib` in the frontend.
- Adds a precommit hook to check in future

Paves the way to writing _unit_ tests for the frontend for the subset of
the frontend code we can import from `node` (which might be a lot of
it!)
2025-06-18 09:04:23 -05:00
Mats Jun Larsen
5dbb5fff15 Eliminate all usages of require() in the client (#7796) 2025-06-12 21:35:00 +00:00
Mats Jun Larsen
5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Ofek
b6386887a8 Make 'new source editor' preserve the origin language (#7031)
When doing 'Add new...'/'Source editor' from, e.g., a Rust editor - open
a new Rust editor and not a C++ one.


![image](https://github.com/user-attachments/assets/861c53bc-fb1e-44c0-ac23-09d2ac839bdb)
2024-10-27 11:06:51 +02:00
Ofek
c312beae24 TSify StackUsage and others (#7021) 2024-10-26 11:35:35 +03:00
Ofek
c1985d64a1 Tsification binge #7 (#6974) 2024-10-25 12:19:04 +03:00
Ofek
2df8d32758 Tsify #6 (#6941)
Another tsification batch. 347 to go and I'm running out of easy fixes
:(
2024-10-22 21:41:44 +03:00
Ofek
d6f0807e9f More fixes for pane-renaming in various scenarios (#6781) 2024-08-22 11:00:00 +03:00
Ofek
09fc2c1ca4 Final (?) pane-renaming fix (#6774)
Some major-ish fixes to tree and minor fixes in multifile-service.
This hopefully fixes #6770, #5734, and maybe others.
2024-08-21 23:42:26 +03:00
Patrick Quist
a98fb47278 Fix bug when loading zip file (#6020)
Fixes #6019
2024-01-17 16:56:55 +01:00
Ofek
21fe5523c0 Since ES6 there's no reason to use underscores map and filter (#5989)
Mindless replacements of the form 
`_.filter(options, option =>...`  --> `options.filter(option =>...`.

One not *entirely* mindless replacement at the bottom of
compiler-dropin-tool.ts :
```
-        return _.filter(pathFilteredFlags) as string[];
+        return pathFilteredFlags.filter(Boolean) as string[];
```
6 files can now stop importing underscore.
2024-01-13 18:35:11 +02:00
Patrick Quist
a0e42db400 Basic CMake support for CUDA (#4286) 2023-04-18 15:21:17 +02: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
Jeremy Rifkin
384c297906 Fix trailing comma issue (#4775)
Make trailing commas more consistent throughout the project, fixes
config conflict between eslint and prettier. Resolves an oversight in
#4766.
2023-02-26 12:21:35 -05:00
Patrick Quist
a15c725c4f Move url expansion to files (#4602) 2023-02-02 22:02:32 +01:00
Jeremy Rifkin
07f37abe76 The War of The Types (#4490) 2023-01-13 19:22:25 -05:00
partouf
deb24bd942 grmbl 2022-11-12 19:38:56 +01:00
partouf
d06ac0dea5 oops 2022-11-12 19:33:34 +01:00
partouf
6c9d5ca148 eslintfix 2022-11-12 19:32:49 +01:00
partouf
23cc0cf596 bugfix tree init 2022-11-12 19:16:58 +01:00
Patrick Quist
750f1930a7 File drop support (#4247) 2022-11-12 15:14:51 +01:00
Markus
559c8585ec Convert editor.js to typescript (#4143) 2022-10-18 18:19:09 +02:00
Patrick Quist
9b65532be9 more explicit that path-browserify should be used (#3901) 2022-07-28 23:33:58 +02:00
Rubén Rincón Blanco
2dbca646f0 Address some low-hanging fruits from webstorm code inspection (#3582)
* Address some low-hanging fruits from webstorm code inspection
* Change editor code to silence eslint

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2022-04-29 14:24:29 -05:00
Mats Larsen
c199b54440 Enable Prettier for TypeScript frontend (#3524) 2022-04-20 22:39:10 +02:00
Jeremy Rifkin
0bffd4ec0f Resolve @typescript-eslint/no-unnecessary-condition for static/*.ts files (#3511) 2022-04-16 00:36:00 +02:00
Mats Larsen
b48efe333b Use Hub and EventHub types in codebase (#3482) 2022-04-02 22:35:17 +01:00
Rubén Rincón Blanco
db229b94bc Add strict tsc flag for the frontend ts code (#3356) 2022-02-12 02:41:01 +01:00
Rubén Rincón Blanco
42c7b2b694 Make eslint work on static ts files (#3304) 2022-02-03 18:04:50 +01:00
Ivan Egorov
34c41900dc Fix loading a zip project (#3136)
* Fix loading a project

Chrome DevTools suggest that `.map()` does not exist here. I think that the right one is `.forEach()`.

https://stuk.github.io/jszip/documentation/api_jszip/for_each.html

* Remove `Promise.all()`

`zip.forEach()` does not return a value, hence waiting on it does not make sense.
2021-11-24 22:55:44 +01:00
Matt Godbolt
cf7d70402e Await for things (#3086)
* Await for things

We had a number of things that aren't await()ing their promises.
That led to non-deterministic compiler settings like Intel support.
I used the IDE to find them all and fix the ones that I thought looked
important.

More generally we should use tslint (once we're all typescript) to
ensure this more generally. I tried the eslint equivalent but it
either overreacted or didn't catch anything.

Closes #3085
2021-10-31 15:31:45 -05:00
Mats Larsen
2d0cb9f8f0 Ensure Alert.enterSomething's yes callback's type includes the answer (#3052) 2021-10-30 15:41:38 +02:00
Mats Larsen
025325e6d5 Replace CommonJS default exports with named exports (#3021)
This patch refactors every single CommonJS default export and TypeScript `export =` to use named exports.
2021-10-12 11:30:10 +02:00
Patrick Quist
bc6757ae94 Pascalchanges (#2881)
* Changes to allow Program (vs Unit) in Object Pascal

* add possibility of dpr

* more flexibility with pascal filenames

* lintfixes

* i have no idea what im doing

* apply changes to pascal-win

* pascal fixes

* pascal projectfile changes

* work in progress

* bugfixes

* bla

* bugfixes

* mostly working

Co-authored-by: paul mcgee <paul.mcgee.8@bigpond.com>
Co-authored-by: Paul McGee <paulmcgee1969@gmail.com>
2021-09-13 20:22:27 +02:00
Patrick Quist
d6081f5bda support cmake for fortran (#2930)
* support cmake for fortran

* fortran compiler flags
2021-09-12 02:43:36 +02:00
Rubén Rincón Blanco
6a1dbe14f7 Some general UI touches (#2910)
* Touches and changes to the UI to make it more consistent

It fixes some problems, improves the UX of certain actions,
 and clears some code up

* More minor tweaks to the UI

* Fix class typo

* Add compiler picker opt group header background color in default theme

* Fix conformance view

* Removes some &nbsp; in favour of margins

Removes boostrap-slider, there's a built-in html solution
Fixes tab width setting having a wrong input type

* More UI tweaks

* Remove empty CSS rule
2021-09-03 05:51:05 +02:00
partouf
d7ec20d865 fix #2888 2021-08-28 14:03:19 +00:00
RabsRincon
55ab80ca6c Change some tree code based on WebStorm suggestions 2021-08-27 18:25:50 +02:00
Patrick Quist
5e5e60159a Multifile/IDE mode (#2725) 2021-08-26 21:57:07 +02:00