Skip to content
This repository was archived by the owner on Jun 30, 2026. It is now read-only.

Commit 060a830

Browse files
Update naming terminology: cadl-ranch → spector, HLC → AutoRest (#3957)
* Rename cadl-ranch references to spector and update terminology - Rename gen-cadl-ranch.js to gen-spector.js - Rename cadl-ranch-list.js to spector-list.js - Update all references in package.json scripts, launch.json, CI pipelines, CONTRIBUTING.md, copilot-instructions.md, and SKILL.md - Update spector-list.js with latest entries from upstream - Replace HLC terminology with AutoRest in CI and test docs - Update README.md option descriptions to remove Modular jargon Fixes #3792 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Rename Modular to JS Emitter for copilot-instruction * Revert "Rename Modular to JS Emitter for copilot-instruction" This reverts commit 9cd1a04. * Revert Modular terminology changes in README.md Restore original 'Modular library', 'Modular client', and 'Only for Modular generation' wording. Keeps this PR limited to cadl-ranch -> spector and HLC -> AutoRest renames. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent cc4829a commit 060a830

12 files changed

Lines changed: 31 additions & 31 deletions

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ To regenerate a specific integration test client (faster than regenerating all):
144144

145145
```bash
146146
cd packages/typespec-ts
147-
npx tsx ./test/commands/gen-cadl-ranch.js --tag=azure-modular --filter=payload/xml
147+
npx tsx ./test/commands/gen-spector.js --tag=azure-modular --filter=payload/xml
148148
```
149149

150150
Replace `payload/xml` with the path of the specific test you want to regenerate.

.github/skills/spector-test-implementer/SKILL.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Read `temp/specs/<path>/mockapi.ts`. Extract all scenario names (the `Scenarios.
3535

3636
### Step 3: Check Existing Implementation
3737

38-
Check whether the path already exists in the `azureModularTsps` array in `test/commands/cadl-ranch-list.js`, and whether a `.spec.ts` file already exists in `test/azureModularIntegration/`.
38+
Check whether the path already exists in the `azureModularTsps` array in `test/commands/spector-list.js`, and whether a `.spec.ts` file already exists in `test/azureModularIntegration/`.
3939

40-
**Important:** `cadl-ranch-list.js` has four arrays in order: `azureRlcTsps`, `rlcTsps`, `azureModularTsps`, `modularTsps`. Verify a match is inside `azureModularTsps` by checking line numbers:
40+
**Important:** `spector-list.js` has four arrays in order: `azureRlcTsps`, `rlcTsps`, `azureModularTsps`, `modularTsps`. Verify a match is inside `azureModularTsps` by checking line numbers:
4141

4242
1. Find the line of `export const azureModularTsps = [` (start)
4343
2. Find the line of `export const modularTsps = [` (end boundary)
@@ -53,7 +53,7 @@ Then branch:
5353

5454
**Case C -- Entry exists but no .spec.ts:** Skip Step 4, go to Step 5.
5555

56-
### Step 4: Add Entry to cadl-ranch-list.js
56+
### Step 4: Add Entry to spector-list.js
5757

5858
Add to the `azureModularTsps` array:
5959

@@ -78,9 +78,9 @@ This step has two phases: first create the config and generate the client, then
7878
2. Create `test/azureModularIntegration/generated/<path>/.gitignore` with the content shown in [.gitignore template](references/naming-and-templates.md#gitignore-template)
7979
3. Generate the client by running:
8080
```bash
81-
npx tsx ./test/commands/gen-cadl-ranch.js --tag=azure-modular --filter=<path>
81+
npx tsx ./test/commands/gen-spector.js --tag=azure-modular --filter=<path>
8282
```
83-
4. **Verify generation succeeded:** Check that `test/azureModularIntegration/generated/<path>/src/index.ts` exists and contains actual client class exports (not empty or placeholder). If the file is missing or empty, **stop** — remove the entry from `cadl-ranch-list.js`, delete the generated directory, and report that generation is not supported for this path.
83+
4. **Verify generation succeeded:** Check that `test/azureModularIntegration/generated/<path>/src/index.ts` exists and contains actual client class exports (not empty or placeholder). If the file is missing or empty, **stop** — remove the entry from `spector-list.js`, delete the generated directory, and report that generation is not supported for this path.
8484
5. Read `test/azureModularIntegration/generated/<path>/src/index.ts` to discover the client class name, method signatures, and operation groups.
8585

8686
**Phase 2 -- .spec.ts file:**
@@ -157,10 +157,10 @@ For each new test path, these are the files that should be committed:
157157

158158
| File | Action |
159159
| -------------------------------------------------------------- | ------------------------------------------ |
160-
| `test/commands/cadl-ranch-list.js` | Modified (new entry in `azureModularTsps`) |
160+
| `test/commands/spector-list.js` | Modified (new entry in `azureModularTsps`) |
161161
| `test/azureModularIntegration/generated/<path>/.gitignore` | Created |
162162
| `test/azureModularIntegration/generated/<path>/tspconfig.yaml` | Created |
163-
| `test/azureModularIntegration/generated/<path>/src/index.d.ts` | Generated (by gen-cadl-ranch.js) |
163+
| `test/azureModularIntegration/generated/<path>/src/index.d.ts` | Generated (by gen-spector.js) |
164164
| `test/azureModularIntegration/<camelCaseName>.spec.ts` | Created |
165165

166166
Do **not** commit these files:
@@ -177,5 +177,5 @@ Do **not** commit these files:
177177
| Constructor mismatch | Read the generated client's `index.ts` for the actual signature |
178178
| Assertion mismatch | Re-read `mockapi.ts` for exact expected values |
179179
| Formatting CI fails | Run `pnpm format` at repo root before committing |
180-
| Generation produces no output | Remove path from `cadl-ranch-list.js`; emitter doesn't support it |
180+
| Generation produces no output | Remove path from `spector-list.js`; emitter doesn't support it |
181181
| Test passes locally but body is undefined | Check generated code for placeholder types like `__PLACEHOLDER_*__` — emitter bug |

.scripts/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ stages:
121121
inputs:
122122
artifactName: packages
123123
path: $(Build.ArtifactStagingDirectory)
124-
- job: HLC_Generation
124+
- job: AutoRest_Generation
125125
dependsOn: Build
126126
variables:
127127
- template: globals.yml
@@ -138,7 +138,7 @@ stages:
138138
- template: build.yml
139139
- script: npm run generate-swaggers
140140
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.typescript
141-
displayName: "Generate HLC Test Clients"
141+
displayName: "Generate AutoRest Test Clients"
142142
- script: npm run check:tree
143143
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.typescript
144144
displayName: "Check git Tree"

.scripts/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ pool:
1515
stages:
1616
- stage: NightlyCI
1717
jobs:
18-
- job: CadlRanchTest
18+
- job: SpectorTest
1919
steps:
2020
- template: nightly-prepare.yml
2121
- script: npm run integration-test-ci
2222
workingDirectory: $(Build.SourcesDirectory)/packages/typespec-ts
23-
displayName: "Run all Cadl-ranch test cases"
23+
displayName: "Run all Spector test cases"
2424
- job: UnitTest
2525
steps:
2626
- template: nightly-prepare.yml

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"name": "[TypeSpec] Debug generate integration code",
125125
"request": "launch",
126126
"cwd": "${workspaceFolder}/packages/typespec-ts",
127-
"runtimeArgs": ["tsx", "./test/commands/gen-cadl-ranch.js", "--tag=rlc"],
127+
"runtimeArgs": ["tsx", "./test/commands/gen-spector.js", "--tag=rlc"],
128128
"runtimeExecutable": "npx",
129129
"skipFiles": ["<node_internals>/**"],
130130
"type": "pwa-node",
@@ -173,4 +173,4 @@
173173
"outFiles": ["${workspaceFolder}/packages/*/dist/**/*.js"]
174174
}
175175
]
176-
}
176+
}

packages/typespec-ts/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ npm run smoke-test
5252

5353
Whenever you work on adding a feature/fixing a bug, this would probably be your first step. You create a test case and then run it through the generator, see the result, modify the generator, run it again and so on, until you get the desired output.
5454

55-
1. Pick up a typespec as your test input in cadl-ranch. Below are some examples
55+
1. Pick up a typespec as your test input in spector. Below are some examples
5656

57-
Let us say your test input is `authentication/api-key/main.tsp` in @azure-tools/cadl-ranch-specs.
57+
Let us say your test input is `authentication/api-key/main.tsp` in @typespec/http-specs or @azure-tools/azure-http-specs.
5858

59-
1. Now add an entry to the TypeSpecRanchConfig to the file [`cadl-ranch-list.ts`](./test/commands/cadl-ranch-list.ts). In the file, add the following to the array.
59+
1. Now add an entry to the TypeSpecRanchConfig to the file [`spector-list.js`](./test/commands/spector-list.js). In the file, add the following to the array.
6060

6161
```typescript
6262
{

packages/typespec-ts/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
"generate-and-run:modular": "npm run generate-tsp-only:modular && npm run integration-test:alone:modular && npm run stop-test-server -- -p 3002",
4646
"generate-and-run:azure-modular": "npm run generate-tsp-only:azure-modular && npm run integration-test:alone:azure-modular && npm run stop-test-server -- -p 3002",
4747
"generate-tsp-only": "npm run generate-tsp-only:azure-rlc && npm run generate-tsp-only:rlc &&npm run generate-tsp-only:azure-modular && npm run generate-tsp-only:modular",
48-
"generate-tsp-only:rlc": "npx tsx ./test/commands/gen-cadl-ranch.js --tag=rlc",
49-
"generate-tsp-only:azure-rlc": "npx tsx ./test/commands/gen-cadl-ranch.js --tag=azure-rlc",
50-
"generate-tsp-only:modular": "npx tsx ./test/commands/gen-cadl-ranch.js --tag=modular",
51-
"generate-tsp-only:azure-modular": "npx tsx ./test/commands/gen-cadl-ranch.js --tag=azure-modular",
48+
"generate-tsp-only:rlc": "npx tsx ./test/commands/gen-spector.js --tag=rlc",
49+
"generate-tsp-only:azure-rlc": "npx tsx ./test/commands/gen-spector.js --tag=azure-rlc",
50+
"generate-tsp-only:modular": "npx tsx ./test/commands/gen-spector.js --tag=modular",
51+
"generate-tsp-only:azure-modular": "npx tsx ./test/commands/gen-spector.js --tag=azure-modular",
5252
"regen-test-baselines": "npm run generate-tsp-only",
5353
"integration-test:alone": "npm run integration-test:alone:rlc && npm run integration-test:alone:azure-rlc && npm run integration-test:alone:modular && npm run integration-test:alone:azure-modular",
5454
"integration-test:alone:rlc": "vitest run --project integration-rlc",

packages/typespec-ts/test/azureModularIntegration/payloadMultipart.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
// id: "123",
2424
// profileImage: {
2525
// contents: fs.createReadStream(imgPath),
26-
// // must specify a filename due to cadl-ranch limitations
26+
// // must specify a filename due to spector limitations
2727
// filename: "test.jpg"
2828
// }
2929
// });

packages/typespec-ts/test/commands/gen-cadl-ranch.js renamed to packages/typespec-ts/test/commands/gen-spector.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
azureModularTsps,
44
azureRlcTsps,
55
rlcTsps
6-
} from "./cadl-ranch-list.js";
6+
} from "./spector-list.js";
77
import { runTypespec } from "./run.js";
88

99
async function generateTypeSpecs(tag = "rlc", isDebugging, pathFilter) {
@@ -68,12 +68,12 @@ async function main() {
6868

6969
let exitCode = 0;
7070
try {
71-
console.time("generate-cadl-ranch");
71+
console.time("generate-spector");
7272
await main();
7373
} catch (e) {
7474
console.error(e);
7575
exitCode = 1;
7676
} finally {
77-
console.timeEnd("generate-cadl-ranch");
77+
console.timeEnd("generate-spector");
7878
process.exit(exitCode);
7979
}
File renamed without changes.

0 commit comments

Comments
 (0)