Skip to content

Commit

Permalink
Make modular depend on old core-client
Browse files Browse the repository at this point in the history
  • Loading branch information
timovv committed Apr 26, 2024
1 parent 7673232 commit f0d9cc1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/rlc-common/src/metadata/buildPackageFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function buildPackageFile(
const config: PackageCommonInfoConfig = {
description: getDescription(model),
moduleKind: model.options?.moduleKind ?? "esm",
isModularLibrary: model.options?.isModularLibrary ?? false,
name: getPackageName(model),
version: getPackageVersion(model),
withSamples: model.options?.generateSample === true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ export function getAzureCommonPackageInfo(config: AzurePackageInfoConfig) {
export function getAzurePackageDependencies({
hasLro,
hasPaging,
specSource
specSource,
isModularLibrary
}: AzurePackageInfoConfig) {
let dependencies: Record<string, string> = {
"@azure-rest/core-client": specSource === "Swagger" ? "^1.4.0" : "^2.0.0",
// Swagger and modular libraries currently only support the old multipart/form-data implementation.
"@azure-rest/core-client":
specSource === "Swagger" || isModularLibrary ? "^1.4.0" : "^2.0.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.5.0",
"@azure/logger": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
export interface PackageCommonInfoConfig {
name: string;
nameWithoutScope?: string;
isModularLibrary: boolean;
version: string;
description: string;
moduleKind: "esm" | "cjs";
Expand Down

0 comments on commit f0d9cc1

Please sign in to comment.