Commit Graph
27 Commits
Author SHA1 Message Date
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
Matt Godbolt f2c1e0bd31 The Grand Reformat (#3643)
* The Grand Reformat

- everything made prettier...literally
- some tweaks to include a few more files, including documentation
- minor changes to format style
- some tiny `// prettier-ignore` changes to keep a few things the way we like them
- a couple of super minor tweaks to embedded document types to ensure they format correctly
2022-05-09 23:13:50 -05: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 a2eed58cd0 Transfer copyright to compiler explorer authors (#2232) 2020-09-26 18:26:02 -04:00
Austin Morton 044dcfbf88 Use ES6 Modules (#2132) 2020-09-26 16:59:26 -04:00
Austin Morton 3c4aa76707 Replace demanglerClassFile with demanglerType (#2225) 2020-09-23 05:34:30 -04: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
Austin Morton cadbdf59ff Switch to p-queue package, implement compilationEnvTimeoutMs, and improve temp cleanup logging (#1877)
These changes are an attempt to help diagnose a queue halting issue that decreases parallelism and prevents temp dir cleanup.

see #1875
2020-03-07 01:50:49 -05:00
Austin Morton 1b7fe24990 Perform some general maintenance on the test suite (#1840) 2020-02-18 00:03:15 -05:00
Partouf c1ddb6481e fix pascal unittests 2019-08-08 15:57:06 +02:00
Partouf 566d019f75 rename pascal-support to demangler-pascal 2019-06-10 14:21:33 +02:00
Rubén 1a33902997 Merge compilerProps functions to a general case one (#956)
* Merge both compilerProps functions to general case

* Move compilerProps to lib/properties.js

It's now its own class, which takes a languages object + the ceProps
function to calMove compilerProps to lib/properties.js

* Add compilerProps behvaiour tests

* Add unknown language test
2018-06-19 10:09:44 +02:00
Partouf 885a9876fc unittest fixes 2018-04-22 15:15:52 +02:00
Partouf f16c7bb7f3 refactor to add extra test 2018-03-15 18:30:31 +01:00
RabsRincon 6ef87b5ef9 Fix copyright dates and normalize text 2018-02-27 14:58:21 +01:00
Partouf 9a76e777a7 remove return initialise, no need for unittestmode 2018-01-28 00:34:05 +01:00
Partouf d69018256b New pascal tests 2018-01-21 13:38:00 +01:00
RabsRincon 9cb7251750 ES6fy CompilationEnv. Fixed some tests cornercases 2018-01-18 20:22:22 +01:00
RabsRincon fc75208dac New year, new date 2018-01-01 16:44:04 +01:00
RabsRincon 288b8be273 Remove unnecessary lang declaration 2017-12-25 23:02:44 +01:00
partouf f7b87e9b6a compensate for difference between beta and unification branches 2017-12-22 18:20:55 +01:00
partouf 6070cfe3c7 Always use output.pas as filename, otherwise things will break.
Tried to make it flexible but ran into trouble in pascal-support.js
2017-12-22 18:15:26 +01:00
partouf bce36b4f78 this one should take coverage to 100% again 2017-12-12 00:36:04 +01:00
partouf f39c0168bd added tests that cover more paths 2017-12-12 00:18:44 +01:00
partouf 50604abff1 refactoring 2017-12-11 23:27:47 +01:00
partouf 2446ea582b separate demangler into support library 2017-11-28 21:22:53 +01:00
partouf fe63adc4bc seperated pascal demangler from pascal compiler, added unit tests and bugfixed some demangling 2017-11-28 03:11:16 +01:00