-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: consolidate
getEntry()
logic (#567)
This consolidates some logic into `getEntry()`, namely including `guessWorkerFormat()` and custom builds. This simplifies the code for both `dev` and `publish`. - Previously, the implementation of custom builds inside `dev` assumed it could be a long running process; however it's not (else consider that `publish` would never work). - By running custom builds inside `getEntry()`, we can be certain that the entry point exists as we validate it and before we enter `dev`/`publish`, simplifying their internals - We don't have to do periodic checks inside `wrangler dev` because it's now a one shot build (and always should have been) - This expands test coverage a little for both `dev` and `publish`. - The 'format' of a worker is intrinsic to its contents, so it makes sense to establish its value inside `getEntry()` - This also means less async logic inside `<Dev/>`, which is always a good thing
- Loading branch information
1 parent
bf2bee9
commit 05b81c5
Showing
11 changed files
with
281 additions
and
254 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
fix: consolidate `getEntry()` logic | ||
|
||
This consolidates some logic into `getEntry()`, namely including `guessWorkerFormat()` and custom builds. This simplifies the code for both `dev` and `publish`. | ||
|
||
- Previously, the implementation of custom builds inside `dev` assumed it could be a long running process; however it's not (else consider that `publish` would never work). | ||
- By running custom builds inside `getEntry()`, we can be certain that the entry point exists as we validate it and before we enter `dev`/`publish`, simplifying their internals | ||
- We don't have to do periodic checks inside `wrangler dev` because it's now a one shot build (and always should have been) | ||
- This expands test coverage a little for both `dev` and `publish`. | ||
- The 'format' of a worker is intrinsic to its contents, so it makes sense to establish its value inside `getEntry()` | ||
- This also means less async logic inside `<Dev/>`, which is always a good thing |
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
Oops, something went wrong.