Commit 6b7c178
[chore] refactor typescript directory (#2087)
# Major TypeScript Directory Refactor
## Overview
This PR introduces a **major refactor of the TypeScript codebase**. The
primary goal is to modernize, modularize, and clarify the structure of
our TypeScript projects, making it easier to maintain, extend, and
onboard new contributors. This is a breaking, high-impact change that
affects nearly every TypeScript-related file and package.
---
## What Changed
### 1. **Monorepo Structure: All TypeScript Packages Moved to
`/packages`**
- **Before:** Many packages and apps (e.g., `fiddle-frontend`,
`vscode-ext`, `playground-common`, `common`, etc.) were scattered
directly under `typescript/` or in ad-hoc subfolders.
- **After:** All reusable packages and libraries now live under
`typescript/packages/`. This includes:
- `baml-schema-wasm-node`
- `baml-schema-wasm-web`
- `codemirror-lang-baml`
- `common`
- `fiddle-proxy`
- `language-server`
- `nextjs-plugin`
- `playground-common`
- `ui` (new, see below)
### 2. **Apps Consolidated Under `/apps`**
- **Before:** Apps like the playground and VSCode extension were in
their own folders (`fiddle-frontend`, `vscode-ext/packages/vscode`,
etc.).
- **After:** All TypeScript-based apps now live under
`typescript/apps/`:
- `fiddle-web-app` (formerly `fiddle-frontend`)
- `vscode-ext` (formerly `vscode-ext/packages/vscode` and `web-panel`)
### 3. **New `ui` Package**
- All shared UI components (buttons, dialogs, forms, etc.) are now in
`typescript/packages/ui/`.
- This package is intended to be the single source of truth for UI
primitives across all apps.
### 4. **Shared Code and Utilities**
- The `common` and `playground-common` packages have been moved and
refactored for clarity.
- Shared logic, types, and utilities are now easier to find and import.
### 5. **Configuration and Tooling**
- All build, lint, and workspace configuration files have been updated
to reflect the new structure.
- New workspace tools and base configs are in
`typescript/workspace-tools/`.
### 6. **Removed/Deleted Files**
- Legacy, duplicate, or now-unnecessary files and configs have been
deleted.
- Old package.jsons, tsconfigs, and other configs from the previous
structure are gone.
---
## Why This Matters
- **Consistency:** All TypeScript code now follows a clear,
industry-standard monorepo structure.
- **Maintainability:** Easier to update dependencies, share code, and
onboard new contributors.
- **Scalability:** Adding new packages or apps is now straightforward.
- **Clarity:** No more confusion about where a package, component, or
utility lives.
---
## Impact for Contributors
- **Imports:** You may need to update import paths in your branches or
local changes.
- **Docs:** Please refer to the new folder structure when writing
documentation or onboarding guides.
- **Build/Test:** All scripts and CI should now reference the new
locations. If you have custom scripts, update their paths.
- **VSCode/IDE:** You may need to reload your workspace or update your
project settings.
---
## Migration Guide
- **Apps:** Look in `typescript/apps/` for all runnable applications.
- **Packages:** Look in `typescript/packages/` for all libraries, shared
code, and utilities.
- **UI Components:** Use `@boundaryml/ui` for all shared UI needs.
- **Workspace Tools:** See `typescript/workspace-tools/` for base
configs and scripts.
---
## Summary Table
| Old Location | New Location |
| ------------------------------------------- |
-------------------------------------------- |
| `typescript/fiddle-frontend/` | `typescript/apps/fiddle-web-app/` |
| `typescript/vscode-ext/packages/vscode/` |
`typescript/apps/vscode-ext/` |
| `typescript/vscode-ext/packages/web-panel/` |
`typescript/apps/vscode-ext/src/web-panel/` |
| `typescript/playground-common/` |
`typescript/packages/playground-common/` |
| `typescript/common/` | `typescript/packages/common/` |
| `typescript/fiddle-proxy/` | `typescript/packages/fiddle-proxy/` |
| `typescript/nextjs-plugin/` | `typescript/packages/nextjs-plugin/` |
| `typescript/codemirror-lang-baml/` |
`typescript/packages/codemirror-lang-baml/` |
| `typescript/baml-schema-wasm-node/` |
`typescript/packages/baml-schema-wasm-node/` |
| `typescript/baml-schema-wasm-web/` |
`typescript/packages/baml-schema-wasm-web/` |
| `typescript/language-server/` | `typescript/packages/language-server/`
|
---
## Final Notes
- This is a **breaking change** for anyone with open PRs or local
branches. Please rebase and update paths as needed.
- If you find any missing or misplaced files, please open a follow-up PR
or issue.
---
---------
Co-authored-by: Chris Watts <chris@boundaryml.com>1 parent 0db53c1 commit 6b7c178
768 files changed
Lines changed: 51123 additions & 59957 deletions
File tree
- .claude
- .devcontainer
- .github
- actions
- setup-all
- setup-go
- setup-java
- setup-node
- setup-python
- setup-ruby
- setup-rust
- setup-tools
- workflows
- .vscode
- engine
- baml-lib/baml
- tests/validation_files
- expr
- baml-rpc
- baml-runtime/src/internal/llm_client/primitive/vertex
- baml-schema-wasm
- nodejs
- scripts
- src/runtime_wasm
- web
- cli
- generators
- language_client_go
- language_client_python
- language_client_ruby
- language_client_typescript
- language_server
- scripts
- src
- baml_project
- playground
- server
- api
- notifications
- requests
- fern
- 03-reference/baml/clients/providers
- assets
- integ-tests
- baml_src
- fiddle-examples
- audio
- images
- test-files
- providers
- testing_pipeline
- go
- baml_client
- python-v1
- python
- react
- src
- app
- components
- network-timeline
- test-client
- components
- hooks
- ui
- lib
- ruby
- typescript-esm
- typescript
- tests/providers
- jetbrains
- src/main/kotlin/com/boundaryml/jetbrains_ext
- patches
- scripts
- tools
- bctl_src
- versions
- typescript
- apps
- fiddle-web-app
- app
- [project_id]
- _atoms
- _components
- Tree
- _playground_controller
- _components
- embed
- hooks
- lib
- public
- _docs
- classification/baml_src
- default-example/baml_src
- dynamic_types/baml_src
- multimodal/baml_src
- testing_functions/baml_src
- _examples
- all-projects/baml_src
- adding-resiliency
- function-calling(tools)
- multi-modal
- ollama
- prompt-engineering
- prompt-syntax
- new-project/baml_src
- playground
- .storybook
- src
- stories
- assets
- vscode-ext
- snippets
- src
- __mocks__
- fixtures
- functions
- helpers
- panels
- plugins
- language-server-client
- cli-downloader
- __tests__
- test
- suite
- utils
- syntaxes
- baml-schema-wasm-node
- scripts
- baml-schema-wasm-web
- scripts
- codemirror-lang-baml
- src
- common
- src
- fiddle-frontend
- app
- [project_id]
- _atoms
- _components
- _playground_controller
- _components
- embed
- components
- hooks
- ui
- hooks
- lib
- pages/api
- fiddle-proxy
- nextjs-plugin
- packages
- codemirror-lang-baml
- src
- test
- cases
- common
- src
- fiddle-proxy
- nextjs-plugin
- src
- playground-common
- src
- Tree
- baml_wasm_web
- components
- api-keys-dialog
- lib
- utils
- wasm
- error
- ui
- src
- components
- custom
- hooks
- lib
- styles
- playground-common
- src
- Tree
- baml_wasm_web
- test_uis
- components
- hooks
- ui
- lib
- utils
- wasm
- error
- vscode-ext/packages
- syntaxes
- vscode
- server
- src
- helpers
- panels
- plugins
- language-server-client
- test/suite
- web-panel
- .storybook
- src
- stories
- examples
- workspace-tools/typescript
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
12 | 37 | | |
13 | 38 | | |
14 | 39 | | |
15 | 40 | | |
16 | | - | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
23 | 22 | | |
| 23 | + | |
24 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
0 commit comments