Commit Graph
1908 Commits
Author SHA1 Message Date
Mats Larsen 115366de0c Move app theme into its own type 2021-10-28 20:54:56 +02:00
Mats Larsen c92f1ffd1c Make colour.ts take Record<number, number> and refactor it to drop underscore 2021-10-22 22:51:57 +02:00
Mats Larsen cd1f67aa45 Enable downLevelIteration and tslib for TypeScript (#3038)
* Install tslib for TypeScript runtime

* Enable downlevel iteration and tslib in tsconfig
2021-10-22 08:56:17 -05:00
Mats Larsen 60217a8e61 Make the TypeScript Pane API easier to work with (#3034)
This is a refactor for core methods of the Pane API. In this patch:

1. Rename initializeDOMRoot to getInitialHTML() - This logic is common for all of the panes. Returning the HTML is more type-safe and makes the method pure.
2. Make createEditor return the monaco editor - Allows us to set the editor in the constructor. Returning the editor is more type-safe and makes the method pure.
3. Rename id parameters to compilerId in onCompileResult, onCompiler and onCompilerClose - It's not easy to tell what these ids were, this makes it easier to understand what we're using here.
4. Type compiler, options and result as unkown in onCompiler, onCompileResult - These parameters don't have types at the moment, so it's safer for implementors to manually override and type as any/whichever type they wish.
5. Add plenty of code documentation to onCompiler and onCompileResult
2021-10-14 15:16:40 +02:00
Mats Larsen 0a5877b91b Add method to Pane for implementing editor actions (#3033)
This feature was already implemented on a lot of the older panes. It is now available for the new TypeScript Pane API.
2021-10-14 12:13:47 +02:00
Mats Larsen 729433e214 Temporarily fix security vulnerability in crystal-mode regex 2021-10-14 11:07:17 +02:00
Mats Larsen 39eec866e9 Use fetch when fetching from the Format API (#3017)
Refactors the Format API handler code to use fetch (or polyfill) instead of JQuery Ajax
2021-10-13 23:31:15 +02:00
Mats Larsen 12fa535841 Remove duplicate import in gnatdebug-view 2021-10-13 21:45:36 +02:00
Marc PoulhièsandMats Larsen 9b46d4f1fd Initial support for GNAT specific debug output (#3000)
This change only gets the GNAT Debug expanded generated code (-gnatD).

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Mats Larsen <me@supergrecko.com>
2021-10-13 19:59:26 +02:00
Mats Larsen a4f33846dd Fix imports for rust MIR and Macro Expansion views 2021-10-12 22:14:50 +02:00
Mats Larsen 9904a6ee51 Make each mode a ts module 2021-10-12 16:11:56 +02:00
Mats Larsen 2f83604654 Rename all mode files to .ts in preparation for #3027 2021-10-12 15:45:18 +02:00
Mats Larsen 85a287c011 Introduce whatwg-fetch as fetch polyfill (#3016)
Fetch is a modern, promise-based API for sending HTTP requests from the browser (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)

This patch introduces whatwg-fetch as the polyfill for fetch, as well as installing it inside the main script.
2021-10-12 11:54:10 +02:00
Markus 9e00d2f896 Convert simplecook.js to typescript (#3010)
Converts simple cookies handler to TypeScript and refactors to use setOn handlers instead of directly mutating the simplecook instance properties
2021-10-12 11:50:33 +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
Matt Godbolt 7fc4bd148c Update chart.js and its API (CC @partouf) 2021-10-11 22:23:29 -05:00
Mats Larsen 896cf2f9ca Decouple each pane state from the base pane state (#3025)
Decouples the individual initial pane states for each pane from the BasePaneState type.

This will allow easier re-use of the state the various constructors receive

Non-functional change.
2021-10-12 00:03:50 +02:00
Mats Larsen 2fb0482367 Fix ansi-to-html background color regression (#3019)
Fixes a regression where the background style would be shown as foreground
2021-10-07 13:56:33 +02:00
Mats Larsen 63b3c90dc2 Add Go formatting with Gofmt (#2966)
Fixes #1009

Supports formatting go code, using gofmt as backend.
2021-10-05 15:41:16 +02:00
Mats Larsen 2405a4d79d Make Rust macro expansion view properly display unsupported compiler (#3006)
Fixes the same issue as patched in #2999 for the Rust macro expansion view
2021-10-05 10:40:18 +02:00
Mats LarsenandMatt Godbolt 189661dbd4 Convert options.js to TypeScript (#2982)
* Convert options.js to TypeScript
* Use export = notation

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2021-10-04 23:01:10 -05:00
Austin MortonandMatt Godbolt 1828965a69 Remove explicit files and outDir values from tsconfig (#2992)
When `files` is unspecified `input` defaults to `**/*`.
This pattern still only matches valid typescript extensions.

When `outDir` is specified it is implicitly added to `exclude`,
which takes priority over `include` and breaks the build.

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2021-10-04 22:55:16 -05:00
MarkusandMatt Godbolt 7a754a3664 Convert codelens-handler.js to typescript (#2990)
* Convert codelens-handler.js to typescript

Signed-off-by: Markus <28785953+MarkusJx@users.noreply.github.com>
Co-authored-by: Matt Godbolt <matt@godbolt.org>
2021-10-04 22:49:16 -05:00
MarkusandMats Larsen 511236c8ec Convert ansi-to-html.js to typescript (#2988)
* Convert ansi-to-html.js to typescript

Signed-off-by: Markus <28785953+MarkusJx@users.noreply.github.com>
Co-authored-by: Mats Larsen <me@supergrecko.com>
2021-10-04 22:29:41 -05:00
Rubén Rincón Blanco b6338e0897 Adds supportsExecute language option (#2963)
* Adds supportsExecute language option

It's recalculated every time the compilers change
2021-10-04 21:47:29 -05:00
Marc Poulhiès adced60365 Fix Rust MIR view to correctly display unsupported compiler (#2999)
The pane would still show <no output> for unsupported compiler.
Let the onCompiler callback correctly write the message in case the compiler is
not supported.

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
2021-10-05 01:36:23 +02:00
Markus f24c4efe4e Convert colour.js to typescript (#2991)
This will convert static/colour.js to typescript (see #2981)

Changes are pretty much the same as with the other conversions I did.

Assumed that param colours in applyColours is of type number[] as this is the only fitting type.

Signed-off-by: Markus <28785953+MarkusJx@users.noreply.github.com>
2021-10-03 23:26:59 +02:00
Matt Godbolt 184e58e569 Some tweaks to regexes. Not that I could get the crystal one to work 2021-09-27 22:39:34 -05:00
Matt Godbolt fa99f6c174 Handle case when no compiler is selected 2021-09-27 22:18:18 -05:00
partouf ee3370501a always escape 2021-09-27 16:12:36 +00:00
RabsRincon 18e84343a6 More escapes 2021-09-27 17:14:05 +02:00
Luka Prebil Grintal 1293bc509e Escape string that gets passed as custom output filename (#2968) 2021-09-27 17:08:02 +02:00
RabsRincon e33a52bfd6 Closes #2967 2021-09-27 17:04:54 +02:00
Mats Larsen 97134a9813 Fix linting errors from #2932 2021-09-27 10:03:22 +02:00
Mats Larsen 278d28b313 Add rustc Macro Expansion view (#2932)
Adds a new pane for producing the macro expansion of Rust code compiled with rustc.
2021-09-27 00:33:09 +02:00
Mats Larsen e7b9cbda91 Respect tab width and tabs/spaces settings for format APIs (#2957)
Site settings for tab width and tabs vs spaces are now being used when sent to the /api/format APIs.

This patch also includes some tiny internal refactoring on the bits related to the formatting API.
2021-09-26 23:56:39 +02:00
Mats Larsen 71af750227 Warn if Execution Only is added for compiler without execution (#2962)
Shows a warning in the alert system and cancels the execution request if the compiler does not support execution.
2021-09-24 02:37:39 +02:00
Mats Larsen 3faf881e95 Bind duplicate selection to Ctrl + D (#2956) 2021-09-22 21:16:36 +02:00
Mats Larsen 6907507570 Add missing tsconfig entries and alphabetically sort existing ones (#2953) 2021-09-22 16:02:11 +02:00
Mats Larsen 5f098e3260 Properly type settings argument for monaco extendConfig() (#2935) 2021-09-21 20:10:11 +02:00
Mats Larsen 3c58e69c94 Fix missing FormatBase variants in settings.interfaces.ts (#2950) 2021-09-21 20:03:21 +02:00
Patrick Quist e24f724e47 Options cleanup (#2924)
* getting rid of compiler.libs

* old widget no longer needed

* move supportedLibraries code to base-compiler

* bugfix

* oops

* grmbl

* bugfix remote msvc compilers
2021-09-13 20:22:39 +02:00
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
Patrick Quist 00f226fa2a fix skipasm (#2931) 2021-09-12 02:43:15 +02:00
partouf 85cda71b9b fix #2929 2021-09-11 22:50:09 +00:00
Mats LarsenandPatrick Quist d93bd31f40 Add base Pane component and migrate RustMirView to TypeScript (#2917)
* Implement generic pane skeleton

* Implement abstract Pane class

* Port RustMirView to typescript

* Fix nits in code

* Adjust method names and add override modifiers

* Add remaining settings keys (and fix a bug)

* Use this-binding in registerStandardCallbacks

* Address review comments

* Use utils.updateAndCalcTopBarHeight in base pane

* Add notice about adding an entry in interfaces.ts

* Use .bind instead of context parameter

GoldenLayout has moved away from the context parameter, so .bind is a safer for the future

* [200~Check for editor presence + fix typo~

* Remove trailing comma

Co-authored-by: Patrick Quist <partouf@gmail.com>
2021-09-10 23:42:47 +02:00
Mats Larsen 000e147431 [NFC] Port monaco-config.js to TypeScript (#2918)
* Port monaco-config.js to TypeScript

* Properly type the inputs of extendConfig()

* Sort tsconfig
2021-09-10 23:40:52 +02:00
Robert Andrzejuk 4484943659 Update styles available in clang-format (#2926)
* Update styles availabe in clang-format

* Update compiler-explorer.amazon.properties
2021-09-10 12:41:53 +02:00
Patrick Quist 902a6a8777 search on cloogle (#2921) 2021-09-10 02:48:52 +02:00