Commit c878f14
authored
fix(config): warn instead of erroring when start dir is not a workspace member (#34458)
When a parent ``deno.json`` declares a ``workspace`` property (including
an empty ``workspace: []``) and Deno is invoked from a child directory
that is not listed as a member, discovery previously errored with
"Config file must be a member of the workspace." That blocks legitimate
setups like a nested ``package.json``-only folder sitting under a Deno
workspace root, even when the user's intent is simply to use the parent
config.
Instead, discard the parent workspace, resolve the start directory as a
standalone workspace, and emit a warning so the user knows the parent
config was ignored. This mirrors the existing silent fallback for npm
workspaces and matches the resolution discussed on the issue.
Fixes #306721 parent 56723af commit c878f14
7 files changed
Lines changed: 89 additions & 34 deletions
File tree
- libs/config/workspace
- tests/specs/workspaces/parent_workspace_empty_ignored
- child
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
590 | 592 | | |
591 | 593 | | |
592 | 594 | | |
593 | 595 | | |
594 | 596 | | |
595 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
596 | 605 | | |
597 | 606 | | |
598 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4958 | 4958 | | |
4959 | 4959 | | |
4960 | 4960 | | |
4961 | | - | |
4962 | | - | |
4963 | | - | |
4964 | | - | |
4965 | | - | |
4966 | | - | |
4967 | | - | |
4968 | | - | |
4969 | | - | |
4970 | | - | |
4971 | | - | |
4972 | | - | |
4973 | | - | |
4974 | | - | |
4975 | | - | |
4976 | | - | |
4977 | | - | |
| 4961 | + | |
| 4962 | + | |
| 4963 | + | |
| 4964 | + | |
| 4965 | + | |
| 4966 | + | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
| 4971 | + | |
| 4972 | + | |
| 4973 | + | |
| 4974 | + | |
| 4975 | + | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + | |
4978 | 4980 | | |
4979 | 4981 | | |
4980 | 4982 | | |
| |||
4988 | 4990 | | |
4989 | 4991 | | |
4990 | 4992 | | |
4991 | | - | |
4992 | | - | |
| 4993 | + | |
| 4994 | + | |
| 4995 | + | |
4993 | 4996 | | |
4994 | 4997 | | |
4995 | | - | |
| 4998 | + | |
4996 | 4999 | | |
4997 | 5000 | | |
4998 | 5001 | | |
4999 | 5002 | | |
5000 | 5003 | | |
5001 | 5004 | | |
5002 | 5005 | | |
5003 | | - | |
5004 | | - | |
| 5006 | + | |
| 5007 | + | |
5005 | 5008 | | |
5006 | 5009 | | |
5007 | 5010 | | |
| |||
5085 | 5088 | | |
5086 | 5089 | | |
5087 | 5090 | | |
5088 | | - | |
5089 | | - | |
| 5091 | + | |
| 5092 | + | |
| 5093 | + | |
| 5094 | + | |
| 5095 | + | |
5090 | 5096 | | |
5091 | | - | |
5092 | | - | |
5093 | | - | |
5094 | | - | |
5095 | | - | |
5096 | | - | |
| 5097 | + | |
| 5098 | + | |
5097 | 5099 | | |
| 5100 | + | |
| 5101 | + | |
| 5102 | + | |
| 5103 | + | |
| 5104 | + | |
| 5105 | + | |
| 5106 | + | |
| 5107 | + | |
| 5108 | + | |
| 5109 | + | |
| 5110 | + | |
| 5111 | + | |
| 5112 | + | |
| 5113 | + | |
| 5114 | + | |
| 5115 | + | |
| 5116 | + | |
| 5117 | + | |
| 5118 | + | |
| 5119 | + | |
| 5120 | + | |
| 5121 | + | |
| 5122 | + | |
| 5123 | + | |
| 5124 | + | |
5098 | 5125 | | |
5099 | 5126 | | |
5100 | 5127 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments