forked from cloudflare/workers-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not consider ancestor files when initializing a project with …
…a specified name When initializing a new project (via `wrangler init`) we attempt to reuse files in the current directory, or in an ancestor directory. In particular we look up the directory tree for package.json and tsconfig.json and use those instead of creating new ones. Now we only do this if you do not specify a name for the new Worker. If you do specify a name, we now only consider files in the directory where the Worker will be initialized. Fixes cloudflare#859
- Loading branch information
1 parent
c4d71cc
commit 43ec49b
Showing
3 changed files
with
157 additions
and
23 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: do not consider ancestor files when initializing a project with a specified name | ||
|
||
When initializing a new project (via `wrangler init`) we attempt to reuse files in the current | ||
directory, or in an ancestor directory. In particular we look up the directory tree for | ||
package.json and tsconfig.json and use those instead of creating new ones. | ||
|
||
Now we only do this if you do not specify a name for the new Worker. If you do specify a name, | ||
we now only consider files in the directory where the Worker will be initialized. | ||
|
||
Fixes #859 |
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