Commit Graph
25 Commits
Author SHA1 Message Date
Mats ea29a6e9d6 Separate list and load actions for source API (#7090)
This is the first PR in API consistency with more to come:

1. The source API urls have been properly defined with
`/source/:source/list` and `/source/:source/load/:language/:filename`
- These used to be two API endpoints mushed together into one `handle()`
function. They are now separate
- While it may appear from the tests that this is an API breakage,
there's currently no way to have the source API spit out responses for
stuff like `/source/moose/load/Grunkle`.
2. The frontend code calling the list api now has shared types
3. Code has been migrated to `/lib/handlers/api/source.ts`
- I've moved code here, because I would like to separate the stuff
that's under the API and the stuff that isn't (e.g., healthcheck)
- The source endpoint is currently not under /api, but I believe it
makes sense to move it.
4. GitHub is terrible at showing the diff, but the `browser.ts` file has
been removed, since it's never actually used. Our frontend only calls
`/source/builtin/...` and it never had any entries. Besides, the type
used on the frontend for the locally stored stuff is different...
2024-11-27 13:54:47 +09: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 dbd1134c39 Small options cleanup (#6981)
Remove the unused googleShortLinkRewrite and gapiKey
2024-10-19 22:12:41 +03:00
Ofek d23b327153 A few leftovers that escaped the google-analytics cleanup (#6979)
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2024-10-19 22:00:12 +03:00
Ofek fecd0fbf11 tsification + small package upgrade (semver) (#6841) 2024-09-10 17:18:48 +03:00
Ofek 9ef46fbafe Binge of (mostly) mindless tsification (#6838)
Turned on `noImplicitAny` in tsconfig, then went around fixing some
random easy stuff.
Hopefully tsification-PRs with more real content coming up.
2024-09-07 14:36:43 +03:00
Patrick Quist 3a278ad3b3 Add library lookupname to support binary builds for boost (#6814) 2024-09-04 19:18:37 +02:00
Patrick Quist b8325cf0c6 eslint root setting and fixes (#6307) 2024-04-16 21:26:53 +02:00
Jeremy Rifkin c43e69bfdd Use CompilerInfo[] in a couple places that were previously any or never (#6029)
Depends on #6028
2024-01-22 21:47:45 -06:00
Patrick Quist 730437464d Fix semver ordering for libraries (#5959)
Fix #5951
Fix #5085

Extended the fictitious version number for non-numbers, so that trunk
can be listed higher than a `yyyymmdd` as a version (EVE uses this)
2024-01-08 22:10:25 -06:00
Patrick Quist 4481bd0f3a Show up to date version for trunk compilers (#5571) 2023-10-15 15:56:43 +02:00
Jeremy Rifkin 4260313e13 Common utilities and type work (#5200)
This PR refactors some common utilities out of lib/ and into shared/ and
eliminates some use of underscore.js, as well as general type
improvements done along the way.
2023-06-28 20:13:10 -04:00
Patrick Quist 40ae2261e0 Headers via conan (#5179) 2023-06-23 12:25:30 +02:00
Patrick Quist 16b96169b3 no warning about paths if library version is autodetect (#5108)
Fixes #5053
2023-06-05 20:27:45 -05:00
Mats Jun LarsenandMatt Godbolt 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
Jeremy Rifkin 2b06c69111 Turn some auto-fixable eslint rules back on (#4766)
This PR turns comma-dangle and indent eslint rules on for lib/. These
are rules inherited from the eslint config for static/, this PR just
makes things more consistent. Also turned
@typescript-eslint/no-var-requires back on while I was here.
2023-02-23 17:16:17 -05:00
Jeremy Rifkin 33167a3024 Tsify main (#4520) 2023-01-13 19:52:00 -05:00
Marc Poulhiès 69055681d9 Support for compiling to binary object (#3232) 2023-01-11 19:39:25 +01:00
Matt Godbolt 749319f791 Slightly more controversial bumpings (#4503)
- latest sentry, tar-stream, which, some yamljs versions
- latest eslint-* stuff
- latest webpack manifest
- Applies all the automatic fixes for newer lint rules
- Bump the webpack version

applies new tslint stuff
2022-12-28 11:42:14 -06:00
Matt Godbolt 57a647b8a3 Add the result inside the CompilationResult (#4475) 2022-12-20 08:15:39 -06:00
Matt Godbolt 6348917e15 Separate shareable tool type from server ITool (#4472)
* Separate shareable tool type from server ITool

I realised we were using the "Tool" on both client and server, but the client only has the JSON-able data of Tool, not the interface/object Tool (now renamed to `ITool`).

* Fix tests
2022-12-19 22:40:27 -06:00
Jeremy Rifkin e1fb48714c Updated CompilerProps.get typing (#4397)
* Updated CompilerProps.get typing

* Get rid of two any casts in options-handler.ts

* Fixed mistaken types
2022-12-06 19:56:58 -05:00
Jeremy Rifkin e7b10519f7 Tsify options-handler (#4396)
* First pass conversion of options-handler to ts

* Small tweaks

* Fix tests
2022-12-03 19:37:57 -05:00