This repository was archived by the owner on Sep 25, 2025. It is now read-only.
Repository navigation
feat: compile ts incrementally - #685
Merged
ojeytonwilliams merged 40 commits intoAug 19, 2021
Merged
Conversation
Unit tests inside the containers don't tell us much and don't work now that the test packages are not included in the app container
Since the root dependencies aren't getting into the docker image anymore this adds concurrently to the server
ojeytonwilliams
force-pushed
the
feat/compile-ts
branch
from
August 10, 2021 21:39
06f1ac1 to
7b660c0
Compare
Also makes the server's volume mirror the clients (i.e. it's just the server dir, not root)
ojeytonwilliams
force-pushed
the
feat/compile-ts
branch
from
August 11, 2021 06:43
7b660c0 to
6dd550e
Compare
production.js couples the client and server too tightly - it directly requires the client's .next directory. This coupling makes it hard to deploy the client and server to different VMs/containers.
ojeytonwilliams
marked this pull request as ready for review
August 11, 2021 09:24
allella
reviewed
Aug 11, 2021
typeorm needs to be called from the server directory, but this can be achieved by cd'ing into server rather than using npm scripts that call npm scripts
Running the tests inside Docker seems redundant - if we make a mistake in the Docker config, the e2e tests will flag that up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This supersedes #684 because I realised that in order to test the docker build in CI, the tests needed to be much faster.
What this does
In a nutshell, it replaces ts-node with node. Instead of compiling TypeScript on the fly and on each call to
npm run db:resetit compiles it once and only re-compiles when a source file has changed. This makes the dev experience (and tests) a lot snappier.db:resetis roughly 10 times quicker now, for instance.Also, this makes the production environment a little quicker, too, since we can compile the TS before starting the server. In principle ts-node can do this, too, but I'd rather cut out the intermediary and just use js directly.
Docker changes
The dev experience should be unchanged, but now we have a production-like version, and Cypress tests to run against it. It would be nice to check the dev-mode in CI, but it's painfully slow to the point that Cypress would need a much larger timeout to pass. As such, it just tests the production-like version. The main difference between that and dev-mode is that dev-mode uses local volumes and
npm run devso that code changes are watched.Reorganisation
The changes in #684 are included.