Commit Graph
187 Commits
Author SHA1 Message Date
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 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 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 QuistandMatt Godbolt 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 GodboltandRabsRincon 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
Austin Morton 67cdfe7417 Fix installation of git hook when using worktrees or spaces
When using git worktrees the hooks directory may not exist.
Also need to quote the arguments for cases where paths have spaces.
2020-11-03 03:42:49 -05:00
Austin Morton 044dcfbf88 Use ES6 Modules (#2132) 2020-09-26 16:59:26 -04:00
RabsRincon 4a2ed5f302 Add some minor improvements to travis
It now logs the out folder size and does not perform audits,
 which saves a whooping 3 seconds total!
2020-08-05 07:22:47 +02:00
Rubén Rincón BlancoandAustin Morton 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
Matt Godbolt 420462bdfd Move thanks to "sponsors"
* Implement (server-side) templating and parsing of sponsors to take some
  of the toil out of updating what was thanks.html, and pave the way for
  making this dynamically loaded outside of the codebase.
* Support corporate sponsorships. Currently showing two (unapproved, NOT
  for merging) ideas of possible sponsors.
* Some minor tweaks to try and support small screens better for these.
2020-04-11 18:11:41 -05:00
Matt Godbolt 91b2431e9a Separate lint from ci-lint and pre-commit. Fixes #1835 2020-02-24 22:02:34 -06:00