From fa3653cd4c16bb71874fd72acfa711e3fd4b53b4 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 10:31:51 -0400 Subject: [PATCH 01/16] dep audit plan --- dependency-audit.md | 80 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 dependency-audit.md diff --git a/dependency-audit.md b/dependency-audit.md new file mode 100644 index 00000000000..e4e14c63a71 --- /dev/null +++ b/dependency-audit.md @@ -0,0 +1,80 @@ +# Dependency Audit Tracker + +Comprehensive audit of all external dependencies across TypeSpec workspace packages. +Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-client-python`. + +--- + +## 🔴 Unused Dependencies — Remove + +- [ ] **`grammarkdown`** — Remove from `packages/compiler/package.json`. No imports or script references found anywhere in the codebase. +- [ ] **`json5`** — Remove from `packages/bundle-uploader/package.json`. No imports found in any source file. +- [ ] **`date-fns`** — Remove from `website/package.json`. No imports found anywhere under `website/`. + +--- + +## 🟡 Redundant with Existing Tooling + +- [ ] **`c8`** (per-package devDeps) — Remove `c8` from individual package devDependencies (29 packages). The repo uses `@vitest/coverage-v8` for coverage. Only the root `package.json` uses `c8` directly in the `merge-coverage` script — keep it there or migrate that script. + - Affected packages: `asset-emitter`, `best-practices`, `bundle-uploader`, `bundler`, `compiler`, `eslint-plugin-typespec`, `events`, `html-program-viewer`, `http`, `internal-build-utils`, `json-schema`, `library-linter`, `monarch`, `openapi`, `openapi3`, `pack`, `playground`, `playground-website`, `protobuf`, `react-components`, `rest`, `sse`, `standalone`, `streams`, `tspd`, `typespec-vscode`, `versioning`, `xml` +- [ ] **`body-parser`** — Replace with Express 5 built-in `express.json()` / `express.urlencoded()` in `packages/spector/src/server/server.ts`. Also remove `@types/body-parser` from spector devDeps. + +--- + +## 🟠 Replace with Node.js Built-ins + +- [ ] **`rimraf`** — Replace with `fs.rmSync(path, { recursive: true, force: true })` or `node -e` in npm scripts. Used in `clean`/`purge` scripts across 36 packages + 1 test file (`packages/typespec-vscode/test/extension/create-typespec.test.ts`). Some runtime files already use `fs/promises.rm` directly. +- [ ] **`globby`** — Replace with `node:fs.glob` (Node 22+). Used in 7 files: + - `packages/compiler/src/testing/test-host.ts` + - `packages/compiler/src/core/formatter-fs.ts` + - `packages/http-client-js/eng/scripts/emit-e2e.js` + - `packages/http-server-js/eng/scripts/emit-e2e.js` + - `packages/http-server-csharp/eng/scripts/emit-scenarios.ts` + - `packages/spector/src/utils/file-utils.ts` + - `packages/tsp-integration/src/validate.ts` +- [ ] **`source-map-support`** — Replace with Node.js `--enable-source-maps` flag. Used in 4 CLI entry points: + - `packages/compiler/src/core/cli/cli.ts` + - `packages/pack/src/cli.ts` + - `packages/bundler/src/cli.ts` + - `packages/tspd/src/cli.ts` + - Last npm update: June 2023. +- [ ] **`deep-equal`** — Replace with `node:util.isDeepStrictEqual()`. Used in 3 files: + - `packages/spec-api/src/expectation.ts` + - `packages/spec-api/src/request-validations.ts` + - `packages/spector/src/actions/server-test.ts` + - Also remove `@types/deep-equal` from `http-specs`, `spec-api`, `spector`. +- [ ] **`fs-extra`** — Replace with `node:fs/promises` + `fs.cp()`. Used in 3 eng/ scripts only: + - `packages/http-client-js/eng/scripts/emit-e2e.js` + - `packages/http-server-js/eng/scripts/emit-e2e.js` + - `packages/http-server-csharp/eng/scripts/emit-scenarios.ts` +- [ ] **`which`** — Replace with Node.js built-in PATH resolution. Used in 1 file: + - `packages/typespec-vscode/src/utils.ts` + - Also remove `@types/which`. +- [ ] **`strip-json-comments`** — Replace with inline function or JSON5. Used in 1 file: + - `packages/internal-build-utils/src/prerelease.ts` + +--- + +## 🟠 Library Consolidation + +- [ ] **`inquirer` → `@inquirer/prompts`** — The legacy monolith `inquirer` (v13) is used in 3 eng/ scripts. The modern modular `@inquirer/prompts` (v8) is already used in the compiler. Consolidate to `@inquirer/prompts`. + - `inquirer` locations: + - `packages/http-client-js/eng/scripts/emit-e2e.js` + - `packages/http-server-js/eng/scripts/emit-e2e.js` + - `packages/http-server-csharp/eng/scripts/emit-scenarios.ts` + - `@inquirer/prompts` locations: + - `packages/compiler/src/init/init.ts` + - `packages/compiler/src/init/prompts.ts` +- [ ] **`onigasm` → `vscode-oniguruma`** — `onigasm` is stale (last updated May 2022) and superseded by `vscode-oniguruma` which is already a devDep of compiler. Used in 1 file: + - `packages/tmlanguage-generator/src/tmlanguage-generator.ts` +- [ ] **`lzutf8`** — Stale since July 2022. Consider replacing with `lz-string` or the browser `CompressionStream` API. Used in 1 file: + - `packages/playground/src/state-storage.ts` + +--- + +## 🔵 Monitor — No Immediate Action + +- [ ] **`postject`** — Alpha (`1.0.0-alpha.6`), last updated May 2023. Used for Node.js SEA injection in `packages/standalone/scripts/build.ts`. No stable alternative — this is the official approach. Monitor for stable release. +- [ ] **`es-module-shims`** — Polyfill for import maps in older browsers. Used in `packages/playground-website/index.html` and `packages/playground/.storybook/preview-head.html`. May become unnecessary as browser support improves. +- [ ] **`vite-plugin-dts`** — Pinned at `4.5.4` across 5 packages. Still maintained (last update July 2025). Pin is likely intentional — verify if newer versions work and unpin. +- [ ] **`xml2js`** — Not officially deprecated on npm but widely considered legacy. Used in `packages/spec-api/src/request-validations.ts`. Consider `fast-xml-parser` as a modern alternative when convenient. From 70ad4f184ddd6df4c2260194116e0b4c909f1ac2 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 11:55:29 -0400 Subject: [PATCH 02/16] pass 1 --- dependency-audit.md | 2 +- packages/bundle-uploader/package.json | 1 - packages/compiler/package.json | 1 - pnpm-lock.yaml | 23 ----------------------- pnpm-workspace.yaml | 3 --- website/package.json | 1 - 6 files changed, 1 insertion(+), 30 deletions(-) diff --git a/dependency-audit.md b/dependency-audit.md index e4e14c63a71..54b6820cbf5 100644 --- a/dependency-audit.md +++ b/dependency-audit.md @@ -7,7 +7,7 @@ Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-cl ## 🔴 Unused Dependencies — Remove -- [ ] **`grammarkdown`** — Remove from `packages/compiler/package.json`. No imports or script references found anywhere in the codebase. +- [x] **`grammarkdown`** — Remove from `packages/compiler/package.json`. No imports or script references found anywhere in the codebase. - [ ] **`json5`** — Remove from `packages/bundle-uploader/package.json`. No imports found in any source file. - [ ] **`date-fns`** — Remove from `website/package.json`. No imports found anywhere under `website/`. diff --git a/packages/bundle-uploader/package.json b/packages/bundle-uploader/package.json index 8be768faefa..d251da7ae14 100644 --- a/packages/bundle-uploader/package.json +++ b/packages/bundle-uploader/package.json @@ -41,7 +41,6 @@ "@azure/storage-blob": "catalog:", "@pnpm/workspace.find-packages": "catalog:", "@typespec/bundler": "workspace:^", - "json5": "catalog:", "picocolors": "catalog:", "semver": "catalog:" }, diff --git a/packages/compiler/package.json b/packages/compiler/package.json index ff0d5612078..a6828d1938b 100644 --- a/packages/compiler/package.json +++ b/packages/compiler/package.json @@ -133,7 +133,6 @@ "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", "c8": "catalog:", - "grammarkdown": "catalog:", "pathe": "catalog:", "rimraf": "catalog:", "source-map-support": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f91e817d807..84469b4d92d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -294,9 +294,6 @@ catalogs: cspell: specifier: ^9.7.0 version: 9.7.0 - date-fns: - specifier: ^4.1.0 - version: 4.1.0 debounce: specifier: ~3.0.0 version: 3.0.0 @@ -342,9 +339,6 @@ catalogs: globby: specifier: ~16.1.1 version: 16.1.1 - grammarkdown: - specifier: ~3.3.2 - version: 3.3.2 happy-dom: specifier: ^20.8.9 version: 20.8.9 @@ -354,9 +348,6 @@ catalogs: is-unicode-supported: specifier: ^2.1.0 version: 2.1.0 - json5: - specifier: ^2.2.3 - version: 2.2.3 log-symbols: specifier: ^7.0.1 version: 7.0.1 @@ -758,9 +749,6 @@ importers: '@typespec/bundler': specifier: workspace:^ version: link:../bundler - json5: - specifier: 'catalog:' - version: 2.2.3 picocolors: specifier: 'catalog:' version: 1.1.1 @@ -920,9 +908,6 @@ importers: c8: specifier: 'catalog:' version: 11.0.0 - grammarkdown: - specifier: 'catalog:' - version: 3.3.2 pathe: specifier: 'catalog:' version: 2.0.3 @@ -3127,9 +3112,6 @@ importers: clsx: specifier: 'catalog:' version: 2.1.1 - date-fns: - specifier: 'catalog:' - version: 4.1.0 es-module-shims: specifier: 'catalog:' version: 2.8.0 @@ -8559,9 +8541,6 @@ packages: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} - date-fns@4.1.0: - resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} - dayjs@1.11.20: resolution: {integrity: sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==} @@ -21021,8 +21000,6 @@ snapshots: whatwg-mimetype: 4.0.0 whatwg-url: 14.2.0 - date-fns@4.1.0: {} - dayjs@1.11.20: {} de-indent@1.0.2: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 608008579dc..fbe6ed126fb 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -103,7 +103,6 @@ catalog: cross-env: ~10.1.0 cross-spawn: ^7.0.6 cspell: ^9.7.0 - date-fns: ^4.1.0 debounce: ~3.0.0 decimal.js: ^10.6.0 deep-equal: ^2.2.3 @@ -119,11 +118,9 @@ catalog: express: ^5.2.1 fs-extra: ^11.3.4 globby: ~16.1.1 - grammarkdown: ~3.3.2 happy-dom: ^20.8.9 inquirer: ^13.3.0 is-unicode-supported: ^2.1.0 - json5: ^2.2.3 log-symbols: ^7.0.1 lzutf8: 0.6.3 micromatch: ^4.0.8 diff --git a/website/package.json b/website/package.json index 21947729e7b..1381d00972f 100644 --- a/website/package.json +++ b/website/package.json @@ -29,7 +29,6 @@ "astro": "catalog:", "astro-rehype-relative-markdown-links": "catalog:", "clsx": "catalog:", - "date-fns": "catalog:", "es-module-shims": "catalog:", "pathe": "catalog:", "prism-react-renderer": "catalog:", From 38e75a89745bf62506b527ad7f3c3dfb2425c185 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 12:03:04 -0400 Subject: [PATCH 03/16] remove c8 --- dependency-audit.md | 6 +- packages/asset-emitter/package.json | 1 - packages/best-practices/package.json | 1 - packages/bundle-uploader/package.json | 1 - packages/bundler/package.json | 1 - packages/compiler/package.json | 1 - packages/eslint-plugin-typespec/package.json | 1 - packages/events/package.json | 1 - packages/html-program-viewer/package.json | 1 - packages/http/package.json | 1 - packages/internal-build-utils/package.json | 1 - packages/json-schema/package.json | 1 - packages/library-linter/package.json | 1 - packages/monarch/package.json | 1 - packages/openapi/package.json | 1 - packages/openapi3/package.json | 1 - packages/pack/package.json | 1 - packages/playground-website/package.json | 1 - packages/playground/package.json | 1 - packages/protobuf/package.json | 1 - packages/react-components/package.json | 1 - packages/rest/package.json | 1 - packages/sse/package.json | 1 - packages/standalone/package.json | 1 - packages/streams/package.json | 1 - packages/tspd/package.json | 1 - packages/typespec-vscode/package.json | 1 - packages/versioning/package.json | 1 - packages/xml/package.json | 1 - pnpm-lock.yaml | 84 -------------------- 30 files changed, 3 insertions(+), 115 deletions(-) diff --git a/dependency-audit.md b/dependency-audit.md index 54b6820cbf5..a622edc89ed 100644 --- a/dependency-audit.md +++ b/dependency-audit.md @@ -8,14 +8,14 @@ Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-cl ## 🔴 Unused Dependencies — Remove - [x] **`grammarkdown`** — Remove from `packages/compiler/package.json`. No imports or script references found anywhere in the codebase. -- [ ] **`json5`** — Remove from `packages/bundle-uploader/package.json`. No imports found in any source file. -- [ ] **`date-fns`** — Remove from `website/package.json`. No imports found anywhere under `website/`. +- [x] **`json5`** — Remove from `packages/bundle-uploader/package.json`. No imports found in any source file. +- [x] **`date-fns`** — Remove from `website/package.json`. No imports found anywhere under `website/`. --- ## 🟡 Redundant with Existing Tooling -- [ ] **`c8`** (per-package devDeps) — Remove `c8` from individual package devDependencies (29 packages). The repo uses `@vitest/coverage-v8` for coverage. Only the root `package.json` uses `c8` directly in the `merge-coverage` script — keep it there or migrate that script. +- [x] **`c8`** (per-package devDeps) — Remove `c8` from individual package devDependencies (29 packages). The repo uses `@vitest/coverage-v8` for coverage. Only the root `package.json` uses `c8` directly in the `merge-coverage` script — keep it there or migrate that script. - Affected packages: `asset-emitter`, `best-practices`, `bundle-uploader`, `bundler`, `compiler`, `eslint-plugin-typespec`, `events`, `html-program-viewer`, `http`, `internal-build-utils`, `json-schema`, `library-linter`, `monarch`, `openapi`, `openapi3`, `pack`, `playground`, `playground-website`, `protobuf`, `react-components`, `rest`, `sse`, `standalone`, `streams`, `tspd`, `typespec-vscode`, `versioning`, `xml` - [ ] **`body-parser`** — Replace with Express 5 built-in `express.json()` / `express.urlencoded()` in `packages/spector/src/server/server.ts`. Also remove `@types/body-parser` from spector devDeps. diff --git a/packages/asset-emitter/package.json b/packages/asset-emitter/package.json index 59e84f20b21..f5aa30b56f0 100644 --- a/packages/asset-emitter/package.json +++ b/packages/asset-emitter/package.json @@ -49,7 +49,6 @@ "@typespec/compiler": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/best-practices/package.json b/packages/best-practices/package.json index 22c07908a52..ecf45c297fc 100644 --- a/packages/best-practices/package.json +++ b/packages/best-practices/package.json @@ -48,7 +48,6 @@ "@typespec/compiler": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/bundle-uploader/package.json b/packages/bundle-uploader/package.json index d251da7ae14..027424ceb10 100644 --- a/packages/bundle-uploader/package.json +++ b/packages/bundle-uploader/package.json @@ -49,7 +49,6 @@ "@types/semver": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/bundler/package.json b/packages/bundler/package.json index 487e1ddb9b7..94e7af14267 100644 --- a/packages/bundler/package.json +++ b/packages/bundler/package.json @@ -53,7 +53,6 @@ "@types/yargs": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vite": "catalog:", diff --git a/packages/compiler/package.json b/packages/compiler/package.json index a6828d1938b..4376d6e596a 100644 --- a/packages/compiler/package.json +++ b/packages/compiler/package.json @@ -132,7 +132,6 @@ "@typespec/internal-build-utils": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "pathe": "catalog:", "rimraf": "catalog:", "source-map-support": "catalog:", diff --git a/packages/eslint-plugin-typespec/package.json b/packages/eslint-plugin-typespec/package.json index 6b9c8f209a8..69e229c2565 100644 --- a/packages/eslint-plugin-typespec/package.json +++ b/packages/eslint-plugin-typespec/package.json @@ -46,7 +46,6 @@ "@typescript-eslint/types": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "eslint": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", diff --git a/packages/events/package.json b/packages/events/package.json index 018114780ba..901848fcbab 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -62,7 +62,6 @@ "@typespec/tspd": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/html-program-viewer/package.json b/packages/html-program-viewer/package.json index 62f94c6deb5..04d4c55bae8 100644 --- a/packages/html-program-viewer/package.json +++ b/packages/html-program-viewer/package.json @@ -71,7 +71,6 @@ "@vitejs/plugin-react": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vite": "catalog:", diff --git a/packages/http/package.json b/packages/http/package.json index 31804e4c352..6f259be4859 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -90,7 +90,6 @@ "@typespec/tspd": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/internal-build-utils/package.json b/packages/internal-build-utils/package.json index 08b8c009385..f846e0c9169 100644 --- a/packages/internal-build-utils/package.json +++ b/packages/internal-build-utils/package.json @@ -54,7 +54,6 @@ "@types/yargs": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "chokidar": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", diff --git a/packages/json-schema/package.json b/packages/json-schema/package.json index 29d2c3b4ec3..779c23be90b 100644 --- a/packages/json-schema/package.json +++ b/packages/json-schema/package.json @@ -66,7 +66,6 @@ "@vitest/ui": "catalog:", "ajv": "catalog:", "ajv-formats": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/library-linter/package.json b/packages/library-linter/package.json index ccaccf14f53..b6296f9fb3f 100644 --- a/packages/library-linter/package.json +++ b/packages/library-linter/package.json @@ -56,7 +56,6 @@ "@typespec/compiler": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/monarch/package.json b/packages/monarch/package.json index 0d4f708b68f..dfbbc5d0e6c 100644 --- a/packages/monarch/package.json +++ b/packages/monarch/package.json @@ -45,7 +45,6 @@ "@types/node": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "happy-dom": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", diff --git a/packages/openapi/package.json b/packages/openapi/package.json index cb83297d08a..c3422e25b92 100644 --- a/packages/openapi/package.json +++ b/packages/openapi/package.json @@ -66,7 +66,6 @@ "@typespec/tspd": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/openapi3/package.json b/packages/openapi3/package.json index 8e50caed344..12ff3bd857b 100644 --- a/packages/openapi3/package.json +++ b/packages/openapi3/package.json @@ -116,7 +116,6 @@ "@typespec/xml": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "cross-env": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", diff --git a/packages/pack/package.json b/packages/pack/package.json index 4595fa79b77..a2034590967 100644 --- a/packages/pack/package.json +++ b/packages/pack/package.json @@ -52,7 +52,6 @@ "@types/node": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "source-map-support": "catalog:", "typescript": "catalog:", diff --git a/packages/playground-website/package.json b/packages/playground-website/package.json index 9e02692cf18..5739bf59996 100644 --- a/packages/playground-website/package.json +++ b/packages/playground-website/package.json @@ -85,7 +85,6 @@ "@vitejs/plugin-react": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "cross-env": "catalog:", "rimraf": "catalog:", "rollup-plugin-visualizer": "catalog:", diff --git a/packages/playground/package.json b/packages/playground/package.json index cf227ea4584..1a7faaef6a4 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -111,7 +111,6 @@ "@typespec/bundler": "workspace:^", "@typespec/react-components": "workspace:^", "@vitejs/plugin-react": "catalog:", - "c8": "catalog:", "cross-env": "catalog:", "es-module-shims": "catalog:", "rimraf": "catalog:", diff --git a/packages/protobuf/package.json b/packages/protobuf/package.json index 4e10f4d4ab6..13300c277bc 100644 --- a/packages/protobuf/package.json +++ b/packages/protobuf/package.json @@ -50,7 +50,6 @@ "@typespec/tspd": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "micromatch": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", diff --git a/packages/react-components/package.json b/packages/react-components/package.json index aaa4649629e..381718c3c17 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -60,7 +60,6 @@ "@vitejs/plugin-react": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vite": "catalog:", diff --git a/packages/rest/package.json b/packages/rest/package.json index 030b56e69f5..db786cc2eea 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -64,7 +64,6 @@ "@typespec/tspd": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/sse/package.json b/packages/sse/package.json index 36004cf18a3..7228e884115 100644 --- a/packages/sse/package.json +++ b/packages/sse/package.json @@ -64,7 +64,6 @@ "@typespec/tspd": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/standalone/package.json b/packages/standalone/package.json index 6bd7e207edf..7426b2b73bf 100644 --- a/packages/standalone/package.json +++ b/packages/standalone/package.json @@ -42,7 +42,6 @@ "@types/node": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "esbuild": "catalog:", "execa": "catalog:", "ora": "catalog:", diff --git a/packages/streams/package.json b/packages/streams/package.json index 59aafc8d828..62922bf6e9c 100644 --- a/packages/streams/package.json +++ b/packages/streams/package.json @@ -62,7 +62,6 @@ "@typespec/tspd": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/tspd/package.json b/packages/tspd/package.json index 20947c03336..8dad73078b6 100644 --- a/packages/tspd/package.json +++ b/packages/tspd/package.json @@ -79,7 +79,6 @@ "@typespec/prettier-plugin-typespec": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "source-map-support": "catalog:", "typescript": "catalog:", diff --git a/packages/typespec-vscode/package.json b/packages/typespec-vscode/package.json index 0c7c140f754..bebfaa73364 100644 --- a/packages/typespec-vscode/package.json +++ b/packages/typespec-vscode/package.json @@ -296,7 +296,6 @@ "@vscode/test-web": "catalog:", "@vscode/vsce": "catalog:", "ajv": "catalog:", - "c8": "catalog:", "cross-spawn": "catalog:", "esbuild": "catalog:", "playwright": "catalog:", diff --git a/packages/versioning/package.json b/packages/versioning/package.json index 81ec4c1a10b..bf2db304ff4 100644 --- a/packages/versioning/package.json +++ b/packages/versioning/package.json @@ -61,7 +61,6 @@ "@typespec/tspd": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/xml/package.json b/packages/xml/package.json index 379c872bcc8..c5474799f77 100644 --- a/packages/xml/package.json +++ b/packages/xml/package.json @@ -59,7 +59,6 @@ "@typespec/tspd": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "c8": "catalog:", "rimraf": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 84469b4d92d..7b290eaef1a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -661,9 +661,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -722,9 +719,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -768,9 +762,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -811,9 +802,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -905,9 +893,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 pathe: specifier: 'catalog:' version: 2.0.3 @@ -1015,9 +1000,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 eslint: specifier: 'catalog:' version: 10.0.3 @@ -1051,9 +1033,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -1121,9 +1100,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -1166,9 +1142,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -1625,9 +1598,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 chokidar: specifier: 'catalog:' version: 5.0.0 @@ -1677,9 +1647,6 @@ importers: ajv-formats: specifier: 'catalog:' version: 3.0.1(ajv@8.18.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -1704,9 +1671,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -1732,9 +1696,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 happy-dom: specifier: 'catalog:' version: 20.8.9 @@ -1789,9 +1750,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -1868,9 +1826,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 cross-env: specifier: 'catalog:' version: 10.1.0 @@ -1902,9 +1857,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -2032,9 +1984,6 @@ importers: '@vitejs/plugin-react': specifier: 'catalog:' version: 6.0.1(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(tsx@4.21.0)(yaml@2.8.2)) - c8: - specifier: 'catalog:' - version: 11.0.0 cross-env: specifier: 'catalog:' version: 10.1.0 @@ -2156,9 +2105,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 cross-env: specifier: 'catalog:' version: 10.1.0 @@ -2220,9 +2166,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 micromatch: specifier: 'catalog:' version: 4.0.8 @@ -2281,9 +2224,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -2326,9 +2266,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -2670,9 +2607,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -2710,9 +2644,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 esbuild: specifier: 'catalog:' version: 0.27.4 @@ -2758,9 +2689,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -2899,9 +2827,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -2968,9 +2893,6 @@ importers: ajv: specifier: 'catalog:' version: 8.18.0 - c8: - specifier: 'catalog:' - version: 11.0.0 cross-spawn: specifier: 'catalog:' version: 7.0.6 @@ -3025,9 +2947,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 @@ -3058,9 +2977,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - c8: - specifier: 'catalog:' - version: 11.0.0 rimraf: specifier: 'catalog:' version: 6.1.3 From 0e2bd0013c4e290940a5922b73c648d159875546 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 12:17:32 -0400 Subject: [PATCH 04/16] remove body parser --- dependency-audit.md | 2 +- packages/spector/package.json | 2 -- packages/spector/src/server/server.ts | 15 +++++++-------- pnpm-lock.yaml | 12 ------------ pnpm-workspace.yaml | 2 -- 5 files changed, 8 insertions(+), 25 deletions(-) diff --git a/dependency-audit.md b/dependency-audit.md index a622edc89ed..549a89a6068 100644 --- a/dependency-audit.md +++ b/dependency-audit.md @@ -17,7 +17,7 @@ Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-cl - [x] **`c8`** (per-package devDeps) — Remove `c8` from individual package devDependencies (29 packages). The repo uses `@vitest/coverage-v8` for coverage. Only the root `package.json` uses `c8` directly in the `merge-coverage` script — keep it there or migrate that script. - Affected packages: `asset-emitter`, `best-practices`, `bundle-uploader`, `bundler`, `compiler`, `eslint-plugin-typespec`, `events`, `html-program-viewer`, `http`, `internal-build-utils`, `json-schema`, `library-linter`, `monarch`, `openapi`, `openapi3`, `pack`, `playground`, `playground-website`, `protobuf`, `react-components`, `rest`, `sse`, `standalone`, `streams`, `tspd`, `typespec-vscode`, `versioning`, `xml` -- [ ] **`body-parser`** — Replace with Express 5 built-in `express.json()` / `express.urlencoded()` in `packages/spector/src/server/server.ts`. Also remove `@types/body-parser` from spector devDeps. +- [x] **`body-parser`** — Replace with Express 5 built-in `express.json()` / `express.urlencoded()` in `packages/spector/src/server/server.ts`. Also remove `@types/body-parser` from spector devDeps. --- diff --git a/packages/spector/package.json b/packages/spector/package.json index 5f29ccba5e4..d61aafeabcb 100644 --- a/packages/spector/package.json +++ b/packages/spector/package.json @@ -43,7 +43,6 @@ "@typespec/spec-coverage-sdk": "workspace:^", "@typespec/versioning": "workspace:^", "ajv": "catalog:", - "body-parser": "catalog:", "deep-equal": "catalog:", "express": "catalog:", "globby": "catalog:", @@ -57,7 +56,6 @@ "yargs": "catalog:" }, "devDependencies": { - "@types/body-parser": "catalog:", "@types/deep-equal": "catalog:", "@types/express": "catalog:", "@types/micromatch": "catalog:", diff --git a/packages/spector/src/server/server.ts b/packages/spector/src/server/server.ts index 35bb20eb868..37570bd0eb7 100644 --- a/packages/spector/src/server/server.ts +++ b/packages/spector/src/server/server.ts @@ -1,5 +1,4 @@ import { RequestExt } from "@typespec/spec-api"; -import bodyParser from "body-parser"; import express, { ErrorRequestHandler, RequestHandler, Response } from "express"; import { Server, ServerResponse } from "http"; import morgan from "morgan"; @@ -56,20 +55,20 @@ export class MockApiServer { constructor(private config: MockApiServerConfig) { this.app = express(); this.app.use(morgan("dev", { stream: loggerstream })); - this.app.use(bodyParser.json({ verify: rawBodySaver, strict: false })); + this.app.use(express.json({ verify: rawBodySaver, strict: false })); this.app.use( - bodyParser.json({ + express.json({ type: "application/merge-patch+json", verify: rawBodySaver, strict: false, }), ); - this.app.use(bodyParser.urlencoded({ verify: rawBodySaver, extended: true })); - this.app.use(bodyParser.text({ type: "*/xml", verify: rawBodySaver })); - this.app.use(bodyParser.text({ type: "*/pdf", verify: rawBodySaver })); - this.app.use(bodyParser.text({ type: "text/plain" })); + this.app.use(express.urlencoded({ verify: rawBodySaver, extended: true })); + this.app.use(express.text({ type: "*/xml", verify: rawBodySaver })); + this.app.use(express.text({ type: "*/pdf", verify: rawBodySaver })); + this.app.use(express.text({ type: "text/plain" })); this.app.use( - bodyParser.raw({ + express.raw({ type: ["application/octet-stream", "image/png", "application/jsonl"], limit: "10mb", verify: rawBinaryBodySaver, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7b290eaef1a..b48e68d2ab8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -135,9 +135,6 @@ catalogs: '@types/babel__code-frame': specifier: ~7.27.0 version: 7.27.0 - '@types/body-parser': - specifier: ^1.19.6 - version: 1.19.6 '@types/cross-spawn': specifier: ~6.0.6 version: 6.0.6 @@ -267,9 +264,6 @@ catalogs: astro-rehype-relative-markdown-links: specifier: ^0.18.1 version: 0.18.1 - body-parser: - specifier: ^2.2.2 - version: 2.2.2 c8: specifier: ^11.0.0 version: 11.0.0 @@ -2504,9 +2498,6 @@ importers: ajv: specifier: 'catalog:' version: 8.18.0 - body-parser: - specifier: 'catalog:' - version: 2.2.2 deep-equal: specifier: 'catalog:' version: 2.2.3 @@ -2541,9 +2532,6 @@ importers: specifier: 'catalog:' version: 18.0.0 devDependencies: - '@types/body-parser': - specifier: 'catalog:' - version: 1.19.6 '@types/deep-equal': specifier: 'catalog:' version: 1.0.4 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fbe6ed126fb..53ffef8d3a1 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -50,7 +50,6 @@ catalog: "@testing-library/jest-dom": ^6.9.1 "@testing-library/react": ^16.3.2 "@types/babel__code-frame": ~7.27.0 - "@types/body-parser": ^1.19.6 "@types/cross-spawn": ~6.0.6 "@types/debounce": ~1.2.4 "@types/deep-equal": ^1.0.4 @@ -94,7 +93,6 @@ catalog: astro: ^6.0.4 astro-expressive-code: ^0.41.7 astro-rehype-relative-markdown-links: ^0.18.1 - body-parser: ^2.2.2 c8: ^11.0.0 change-case: ~5.4.4 chokidar: ~5.0.0 From a4dd6f004d41e8083d6d165b33468806d62ac3a0 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 12:24:12 -0400 Subject: [PATCH 05/16] replace unneeded rimraf use --- .../typespec-vscode/test/extension/create-typespec.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/typespec-vscode/test/extension/create-typespec.test.ts b/packages/typespec-vscode/test/extension/create-typespec.test.ts index c08dbefe414..f42857f0a21 100644 --- a/packages/typespec-vscode/test/extension/create-typespec.test.ts +++ b/packages/typespec-vscode/test/extension/create-typespec.test.ts @@ -1,6 +1,5 @@ -import { mkdir } from "fs/promises"; +import { mkdir, rm } from "fs/promises"; import path from "node:path"; -import { rimraf } from "rimraf"; import { beforeEach, describe } from "vitest"; import { expectFilesInDir, @@ -54,7 +53,7 @@ const CreateCasesConfigList: CreateConfigType[] = [ beforeEach(async () => { const dir = CreateTypespecProjectFolderPath; try { - await rimraf(dir); + await rm(dir, { recursive: true, force: true }); } catch {} await mkdir(dir, { recursive: true }); }); From db883ace0e61f6d8a10ce9eb53877cf3f5fbe61d Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 14:23:51 -0400 Subject: [PATCH 06/16] remove deep equal --- dependency-audit.md | 2 +- packages/http-specs/package.json | 4 +- packages/spec-api/package.json | 2 - packages/spec-api/src/expectation.ts | 4 +- packages/spec-api/src/request-validations.ts | 12 +- packages/spector/package.json | 2 - packages/spector/src/actions/server-test.ts | 7 +- pnpm-lock.yaml | 410 ------------------- pnpm-workspace.yaml | 2 - 9 files changed, 13 insertions(+), 432 deletions(-) diff --git a/dependency-audit.md b/dependency-audit.md index 549a89a6068..092bdf08dbe 100644 --- a/dependency-audit.md +++ b/dependency-audit.md @@ -38,7 +38,7 @@ Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-cl - `packages/bundler/src/cli.ts` - `packages/tspd/src/cli.ts` - Last npm update: June 2023. -- [ ] **`deep-equal`** — Replace with `node:util.isDeepStrictEqual()`. Used in 3 files: +- [x] **`deep-equal`** — Replace with `node:util.isDeepStrictEqual()`. Used in 3 files: - `packages/spec-api/src/expectation.ts` - `packages/spec-api/src/request-validations.ts` - `packages/spector/src/actions/server-test.ts` diff --git a/packages/http-specs/package.json b/packages/http-specs/package.json index 136286dc5da..8ec9f64fe3f 100644 --- a/packages/http-specs/package.json +++ b/packages/http-specs/package.json @@ -44,11 +44,9 @@ "homepage": "https://github.com/microsoft/typespec#readme", "dependencies": { "@typespec/spec-api": "workspace:^", - "@typespec/spector": "workspace:^", - "deep-equal": "catalog:" + "@typespec/spector": "workspace:^" }, "devDependencies": { - "@types/deep-equal": "catalog:", "@types/multer": "catalog:", "@types/node": "catalog:", "@typespec/json-schema": "workspace:^", diff --git a/packages/spec-api/package.json b/packages/spec-api/package.json index ac14f6ced86..c6a928343b1 100644 --- a/packages/spec-api/package.json +++ b/packages/spec-api/package.json @@ -28,12 +28,10 @@ }, "homepage": "https://github.com/microsoft/typespec#readme", "dependencies": { - "deep-equal": "catalog:", "express": "catalog:", "xml2js": "catalog:" }, "devDependencies": { - "@types/deep-equal": "catalog:", "@types/express": "catalog:", "@types/multer": "catalog:", "@types/node": "catalog:", diff --git a/packages/spec-api/src/expectation.ts b/packages/spec-api/src/expectation.ts index 47176f7a53f..831e286b620 100644 --- a/packages/spec-api/src/expectation.ts +++ b/packages/spec-api/src/expectation.ts @@ -1,4 +1,4 @@ -import deepEqual from "deep-equal"; +import { isDeepStrictEqual } from "node:util"; import { validateBodyEmpty, validateBodyEquals, @@ -89,7 +89,7 @@ export class RequestExpectation { * @param expected Expected value */ public deepEqual(actual: unknown, expected: unknown, message = "Values not deep equal"): void { - if (!deepEqual(actual, expected, { strict: true })) { + if (!isDeepStrictEqual(actual, expected)) { throw new ValidationError(message, expected, actual); } } diff --git a/packages/spec-api/src/request-validations.ts b/packages/spec-api/src/request-validations.ts index 3dc7f7260ab..8e6f0c816eb 100644 --- a/packages/spec-api/src/request-validations.ts +++ b/packages/spec-api/src/request-validations.ts @@ -1,4 +1,4 @@ -import deepEqual from "deep-equal"; +import { isDeepStrictEqual } from "node:util"; import { parseString } from "xml2js"; import { CollectionFormat, RequestExt } from "./types.js"; import { ValidationError } from "./validation-error.js"; @@ -20,7 +20,7 @@ export const validateRawBodyEquals = ( return; } - if (!deepEqual(actualRawBody, expectedRawBody, { strict: true })) { + if (!isDeepStrictEqual(actualRawBody, expectedRawBody)) { throw new ValidationError(BODY_NOT_EQUAL_ERROR_MESSAGE, expectedRawBody, actualRawBody); } }; @@ -36,7 +36,7 @@ export const validateBodyEquals = ( return; } - if (!deepEqual(request.body, expectedBody, { strict: true })) { + if (!isDeepStrictEqual(request.body, expectedBody)) { throw new ValidationError(BODY_NOT_EQUAL_ERROR_MESSAGE, expectedBody, request.body); } }; @@ -64,7 +64,7 @@ export const validateXmlBodyEquals = (request: RequestExt, expectedBody: string) expectedParsedBody = result; }); - if (!deepEqual(actualParsedBody, expectedParsedBody, { strict: true })) { + if (!isDeepStrictEqual(actualParsedBody, expectedParsedBody)) { throw new ValidationError(BODY_NOT_EQUAL_ERROR_MESSAGE, expectedBody, request.rawBody); } }; @@ -80,7 +80,7 @@ export const validateCoercedDateBodyEquals = ( return; } - if (!deepEqual(coerceDate(request.body), expectedBody, { strict: true })) { + if (!isDeepStrictEqual(coerceDate(request.body), expectedBody)) { throw new ValidationError(BODY_NOT_EQUAL_ERROR_MESSAGE, expectedBody, request.body); } }; @@ -148,7 +148,7 @@ export const validateQueryParam = ( if (collectionFormat && Array.isArray(expected)) { // verify query parameter as collection if (collectionFormat === "multi" && Array.isArray(actual)) { - isExpected = deepEqual(actual, expected); + isExpected = isDeepStrictEqual(actual, expected); } else if (collectionFormat !== "multi" && typeof actual === "string") { const expectedString = expected.join(splitterMap[collectionFormat]); isExpected = expectedString === decodeURIComponent(actual); diff --git a/packages/spector/package.json b/packages/spector/package.json index d61aafeabcb..6e72ecc7a4e 100644 --- a/packages/spector/package.json +++ b/packages/spector/package.json @@ -43,7 +43,6 @@ "@typespec/spec-coverage-sdk": "workspace:^", "@typespec/versioning": "workspace:^", "ajv": "catalog:", - "deep-equal": "catalog:", "express": "catalog:", "globby": "catalog:", "micromatch": "catalog:", @@ -56,7 +55,6 @@ "yargs": "catalog:" }, "devDependencies": { - "@types/deep-equal": "catalog:", "@types/express": "catalog:", "@types/micromatch": "catalog:", "@types/morgan": "catalog:", diff --git a/packages/spector/src/actions/server-test.ts b/packages/spector/src/actions/server-test.ts index aeb1d8f2c3c..50941370d93 100644 --- a/packages/spector/src/actions/server-test.ts +++ b/packages/spector/src/actions/server-test.ts @@ -5,9 +5,8 @@ import { ResolverConfig, ValidationError, } from "@typespec/spec-api"; -import deepEqual from "deep-equal"; import micromatch from "micromatch"; -import { inspect } from "node:util"; +import { inspect, isDeepStrictEqual } from "node:util"; import pc from "picocolors"; import { logger } from "../logger.js"; import { loadScenarioMockApis } from "../scenarios-resolver.js"; @@ -79,7 +78,7 @@ class ServerTestsGenerator { async #validateBody(response: Response, body: MockBody) { if (Buffer.isBuffer(body.rawContent)) { const responseData = Buffer.from(await response.arrayBuffer()); - if (!deepEqual(responseData, body.rawContent)) { + if (!isDeepStrictEqual(responseData, body.rawContent)) { throw new ValidationError(`Raw body mismatch`, body.rawContent, responseData); } } else { @@ -98,7 +97,7 @@ class ServerTestsGenerator { case "application/json": const expected = JSON.parse(raw as any); const actual = JSON.parse(responseData); - if (!deepEqual(actual, expected, { strict: true })) { + if (!isDeepStrictEqual(actual, expected)) { throw new ValidationError("Response data mismatch", expected, actual); } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b48e68d2ab8..a6785c90c3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -141,9 +141,6 @@ catalogs: '@types/debounce': specifier: ~1.2.4 version: 1.2.4 - '@types/deep-equal': - specifier: ^1.0.4 - version: 1.0.4 '@types/express': specifier: ^5.0.6 version: 5.0.6 @@ -294,9 +291,6 @@ catalogs: decimal.js: specifier: ^10.6.0 version: 10.6.0 - deep-equal: - specifier: ^2.2.3 - version: 2.2.3 ecmarkup: specifier: ~23.0.2 version: 23.0.2 @@ -1521,13 +1515,7 @@ importers: '@typespec/xml': specifier: workspace:^ version: link:../xml - deep-equal: - specifier: 'catalog:' - version: 2.2.3 devDependencies: - '@types/deep-equal': - specifier: 'catalog:' - version: 1.0.4 '@types/multer': specifier: 'catalog:' version: 2.1.0 @@ -2357,9 +2345,6 @@ importers: packages/spec-api: dependencies: - deep-equal: - specifier: 'catalog:' - version: 2.2.3 express: specifier: 'catalog:' version: 5.2.1 @@ -2367,9 +2352,6 @@ importers: specifier: 'catalog:' version: 0.6.2 devDependencies: - '@types/deep-equal': - specifier: 'catalog:' - version: 1.0.4 '@types/express': specifier: 'catalog:' version: 5.0.6 @@ -2498,9 +2480,6 @@ importers: ajv: specifier: 'catalog:' version: 8.18.0 - deep-equal: - specifier: 'catalog:' - version: 2.2.3 express: specifier: 'catalog:' version: 5.2.1 @@ -2532,9 +2511,6 @@ importers: specifier: 'catalog:' version: 18.0.0 devDependencies: - '@types/deep-equal': - specifier: 'catalog:' - version: 1.0.4 '@types/express': specifier: 'catalog:' version: 5.0.6 @@ -6674,9 +6650,6 @@ packages: '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} - '@types/deep-equal@1.0.4': - resolution: {integrity: sha512-tqdiS4otQP4KmY0PR3u6KbZ5EWvhNdUoS/jc93UuK23C220lOZ/9TvjfxdPcKvqwwDVtmtSCrnr0p/2dirAxkA==} - '@types/doctrine@0.0.9': resolution: {integrity: sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==} @@ -7548,10 +7521,6 @@ packages: resolution: {integrity: sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==} engines: {node: '>=8'} - array-buffer-byte-length@1.0.2: - resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} - engines: {node: '>= 0.4'} - array-iterate@2.0.1: resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==} @@ -7606,10 +7575,6 @@ packages: resolution: {integrity: sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ==} engines: {node: '>=8'} - available-typed-arrays@1.0.7: - resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} - engines: {node: '>= 0.4'} - axobject-query@4.1.0: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} engines: {node: '>= 0.4'} @@ -7816,10 +7781,6 @@ packages: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} - call-bind@1.0.8: - resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} - engines: {node: '>= 0.4'} - call-bound@1.0.4: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} @@ -8500,10 +8461,6 @@ packages: deep-equal@1.0.1: resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==} - deep-equal@2.2.3: - resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==} - engines: {node: '>= 0.4'} - deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -8526,10 +8483,6 @@ packages: resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} engines: {node: '>=10'} - define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} - define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} @@ -8538,10 +8491,6 @@ packages: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} - define-properties@1.2.1: - resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} - engines: {node: '>= 0.4'} - defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} @@ -8768,9 +8717,6 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-get-iterator@1.1.3: - resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} - es-module-lexer@2.0.0: resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} @@ -9112,10 +9058,6 @@ packages: resolution: {integrity: sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw==} engines: {node: '>=20'} - for-each@0.3.5: - resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} - engines: {node: '>= 0.4'} - foreground-child@3.3.1: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} @@ -9167,9 +9109,6 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - gensequence@8.0.8: resolution: {integrity: sha512-omMVniXEXpdx/vKxGnPRoO2394Otlze28TyxECbFVyoSpZ9H3EO7lemjcB12OpQJzRW4e5tt/dL1rOxry6aMHg==} engines: {node: '>=20'} @@ -9329,10 +9268,6 @@ packages: resolution: {integrity: sha512-Tz23LR9T9jOGVZm2x1EPdXqwA37G/owYMxRwU0E4miurAtFsPMQ1d2Jc2okUaSjZqAFz2oEn3FLXC5a0a+siyA==} engines: {node: '>=20.0.0'} - has-bigints@1.1.0: - resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} - engines: {node: '>= 0.4'} - has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -9341,9 +9276,6 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - has-symbols@1.1.0: resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} @@ -9639,10 +9571,6 @@ packages: '@types/node': optional: true - internal-slot@1.1.0: - resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} - engines: {node: '>= 0.4'} - internmap@1.0.1: resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==} @@ -9671,33 +9599,13 @@ packages: is-alphanumerical@2.0.1: resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} - is-arguments@1.2.0: - resolution: {integrity: sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==} - engines: {node: '>= 0.4'} - - is-array-buffer@3.0.5: - resolution: {integrity: sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==} - engines: {node: '>= 0.4'} - is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - is-bigint@1.1.0: - resolution: {integrity: sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==} - engines: {node: '>= 0.4'} - - is-boolean-object@1.2.2: - resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==} - engines: {node: '>= 0.4'} - is-builtin-module@5.0.0: resolution: {integrity: sha512-f4RqJKBUe5rQkJ2eJEJBXSticB3hGbN9j0yxxMQFqIW89Jp9WYFtzfTcRlstDKVUTRzSOTLKRfO9vIztenwtxA==} engines: {node: '>=18.20'} - is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - is-ci@2.0.0: resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} hasBin: true @@ -9706,10 +9614,6 @@ packages: resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} - is-date-object@1.1.0: - resolution: {integrity: sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==} - engines: {node: '>= 0.4'} - is-decimal@2.0.1: resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} @@ -9762,14 +9666,6 @@ packages: resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} engines: {node: '>=12'} - is-map@2.0.3: - resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} - engines: {node: '>= 0.4'} - - is-number-object@1.1.1: - resolution: {integrity: sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==} - engines: {node: '>= 0.4'} - is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -9804,22 +9700,10 @@ packages: is-promise@4.0.0: resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} - is-regex@1.2.1: - resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} - engines: {node: '>= 0.4'} - is-safe-filename@0.1.1: resolution: {integrity: sha512-4SrR7AdnY11LHfDKTZY1u6Ga3RuxZdl3YKWWShO5iyuG5h8QS4GD2tOb04peBJ5I7pXbR+CGBNEhTcwK+FzN3g==} engines: {node: '>=20'} - is-set@2.0.3: - resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} - engines: {node: '>= 0.4'} - - is-shared-array-buffer@1.0.4: - resolution: {integrity: sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==} - engines: {node: '>= 0.4'} - is-ssh@1.4.1: resolution: {integrity: sha512-JNeu1wQsHjyHgn9NcWTaXq6zWSR6hqE0++zhfZlkFBbScNkyvxCdeV8sRkSBaeLKxmbpR21brail63ACNxJ0Tg==} @@ -9831,18 +9715,10 @@ packages: resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} engines: {node: '>=18'} - is-string@1.1.1: - resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==} - engines: {node: '>= 0.4'} - is-subdir@1.2.0: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} - is-symbol@1.1.1: - resolution: {integrity: sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==} - engines: {node: '>= 0.4'} - is-unicode-supported@1.3.0: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} @@ -9851,14 +9727,6 @@ packages: resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} engines: {node: '>=18'} - is-weakmap@2.0.2: - resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} - engines: {node: '>= 0.4'} - - is-weakset@2.0.4: - resolution: {integrity: sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==} - engines: {node: '>= 0.4'} - is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -9874,9 +9742,6 @@ packages: isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -10906,18 +10771,6 @@ packages: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} - object-is@1.1.6: - resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} - engines: {node: '>= 0.4'} - - object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - - object.assign@4.1.7: - resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==} - engines: {node: '>= 0.4'} - obug@2.1.1: resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} @@ -11301,10 +11154,6 @@ packages: points-on-path@0.2.1: resolution: {integrity: sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==} - possible-typed-array-names@1.1.0: - resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} - engines: {node: '>= 0.4'} - postcss-nested@6.2.0: resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==} engines: {node: '>=12.0'} @@ -11640,10 +11489,6 @@ packages: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true - regexp.prototype.flags@1.5.4: - resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} - engines: {node: '>= 0.4'} - regjsparser@0.13.0: resolution: {integrity: sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==} hasBin: true @@ -11882,10 +11727,6 @@ packages: resolution: {integrity: sha512-GI3k4zl4aLC3lxZNEEXAxxcXE6E3TfOsJ5xxJPhcAv9MWwnH2O9I0HrDmZFsVnu/C8wzRYSsTHdoVRmL0VicDw==} engines: {node: '>=12'} - safe-regex-test@1.1.0: - resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} - engines: {node: '>= 0.4'} - safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -11947,14 +11788,6 @@ packages: resolution: {integrity: sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==} engines: {node: '>= 18'} - set-function-length@1.2.2: - resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} - engines: {node: '>= 0.4'} - - set-function-name@2.0.2: - resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} - engines: {node: '>= 0.4'} - setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} @@ -12179,10 +12012,6 @@ packages: resolution: {integrity: sha512-reExS1kSGoElkextOcPkel4NE99S0BWxjUHQeDFnR8S993JxpPX7KU4MNmO19NXhlJp+8dmdCbKQVNgLJh2teA==} engines: {node: '>=18'} - stop-iteration-iterator@1.1.0: - resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} - engines: {node: '>= 0.4'} - storybook@10.3.3: resolution: {integrity: sha512-tMoRAts9EVqf+mEMPLC6z1DPyHbcPe+CV1MhLN55IKsl0HxNjvVGK44rVPSePbltPE6vIsn4bdRj6CCUt8SJwQ==} hasBin: true @@ -13289,14 +13118,6 @@ packages: resolution: {integrity: sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==} engines: {node: '>=18'} - which-boxed-primitive@1.1.1: - resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} - engines: {node: '>= 0.4'} - - which-collection@1.0.2: - resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} - engines: {node: '>= 0.4'} - which-pm-runs@1.1.0: resolution: {integrity: sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==} engines: {node: '>=4'} @@ -13305,10 +13126,6 @@ packages: resolution: {integrity: sha512-MOiaDbA5ZZgUjkeMWM5EkJp4loW5ZRoa5bc3/aeMox/PJelMhE6t7S/mLuiY43DBupyxH+S0U1bTui9kWUlmsw==} engines: {node: '>=8.15'} - which-typed-array@1.1.20: - resolution: {integrity: sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==} - engines: {node: '>= 0.4'} - which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -18591,8 +18408,6 @@ snapshots: '@types/deep-eql@4.0.2': {} - '@types/deep-equal@1.0.4': {} - '@types/doctrine@0.0.9': {} '@types/emscripten@1.41.5': {} @@ -19823,11 +19638,6 @@ snapshots: array-back@4.0.2: {} - array-buffer-byte-length@1.0.2: - dependencies: - call-bound: 1.0.4 - is-array-buffer: 3.0.5 - array-iterate@2.0.1: {} array-timsort@1.0.3: {} @@ -19971,10 +19781,6 @@ snapshots: auto-bind@4.0.0: {} - available-typed-arrays@1.0.7: - dependencies: - possible-typed-array-names: 1.1.0 - axobject-query@4.1.0: {} azure-devops-node-api@12.5.0: @@ -20212,13 +20018,6 @@ snapshots: es-errors: 1.3.0 function-bind: 1.1.2 - call-bind@1.0.8: - dependencies: - call-bind-apply-helpers: 1.0.2 - es-define-property: 1.0.1 - get-intrinsic: 1.3.0 - set-function-length: 1.2.2 - call-bound@1.0.4: dependencies: call-bind-apply-helpers: 1.0.2 @@ -20938,27 +20737,6 @@ snapshots: deep-equal@1.0.1: {} - deep-equal@2.2.3: - dependencies: - array-buffer-byte-length: 1.0.2 - call-bind: 1.0.8 - es-get-iterator: 1.1.3 - get-intrinsic: 1.3.0 - is-arguments: 1.2.0 - is-array-buffer: 3.0.5 - is-date-object: 1.1.0 - is-regex: 1.2.1 - is-shared-array-buffer: 1.0.4 - isarray: 2.0.5 - object-is: 1.1.6 - object-keys: 1.1.1 - object.assign: 4.1.7 - regexp.prototype.flags: 1.5.4 - side-channel: 1.1.0 - which-boxed-primitive: 1.1.1 - which-collection: 1.0.2 - which-typed-array: 1.1.20 - deep-extend@0.6.0: {} deep-is@0.1.4: {} @@ -20976,22 +20754,10 @@ snapshots: defer-to-connect@2.0.1: {} - define-data-property@1.1.4: - dependencies: - es-define-property: 1.0.1 - es-errors: 1.3.0 - gopd: 1.2.0 - define-lazy-prop@2.0.0: {} define-lazy-prop@3.0.0: {} - define-properties@1.2.1: - dependencies: - define-data-property: 1.1.4 - has-property-descriptors: 1.0.2 - object-keys: 1.1.1 - defu@6.1.4: {} del@6.1.1: @@ -21210,18 +20976,6 @@ snapshots: es-errors@1.3.0: {} - es-get-iterator@1.1.3: - dependencies: - call-bind: 1.0.8 - get-intrinsic: 1.3.0 - has-symbols: 1.1.0 - is-arguments: 1.2.0 - is-map: 2.0.3 - is-set: 2.0.3 - is-string: 1.1.1 - isarray: 2.0.5 - stop-iteration-iterator: 1.1.0 - es-module-lexer@2.0.0: {} es-module-shims@2.8.0: {} @@ -21671,10 +21425,6 @@ snapshots: dependencies: tiny-inflate: 1.0.3 - for-each@0.3.5: - dependencies: - is-callable: 1.2.7 - foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 @@ -21722,8 +21472,6 @@ snapshots: function-bind@1.1.2: {} - functions-have-names@1.2.3: {} - gensequence@8.0.8: {} gensync@1.0.0-beta.2: {} @@ -21947,16 +21695,10 @@ snapshots: - bufferutil - utf-8-validate - has-bigints@1.1.0: {} - has-flag@3.0.0: {} has-flag@4.0.0: {} - has-property-descriptors@1.0.2: - dependencies: - es-define-property: 1.0.1 - has-symbols@1.1.0: {} has-tostringtag@1.0.2: @@ -22426,12 +22168,6 @@ snapshots: optionalDependencies: '@types/node': 25.5.0 - internal-slot@1.1.0: - dependencies: - es-errors: 1.3.0 - hasown: 2.0.2 - side-channel: 1.1.0 - internmap@1.0.1: {} internmap@2.0.3: {} @@ -22451,34 +22187,12 @@ snapshots: is-alphabetical: 2.0.1 is-decimal: 2.0.1 - is-arguments@1.2.0: - dependencies: - call-bound: 1.0.4 - has-tostringtag: 1.0.2 - - is-array-buffer@3.0.5: - dependencies: - call-bind: 1.0.8 - call-bound: 1.0.4 - get-intrinsic: 1.3.0 - is-arrayish@0.2.1: {} - is-bigint@1.1.0: - dependencies: - has-bigints: 1.1.0 - - is-boolean-object@1.2.2: - dependencies: - call-bound: 1.0.4 - has-tostringtag: 1.0.2 - is-builtin-module@5.0.0: dependencies: builtin-modules: 5.0.0 - is-callable@1.2.7: {} - is-ci@2.0.0: dependencies: ci-info: 2.0.0 @@ -22487,11 +22201,6 @@ snapshots: dependencies: hasown: 2.0.2 - is-date-object@1.1.0: - dependencies: - call-bound: 1.0.4 - has-tostringtag: 1.0.2 - is-decimal@2.0.1: {} is-deflate@1.0.0: {} @@ -22522,13 +22231,6 @@ snapshots: is-interactive@2.0.0: {} - is-map@2.0.3: {} - - is-number-object@1.1.1: - dependencies: - call-bound: 1.0.4 - has-tostringtag: 1.0.2 - is-number@7.0.0: {} is-path-cwd@2.2.0: {} @@ -22549,21 +22251,8 @@ snapshots: is-promise@4.0.0: {} - is-regex@1.2.1: - dependencies: - call-bound: 1.0.4 - gopd: 1.2.0 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - is-safe-filename@0.1.1: {} - is-set@2.0.3: {} - - is-shared-array-buffer@1.0.4: - dependencies: - call-bound: 1.0.4 - is-ssh@1.4.1: dependencies: protocols: 2.0.2 @@ -22572,32 +22261,14 @@ snapshots: is-stream@4.0.1: {} - is-string@1.1.1: - dependencies: - call-bound: 1.0.4 - has-tostringtag: 1.0.2 - is-subdir@1.2.0: dependencies: better-path-resolve: 1.0.0 - is-symbol@1.1.1: - dependencies: - call-bound: 1.0.4 - has-symbols: 1.1.0 - safe-regex-test: 1.1.0 - is-unicode-supported@1.3.0: {} is-unicode-supported@2.1.0: {} - is-weakmap@2.0.2: {} - - is-weakset@2.0.4: - dependencies: - call-bound: 1.0.4 - get-intrinsic: 1.3.0 - is-windows@1.0.2: {} is-wsl@2.2.0: @@ -22610,8 +22281,6 @@ snapshots: isarray@1.0.0: {} - isarray@2.0.5: {} - isexe@2.0.0: {} isexe@3.1.5: {} @@ -23983,22 +23652,6 @@ snapshots: object-inspect@1.13.4: {} - object-is@1.1.6: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - - object-keys@1.1.1: {} - - object.assign@4.1.7: - dependencies: - call-bind: 1.0.8 - call-bound: 1.0.4 - define-properties: 1.2.1 - es-object-atoms: 1.1.1 - has-symbols: 1.1.0 - object-keys: 1.1.1 - obug@2.1.1: {} octokit@5.0.5: @@ -24408,8 +24061,6 @@ snapshots: path-data-parser: 0.1.0 points-on-curve: 0.2.0 - possible-typed-array-names@1.1.0: {} - postcss-nested@6.2.0(postcss@8.5.8): dependencies: postcss: 8.5.8 @@ -24804,15 +24455,6 @@ snapshots: regexp-tree@0.1.27: {} - regexp.prototype.flags@1.5.4: - dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-errors: 1.3.0 - get-proto: 1.0.1 - gopd: 1.2.0 - set-function-name: 2.0.2 - regjsparser@0.13.0: dependencies: jsesc: 3.1.0 @@ -25158,12 +24800,6 @@ snapshots: execa: 5.1.1 path-name: 1.0.0 - safe-regex-test@1.1.0: - dependencies: - call-bound: 1.0.4 - es-errors: 1.3.0 - is-regex: 1.2.1 - safer-buffer@2.1.2: {} sanitize-filename@1.6.3: @@ -25241,22 +24877,6 @@ snapshots: transitivePeerDependencies: - supports-color - set-function-length@1.2.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.3.0 - gopd: 1.2.0 - has-property-descriptors: 1.0.2 - - set-function-name@2.0.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - functions-have-names: 1.2.3 - has-property-descriptors: 1.0.2 - setimmediate@1.0.5: {} setprototypeof@1.1.0: {} @@ -25537,11 +25157,6 @@ snapshots: stdin-discarder@0.3.1: {} - stop-iteration-iterator@1.1.0: - dependencies: - es-errors: 1.3.0 - internal-slot: 1.1.0 - storybook@10.3.3(@testing-library/dom@10.4.1)(prettier@3.8.1)(react-dom@19.2.4(react@19.2.4))(react@19.2.4): dependencies: '@storybook/global': 5.0.0 @@ -26612,21 +26227,6 @@ snapshots: tr46: 5.1.1 webidl-conversions: 7.0.0 - which-boxed-primitive@1.1.1: - dependencies: - is-bigint: 1.1.0 - is-boolean-object: 1.2.2 - is-number-object: 1.1.1 - is-string: 1.1.1 - is-symbol: 1.1.1 - - which-collection@1.0.2: - dependencies: - is-map: 2.0.3 - is-set: 2.0.3 - is-weakmap: 2.0.2 - is-weakset: 2.0.4 - which-pm-runs@1.1.0: {} which-pm@2.2.0: @@ -26634,16 +26234,6 @@ snapshots: load-yaml-file: 0.2.0 path-exists: 4.0.0 - which-typed-array@1.1.20: - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.8 - call-bound: 1.0.4 - for-each: 0.3.5 - get-proto: 1.0.1 - gopd: 1.2.0 - has-tostringtag: 1.0.2 - which@2.0.2: dependencies: isexe: 2.0.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 53ffef8d3a1..be55ccf7e75 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -52,7 +52,6 @@ catalog: "@types/babel__code-frame": ~7.27.0 "@types/cross-spawn": ~6.0.6 "@types/debounce": ~1.2.4 - "@types/deep-equal": ^1.0.4 "@types/express": ^5.0.6 "@types/micromatch": ^4.0.10 "@types/morgan": ^1.9.10 @@ -103,7 +102,6 @@ catalog: cspell: ^9.7.0 debounce: ~3.0.0 decimal.js: ^10.6.0 - deep-equal: ^2.2.3 ecmarkup: ~23.0.2 env-paths: ^4.0.0 es-module-shims: ~2.8.0 From e5a404e2d3f0a65555dc323e29227ac6fec7532d Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 14:30:05 -0400 Subject: [PATCH 07/16] remove path-extra --- dependency-audit.md | 2 +- packages/http-client-js/eng/scripts/emit-e2e.js | 9 +++++---- packages/http-client-js/package.json | 1 - .../http-server-csharp/eng/scripts/emit-scenarios.ts | 10 +++++++--- packages/http-server-csharp/package.json | 1 - packages/http-server-js/eng/scripts/emit-e2e.js | 9 +++++---- packages/http-server-js/package.json | 1 - pnpm-lock.yaml | 12 ------------ pnpm-workspace.yaml | 1 - 9 files changed, 18 insertions(+), 28 deletions(-) diff --git a/dependency-audit.md b/dependency-audit.md index 092bdf08dbe..811252956e0 100644 --- a/dependency-audit.md +++ b/dependency-audit.md @@ -43,7 +43,7 @@ Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-cl - `packages/spec-api/src/request-validations.ts` - `packages/spector/src/actions/server-test.ts` - Also remove `@types/deep-equal` from `http-specs`, `spec-api`, `spector`. -- [ ] **`fs-extra`** — Replace with `node:fs/promises` + `fs.cp()`. Used in 3 eng/ scripts only: +- [x] **`fs-extra`** — Replace with `node:fs/promises` + `fs.cp()`. Used in 3 eng/ scripts only: - `packages/http-client-js/eng/scripts/emit-e2e.js` - `packages/http-server-js/eng/scripts/emit-e2e.js` - `packages/http-server-csharp/eng/scripts/emit-scenarios.ts` diff --git a/packages/http-client-js/eng/scripts/emit-e2e.js b/packages/http-client-js/eng/scripts/emit-e2e.js index 5343bb40f45..7b777d4bb4e 100644 --- a/packages/http-client-js/eng/scripts/emit-e2e.js +++ b/packages/http-client-js/eng/scripts/emit-e2e.js @@ -1,8 +1,7 @@ #!/usr/bin/env node /* eslint-disable no-console */ import { execa } from "execa"; -import pkg from "fs-extra"; -import { copyFile, mkdir, rm } from "fs/promises"; +import { access, copyFile, mkdir, readFile, rm, stat, writeFile } from "fs/promises"; import { globby } from "globby"; import inquirer from "inquirer"; import ora from "ora"; @@ -13,11 +12,13 @@ import { fileURLToPath } from "url"; import { hideBin } from "yargs/helpers"; import yargs from "yargs/yargs"; -const { pathExists, stat, readFile, writeFile } = pkg; - const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); +async function pathExists(path) { + return access(path).then(() => true, () => false); +} + const projectRoot = join(__dirname, "../.."); const tspConfig = join(__dirname, "tspconfig.yaml"); diff --git a/packages/http-client-js/package.json b/packages/http-client-js/package.json index 37465bbff50..e2bab95032c 100644 --- a/packages/http-client-js/package.json +++ b/packages/http-client-js/package.json @@ -74,7 +74,6 @@ "concurrently": "catalog:", "cross-env": "catalog:", "execa": "catalog:", - "fs-extra": "catalog:", "globby": "catalog:", "inquirer": "catalog:", "ora": "catalog:", diff --git a/packages/http-server-csharp/eng/scripts/emit-scenarios.ts b/packages/http-server-csharp/eng/scripts/emit-scenarios.ts index bb7980a5d99..170a430fc91 100644 --- a/packages/http-server-csharp/eng/scripts/emit-scenarios.ts +++ b/packages/http-server-csharp/eng/scripts/emit-scenarios.ts @@ -1,7 +1,6 @@ /* eslint-disable no-console */ import { run } from "@typespec/internal-build-utils"; -import { copy, pathExists } from "fs-extra"; -import { mkdir, readFile, rm, writeFile } from "fs/promises"; +import { access, copyFile, mkdir, readFile, rm, writeFile } from "fs/promises"; import { globby } from "globby"; import inquirer from "inquirer"; import ora from "ora"; @@ -40,6 +39,10 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const tspConfig = join(__dirname, "tspconfig.yaml"); +async function pathExists(path: string): Promise { + return access(path).then(() => true, () => false); +} + const basePath = join(__dirname, "../.."); const logDirRoot = join(basePath, "temp", "emit-scenarios-logs"); const reportFilePath = join(logDirRoot, "report.txt"); @@ -78,7 +81,8 @@ async function copySelectiveFiles( for (const file of files) { const src = join(sourceDir, file); const dest = join(targetDir, file); - await copy(src, dest); + await mkdir(dirname(dest), { recursive: true }); + await copyFile(src, dest); } } diff --git a/packages/http-server-csharp/package.json b/packages/http-server-csharp/package.json index 9ff01fac072..97c1c45ec41 100644 --- a/packages/http-server-csharp/package.json +++ b/packages/http-server-csharp/package.json @@ -87,7 +87,6 @@ "@typespec/versioning": "workspace:^", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", - "fs-extra": "catalog:", "globby": "catalog:", "inquirer": "catalog:", "ora": "catalog:", diff --git a/packages/http-server-js/eng/scripts/emit-e2e.js b/packages/http-server-js/eng/scripts/emit-e2e.js index b7d3dd6d3e0..e837627afd1 100644 --- a/packages/http-server-js/eng/scripts/emit-e2e.js +++ b/packages/http-server-js/eng/scripts/emit-e2e.js @@ -1,8 +1,7 @@ #!/usr/bin/env node /* eslint-disable no-console */ import { run } from "@typespec/internal-build-utils"; -import pkg from "fs-extra"; -import { copyFile, mkdir, rm } from "fs/promises"; +import { access, copyFile, mkdir, readFile, rm, stat, writeFile } from "fs/promises"; import { globby } from "globby"; import inquirer from "inquirer"; import ora from "ora"; @@ -13,11 +12,13 @@ import { fileURLToPath } from "url"; import { hideBin } from "yargs/helpers"; import yargs from "yargs/yargs"; -const { pathExists, stat, readFile, writeFile } = pkg; - const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); +async function pathExists(path) { + return access(path).then(() => true, () => false); +} + const projectRoot = join(__dirname, "../.."); const tspConfig = join(__dirname, "tspconfig.yaml"); diff --git a/packages/http-server-js/package.json b/packages/http-server-js/package.json index 27af256d1a6..5ba5de2484e 100644 --- a/packages/http-server-js/package.json +++ b/packages/http-server-js/package.json @@ -78,7 +78,6 @@ "@vitest/ui": "catalog:", "decimal.js": "catalog:", "express": "catalog:", - "fs-extra": "catalog:", "globby": "catalog:", "inquirer": "catalog:", "morgan": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6785c90c3c..82d3bb19759 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -321,9 +321,6 @@ catalogs: express: specifier: ^5.2.1 version: 5.2.1 - fs-extra: - specifier: ^11.3.4 - version: 11.3.4 globby: specifier: ~16.1.1 version: 16.1.1 @@ -1270,9 +1267,6 @@ importers: execa: specifier: 'catalog:' version: 9.6.1 - fs-extra: - specifier: 'catalog:' - version: 11.3.4 globby: specifier: 'catalog:' version: 16.1.1 @@ -1370,9 +1364,6 @@ importers: '@vitest/ui': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) - fs-extra: - specifier: 'catalog:' - version: 11.3.4 globby: specifier: 'catalog:' version: 16.1.1 @@ -1449,9 +1440,6 @@ importers: express: specifier: 'catalog:' version: 5.2.1 - fs-extra: - specifier: 'catalog:' - version: 11.3.4 globby: specifier: 'catalog:' version: 16.1.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index be55ccf7e75..01574764336 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -112,7 +112,6 @@ catalog: eslint-plugin-unicorn: ^63.0.0 execa: ^9.6.1 express: ^5.2.1 - fs-extra: ^11.3.4 globby: ~16.1.1 happy-dom: ^20.8.9 inquirer: ^13.3.0 From de4960a893de497dd602389cde620862ab139517 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 14:49:57 -0400 Subject: [PATCH 08/16] migrate inquier --- dependency-audit.md | 22 +-------- .../http-client-js/eng/scripts/emit-e2e.js | 22 ++++----- packages/http-client-js/package.json | 2 +- .../eng/scripts/emit-scenarios.ts | 22 ++++----- packages/http-server-csharp/package.json | 2 +- .../http-server-js/eng/scripts/emit-e2e.js | 22 ++++----- .../generated-defs/package.json.ts | 3 +- packages/http-server-js/package.json | 2 +- pnpm-lock.yaml | 48 ++++--------------- pnpm-workspace.yaml | 1 - 10 files changed, 41 insertions(+), 105 deletions(-) diff --git a/dependency-audit.md b/dependency-audit.md index 811252956e0..40f24f641d5 100644 --- a/dependency-audit.md +++ b/dependency-audit.md @@ -23,21 +23,6 @@ Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-cl ## 🟠 Replace with Node.js Built-ins -- [ ] **`rimraf`** — Replace with `fs.rmSync(path, { recursive: true, force: true })` or `node -e` in npm scripts. Used in `clean`/`purge` scripts across 36 packages + 1 test file (`packages/typespec-vscode/test/extension/create-typespec.test.ts`). Some runtime files already use `fs/promises.rm` directly. -- [ ] **`globby`** — Replace with `node:fs.glob` (Node 22+). Used in 7 files: - - `packages/compiler/src/testing/test-host.ts` - - `packages/compiler/src/core/formatter-fs.ts` - - `packages/http-client-js/eng/scripts/emit-e2e.js` - - `packages/http-server-js/eng/scripts/emit-e2e.js` - - `packages/http-server-csharp/eng/scripts/emit-scenarios.ts` - - `packages/spector/src/utils/file-utils.ts` - - `packages/tsp-integration/src/validate.ts` -- [ ] **`source-map-support`** — Replace with Node.js `--enable-source-maps` flag. Used in 4 CLI entry points: - - `packages/compiler/src/core/cli/cli.ts` - - `packages/pack/src/cli.ts` - - `packages/bundler/src/cli.ts` - - `packages/tspd/src/cli.ts` - - Last npm update: June 2023. - [x] **`deep-equal`** — Replace with `node:util.isDeepStrictEqual()`. Used in 3 files: - `packages/spec-api/src/expectation.ts` - `packages/spec-api/src/request-validations.ts` @@ -47,17 +32,12 @@ Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-cl - `packages/http-client-js/eng/scripts/emit-e2e.js` - `packages/http-server-js/eng/scripts/emit-e2e.js` - `packages/http-server-csharp/eng/scripts/emit-scenarios.ts` -- [ ] **`which`** — Replace with Node.js built-in PATH resolution. Used in 1 file: - - `packages/typespec-vscode/src/utils.ts` - - Also remove `@types/which`. -- [ ] **`strip-json-comments`** — Replace with inline function or JSON5. Used in 1 file: - - `packages/internal-build-utils/src/prerelease.ts` --- ## 🟠 Library Consolidation -- [ ] **`inquirer` → `@inquirer/prompts`** — The legacy monolith `inquirer` (v13) is used in 3 eng/ scripts. The modern modular `@inquirer/prompts` (v8) is already used in the compiler. Consolidate to `@inquirer/prompts`. +- [x] **`inquirer` → `@inquirer/prompts`** — The legacy monolith `inquirer` (v13) is used in 3 eng/ scripts. The modern modular `@inquirer/prompts` (v8) is already used in the compiler. Consolidate to `@inquirer/prompts`. - `inquirer` locations: - `packages/http-client-js/eng/scripts/emit-e2e.js` - `packages/http-server-js/eng/scripts/emit-e2e.js` diff --git a/packages/http-client-js/eng/scripts/emit-e2e.js b/packages/http-client-js/eng/scripts/emit-e2e.js index 7b777d4bb4e..f53d0c19e52 100644 --- a/packages/http-client-js/eng/scripts/emit-e2e.js +++ b/packages/http-client-js/eng/scripts/emit-e2e.js @@ -3,7 +3,7 @@ import { execa } from "execa"; import { access, copyFile, mkdir, readFile, rm, stat, writeFile } from "fs/promises"; import { globby } from "globby"; -import inquirer from "inquirer"; +import { select } from "@inquirer/prompts"; import ora from "ora"; import pLimit from "p-limit"; import { basename, dirname, join, resolve } from "path"; @@ -186,18 +186,14 @@ async function processFile(file, options) { await writeFile(logFilePath, errorDetails, "utf8"); if (interactive) { - const { action } = await inquirer.prompt([ - { - type: "list", - name: "action", - message: `Processing failed for ${relativePath}. What would you like to do?`, - choices: [ - { name: "Retry", value: "retry" }, - { name: "Skip to next file", value: "next" }, - { name: "Abort processing", value: "abort" }, - ], - }, - ]); + const action = await select({ + message: `Processing failed for ${relativePath}. What would you like to do?`, + choices: [ + { name: "Retry", value: "retry" }, + { name: "Skip to next file", value: "next" }, + { name: "Abort processing", value: "abort" }, + ], + }); if (action === "retry") { if (spinner) spinner.start(`Retrying: ${relativePath}`); diff --git a/packages/http-client-js/package.json b/packages/http-client-js/package.json index e2bab95032c..dbde3f6c00d 100644 --- a/packages/http-client-js/package.json +++ b/packages/http-client-js/package.json @@ -75,7 +75,7 @@ "cross-env": "catalog:", "execa": "catalog:", "globby": "catalog:", - "inquirer": "catalog:", + "@inquirer/prompts": "catalog:", "ora": "catalog:", "p-limit": "catalog:", "picocolors": "catalog:", diff --git a/packages/http-server-csharp/eng/scripts/emit-scenarios.ts b/packages/http-server-csharp/eng/scripts/emit-scenarios.ts index 170a430fc91..aa409e36b21 100644 --- a/packages/http-server-csharp/eng/scripts/emit-scenarios.ts +++ b/packages/http-server-csharp/eng/scripts/emit-scenarios.ts @@ -2,7 +2,7 @@ import { run } from "@typespec/internal-build-utils"; import { access, copyFile, mkdir, readFile, rm, writeFile } from "fs/promises"; import { globby } from "globby"; -import inquirer from "inquirer"; +import { select } from "@inquirer/prompts"; import ora from "ora"; import pLimit from "p-limit"; import { basename, dirname, join, resolve } from "pathe"; @@ -169,18 +169,14 @@ async function compileSpec(file: string, options: CompileOptions): Promise = { "@vitest/ui": "^4.1.0", "decimal.js": "^10.6.0", "express": "^5.2.1", - "fs-extra": "^11.3.4", "globby": "~16.1.1", - "inquirer": "^13.3.0", + "@inquirer/prompts": "^8.3.0", "morgan": "^1.10.1", "ora": "^9.3.0", "p-limit": "^7.3.0", diff --git a/packages/http-server-js/package.json b/packages/http-server-js/package.json index 5ba5de2484e..877439ae432 100644 --- a/packages/http-server-js/package.json +++ b/packages/http-server-js/package.json @@ -79,7 +79,7 @@ "decimal.js": "catalog:", "express": "catalog:", "globby": "catalog:", - "inquirer": "catalog:", + "@inquirer/prompts": "catalog:", "morgan": "catalog:", "ora": "catalog:", "p-limit": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82d3bb19759..cc157a8d79a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -327,9 +327,6 @@ catalogs: happy-dom: specifier: ^20.8.9 version: 20.8.9 - inquirer: - specifier: ^13.3.0 - version: 13.3.0 is-unicode-supported: specifier: ^2.1.0 version: 2.1.0 @@ -1231,6 +1228,9 @@ importers: '@alloy-js/rollup-plugin': specifier: 'catalog:' version: 0.1.0(@babel/core@7.29.0)(@types/babel__core@7.20.5)(rollup@4.60.0) + '@inquirer/prompts': + specifier: 'catalog:' + version: 8.3.0(@types/node@25.5.0) '@types/yargs': specifier: 'catalog:' version: 17.0.35 @@ -1270,9 +1270,6 @@ importers: globby: specifier: 'catalog:' version: 16.1.1 - inquirer: - specifier: 'catalog:' - version: 13.3.0(@types/node@25.5.0) ora: specifier: 'catalog:' version: 9.3.0 @@ -1316,6 +1313,9 @@ importers: specifier: 'catalog:' version: 18.0.0 devDependencies: + '@inquirer/prompts': + specifier: 'catalog:' + version: 8.3.0(@types/node@25.5.0) '@types/cross-spawn': specifier: 'catalog:' version: 6.0.6 @@ -1367,9 +1367,6 @@ importers: globby: specifier: 'catalog:' version: 16.1.1 - inquirer: - specifier: 'catalog:' - version: 13.3.0(@types/node@25.5.0) ora: specifier: 'catalog:' version: 9.3.0 @@ -1395,6 +1392,9 @@ importers: specifier: 'catalog:' version: 2.8.2 devDependencies: + '@inquirer/prompts': + specifier: 'catalog:' + version: 8.3.0(@types/node@25.5.0) '@types/express': specifier: 'catalog:' version: 5.0.6 @@ -1443,9 +1443,6 @@ importers: globby: specifier: 'catalog:' version: 16.1.1 - inquirer: - specifier: 'catalog:' - version: 13.3.0(@types/node@25.5.0) morgan: specifier: 'catalog:' version: 1.10.1 @@ -9550,15 +9547,6 @@ packages: inline-style-parser@0.2.7: resolution: {integrity: sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==} - inquirer@13.3.0: - resolution: {integrity: sha512-APTrZe9IhrsshL0u2PgmEMLP3CXDBjZ99xh5dR2+sryOt5R+JGL0KNuaTTT2lW54B9eNQDMutPR05UYTL7Xb1Q==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - internmap@1.0.1: resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==} @@ -11681,10 +11669,6 @@ packages: resolution: {integrity: sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==} engines: {node: '>=18'} - run-async@4.0.6: - resolution: {integrity: sha512-IoDlSLTs3Yq593mb3ZoKWKXMNu3UpObxhgA/Xuid5p4bbfi2jdY1Hj0m1K+0/tEuQTxIGMhQDqGjKb7RuxGpAQ==} - engines: {node: '>=0.12.0'} - run-groups@3.0.1: resolution: {integrity: sha512-2hIL01Osd6FWsQVhVGqJ7drNikmTaUg2A/VBR98+LuhQ1jV1Xlh43BQH4gJiNaOzfHJTasD0pw5YviIfdVVY4g==} engines: {node: '>=10'} @@ -22144,18 +22128,6 @@ snapshots: inline-style-parser@0.2.7: {} - inquirer@13.3.0(@types/node@25.5.0): - dependencies: - '@inquirer/ansi': 2.0.3 - '@inquirer/core': 11.1.5(@types/node@25.5.0) - '@inquirer/prompts': 8.3.0(@types/node@25.5.0) - '@inquirer/type': 4.0.3(@types/node@25.5.0) - mute-stream: 3.0.0 - run-async: 4.0.6 - rxjs: 7.8.2 - optionalDependencies: - '@types/node': 25.5.0 - internmap@1.0.1: {} internmap@2.0.3: {} @@ -24754,8 +24726,6 @@ snapshots: run-applescript@7.1.0: {} - run-async@4.0.6: {} - run-groups@3.0.1: dependencies: p-limit: 3.1.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 01574764336..aed18db4612 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -114,7 +114,6 @@ catalog: express: ^5.2.1 globby: ~16.1.1 happy-dom: ^20.8.9 - inquirer: ^13.3.0 is-unicode-supported: ^2.1.0 log-symbols: ^7.0.1 lzutf8: 0.6.3 From 5744d926215960532e8526b4d2a36865bc9b9b48 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 15:01:40 -0400 Subject: [PATCH 09/16] migrate onigasm --- dependency-audit.md | 2 +- packages/tmlanguage-generator/package.json | 2 +- .../src/tmlanguage-generator.ts | 19 ++++++++----------- pnpm-lock.yaml | 16 +++------------- pnpm-workspace.yaml | 1 - 5 files changed, 13 insertions(+), 27 deletions(-) diff --git a/dependency-audit.md b/dependency-audit.md index 40f24f641d5..e2b00293c27 100644 --- a/dependency-audit.md +++ b/dependency-audit.md @@ -45,7 +45,7 @@ Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-cl - `@inquirer/prompts` locations: - `packages/compiler/src/init/init.ts` - `packages/compiler/src/init/prompts.ts` -- [ ] **`onigasm` → `vscode-oniguruma`** — `onigasm` is stale (last updated May 2022) and superseded by `vscode-oniguruma` which is already a devDep of compiler. Used in 1 file: +- [x] **`onigasm` → `vscode-oniguruma`** — `onigasm` is stale (last updated May 2022) and superseded by `vscode-oniguruma` which is already a devDep of compiler. Used in 1 file: - `packages/tmlanguage-generator/src/tmlanguage-generator.ts` - [ ] **`lzutf8`** — Stale since July 2022. Consider replacing with `lz-string` or the browser `CompressionStream` API. Used in 1 file: - `packages/playground/src/state-storage.ts` diff --git a/packages/tmlanguage-generator/package.json b/packages/tmlanguage-generator/package.json index b5eeaf4a6b7..99bc421608b 100644 --- a/packages/tmlanguage-generator/package.json +++ b/packages/tmlanguage-generator/package.json @@ -33,7 +33,7 @@ "!dist/test/**" ], "dependencies": { - "onigasm": "catalog:", + "vscode-oniguruma": "catalog:", "plist": "catalog:" }, "devDependencies": { diff --git a/packages/tmlanguage-generator/src/tmlanguage-generator.ts b/packages/tmlanguage-generator/src/tmlanguage-generator.ts index 6ae1f2a958a..3020acb2484 100644 --- a/packages/tmlanguage-generator/src/tmlanguage-generator.ts +++ b/packages/tmlanguage-generator/src/tmlanguage-generator.ts @@ -1,7 +1,9 @@ import { readFile } from "fs/promises"; -import { loadWASM, OnigRegExp } from "onigasm"; import { dirname, resolve } from "path"; import plist from "plist"; +import * as vscodeOniguruma from "vscode-oniguruma"; + +const { loadWASM, createOnigScanner } = vscodeOniguruma; export const schema = "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json"; @@ -64,10 +66,10 @@ export interface Grammar extends RulePatterns Number(s))); - const buffer = Buffer.from(array); - err = new Error(buffer.toString("utf-8")); - } const sourceFile = options.errorSourceFilePath ?? "unknown_file"; //prettier-ignore // eslint-disable-next-line no-console diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc157a8d79a..75b65987d1a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -354,9 +354,6 @@ catalogs: mustache: specifier: ~4.2.0 version: 4.2.0 - onigasm: - specifier: ~2.2.5 - version: 2.2.5 ora: specifier: ^9.3.0 version: 9.3.0 @@ -2650,12 +2647,12 @@ importers: packages/tmlanguage-generator: dependencies: - onigasm: - specifier: 'catalog:' - version: 2.2.5 plist: specifier: 'catalog:' version: 3.1.0 + vscode-oniguruma: + specifier: 'catalog:' + version: 2.0.1 devDependencies: '@types/node': specifier: 'catalog:' @@ -10783,9 +10780,6 @@ packages: resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} engines: {node: '>=18'} - onigasm@2.2.5: - resolution: {integrity: sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==} - oniguruma-parser@0.12.1: resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==} @@ -23658,10 +23652,6 @@ snapshots: dependencies: mimic-function: 5.0.1 - onigasm@2.2.5: - dependencies: - lru-cache: 5.1.1 - oniguruma-parser@0.12.1: {} oniguruma-to-es@4.3.4: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index aed18db4612..5710ff1c162 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -123,7 +123,6 @@ catalog: morgan: ^1.10.1 multer: ^2.1.1 mustache: ~4.2.0 - onigasm: ~2.2.5 ora: ^9.3.0 p-limit: ^7.3.0 pathe: ^2.0.3 From c7b04ae5fdeb8b9378e91de655149b22228a3d2d Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 15:16:03 -0400 Subject: [PATCH 10/16] delete plan --- dependency-audit.md | 60 --------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 dependency-audit.md diff --git a/dependency-audit.md b/dependency-audit.md deleted file mode 100644 index e2b00293c27..00000000000 --- a/dependency-audit.md +++ /dev/null @@ -1,60 +0,0 @@ -# Dependency Audit Tracker - -Comprehensive audit of all external dependencies across TypeSpec workspace packages. -Excludes standalone emitters: `http-client-csharp`, `http-client-java`, `http-client-python`. - ---- - -## 🔴 Unused Dependencies — Remove - -- [x] **`grammarkdown`** — Remove from `packages/compiler/package.json`. No imports or script references found anywhere in the codebase. -- [x] **`json5`** — Remove from `packages/bundle-uploader/package.json`. No imports found in any source file. -- [x] **`date-fns`** — Remove from `website/package.json`. No imports found anywhere under `website/`. - ---- - -## 🟡 Redundant with Existing Tooling - -- [x] **`c8`** (per-package devDeps) — Remove `c8` from individual package devDependencies (29 packages). The repo uses `@vitest/coverage-v8` for coverage. Only the root `package.json` uses `c8` directly in the `merge-coverage` script — keep it there or migrate that script. - - Affected packages: `asset-emitter`, `best-practices`, `bundle-uploader`, `bundler`, `compiler`, `eslint-plugin-typespec`, `events`, `html-program-viewer`, `http`, `internal-build-utils`, `json-schema`, `library-linter`, `monarch`, `openapi`, `openapi3`, `pack`, `playground`, `playground-website`, `protobuf`, `react-components`, `rest`, `sse`, `standalone`, `streams`, `tspd`, `typespec-vscode`, `versioning`, `xml` -- [x] **`body-parser`** — Replace with Express 5 built-in `express.json()` / `express.urlencoded()` in `packages/spector/src/server/server.ts`. Also remove `@types/body-parser` from spector devDeps. - ---- - -## 🟠 Replace with Node.js Built-ins - -- [x] **`deep-equal`** — Replace with `node:util.isDeepStrictEqual()`. Used in 3 files: - - `packages/spec-api/src/expectation.ts` - - `packages/spec-api/src/request-validations.ts` - - `packages/spector/src/actions/server-test.ts` - - Also remove `@types/deep-equal` from `http-specs`, `spec-api`, `spector`. -- [x] **`fs-extra`** — Replace with `node:fs/promises` + `fs.cp()`. Used in 3 eng/ scripts only: - - `packages/http-client-js/eng/scripts/emit-e2e.js` - - `packages/http-server-js/eng/scripts/emit-e2e.js` - - `packages/http-server-csharp/eng/scripts/emit-scenarios.ts` - ---- - -## 🟠 Library Consolidation - -- [x] **`inquirer` → `@inquirer/prompts`** — The legacy monolith `inquirer` (v13) is used in 3 eng/ scripts. The modern modular `@inquirer/prompts` (v8) is already used in the compiler. Consolidate to `@inquirer/prompts`. - - `inquirer` locations: - - `packages/http-client-js/eng/scripts/emit-e2e.js` - - `packages/http-server-js/eng/scripts/emit-e2e.js` - - `packages/http-server-csharp/eng/scripts/emit-scenarios.ts` - - `@inquirer/prompts` locations: - - `packages/compiler/src/init/init.ts` - - `packages/compiler/src/init/prompts.ts` -- [x] **`onigasm` → `vscode-oniguruma`** — `onigasm` is stale (last updated May 2022) and superseded by `vscode-oniguruma` which is already a devDep of compiler. Used in 1 file: - - `packages/tmlanguage-generator/src/tmlanguage-generator.ts` -- [ ] **`lzutf8`** — Stale since July 2022. Consider replacing with `lz-string` or the browser `CompressionStream` API. Used in 1 file: - - `packages/playground/src/state-storage.ts` - ---- - -## 🔵 Monitor — No Immediate Action - -- [ ] **`postject`** — Alpha (`1.0.0-alpha.6`), last updated May 2023. Used for Node.js SEA injection in `packages/standalone/scripts/build.ts`. No stable alternative — this is the official approach. Monitor for stable release. -- [ ] **`es-module-shims`** — Polyfill for import maps in older browsers. Used in `packages/playground-website/index.html` and `packages/playground/.storybook/preview-head.html`. May become unnecessary as browser support improves. -- [ ] **`vite-plugin-dts`** — Pinned at `4.5.4` across 5 packages. Still maintained (last update July 2025). Pin is likely intentional — verify if newer versions work and unpin. -- [ ] **`xml2js`** — Not officially deprecated on npm but widely considered legacy. Used in `packages/spec-api/src/request-validations.ts`. Consider `fast-xml-parser` as a modern alternative when convenient. From 8ccccf00733f5013a3b3d32a421bfa2bbc58aa7a Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 12:16:25 -0700 Subject: [PATCH 11/16] Create dependency-audit-2026-3-1-19-4-24.md --- .../dependency-audit-2026-3-1-19-4-24.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .chronus/changes/dependency-audit-2026-3-1-19-4-24.md diff --git a/.chronus/changes/dependency-audit-2026-3-1-19-4-24.md b/.chronus/changes/dependency-audit-2026-3-1-19-4-24.md new file mode 100644 index 00000000000..f9047ce4e43 --- /dev/null +++ b/.chronus/changes/dependency-audit-2026-3-1-19-4-24.md @@ -0,0 +1,35 @@ +--- +# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking +changeKind: internal +packages: + - "@typespec/asset-emitter" + - "@typespec/bundler" + - "@typespec/compiler" + - "@typespec/eslint-plugin" + - "@typespec/events" + - "@typespec/html-program-viewer" + - "@typespec/http-client-js" + - "@typespec/http-server-csharp" + - "@typespec/http-server-js" + - "@typespec/http-specs" + - "@typespec/http" + - "@typespec/internal-build-utils" + - "@typespec/json-schema" + - "@typespec/library-linter" + - "@typespec/openapi" + - "@typespec/openapi3" + - "@typespec/playground" + - "@typespec/protobuf" + - "@typespec/rest" + - "@typespec/spec-api" + - "@typespec/spector" + - "@typespec/sse" + - "@typespec/streams" + - tmlanguage-generator + - "@typespec/tspd" + - typespec-vscode + - "@typespec/versioning" + - "@typespec/xml" +--- + +Dependency audit From d6dfd574f6f113c821960003eca5da133f12b9b2 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 15:21:15 -0400 Subject: [PATCH 12/16] format --- packages/http-client-js/eng/scripts/emit-e2e.js | 7 +++++-- packages/http-server-csharp/eng/scripts/emit-scenarios.ts | 7 +++++-- packages/http-server-js/eng/scripts/emit-e2e.js | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/http-client-js/eng/scripts/emit-e2e.js b/packages/http-client-js/eng/scripts/emit-e2e.js index f53d0c19e52..7861d4ca8a3 100644 --- a/packages/http-client-js/eng/scripts/emit-e2e.js +++ b/packages/http-client-js/eng/scripts/emit-e2e.js @@ -1,9 +1,9 @@ #!/usr/bin/env node /* eslint-disable no-console */ +import { select } from "@inquirer/prompts"; import { execa } from "execa"; import { access, copyFile, mkdir, readFile, rm, stat, writeFile } from "fs/promises"; import { globby } from "globby"; -import { select } from "@inquirer/prompts"; import ora from "ora"; import pLimit from "p-limit"; import { basename, dirname, join, resolve } from "path"; @@ -16,7 +16,10 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); async function pathExists(path) { - return access(path).then(() => true, () => false); + return access(path).then( + () => true, + () => false, + ); } const projectRoot = join(__dirname, "../.."); diff --git a/packages/http-server-csharp/eng/scripts/emit-scenarios.ts b/packages/http-server-csharp/eng/scripts/emit-scenarios.ts index aa409e36b21..149d19882a2 100644 --- a/packages/http-server-csharp/eng/scripts/emit-scenarios.ts +++ b/packages/http-server-csharp/eng/scripts/emit-scenarios.ts @@ -1,8 +1,8 @@ /* eslint-disable no-console */ +import { select } from "@inquirer/prompts"; import { run } from "@typespec/internal-build-utils"; import { access, copyFile, mkdir, readFile, rm, writeFile } from "fs/promises"; import { globby } from "globby"; -import { select } from "@inquirer/prompts"; import ora from "ora"; import pLimit from "p-limit"; import { basename, dirname, join, resolve } from "pathe"; @@ -40,7 +40,10 @@ const __dirname = dirname(__filename); const tspConfig = join(__dirname, "tspconfig.yaml"); async function pathExists(path: string): Promise { - return access(path).then(() => true, () => false); + return access(path).then( + () => true, + () => false, + ); } const basePath = join(__dirname, "../.."); diff --git a/packages/http-server-js/eng/scripts/emit-e2e.js b/packages/http-server-js/eng/scripts/emit-e2e.js index bf3547b4b19..3ef46e0da3a 100644 --- a/packages/http-server-js/eng/scripts/emit-e2e.js +++ b/packages/http-server-js/eng/scripts/emit-e2e.js @@ -1,9 +1,9 @@ #!/usr/bin/env node /* eslint-disable no-console */ +import { select } from "@inquirer/prompts"; import { run } from "@typespec/internal-build-utils"; import { access, copyFile, mkdir, readFile, rm, stat, writeFile } from "fs/promises"; import { globby } from "globby"; -import { select } from "@inquirer/prompts"; import ora from "ora"; import pLimit from "p-limit"; import { basename, dirname, join, resolve } from "path"; @@ -16,7 +16,10 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); async function pathExists(path) { - return access(path).then(() => true, () => false); + return access(path).then( + () => true, + () => false, + ); } const projectRoot = join(__dirname, "../.."); From 13dce4819c706a1a04fbde831ab4df307f16ea4f Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 16:12:36 -0400 Subject: [PATCH 13/16] fix merge issue --- packages/spec-api/src/request-validations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/spec-api/src/request-validations.ts b/packages/spec-api/src/request-validations.ts index 300d277f219..8088c7fbca1 100644 --- a/packages/spec-api/src/request-validations.ts +++ b/packages/spec-api/src/request-validations.ts @@ -98,7 +98,7 @@ export const validateXmlBodyEquals = ( ); } } else { - if (!deepEqual(actualParsed, expectedParsed, { strict: true })) { + if (!isDeepStrictEqual(actualParsed, expectedParsed, { strict: true })) { throw new ValidationError(BODY_NOT_EQUAL_ERROR_MESSAGE, expectedXml, request.rawBody); } } From 53d9c5e4bf88d7ddcae551e149527c0de1ee5d62 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 16:17:25 -0400 Subject: [PATCH 14/16] fix --- packages/spec-api/src/request-validations.ts | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/packages/spec-api/src/request-validations.ts b/packages/spec-api/src/request-validations.ts index 8088c7fbca1..da170b07aed 100644 --- a/packages/spec-api/src/request-validations.ts +++ b/packages/spec-api/src/request-validations.ts @@ -1,5 +1,5 @@ +import { XMLParser } from "fast-xml-parser"; import { isDeepStrictEqual } from "node:util"; -import { parseString } from "xml2js"; import { matchValues, type MockValueMatcher } from "./match-engine.js"; import { CollectionFormat, RequestExt, Resolver, ResolverConfig } from "./types.js"; import { ValidationError } from "./validation-error.js"; @@ -64,17 +64,9 @@ export const validateXmlBodyEquals = ( throw new ValidationError(BODY_EMPTY_ERROR_MESSAGE, expectedXml, request.rawBody); } - let actualParsed: unknown; - parseString(request.rawBody, (err: Error | null, result: any): void => { - if (err !== null) throw err; - actualParsed = result; - }); - - let expectedParsed: unknown; - parseString(expectedXml, (err: Error | null, result: any): void => { - if (err !== null) throw err; - expectedParsed = result; - }); + const parser = new XMLParser({ parseTagValue: false }); + const actualParsed: unknown = parser.parse(request.rawBody); + let expectedParsed: unknown = parser.parse(expectedXml); // If the expected body is a DynValue with matchers, use matcher-aware comparison const matchers = @@ -98,7 +90,7 @@ export const validateXmlBodyEquals = ( ); } } else { - if (!isDeepStrictEqual(actualParsed, expectedParsed, { strict: true })) { + if (!isDeepStrictEqual(actualParsed, expectedParsed)) { throw new ValidationError(BODY_NOT_EQUAL_ERROR_MESSAGE, expectedXml, request.rawBody); } } From 79fb6a684388b83f6aad41e3ee3c7b0e4b6471d9 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 16:20:16 -0400 Subject: [PATCH 15/16] remove unused xml2js --- packages/spec-api/package.json | 3 +- packages/spector/package.json | 2 -- pnpm-lock.yaml | 66 +++++++++++++++++----------------- pnpm-workspace.yaml | 3 +- 4 files changed, 35 insertions(+), 39 deletions(-) diff --git a/packages/spec-api/package.json b/packages/spec-api/package.json index c6a928343b1..13ee8de5901 100644 --- a/packages/spec-api/package.json +++ b/packages/spec-api/package.json @@ -29,13 +29,12 @@ "homepage": "https://github.com/microsoft/typespec#readme", "dependencies": { "express": "catalog:", - "xml2js": "catalog:" + "fast-xml-parser": "catalog:" }, "devDependencies": { "@types/express": "catalog:", "@types/multer": "catalog:", "@types/node": "catalog:", - "@types/xml2js": "catalog:", "@vitest/coverage-v8": "catalog:", "@vitest/ui": "catalog:", "rimraf": "catalog:", diff --git a/packages/spector/package.json b/packages/spector/package.json index 6e72ecc7a4e..aa4ba74d7d2 100644 --- a/packages/spector/package.json +++ b/packages/spector/package.json @@ -50,7 +50,6 @@ "multer": "catalog:", "picocolors": "catalog:", "source-map-support": "catalog:", - "xml2js": "catalog:", "yaml": "catalog:", "yargs": "catalog:" }, @@ -60,7 +59,6 @@ "@types/morgan": "catalog:", "@types/multer": "catalog:", "@types/node": "catalog:", - "@types/xml2js": "catalog:", "@types/yargs": "catalog:", "@typespec/tspd": "workspace:^", "rimraf": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 75b65987d1a..eb6852aa6b8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -186,9 +186,6 @@ catalogs: '@types/which': specifier: ^3.0.4 version: 3.0.4 - '@types/xml2js': - specifier: ^0.4.14 - version: 0.4.14 '@types/yargs': specifier: ~17.0.35 version: 17.0.35 @@ -321,6 +318,9 @@ catalogs: express: specifier: ^5.2.1 version: 5.2.1 + fast-xml-parser: + specifier: ^5.5.9 + version: 5.5.9 globby: specifier: ~16.1.1 version: 16.1.1 @@ -513,9 +513,6 @@ catalogs: which: specifier: ^6.0.1 version: 6.0.1 - xml2js: - specifier: ^0.6.2 - version: 0.6.2 yaml: specifier: ~2.8.2 version: 2.8.2 @@ -2330,9 +2327,9 @@ importers: express: specifier: 'catalog:' version: 5.2.1 - xml2js: + fast-xml-parser: specifier: 'catalog:' - version: 0.6.2 + version: 5.5.9 devDependencies: '@types/express': specifier: 'catalog:' @@ -2343,9 +2340,6 @@ importers: '@types/node': specifier: 'catalog:' version: 25.5.0 - '@types/xml2js': - specifier: 'catalog:' - version: 0.4.14 '@vitest/coverage-v8': specifier: 'catalog:' version: 4.1.0(vitest@4.1.0) @@ -2483,9 +2477,6 @@ importers: source-map-support: specifier: 'catalog:' version: 0.5.21 - xml2js: - specifier: 'catalog:' - version: 0.6.2 yaml: specifier: 'catalog:' version: 2.8.2 @@ -2508,9 +2499,6 @@ importers: '@types/node': specifier: 'catalog:' version: 25.5.0 - '@types/xml2js': - specifier: 'catalog:' - version: 0.4.14 '@types/yargs': specifier: 'catalog:' version: 17.0.35 @@ -6793,9 +6781,6 @@ packages: '@types/ws@8.18.1': resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} - '@types/xml2js@0.4.14': - resolution: {integrity: sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==} - '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -8941,10 +8926,17 @@ packages: fast-xml-builder@1.1.3: resolution: {integrity: sha512-1o60KoFw2+LWKQu3IdcfcFlGTW4dpqEWmjhYec6H82AYZU2TVBXep6tMl8Z1Y+wM+ZrzCwe3BZ9Vyd9N2rIvmg==} + fast-xml-builder@1.1.4: + resolution: {integrity: sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==} + fast-xml-parser@5.5.5: resolution: {integrity: sha512-NLY+V5NNbdmiEszx9n14mZBseJTC50bRq1VHsaxOmR72JDuZt+5J1Co+dC/4JPnyq+WrIHNM69r0sqf7BMb3Mg==} hasBin: true + fast-xml-parser@5.5.9: + resolution: {integrity: sha512-jldvxr1MC6rtiZKgrFnDSvT8xuH+eJqxqOBThUVjYrxssYTo1avZLGql5l0a0BAERR01CadYzZ83kVEkbyDg+g==} + hasBin: true + fastq@1.20.1: resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} @@ -11000,6 +10992,10 @@ packages: resolution: {integrity: sha512-qdVgY8KXmVdJZRSS1JdEPOKPdTiEK/pi0RkcT2sw1RhXxohdujUlJFPuS1TSkevZ9vzd3ZlL7ULl1MHGTApKzQ==} engines: {node: '>=14.0.0'} + path-expression-matcher@1.2.0: + resolution: {integrity: sha512-DwmPWeFn+tq7TiyJ2CxezCAirXjFxvaiD03npak3cRjlP9+OjTmSy1EpIrEbh+l6JgUundniloMLDQ/6VTdhLQ==} + engines: {node: '>=14.0.0'} + path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} @@ -12087,6 +12083,9 @@ packages: strnum@2.2.0: resolution: {integrity: sha512-Y7Bj8XyJxnPAORMZj/xltsfo55uOiyHcU2tnAVzHUnSJR/KsEX+9RoDeXEnsXtl/CX4fAcrt64gZ13aGaWPeBg==} + strnum@2.2.2: + resolution: {integrity: sha512-DnR90I+jtXNSTXWdwrEy9FakW7UX+qUZg28gj5fk2vxxl7uS/3bpI4fjFYVmdK9etptYBPNkpahuQnEwhwECqA==} + structured-source@4.0.0: resolution: {integrity: sha512-qGzRFNJDjFieQkl/sVOI2dUjHKRyL9dAJi2gCPGJLbJHBIkyOHxjuocpIEfbLioX+qSJpvbYdT49/YCdMznKxA==} @@ -13199,10 +13198,6 @@ packages: resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==} engines: {node: '>=4.0.0'} - xml2js@0.6.2: - resolution: {integrity: sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==} - engines: {node: '>=4.0.0'} - xmlbuilder@11.0.1: resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==} engines: {node: '>=4.0'} @@ -18537,10 +18532,6 @@ snapshots: dependencies: '@types/node': 25.5.0 - '@types/xml2js@0.4.14': - dependencies: - '@types/node': 25.5.0 - '@types/yargs-parser@21.0.3': {} '@types/yargs@17.0.35': @@ -21294,12 +21285,22 @@ snapshots: dependencies: path-expression-matcher: 1.1.3 + fast-xml-builder@1.1.4: + dependencies: + path-expression-matcher: 1.2.0 + fast-xml-parser@5.5.5: dependencies: fast-xml-builder: 1.1.3 path-expression-matcher: 1.1.3 strnum: 2.2.0 + fast-xml-parser@5.5.9: + dependencies: + fast-xml-builder: 1.1.4 + path-expression-matcher: 1.2.0 + strnum: 2.2.2 + fastq@1.20.1: dependencies: reusify: 1.1.0 @@ -23906,6 +23907,8 @@ snapshots: path-expression-matcher@1.1.3: {} + path-expression-matcher@1.2.0: {} + path-is-absolute@1.0.1: {} path-key@3.1.1: {} @@ -25221,6 +25224,8 @@ snapshots: strnum@2.2.0: {} + strnum@2.2.2: {} + structured-source@4.0.0: dependencies: boundary: 2.0.0 @@ -26273,11 +26278,6 @@ snapshots: sax: 1.5.0 xmlbuilder: 11.0.1 - xml2js@0.6.2: - dependencies: - sax: 1.5.0 - xmlbuilder: 11.0.1 - xmlbuilder@11.0.1: {} xmlbuilder@15.1.1: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5710ff1c162..d20f4a49428 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -67,7 +67,7 @@ catalog: "@types/swagger-ui-dist": ~3.30.6 "@types/swagger-ui-express": ^4.1.8 "@types/which": ^3.0.4 - "@types/xml2js": ^0.4.14 + fast-xml-parser: ^5.5.9 "@types/yargs": ~17.0.35 "@typescript-eslint/parser": ^8.57.0 "@typescript-eslint/rule-tester": ^8.57.0 @@ -176,7 +176,6 @@ catalog: vscode-textmate: ~9.3.2 web-tree-sitter: ^0.26.7 which: ^6.0.1 - xml2js: ^0.6.2 yaml: ~2.8.2 yargs: ~18.0.0 From 19206f65b643b222d8e823c137968b251a9b8cd4 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 1 Apr 2026 16:59:03 -0400 Subject: [PATCH 16/16] format --- packages/spector/src/actions/server-test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/spector/src/actions/server-test.ts b/packages/spector/src/actions/server-test.ts index 7c2e262a184..6bb41a9f1d3 100644 --- a/packages/spector/src/actions/server-test.ts +++ b/packages/spector/src/actions/server-test.ts @@ -7,7 +7,7 @@ import { ValidationError, } from "@typespec/spec-api"; import micromatch from "micromatch"; -import { inspect, isDeepStrictEqual } from "node:util"; +import { inspect } from "node:util"; import pc from "picocolors"; import { logger } from "../logger.js"; import { loadScenarioMockApis } from "../scenarios-resolver.js";