diff --git a/.chronus/changes/cleanup-npm-usage-2026-07-20-13-49-00.md b/.chronus/changes/cleanup-npm-usage-2026-07-20-13-49-00.md new file mode 100644 index 0000000000..dad6204f4a --- /dev/null +++ b/.chronus/changes/cleanup-npm-usage-2026-07-20-13-49-00.md @@ -0,0 +1,14 @@ +--- +changeKind: internal +packages: + - "@azure-tools/typespec-autorest" + - "@azure-tools/typespec-autorest-canonical" + - "@azure-tools/typespec-azure-portal-core" + - "@azure-tools/typespec-azure-resource-manager" + - "@azure-tools/typespec-client-generator-core" + - "@azure-tools/typespec-go" + - "@azure-tools/typespec-java" + - "@azure-tools/typespec-ts" +--- + +Replace `npm`/`npx` usage in build and test scripts with `pnpm` equivalents to stop `npm warn Unknown env config` warnings when running inside the pnpm workspace. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 01f7ed7e8e..9791b6e8c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -204,7 +204,7 @@ The package also needs a `vitest.config.ts` — the root vitest workspace config ```json { "scripts": { - "test": "npm run test:vitest && npm run test:extra", + "test": "pnpm test:vitest && pnpm test:extra", "test:vitest": "vitest run", "test:extra": "dotnet test" } @@ -287,12 +287,12 @@ Do the following to publish a new release: main branch (both typespec-azure and core should point to main). 4. Generate release notes for TypeSpec once the full list of changes are in. - 1. In your fork of the core (typespec) repo, run `npx chronus changelog --policy typespec > out.md`. + 1. In your fork of the core (typespec) repo, run `pnpm exec chronus changelog --policy typespec > out.md`. 2. Create a new entry in `./core/website/src/content/docs/docs/release-notes` for this release and paste the contents of `out.md` into the new file. Reorganize the file to have the following sections in order: _Breaking Changes_, _Deprecations_, _Features_, and _Bug Fixes_. Skip the section if there are no entries in it. Also add a blurb above these sections for any especially notable updates. Example PR: https://github.com/microsoft/typespec/pull/4102 5. Generate release notes for TypeSpec Azure once the full list of changes are in. - 1. In your fork of the typespec-azure repo, run `npx chronus changelog --policy typespec-azure > out.md`. + 1. In your fork of the typespec-azure repo, run `pnpm exec chronus changelog --policy typespec-azure > out.md`. 2. Create a new entry in `./website/src/content/docs/docs/release-notes` for this release and paste the contents of `out.md` into the new file. Reorganize the file to have the following sections in order: _Breaking Changes_, _Deprecations_, _Features_, and _Bug Fixes_. Skip the section if there are no entries in it. Also add a blurb above these sections for any especially notable updates. Example PR: https://github.com/Azure/typespec-azure/pull/1306 diff --git a/README.md b/README.md index b23fc4dad6..ff695d26e9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ For TypeSpec language documentation, see https://typespec.io/docs. If you are team working on Azure, see TypeSpec Azure development documentation https://azure.github.io/typespec-azure. You should pre-install as well `@azure-tools/typespec-azure-core` to define Azure resources, and `@azure-tools/typespec-autorest` to export in Swagger: ``` -npm install @typespec/rest @typespec/openapi3 @azure-tools/typespec-azure-core @azure-tools/typespec-autorest +pnpm add @typespec/rest @typespec/openapi3 @azure-tools/typespec-azure-core @azure-tools/typespec-autorest ``` > If you plan to use the output openapi with autorest or any of the azure sdk tooling _you should use typespec-autorest_, the openapi3 emitter is not going to have any of the ms extensions (pageable, lro, client name, etc.) and so it will be losing information. diff --git a/package.json b/package.json index 3c1a320f22..0c384d182a 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "lint:extra": "pnpm run-all lint:extra", "lint:fix": "oxlint . --fix", "pack:all": "chronus pack --pack-destination ./temp/artifacts", - "preinstall": "npx only-allow pnpm", "prepare-publish": "node ./eng/scripts/prepare-publish.js", "purge": "rimraf --glob \"packages/*/node_modules/\" --glob \"core/packages/*/node_modules/\"", "regen-docs": "pnpm run-all regen-docs", diff --git a/packages/samples/README.md b/packages/samples/README.md index b58e3f6a8c..0b71b469d2 100644 --- a/packages/samples/README.md +++ b/packages/samples/README.md @@ -1,10 +1,10 @@ # Typespec Azure Samples ```bash -npm run test # Check Samples match snapshots -npm run test:ci # run test same as CI +pnpm test # Check Samples match snapshots +pnpm test:ci # run test same as CI -npm run test:regen -- -g "" # Regen of this name +pnpm test:regen -- -g "" # Regen of this name -npm run test:regen # Regen all samples. +pnpm test:regen # Regen all samples. ``` diff --git a/packages/typespec-autorest-canonical/package.json b/packages/typespec-autorest-canonical/package.json index 7e5999c159..ef9d4a9e01 100644 --- a/packages/typespec-autorest-canonical/package.json +++ b/packages/typespec-autorest-canonical/package.json @@ -35,7 +35,7 @@ }, "scripts": { "clean": "rimraf ./dist ./temp", - "build": " tsc -p tsconfig.build.json && npm run lint-typespec-library", + "build": " tsc -p tsconfig.build.json && pnpm lint-typespec-library", "watch": "tsc -p tsconfig.build.json --watch", "lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit", "test": "vitest run", diff --git a/packages/typespec-autorest/package.json b/packages/typespec-autorest/package.json index 8368c14247..0944cad6b1 100644 --- a/packages/typespec-autorest/package.json +++ b/packages/typespec-autorest/package.json @@ -36,7 +36,7 @@ }, "scripts": { "clean": "rimraf ./dist ./temp", - "build": "npm run gen-extern-signature && npm run regen-autorest-openapi-schema && npm run regen-service-yaml-schema && tsc -p tsconfig.build.json && npm run lint-typespec-library", + "build": "pnpm gen-extern-signature && pnpm regen-autorest-openapi-schema && pnpm regen-service-yaml-schema && tsc -p tsconfig.build.json && pnpm lint-typespec-library", "watch": "tsc -p tsconfig.build.json --watch", "gen-extern-signature": "tspd --enable-experimental gen-extern-signature .", "lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit", diff --git a/packages/typespec-azure-playground-website/README.md b/packages/typespec-azure-playground-website/README.md index b08c34274d..13c9aa2fd9 100644 --- a/packages/typespec-azure-playground-website/README.md +++ b/packages/typespec-azure-playground-website/README.md @@ -4,9 +4,9 @@ A self contained website for the TypeSpec Azure Playground. ## Use -- `npm start` to start in dev mode -- `npm run preview` to build and preview prod mode -- `npm run build` to build for production +- `pnpm start` to start in dev mode +- `pnpm preview` to build and preview prod mode +- `pnpm build` to build for production ## Configuration diff --git a/packages/typespec-azure-playground-website/package.json b/packages/typespec-azure-playground-website/package.json index a9191e9eb8..79ce265b77 100644 --- a/packages/typespec-azure-playground-website/package.json +++ b/packages/typespec-azure-playground-website/package.json @@ -34,9 +34,9 @@ "scripts": { "clean": "rimraf ./dist ./dist-dev ./temp ./samples/dist", "build-samples": "tsx ./samples/build.ts", - "build": "npm run build-samples && tsc -p tsconfig.build.json && vite build 2>&1", + "build": "pnpm build-samples && tsc -p tsconfig.build.json && vite build 2>&1", "preview": "pnpm build && vite preview", - "start": "npm run -s watch", + "start": "pnpm -s watch", "test": "vitest run", "test:ci": "vitest run", "test:watch": "vitest -w", diff --git a/packages/typespec-azure-portal-core/package.json b/packages/typespec-azure-portal-core/package.json index 26176168b3..ca80eb6209 100644 --- a/packages/typespec-azure-portal-core/package.json +++ b/packages/typespec-azure-portal-core/package.json @@ -8,7 +8,7 @@ "readme": "https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-portal-core/README.md", "scripts": { "clean": "rimraf ./dist ./temp", - "build": "tsc -p tsconfig.build.json && npm run lint-typespec-library", + "build": "tsc -p tsconfig.build.json && pnpm lint-typespec-library", "watch": "tsc -p tsconfig.build.json --watch", "lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit", "test": "vitest run", diff --git a/packages/typespec-azure-resource-manager/package.json b/packages/typespec-azure-resource-manager/package.json index b67b410f18..26a9f4cbd1 100644 --- a/packages/typespec-azure-resource-manager/package.json +++ b/packages/typespec-azure-resource-manager/package.json @@ -39,7 +39,7 @@ }, "scripts": { "clean": "rimraf ./dist ./temp", - "build": "npm run gen-extern-signature && tsc -p tsconfig.build.json && npm run lint-typespec-library", + "build": "pnpm gen-extern-signature && tsc -p tsconfig.build.json && pnpm lint-typespec-library", "watch": "tsc -p tsconfig.build.json --watch", "gen-extern-signature": "tspd --enable-experimental gen-extern-signature .", "lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit", diff --git a/packages/typespec-client-generator-core/package.json b/packages/typespec-client-generator-core/package.json index fcb8103803..785134e59c 100644 --- a/packages/typespec-client-generator-core/package.json +++ b/packages/typespec-client-generator-core/package.json @@ -37,7 +37,7 @@ }, "scripts": { "clean": "rimraf ./dist ./temp", - "build": "npm run gen-extern-signature && tsc -p tsconfig.build.json && npm run lint-typespec-library", + "build": "pnpm gen-extern-signature && tsc -p tsconfig.build.json && pnpm lint-typespec-library", "watch": "tsc -p tsconfig.build.json --watch", "gen-extern-signature": "tspd --enable-experimental gen-extern-signature .", "lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit", diff --git a/packages/typespec-go/.scripts/spector.js b/packages/typespec-go/.scripts/spector.js index a3e8c67eed..441bbe8e21 100644 --- a/packages/typespec-go/.scripts/spector.js +++ b/packages/typespec-go/.scripts/spector.js @@ -34,6 +34,6 @@ if (switches.length === 0) { throw new Error("missing arg: [--start] [--stop]"); } -const cmdLine = "npx tsp-spector " + switches.join(" "); +const cmdLine = "pnpm exec tsp-spector " + switches.join(" "); console.log(cmdLine); execSync(cmdLine, execSyncOptions); diff --git a/packages/typespec-go/.scripts/test-update.js b/packages/typespec-go/.scripts/test-update.js index 2743650737..4ef10b19f9 100644 --- a/packages/typespec-go/.scripts/test-update.js +++ b/packages/typespec-go/.scripts/test-update.js @@ -22,7 +22,7 @@ const genSuites = resolve(scriptDir, "..", "test", "unittest", "gen-scenario-sui execSync(`node "${genSuites}"`, { stdio: "inherit" }); const extra = process.argv.slice(2).join(" "); -const cmdLine = `npx vitest run --pass-with-no-tests ${extra}`.trim(); +const cmdLine = `pnpm exec vitest run --pass-with-no-tests ${extra}`.trim(); console.log(cmdLine); execSync(cmdLine, { stdio: "inherit", diff --git a/packages/typespec-go/docs/development.md b/packages/typespec-go/docs/development.md index 561785ca94..7d3e6c29b5 100644 --- a/packages/typespec-go/docs/development.md +++ b/packages/typespec-go/docs/development.md @@ -190,4 +190,4 @@ Before you do, make sure to: 1. Format your code (`pnpm format` from the repo root, or check with `pnpm format:check`). 2. Rebuild and regenerate everything so the committed fixtures reflect your change. -3. Add a changelog entry with [Chronus](https://github.com/microsoft/chronus) by running `npx chronus add` from the repo root and following the prompts. This creates a change file under `.chronus/changes/` that you should commit with your PR. +3. Add a changelog entry with [Chronus](https://github.com/microsoft/chronus) by running `pnpm exec chronus add` from the repo root and following the prompts. This creates a change file under `.chronus/changes/` that you should commit with your PR. diff --git a/packages/typespec-java/package.json b/packages/typespec-java/package.json index 757b624a70..b8aa438970 100644 --- a/packages/typespec-java/package.json +++ b/packages/typespec-java/package.json @@ -29,7 +29,7 @@ }, "scripts": { "clean": "rimraf ./dist ./temp ./generator", - "build": "npm run build:emitter && npm run build:generator", + "build": "pnpm build:emitter && pnpm build:generator", "build:emitter": "pwsh -NoProfile -File Copy-Sources.ps1 && tsc -p .", "build:generator": "pwsh -NoProfile -File Build-Generator.ps1", "watch": "tsc -p . --watch", diff --git a/packages/typespec-ts/package.json b/packages/typespec-ts/package.json index fcdcd05733..3b4c3566d4 100644 --- a/packages/typespec-ts/package.json +++ b/packages/typespec-ts/package.json @@ -19,24 +19,24 @@ "test-next:coverage": "vitest run --project test-next --coverage", "clean": "rimraf ./dist ./typespec-output", "build": "tsc -p .", - "test": "npm run test-next && npm run unit-test && npm run integration-test-ci", + "test": "pnpm test-next && pnpm unit-test && pnpm integration-test-ci", "lint": "oxlint . --deny-warnings", "lint:fix": "oxlint . --fix", "check:tree": "node ./test/commands/check-clean-tree.ts", - "integration-test-ci": "npm run copy:typespec && npm run spector-test", - "spector-test": "concurrently --kill-others --success first \"npm:start-test-server\" \"npm:generate-and-run\"", + "integration-test-ci": "pnpm copy:typespec && pnpm spector-test", + "spector-test": "concurrently --kill-others --success first \"pnpm start-test-server\" \"pnpm generate-and-run\"", "start-test-server": "node ./test/commands/start-test-server.js", "copy:typespec": "node ./test/commands/copy-typespec.ts", - "generate-and-run": "npm run generate-tsp-only:client && concurrently --kill-others-on-fail \"npm:integration-test:alone\" \"npm:generate-tsp-only:declarations\" && npm run stop-test-server -- -p 3002", + "generate-and-run": "pnpm generate-tsp-only:client && concurrently --kill-others-on-fail \"pnpm integration-test:alone\" \"pnpm generate-tsp-only:declarations\" && pnpm stop-test-server", "generate-tsp-only": "node ./test/commands/gen-spector.js", "generate-tsp-only:client": "node ./test/commands/gen-spector.js --phase=client", "generate-tsp-only:declarations": "node ./test/commands/gen-spector.js --phase=declarations", - "regen-test-baselines": "npm run generate-tsp-only", + "regen-test-baselines": "pnpm generate-tsp-only", "integration-test:alone": "vitest run --project integration-azure-modular", - "stop-test-server": "npx tsp-spector server stop", + "stop-test-server": "pnpm exec tsp-spector server stop -p 3002", "unit-test": "cross-env NODE_OPTIONS=--max-old-space-size=1024 vitest run --project unit-modular", "gen:scenario-suites": "node ./test/commands/gen-scenario-suites.ts", - "regen-docs": "npm run build && tspd doc . --enable-experimental --output-dir ../../website/src/content/docs/docs/emitters/clients/typespec-ts/reference --skip-js" + "regen-docs": "pnpm build && tspd doc . --enable-experimental --output-dir ../../website/src/content/docs/docs/emitters/clients/typespec-ts/reference --skip-js" }, "author": "Jose Heredia ", "license": "MIT", diff --git a/packages/typespec-ts/test/commands/gen-scenario-suites.ts b/packages/typespec-ts/test/commands/gen-scenario-suites.ts index 5ca2a58895..da1c288942 100644 --- a/packages/typespec-ts/test/commands/gen-scenario-suites.ts +++ b/packages/typespec-ts/test/commands/gen-scenario-suites.ts @@ -5,7 +5,7 @@ * files lets vitest run them in parallel worker processes, which dramatically * reduces wall-clock time and per-worker memory. * - * Run with: `npm run gen:scenario-suites` + * Run with: `pnpm gen:scenario-suites` * * The `coverage` guard test in `scenario-suites.guard.test.ts` fails if the * generated files drift from the scenario directory tree, prompting a re-run. @@ -45,7 +45,7 @@ export function suiteFileName(relDir: string): string { function suiteFileContent(relDir: string): string { const posixRel = relDir.split(path.sep).join("/"); const location = `./test/modular-unit/scenarios/${posixRel}`; - return `// Generated by \`npm run gen:scenario-suites\`. Do not edit by hand. + return `// Generated by \`pnpm gen:scenario-suites\`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/commands/start-test-server.js b/packages/typespec-ts/test/commands/start-test-server.js index 14c7bd8d0b..9dd44a3376 100644 --- a/packages/typespec-ts/test/commands/start-test-server.js +++ b/packages/typespec-ts/test/commands/start-test-server.js @@ -25,8 +25,8 @@ try { } const child = spawn( - "npx", - ["tsp-spector", "serve", ...SPEC_PATHS, "--port", PORT, "--coverageFile", COVERAGE_FILE], + "pnpm", + ["exec", "tsp-spector", "serve", ...SPEC_PATHS, "--port", PORT, "--coverageFile", COVERAGE_FILE], { stdio: "inherit", shell: true }, ); diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites.guard.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites.guard.test.ts index cfdb8e8f72..3dfa67966f 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites.guard.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites.guard.test.ts @@ -12,7 +12,7 @@ function suiteFileName(relDir: string): string { /** * Guards against silent coverage loss: every leaf scenario directory must have * exactly one generated suite file, and vice versa. If this fails after adding - * or moving scenarios, run `npm run gen:scenario-suites`. + * or moving scenarios, run `pnpm gen:scenario-suites`. */ it("every scenario leaf directory has a generated suite file", () => { const expected = getLeafScenarioDirs().map(suiteFileName).sort(); @@ -23,6 +23,6 @@ it("every scenario leaf directory has a generated suite file", () => { assert.deepEqual( actual, expected, - "Scenario suite files are out of sync with the scenario directory tree. Run `npm run gen:scenario-suites` to regenerate them.", + "Scenario suite files are out of sync with the scenario directory tree. Run `pnpm gen:scenario-suites` to regenerate them.", ); }); diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/anonymous.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/anonymous.test.ts index 66038a2d2d..f089bcf754 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/anonymous.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/anonymous.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/api-operations.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/api-operations.test.ts index 3032e37cb7..18f2876b72 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/api-operations.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/api-operations.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/classic-client.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/classic-client.test.ts index 314019e123..802321424d 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/classic-client.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/classic-client.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/client-context.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/client-context.test.ts index ab8e49557e..72a561961f 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/client-context.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/client-context.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/empty-project.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/empty-project.test.ts index b6f1363fdb..78b4d9dbc8 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/empty-project.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/empty-project.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/enum-union.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/enum-union.test.ts index 1c4e12d737..b9916ccf40 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/enum-union.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/enum-union.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/example.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/example.test.ts index 234daa02bf..c1336bfb88 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/example.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/example.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models-generator.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models-generator.test.ts index d89a52bbc9..5137d09511 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models-generator.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models-generator.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models.test.ts index 1db72e427f..966f1aed4c 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__api-version.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__api-version.test.ts index 1521f85aee..bcbfd045ae 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__api-version.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__api-version.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__arm.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__arm.test.ts index 9bcc68b627..1a71596d79 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__arm.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__arm.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__deserialization.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__deserialization.test.ts index 4202a90d8d..b59d03f9a0 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__deserialization.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__deserialization.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__nested-enum__flatten.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__nested-enum__flatten.test.ts index 20bc80ae76..d78438d3de 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__nested-enum__flatten.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__nested-enum__flatten.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__nested-enum__not-flatten.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__nested-enum__not-flatten.test.ts index 9e60aff34e..00696652e5 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__nested-enum__not-flatten.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__nested-enum__not-flatten.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__nullable.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__nullable.test.ts index 2aa72c94fe..73668fff4e 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__nullable.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__nullable.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__property-flatten.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__property-flatten.test.ts index f2712d19f5..071fb3c4eb 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__property-flatten.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__property-flatten.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__response.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__response.test.ts index 15c6859b52..e2fa92d035 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__response.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__response.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__serialization.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__serialization.test.ts index cf2a28e65f..c8b1fcdaf1 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__serialization.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__serialization.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/models__template.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/models__template.test.ts index 71a8e6cf34..b88dd40210 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/models__template.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/models__template.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/multipart.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/multipart.test.ts index 78af28a6e9..45443ee368 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/multipart.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/multipart.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/operations.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/operations.test.ts index 444bc37fe2..b6b0454763 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/operations.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/operations.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__body-param.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__body-param.test.ts index 46382435d0..1716d4c5a3 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__body-param.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__body-param.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__cookie-param.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__cookie-param.test.ts index 2433fbac19..11af12dcf4 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__cookie-param.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__cookie-param.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__error-deserialization.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__error-deserialization.test.ts index 20df8770c4..8cbe456879 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__error-deserialization.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__error-deserialization.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__header-param.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__header-param.test.ts index 18c62f4fe3..5a3dd33329 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__header-param.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__header-param.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__pagination.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__pagination.test.ts index c0c0f8d4fb..c1da32e53a 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__pagination.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__pagination.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__path-param.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__path-param.test.ts index aff29e111e..3ac090da66 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__path-param.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__path-param.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__query-param.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__query-param.test.ts index 2cecbd772e..738674c7a8 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__query-param.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__query-param.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__storage-compat.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__storage-compat.test.ts index 8b80623375..af3b1f1810 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/operations__storage-compat.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/operations__storage-compat.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/payload__xml.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/payload__xml.test.ts index 84e1804881..0f2738f315 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/payload__xml.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/payload__xml.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client.test.ts index 54a15d5225..225d704eef 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client__disable-hierarchy.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client__disable-hierarchy.test.ts index 0532a786e3..85fdba36c7 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client__disable-hierarchy.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client__disable-hierarchy.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client__enable-hierarchy.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client__enable-hierarchy.test.ts index e664a0653d..10b8f3157f 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client__enable-hierarchy.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__client__enable-hierarchy.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__operations.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__operations.test.ts index 1dc41aa2d8..587377b380 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__operations.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__operations.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__parameters.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__parameters.test.ts index 74b199eb9e..838abb02c0 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__parameters.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__parameters.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__property-flatten.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__property-flatten.test.ts index 505ff1445b..c48580675a 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/samples__property-flatten.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/samples__property-flatten.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/test__operations.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/test__operations.test.ts index fda78a65c7..9665a29c90 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/test__operations.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/test__operations.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/test__parameters.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/test__parameters.test.ts index 1c28733566..bce13e73dc 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/test__parameters.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/test__parameters.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/packages/typespec-ts/test/modular-unit/scenario-suites/test__responses.test.ts b/packages/typespec-ts/test/modular-unit/scenario-suites/test__responses.test.ts index af4a822277..b542700f07 100644 --- a/packages/typespec-ts/test/modular-unit/scenario-suites/test__responses.test.ts +++ b/packages/typespec-ts/test/modular-unit/scenario-suites/test__responses.test.ts @@ -1,4 +1,4 @@ -// Generated by `npm run gen:scenario-suites`. Do not edit by hand. +// Generated by `pnpm gen:scenario-suites`. Do not edit by hand. import { describe } from "vitest"; import { describeScenarioDir } from "../scenario-runner.js"; diff --git a/website/src/content/docs/docs/emitters/typespec-autorest/index.md b/website/src/content/docs/docs/emitters/typespec-autorest/index.md index db8b10a116..25a7b6bdce 100644 --- a/website/src/content/docs/docs/emitters/typespec-autorest/index.md +++ b/website/src/content/docs/docs/emitters/typespec-autorest/index.md @@ -22,7 +22,7 @@ The generated OpenAPI spec will have custom `x-ms-` extensions properties and co } ``` -2. Run `npm install` to install the dependency +2. Run `pnpm install` to install the dependency 3. Import `@azure-tools/typespec-autorest` in your `main.tsp` file ```typespec