Commit 2d28766
authored
Dependency audit (#10239)
Had copilot do an audit of all our dependencies to see which ones were
not used, which ones should use a more modern or built in alternative.
### Removed unused dependencies
| Dependency | Packages affected | Reason |
|---|---|---|
| `json5` | `internal-build-utils` | Unused |
| `grammarkdown` | `compiler` | Unused |
| `date-fns` | `website` | Unused |
### Replaced with built in
| Dependency | Packages affected | Reason |
|---|---|---|
| `c8` | ~25 packages | Unused; coverage handled by
`@vitest/coverage-v8` |
| `deep-equal` / `@types/deep-equal` | `spec-api`, `spector`,
`http-specs` | Replaced with Node.js built-in `isDeepStrictEqual` from
`node:util` |
| `body-parser` / `@types/body-parser` | `spector` | Replaced with
Express 5 built-ins (`express.json()`, `express.urlencoded()`, etc.) |
| `fs-extra` | `http-server-csharp`, `http-server-js`, `http-client-js`
| Replaced with `fs/promises` (`access`, `copyFile`, `mkdir`, etc.) |
### Modernized dependencies
| Old | New | Packages affected | Notes |
|---|---|---|---|
| `onigasm` | `vscode-oniguruma` | `tmlanguage-generator` | Updated WASM
loading and regex validation logic |
| `inquirer` | `@inquirer/prompts` | `http-server-csharp`,
`http-server-js`, `http-client-js` | Switched to modern modular
`select()` API |
| `rimraf` | `fs.rm()` | `typespec-vscode` | Uses `rm(dir, { recursive:
true, force: true })` |
### Code changes
- Emit scenario scripts in `http-server-csharp`, `http-server-js`, and
`http-client-js` updated to use native `fs/promises` and
`@inquirer/prompts`
- A local `pathExists()` helper added to replace the `fs-extra` version
- `tmlanguage-generator` migrated from `onigasm` to `vscode-oniguruma`,
including updated WASM loading and regex validation logic (also removed
a workaround for an `onigasm` bug)
- `@typespec/spector` mock API server replaced `bodyParser.*` calls with
`express.*` equivalents
- `@typespec/spec-api` and `@typespec/spector` replaced all
`deepEqual(a, b, { strict: true })` calls with `isDeepStrictEqual(a, b)`
- pnpm catalog and lockfile cleaned up, removing many transitive
dependencies1 parent 2a3cc5e commit 2d28766
47 files changed
Lines changed: 166 additions & 779 deletions
File tree
- .chronus/changes
- packages
- asset-emitter
- best-practices
- bundle-uploader
- bundler
- compiler
- eslint-plugin-typespec
- events
- html-program-viewer
- http-client-js
- eng/scripts
- http-server-csharp
- eng/scripts
- http-server-js
- eng/scripts
- generated-defs
- http-specs
- http
- internal-build-utils
- json-schema
- library-linter
- monarch
- openapi3
- openapi
- pack
- playground-website
- playground
- protobuf
- react-components
- rest
- spec-api
- src
- spector
- src/server
- sse
- standalone
- streams
- tmlanguage-generator
- src
- tspd
- typespec-vscode
- test/extension
- versioning
- xml
- website
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 | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | | - | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
137 | 135 | | |
138 | 136 | | |
139 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | | - | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | | - | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
185 | 189 | | |
186 | 190 | | |
187 | 191 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
0 commit comments