You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove branded and flavor emitter options from typespec-ts (#4668)
## Summary
Removes the `branded` and `flavor` emitter options from
`@azure-tools/typespec-ts`. This package now only generates
Azure-branded packages — unbranded emit moves to
`@typespec/http-client-js`.
This is a **breaking change** to the emitter's public options.
## Changes
**Public surface**
- `lib.ts`: removed `flavor` and `branded` from `EmitterOptions` + the
options JSON schema; reworded the `azure-sdk-for-js` description.
- `interfaces.ts`: deleted the `PackageFlavor` type and `flavor?` from
`RLCOptions`.
**Internal cleanup**
- Removed the `PackageFlavor` plumbing and the `isAzurePackage()`
helper, collapsing every `flavor === "azure"` / `isAzurePackage(...)`
branch to its Azure behavior and deleting all unbranded (`flavor !==
"azure"`) code paths across ~26 source files.
- Deleted the now-dead `build-flavorless-package.ts` and the orphaned
`commonPackageDependencies`.
- `isAzureMonorepoPackage` = `azureSdkForJs`, `isAzureStandalonePackage`
= `!azureSdkForJs` (mutually exclusive, covering all cases).
**Tests**
- Updated 6 unit test files: dropped `flavor`/`branded`/`PackageFlavor`,
removed the non-Azure / "Flavorless lib" cases, and changed
`buildRuntimeImports()` to take no args.
- Deleted the obsolete `apiKeyCredentialClient.md` scenario sample —
key-credential sample generation was an unbranded-only behavior that no
longer exists.
**Test suite dedup**
The integration suite previously covered `{modular, rlc} × {branded,
unbranded}` combinations. With unbranded emit gone, the non-Azure
(standard) integration folders were redundant subsets of their Azure
variants, so they've been removed:
- Deleted `test/modular-integration/` entirely and the non-Azure tests +
generated baselines under `test/integration/` (kept the shared
`test/integration/typespec/` specs that `copy:typespec` feeds into Azure
generation).
- Removed the `integration-rlc` / `integration-modular` vitest projects
and all non-Azure integration scripts from `package.json`.
- Removed the `rlcTsps` / `modularTsps` lists from `spector-list.js` and
their cases in `gen-spector.js`; collapsed the `run.ts` output-path
mapping to Azure-only.
- Regenerated the Azure `encode/duration` baselines (new upstream-spec
"Lossy" duration ops) so the e2e `check:tree` stays clean.
**Docs**
- Regenerated the emitter reference (`reference/emitter.md` + package
`README.md`) so the documented options match.
## Verification
- `tsc -p .` builds clean
- `test-next` suite: **267/267 pass**
- Unit tests: `unit-test:rlc` (316 pass) + `unit-test:modular` (652
pass)
- Azure integration (spector) tests: `azure-modular` (934 pass) +
`azure-rlc` (783 pass)
- `eslint` clean (`--max-warnings=0`)
- `chronus verify` passes (breaking changeset added for
`@azure-tools/typespec-ts`)
- Code-review pass over the diff surfaced no issues
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
3
+
changeKind: breaking
4
+
packages:
5
+
- "@azure-tools/typespec-ts"
6
+
---
7
+
8
+
Remove the `branded` and `flavor` emitter options. `@azure-tools/typespec-ts` now only generates Azure-branded packages; use `@typespec/http-client-js` for unbranded emit.
Copy file name to clipboardExpand all lines: packages/typespec-ts/README.md
+1-13Lines changed: 1 addition & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,7 @@ Whether to generate sample files, for basic samples of your generated sdks. Defa
149
149
150
150
**Type:** `boolean`
151
151
152
-
This is used to indicate your project is generated in [azure-sdk-for-js](https://github.com/Azure/azure-sdk-for-js) repo or not. If your package is located in that repo we'll leverage `dev-tool` to accelerate our building and testing, however if not we'll remove the dependency for that tool. Defaults to `undefined`. Services with Flavor equal to 'Azure' default to 'true'.
152
+
This is used to indicate your project is generated in [azure-sdk-for-js](https://github.com/Azure/azure-sdk-for-js) repo or not. If your package is located in that repo we'll leverage `dev-tool` to accelerate our building and testing, however if not we'll remove the dependency for that tool. Defaults to `undefined`.
153
153
154
154
### `azure-output-directory`
155
155
@@ -239,18 +239,6 @@ Provides an option to add the model namespace to model names in case of conflict
239
239
240
240
An option to organize the client in a hierarchical way as defined by `@clientInitialization`. This is true by default.
Copy file name to clipboardExpand all lines: packages/typespec-ts/package.json
+4-15Lines changed: 4 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -21,37 +21,26 @@
21
21
"build": "tsc -p .",
22
22
"test": "npm run test-next && npm run unit-test && npm run integration-test-ci",
23
23
"test:azure": "npm run test-next && npm run copy:typespec && npm run integration-test-ci:azure-rlc && npm run integration-test-ci:azure-modular",
24
-
"test:standard": "npm run test-next && npm run copy:typespec && npm run unit-test&& npm run integration-test-ci:rlc && npm run integration-test-ci:modular",
"generate-and-run:rlc": "npm run generate-tsp-only:rlc && npm run integration-test:alone:rlc && npm run stop-test-server -- -p 3000",
42
36
"generate-and-run:azure-rlc": "npm run generate-tsp-only:azure-rlc && npm run integration-test:alone:azure-rlc && npm run stop-test-server -- -p 3000",
43
-
"generate-and-run:modular": "npm run generate-tsp-only:modular && npm run integration-test:alone:modular && npm run stop-test-server -- -p 3002",
44
37
"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",
45
-
"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",
"regen-test-baselines": "npm run generate-tsp-only",
51
-
"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",
52
-
"integration-test:alone:rlc": "vitest run --project integration-rlc",
42
+
"integration-test:alone": "npm run integration-test:alone:azure-rlc && npm run integration-test:alone:azure-modular",
53
43
"integration-test:alone:azure-rlc": "vitest run --project integration-azure-rlc",
54
-
"integration-test:alone:modular": "vitest run --project integration-modular",
55
44
"integration-test:alone:azure-modular": "vitest run --project integration-azure-modular",
56
45
"stop-test-server": "npx tsp-spector server stop",
"This is used to indicate your project is generated in [azure-sdk-for-js](https://github.com/Azure/azure-sdk-for-js) repo or not. If your package is located in that repo we'll leverage `dev-tool` to accelerate our building and testing, however if not we'll remove the dependency for that tool. Defaults to `undefined`. Services with Flavor equal to 'Azure' default to 'true'. ",
211
+
"This is used to indicate your project is generated in [azure-sdk-for-js](https://github.com/Azure/azure-sdk-for-js) repo or not. If your package is located in that repo we'll leverage `dev-tool` to accelerate our building and testing, however if not we'll remove the dependency for that tool. Defaults to `undefined`. ",
0 commit comments