Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
Expand Up @@ -19,11 +19,11 @@ import {
TodoItemsAttachmentsCreateJsonAttachmentOptionalParams,
TodoItemsAttachmentsListOptionalParams,
} from "./options.js";
import { expandUrlTemplate } from "../../../static-helpers/urlTemplate.js";
import {
PagedAsyncIterableIterator,
buildPagedAsyncIterator,
} from "../../../static-helpers/pagingHelpers.js";
import { expandUrlTemplate } from "../../../static-helpers/urlTemplate.js";
import {
StreamableMethod,
PathUncheckedResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import {
TodoItemsCreateJsonOptionalParams,
TodoItemsListOptionalParams,
} from "./options.js";
import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
import {
PagedAsyncIterableIterator,
buildPagedAsyncIterator,
} from "../../static-helpers/pagingHelpers.js";
import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
import {
StreamableMethod,
PathUncheckedResponse,
Expand Down
3 changes: 1 addition & 2 deletions packages/typespec-ts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,7 @@ export async function $onEmit(context: EmitContext) {
);
const hasPackageFile = await existsSync(existingPackageFilePath);
const shouldGenerateMetadata =
option.generateMetadata === true ||
(option.generateMetadata === undefined && !hasPackageFile);
option.generateMetadata === true || !hasPackageFile;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this broke the scenario where a user explicitly passes false to generate-metadata which should be honored. Keyvault is a prime example of this https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-admin/package.json#L45

const existingTestFolderPath = join(
dpgContext.generationPathDetail?.metadataDir ?? "",
"test"
Expand Down
Loading