Infer project references from common monorepo patterns / tools
Genesis: see section "Repetitive configuration" in https://github.com/Microsoft/TypeScript/issues/3469#issuecomment-400439520 ## Search Terms monorepo infer project references automatically yarn lerna workspace package.json ## Suggestion For common monorepo managers, we should natively understand cross-project references declared in `package.json` as if they were declared in `tsconfig.json` Open questions: * Which formats (lerna, yarn, pnpm, etc) would be supported? Can all of them be consistently detected, or would you need to opt in to a specific "monorepo format" to enable a specific resolution algorithm? * How do we find the `tsconfig.json` file? This data is actually not present in the current (non-tsconfig) dependency graph. We could assume it to be in the package root; what if it's elsewhere? * Would you need to opt in? Would there be a way to opt out? What should that look like? ## Use Cases * Monorepos of all (supportable) flavors ## Examples https://github.com/RyanCavanaugh/learn-a This repo has a fair bit of duplication where projects need to write down their dependencies in package.json *and* as references (with different syntax) in `tsconfig.json`. ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the express
Posted by RyanCavanaugh on Jul 2, 2018, 7:39 PM
Tags
Related issues
- [BUG] Cowork (Windows): all Plan9 shares fail with "Plan9 mount failed: invalid argument" after Windows update KB5124008 (26200.9445) — uninstalling the KB fixe
- Feature Request: Auto-resume CLI session when usage limit resets
- Please deobfuscate the Python
- [Bug] MLX version of Gemma 4 26B fails to load: "Model type gemma4 not supported" (macOS)
- # 233 Developers Discussed Abandoning the Office Add-in Platform — An Open Letter on the Office.js Stability, Security & Trust Crisis
- [FEATURE] Allow users to configure which shell the Bash tool uses or inherit initial shell
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
reliability (Software)
[BUG] Cowork (Windows): all Plan9 shares fail with "Plan9 mount failed: invalid argument" after Windows update KB5124008 (26200.9445) — uninstalling the KB fixe
Feature Request: Auto-resume CLI session when usage limit resets
Please deobfuscate the Python
[Bug] MLX version of Gemma 4 26B fails to load: "Model type gemma4 not supported" (macOS)
# 233 Developers Discussed Abandoning the Office Add-in Platform — An Open Letter on the Office.js Stability, Security & Trust Crisis
[FEATURE] Allow users to configure which shell the Bash tool uses or inherit initial shell
Admin Materials and Surfaces
AMD Support
Infer project references from common monorepo patterns / tools
Genesis: see section "Repetitive configuration" in https://github.com/Microsoft/TypeScript/issues/3469#issuecomment-400439520 ## Search Terms monorepo infer project references automatically yarn lerna workspace package.json ## Suggestion For common monorepo managers, we should natively understand cross-project references declared in `package.json` as if they were declared in `tsconfig.json` Open questions: * Which formats (lerna, yarn, pnpm, etc) would be supported? Can all of them be consistently detected, or would you need to opt in to a specific "monorepo format" to enable a specific resolution algorithm? * How do we find the `tsconfig.json` file? This data is actually not present in the current (non-tsconfig) dependency graph. We could assume it to be in the package root; what if it's elsewhere? * Would you need to opt in? Would there be a way to opt out? What should that look like? ## Use Cases * Monorepos of all (supportable) flavors ## Examples https://github.com/RyanCavanaugh/learn-a This repo has a fair bit of duplication where projects need to write down their dependencies in package.json *and* as references (with different syntax) in `tsconfig.json`. ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the express
Comments (0)
No comments yet. Start the discussion.