193 Commits

Author SHA1 Message Date
Matt Godbolt
60497c6b9a Use uv to install python dependencies in docenizers (#8140)
Tested locally and it works BUT the created `.ts` files are still broken
similar to what was found in #8101

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-25 15:35:07 -05:00
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
kevinjeon-g
ff8fd43e1f Update Makefile --webpack-content to --static (#7683)
<!-- 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!
-->
2025-05-13 12:50:59 -05:00
Matt Godbolt
54c942ba76 Replace nopt with commander.js for argument parsing (#7673)
- Replace nopt with commander.js for better command-line argument parsing
- Add automatic help generation with detailed descriptions
- Maintain backward compatibility with existing arguments
- Remove unused nopt dependency from package.json

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-12 12:49:28 -05:00
Ofek
c4692058cf Replace cp --update with an osx-compliant alternative (#7471) 2025-03-01 21:55:21 +02:00
Mats Jun Larsen
5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Partouf
3c4e2bb178 osx fix 2024-12-20 14:11:51 +01:00
Mats Jun Larsen
fb7b592025 Replace supervisor with tsx --watch (#7212)
Works just like before with reloading of properties. See demo GIF

![Peek 2024-12-11
12-10](https://github.com/user-attachments/assets/aba24af0-6762-4946-8fd9-ef0080e9a6cc)
2024-12-12 08:40:19 +09:00
Mats Jun Larsen
d9093faf18 Replace ts-node with tsx (#7205)
Migrates tooling to TSX (as advised by nodejs) until we are on Node 22
where we can `--watch --experimental-strip-types`
2024-12-10 00:18:46 +09:00
Ofek
6c8f9aed5a Fix #4225: make now copies etc/scripts/disasms into out/dist (#7047) 2024-11-02 10:56:03 +02:00
Matt Godbolt
5d776aaae3 Replace ts-node-esm with direct calls to node to support node 20 (#5521)
- works both v18 and v20
- see https://github.com/TypeStrong/ts-node/issues/1997
2023-09-27 21:57:18 -05:00
Matt Godbolt
5c51cecd9c Use npm ci instead; and also ci if package-lock.json changes (#5335) 2023-08-21 22:09:08 -05: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
6bd5c43f62 Tsify app.js (#4767)
I forgot about app.js, now this is actually the last file in our ts
conversion (other than test/)
2023-02-23 17:15:59 -05:00
Jeremy Rifkin
4a1b5a85c5 Add make asm-docs (#4590) 2023-01-16 19:46:26 -05:00
Jessica Clarke
b3e48b7bd1 Makefile: Split run into new prebuild and run-only targets (#4450)
This provides a simple interface for build scripts that want to pre-run
the webpack and ts-compile steps (e.g. when producing a container
image) ahead of time rather, without requiring them to copy the current
set of commands needed for each part and hope they don't change.

Fixes https://github.com/compiler-explorer/compiler-explorer/issues/3287
2022-12-17 19:53:06 -06:00
Patrick Quist
960e85af45 gpu properties files (#4241) 2022-11-04 20:36:58 +01:00
Mats Larsen
18160be477 Use eslint-plugin-prettier to fix and check formatting problems (#3847) 2022-07-12 22:56:03 +02:00
partouf
8932b8d21a do a normal lint at precommit including ts-check 2022-06-06 15:35:47 +02:00
Rubén Rincón Blanco
e98d428030 Make check and npm run check now run similar steps (#3722) 2022-05-27 22:54:36 +02:00
Mats Larsen
e24b2f72be Remove unused prettier format script (#3646) 2022-05-15 20:36:13 +01:00
Matt Godbolt
7828576a5b Reverts the reversion of the "make" being more prod-like, and fixes it. (#3591)
* Use webpack to autogenerate the files.

That way, we always generate them consistently, be it through
`make` or building for prod. This fixes the `make` issue, and also
means we've further unified the way we build and run with `make`
vs prod.

Unfortunately this doesn't work for `make dev`; which sees the
handlebars content only. That's probably ok though, I think.
2022-04-28 12:59:25 -05:00
Matt Godbolt
9b8b9f711b Revert "Make make run the site similar to prod. (#3587)"
This reverts commit fbcf4fc318.
2022-04-28 08:00:31 -05:00
Matt Godbolt
fbcf4fc318 Make make run the site similar to prod. (#3587)
Fixes #3584
2022-04-27 16:36:56 -05:00
Matt Godbolt
a6682987dc New build and deploy setup (#3269)
* New build and deploy setup

* kills a lot of makefile complexity
* users will only ever use node-env=development for all practical
  purposes. Hopefully fixes issues where something node_modules
  is missing non-dev dependencies
* script building now pulled into a bash file
2022-01-18 20:46:33 -06:00
Patrick Quist
23eaff0395 Update Makefile (#3234) 2022-01-05 16:20:26 +01:00
Patrick Quist
b03f6a7e7b Makefixes (#3227)
* move ts-node to normal dependencies

* always install everything

* need node things to precommit
2022-01-01 15:18:13 +01:00
Patrick Quist
6e79e098c4 Minimal backend typescript support (#3207)
* minimal ts support

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2021-12-22 20:44:51 +01:00
Matt Godbolt
7c20613c5d Move to using webpack5 (#3197)
* Bumps a lot of the auxiliary webpack projects to latest
* Minor tweaks to get webpack5 working
* Replace css minimizer with new https://webpack.js.org/plugins/css-minimizer-webpack-plugin/
* es6 shim uniquely named
2021-12-21 10:20:15 -06:00
Rubén Rincón Blanco
3d68f5382e Implements Prettier formatting (#2766) 2021-08-28 14:41:28 +02:00
RabsRincon
1db038b0e1 Add ts files to watcher list 2021-08-27 21:33:14 +02:00
RabsRincon
41cf06815a Add --inspect to make debug rule 2021-07-15 16:47:10 +02:00
Austin Morton
53ee8ee2ff Clear esm module cache when updating npm packages to avoid stale cached dependencies 2021-06-06 16:10:58 -04:00
Matt Godbolt
c6b7cc27af Attempt at uploading sourcemaps 2021-04-05 20:55:03 -05:00
Matt Godbolt
ed7f003651 Privacy policy updates. Closes #2276 (#2419)
* Privacy policy updates. Closes #2276

* Improve policies timestamp generation

* Remove leftover debug print

* Python3 all the things

Also uses the short hash for policy commits

* More master->main.

Co-authored-by: RabsRincon <ruben@rinconblanco.es>
2021-02-15 00:09:13 +01:00
Matt Godbolt
91c6e77c28 Argh, more broken 2021-02-13 17:05:40 -06:00
Matt Godbolt
1505ba3428 If only I could remember how this worked. The filenames must all agree here for the deploys to work 2021-02-13 17:04:16 -06:00
Matt Godbolt
311e102e37 More name tweaks. Nothin's ever simple 2021-02-13 16:55:47 -06:00
Matt Godbolt
c1a13ce2ac Well, turns out one thing needs to know the actual name we give it. Sigh 2021-02-13 16:49:10 -06:00
Matt Godbolt
4fbb52ab70 We don't need the gh- prefix in the name. We already have that in the darned path 2021-02-13 16:39:08 -06:00
Matt Godbolt
7c4d2e625c erg GITHUB_RUN_NUMBER is what I meant, obviously 2021-02-13 16:37:23 -06:00
Matt Godbolt
ee8df1ceb9 After much debate; go to gh-ID for build numbers 2021-02-13 15:58:19 -06:00
Matt Godbolt
85bf61bad3 Use git run id 2021-02-13 15:03:44 -06:00
Matt Godbolt
6eee72f409 As we changed build step/name of the yml file our build number went back to zero 2021-02-13 14:56:59 -06:00
Matt Godbolt
ff6105aa36 recombine workflows 2021-02-13 14:38:15 -06:00
Matt Godbolt
29cf0b29ad More hopeful fixes 2021-02-13 09:52:00 -06:00
Matt Godbolt
9d282cb598 Fix GH branch 2021-02-13 09:45:26 -06:00
Matt Godbolt
459afeb426 Goodbye, travis 2021-02-13 09:23:17 -06:00
Matt Godbolt
5136152d36 Ensure args get passed to npx-run sentry-cli 2020-11-03 08:41:44 -06:00
Matt Godbolt
43343cdd56 Only install and use sentry-cli on travis; sentry-cli doesn't work on BSD. See #2307 2020-11-03 08:09:28 -06:00