-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
fix: reintroduce watch and direct import of config files (#2634)
`engine-cli` used to have 3 config modes: 1. require - was actually doing a direct `import()` to the config (was a `require()` call before the move to esm) 2. watch - bundles config files into cjs bundles. this was (and still is) broken when the config module, or any of the files it imports use esm-specific syntax (e.g import.meta). 3. fresh - this used `import()` via a freshly created worker_thread. it allowed getting the "current" value of a config file (in dev time), meaning you don't have to watch. it got broken when we moved to esm. #2629 removed the first two and fixed the third. this caused a speed regression downstream, as tests imported configs over and over in a non-cached manner. with this PR, we now have 3 modes again: 1. "import" - same functionality as before, but a non-confusing name 2. "watch" - same functionality as before. still broken when using native esm syntax 3. fresh - got fixed so it actually works again. not used unless cli flag is passed "import" is now the default unless cli is in watch mode (where "watch" gets be the default)
Showing
5 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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