Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* eslint-disable */
// TODO: Enable eslint, fix errors

Expand Down Expand Up @@ -253,7 +253,7 @@
folder: string,
): SkipResult {
const isRLCClient =
config?.options?.["@azure-tools/typespec-ts"]?.["is-modular-library"] !== true;
config?.options?.["@azure-tools/typespec-ts"]?.["is-modular-library"] === false;
const shouldSkip = isManagementSdk(folder) || isRLCClient;
const result: SkipResult = {
shouldSkip: shouldSkip,
Expand All @@ -265,7 +265,7 @@

function skipForModularOrManagementPlaneInTsEmitter(config: any, folder: string): SkipResult {
const isModularClient =
config?.options?.["@azure-tools/typespec-ts"]?.["is-modular-library"] === true;
config?.options?.["@azure-tools/typespec-ts"]?.["is-modular-library"] !== false;
const shouldSkip = isManagementSdk(folder) || isModularClient;
const result: SkipResult = {
shouldSkip: shouldSkip,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { afterEach, beforeEach, describe, it, MockInstance, vi } from "vitest";

import { contosoTspConfig } from "@azure-tools/specs-shared/test/examples";
Expand Down Expand Up @@ -247,6 +247,8 @@
"{output-dir}/{service-dir}/arm-aaa-rest",
"{output-dir}/{service-dir}/aaa--rest",
[new TspConfigTsDpEmitterOutputDirSubRule()],
false,
{ "is-modular-library": false },
);

const tsDpPackageNameTestCases = createEmitterOptionTestCases(
Expand All @@ -256,6 +258,8 @@
"@azure-rest/aaa-bbb",
"@azure/aaa-bbb",
[new TspConfigTsRlcDpPackageNameMatchPatternSubRule()],
false,
{ "is-modular-library": false },
);

const tsDpModularPackageNameTestCases = createEmitterOptionTestCases(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ options:
"name": "@azure-rest/azure-confidentialledger"
description: "Microsoft Confidential Ledger"
"flavor": "azure"
is-modular-library: false
generate-metadata: true
generate-sample-project: false
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ options:
"name": "@azure-rest/azure-confidentialledger-certificate"
description: "Microsoft Confidential Ledger Certificate"
"flavor": "azure"
is-modular-library: false
generate-metadata: true
generate-sample-project: false
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ options:
model-namespace: false
"@azure-tools/typespec-ts":
emitter-output-dir: "{output-dir}/{service-dir}/contoso-widgetmanager"
is-modular-library: true
Copy link
Member

@MaryGao MaryGao Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maririos and @mikeharder Could you help review and approve this pr?

JS has adjusted the default rule for option is-modular-library and this setting won't be necessary in our contoso project.

Copy link
Member

@mikeharder mikeharder Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the setting also be removed from our widget sample?

Also, I see a lot more hits for is-modular-library, both true and false, in existing specs in main. Why does this PR only change these 3?

Copy link
Member

@MaryGao MaryGao Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know we have other samples, @v-jiaodi Could you update config to remove all is-modular-library: true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

package-details:
name: "@azure/contoso-widgetmanager"
flavor: azure
Expand Down
Loading