Skip to content

Commit faa3afd

Browse files
committed
update
1 parent b3498ba commit faa3afd

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

packages/typespec-ts/src/index.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,8 @@ export async function $onEmit(context: EmitContext) {
455455
// has a manual convenience layer. Skip all metadata/test file generation
456456
// to avoid unexpected modifications to files like package.json, README.md,
457457
// warp.config.yml, and snippets.spec.ts. metadata.json is still updated.
458-
const sourcesDir =
459-
dpgContext.generationPathDetail?.rlcSourcesDir ??
460-
dpgContext.generationPathDetail?.modularSourcesDir ??
461-
"";
462-
const hasManualConvenienceLayer =
463-
option.generateMetadata === false && basename(sourcesDir) === "generated";
458+
const sourcesDir = dpgContext.generationPathDetail?.modularSourcesDir ?? "";
459+
const hasManualConvenienceLayer = basename(sourcesDir) === "generated";
464460
const isAzureFlavor = isAzurePackage({ options: option });
465461
// Generate metadata
466462
const existingPackageFilePath = join(
@@ -495,7 +491,7 @@ export async function $onEmit(context: EmitContext) {
495491
}
496492
}
497493

498-
if (shouldGenerateMetadata && !hasManualConvenienceLayer) {
494+
if (shouldGenerateMetadata) {
499495
const commonBuilders = [
500496
buildRollupConfig,
501497
buildApiExtractorConfig,

0 commit comments

Comments
 (0)