Open nirnay-raval-st10 opened 1 week ago
Can you explain the benefit over just using different name prefixes? Also, where is the pnpm/yarn documentation on this?
Can you explain the benefit over just using different name prefixes? Also, where is the pnpm/yarn documentation on this?
Let me explain the benefits of using workspace structure over name prefixes:
// Workspace Structure
workspace/
├── slices/
│ ├── extractFeeds/ // Complete isolated module
│ ├── fetchFeeds/ // Complete isolated module
│ └── generateIssues/ // Complete isolated module
// vs Name Prefix Structure src/ ├── extractFeeds.ts ├── fetchFeeds.ts └── generateIssues.ts
2. **Benefits**
- **Dependency Management**: Each slice can have its own dependencies
- **Cleaner Testing**: Tests live alongside the code they test
- **Better Code Organization**: Related files stay together
- **Easier Maintenance**: Changes to one slice don't affect others
- **Independent Versioning**: Each slice can be versioned separately
- **Better CI/CD**: Can build/test individual slices
3. **Your Current Setup**
```json
{
"workspace": {
"members": [
"./slices/extractFeeds",
"./slices/fetchFeeds",
"./slices/generateIssues",
"./slices/services",
"./slices/types",
"./slices/shared",
"./slices/generateUpdatesFeeds"
]
}
}
This is actually a Deno-specific workspace implementation, different from pnpm/yarn:
The key difference is that Deno workspaces are more lightweight and focused on module organization rather than package management like pnpm/yarn.
For use case, Deno workspaces provide better module isolation and organization without the complexity of full package management systems.
Is this chatgpt output? Why is it linking to https://deno.land/manual@v1.34.3/tools/workspaces
Can you please explain in your own words a concrete example and use case? The yarn and pnpm documentation looks similar to Deno for what I can see, but I must be missing something.
Is this chatgpt output? Why is it linking to https://deno.land/manual@v1.34.3/tools/workspaces
Can you please explain in your own words a concrete example and use case? The yarn and pnpm documentation looks similar to Deno for what I can see, but I must be missing something.
the problem is
nested-deno-workspace/
├── deno.json
├── packages/
│ ├── math/
│ │ ├── deno.json
│ │ ├── src/
│ │ │ ├── add.ts
│ │ │ ├── subtract.ts
│ │ │ ├── multiply.ts
│ │ │ └── divide.ts
│ │ └── tests/
│ │ └── math_test.ts
│ └── utils/
│ ├── deno.json
│ ├── src/
│ │ └── logger.ts
│ └── tests/
│ └── logger_test.ts
└── main.ts
like in this example
now i want to make a math as a individual deno workspace and also utils as a individual deno workspace and they are member of package deno workspace too.
Can you show an example of pnpm or yarn doing this? I don't see an example in the linked documentation of them having this functionality. I still don't understand what this solves or why it's desired/what the benefit is.
I think I just realized my confusion. Are you asking for workspace support in general? It's already supported in Deno: https://docs.deno.com/runtime/fundamentals/workspaces/
I got confused because I thought you were asking for a change to how workspaces worked.
let me rephrase my issue/request:-
Current Behavior:
Desired Behavior:
Example Structure:
root-workspace/
├── workspace-1/
│ ├── package-1/
│ └── package-2/
└── workspace-2/
├── package-3/
└── package-4/
💡 Feature Request: Nested Deno Workspaces
Description Add support for nested workspace configuration in Deno projects to better organize code by domains and subdomains, similar to how pnpm/yarn workspaces work for Node.js.
Current Situation
Proposed Solution Support nested workspace configuration through:
deno.json
workspace configuration:basically i want to have domain and subdomain workspace differently in same repository.