Skip to content

Commit

Permalink
Bump core from 4b942c9 to a336c93 (#1549)
Browse files Browse the repository at this point in the history
Bumps [core](https://github.com/microsoft/typespec) from `4b942c9` to
`a336c93`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/typespec/commit/a336c9370940afd9a80173be9c31dab55d5597f6"><code>a336c93</code></a>
Update prettier config to format trailing commas to <code>all</code>
(Default) (<a
href="https://redirect.github.com/microsoft/typespec/issues/4457">#4457</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/9a65543efdccef4d38359bb88320c8985c2facb9"><code>9a65543</code></a>
Support customizing to enum/extensible enum (<a
href="https://redirect.github.com/microsoft/typespec/issues/4441">#4441</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/d0666e643e56775d4fc7c53c814e37677530a80d"><code>d0666e6</code></a>
Add Support for Json schema examples (<a
href="https://redirect.github.com/microsoft/typespec/issues/4447">#4447</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/0108755871a372d184a65bdfa44ac4bfe6d2e3a5"><code>0108755</code></a>
Fix 1ds banner (<a
href="https://redirect.github.com/microsoft/typespec/issues/4451">#4451</a>)</li>
<li>See full diff in <a
href="https://github.com/microsoft/typespec/compare/4b942c9fb957c5b4e8e443a16bbdb130790a80b8...a336c9370940afd9a80173be9c31dab55d5597f6">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
  • Loading branch information
3 people authored Sep 17, 2024
1 parent 5e496af commit cdeb62c
Show file tree
Hide file tree
Showing 239 changed files with 2,105 additions and 2,106 deletions.
1 change: 0 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"arrowParens": "always",
"trailingComma": "es5",
"bracketSpacing": true,
"endOfLine": "lf",
"printWidth": 100,
Expand Down
2 changes: 1 addition & 1 deletion core
Submodule core updated 499 files
8 changes: 4 additions & 4 deletions docs/howtos/Client Generation/05union.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ export type DemoServiceContext = Client & {
queryParameters: {
mode: "strict" | "lenient";
};
} & RequestParameters
} & RequestParameters,
): StreamableMethod<Analyze200Response | AnalyzeDefaultResponse>;
};
/** Resource for '/completions' has methods for the following verbs: post */
(path: "/completions"): {
post(
options: {
body: CompletionInput;
} & RequestParameters
} & RequestParameters,
): StreamableMethod<Completions200Response | CompletionsDefaultResponse>;
};
};
Expand Down Expand Up @@ -209,14 +209,14 @@ export type DemoServiceContext = Client & {
body?: {
x: number;
};
} & RequestParameters
} & RequestParameters,
): StreamableMethod<A200Response>;
post(
options?: {
body?: {
x: string;
};
} & RequestParameters
} & RequestParameters,
): StreamableMethod<B200Response>;
};
};
Expand Down
34 changes: 17 additions & 17 deletions docs/howtos/Client Generation/07tcgcTypes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ import { PythonSdkContext } from "./lib.js";
import { PythonSdkClientType } from "./interfaces.js";

function linkSubClients<TServiceOperation extends PythonSdkServiceOperation>(
sdkContext: PythonSdkContext<TServiceOperation>
sdkContext: PythonSdkContext<TServiceOperation>,
): void {
for (const client of sdkContext.clients) {
client.subclients = client.methods
Expand Down Expand Up @@ -601,7 +601,7 @@ interface SdkServiceMethodBase<TServiceOperation extends SdkServiceOperation>
```ts
function serializeServiceMethod<TServiceOperation extends PythonSdkServiceOperation>(
context: PythonSdkContext<TServiceOperation>,
method: SdkServiceMethod<TServiceOperation>
method: SdkServiceMethod<TServiceOperation>,
): PythonSdkServiceMethod {
switch (method.kind) {
case "basic":
Expand Down Expand Up @@ -968,7 +968,7 @@ const sdkHttpOperation = {
function serializeServiceOperation<TServiceOperation extends PythonSdkServiceOperation>(
context: PythonSdkContext<TServiceOperation>,
method: SdkServiceMethod<TServiceOperation>,
operation: TServiceOperation
operation: TServiceOperation,
): TServiceOperation {
switch (operation.kind) {
case "http":
Expand Down Expand Up @@ -1252,7 +1252,7 @@ import { getPythonSdkType } from "./types.js";

function serializeMethodResponse<TServiceOperation extends SdkServiceOperation>(
context: PythonSdkContext<TServiceOperation>,
response: SdkMethodResponse
response: SdkMethodResponse,
): PythonSdkMethodResponse {
return {
...response,
Expand Down Expand Up @@ -1699,7 +1699,7 @@ const sdkHttpOperationExample = {
```ts
function serializeServiceOperationExample(
context: PythonSdkContext<SdkHttpOperation>,
operation: SdkHttpOperation
operation: SdkHttpOperation,
): PythonSdkHttpOperationExample {
for (const example of operation.examples) {
return {
Expand All @@ -1720,15 +1720,15 @@ function serializeServiceOperationExample(
})),
bodyValue: serializeTypeExample(context, value.bodyValue),
},
])
]),
),
};
}
}

function serializeTypeExample(
context: PythonSdkContext<SdkHttpOperation>,
example: SdkTypeExample
example: SdkTypeExample,
): PythonSdkTypeExample {
switch (example.kind) {
case "string":
Expand Down Expand Up @@ -1770,7 +1770,7 @@ function serializeTypeExample(
Object.entries(example.value).map(([key, value]) => [
key,
serializeTypeExample(context, value),
])
]),
),
};
case "union":
Expand All @@ -1786,14 +1786,14 @@ function serializeTypeExample(
Object.entries(example.value).map(([key, value]) => [
key,
serializeTypeExample(context, value),
])
]),
),
additionalPropertiesValue: example.additionalPropertiesValue
? Object.fromEntries(
Object.entries(example.additionalPropertiesValue).map(([key, value]) => [
key,
serializeTypeExample(context, value),
])
]),
)
: undefined,
};
Expand Down Expand Up @@ -1862,12 +1862,12 @@ export async function $onEmit(context: EmitContext<PythonEmitterOptions>) {

function serializeClient<TServiceOperation extends PythonSdkServiceOperation>(
sdkContext: PythonSdkContext<TServiceOperation>,
client: SdkClientType<TServiceOperation>
client: SdkClientType<TServiceOperation>,
): PythonSdkClientType {
const pythonClient = {
...client,
parameters: client.initialization?.properties.map((x) =>
getSdkModelPropertyType(sdkContext, x)
getSdkModelPropertyType(sdkContext, x),
),
subClients: client.methods
.filter((x) => x.kind === "clientaccessor")
Expand All @@ -1882,7 +1882,7 @@ function serializeClient<TServiceOperation extends PythonSdkServiceOperation>(
}

function linkSubClients<TServiceOperation extends PythonSdkServiceOperation>(
sdkContext: PythonSdkContext<TServiceOperation>
sdkContext: PythonSdkContext<TServiceOperation>,
): void {
for (const client of sdkContext.clients) {
client.subclients = client.methods
Expand Down Expand Up @@ -2037,7 +2037,7 @@ import { getPythonSdkType, getSdkModelPropertyType } from "./types.js";
function serializeHttpServiceOperation(
context: PythonSdkContext<SdkHttpOperation>,
method: SdkServiceMethod<SdkHttpOperation>,
operation: SdkHttpOperation
operation: SdkHttpOperation,
): PythonSdkHttpOperation {
return {
...operation,
Expand All @@ -2046,16 +2046,16 @@ function serializeHttpServiceOperation(
? getSdkModelPropertyType(context, operation.bodyParam)
: undefined,
responses: Object.entries(operation.responses).map(([statusCode, responses]) =>
serializeHttpResponse(context, method, statusCode, responses)
serializeHttpResponse(context, method, statusCode, responses),
),
exceptions: Object.entries(operation.exceptions).map(([statusCode, exceptions]) =>
serializeHttpResponse(context, method, statusCode, exceptions)
serializeHttpResponse(context, method, statusCode, exceptions),
),
};

function serializeHttpResponse(
context: PythonSdkContext<SdkHttpOperation>,
response: SdkHttpResponse
response: SdkHttpResponse,
): PythonSdkHttpResponse {
return {
...response,
Expand Down
42 changes: 21 additions & 21 deletions docs/howtos/Client Generation/08methodInputs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export type DemoServiceContext = Client & {
/** Resource for '/analyze' has methods for the following verbs: post */
(path: "/users"): {
get(
options: RequestParameters
options: RequestParameters,
): StreamableMethod<GetUser200Response | GetUserDefaultResponse>;
};
};
Expand Down Expand Up @@ -152,7 +152,7 @@ export type DemoServiceContext = Client & {
post(
options: {
body: User;
} & RequestParameters
} & RequestParameters,
): StreamableMethod<PostUserDefaultResponse>;
};
};
Expand Down Expand Up @@ -252,7 +252,7 @@ export type DemoServiceContext = Client & {
firstName: string;
lastName: string;
};
} & RequestParameters
} & RequestParameters,
): StreamableMethod<PostUserDefaultResponse>;
};
};
Expand All @@ -262,7 +262,7 @@ export type DemoServiceContext = Client & {
export async function upload(
firstName: string,
lastName: string,
options: UploadOptionalParams
options: UploadOptionalParams,
): Promise<void>;

// Modular classical client layer
Expand Down Expand Up @@ -344,15 +344,15 @@ export type DemoServiceContext = Client & {
/** Resource for '/completions' has methods for the following verbs: post */
(
path: "/users/{id}",
id
id,
): {
post(
options: {
body: {
firstName: string;
lastName: string;
};
} & RequestParameters
} & RequestParameters,
): StreamableMethod<PostUserDefaultResponse>;
};
};
Expand All @@ -363,7 +363,7 @@ export async function upload(
id: string,
firstName: string,
lastName: string,
options: UploadOptionalParams
options: UploadOptionalParams,
): Promise<void>;

// Modular classical client layer
Expand All @@ -372,7 +372,7 @@ export class DemoServiceClient {
id: string,
firstName: string,
lastName: string,
options: UploadOptionalParams
options: UploadOptionalParams,
): Promise<void>;
}
```
Expand Down Expand Up @@ -458,7 +458,7 @@ export type DemoServiceContext = Client & {
firstName: string;
lastName: string;
};
} & RequestParameters
} & RequestParameters,
): StreamableMethod<PostUserDefaultResponse>;
};
};
Expand All @@ -468,7 +468,7 @@ export type DemoServiceContext = Client & {
export async function upload(
firstName: string,
lastName: string,
options: UploadOptionalParams
options: UploadOptionalParams,
): Promise<void>;

// Modular classical client layer
Expand Down Expand Up @@ -561,7 +561,7 @@ export type DemoServiceContext = Client & {
post(
options: {
body: User;
} & RequestParameters
} & RequestParameters,
): StreamableMethod<PostUserDefaultResponse>;
};
};
Expand Down Expand Up @@ -775,7 +775,7 @@ export type DemoServiceContext = Client & {
body: {
schema: string;
};
} & RequestParameters
} & RequestParameters,
): StreamableMethod<PostUserDefaultResponse>;
};
};
Expand All @@ -789,7 +789,7 @@ export interface Schema {
// Modular api layer
export async function register(
body: Schema,
options: GetBlobPropertiesOptionalParams
options: GetBlobPropertiesOptionalParams,
): Promise<void>;

// Modular classical client layer
Expand Down Expand Up @@ -901,12 +901,12 @@ export type WidgetServiceContext = Client & {
path: {
(
path: "/widgets/{widgetName}:scheduleRepairs",
widgetName: string
widgetName: string,
): {
post(
options: {
body: RepairInfo;
} & RequestParameters
} & RequestParameters,
): StreamableMethod<PostUserDefaultResponse>;
};
};
Expand All @@ -918,7 +918,7 @@ export async function scheduleRepairs(
widgetName: string,
problem: string,
contact: string,
options: ScheduleRepairsOptionalParams = { requestOptions: {} }
options: ScheduleRepairsOptionalParams = { requestOptions: {} },
): Promise<RepairResult>;

// Modular classical client layer
Expand All @@ -927,7 +927,7 @@ export class WidgetServiceClient {
widgetName: string,
problem: string,
contact: string,
options: ScheduleRepairsOptionalParams = { requestOptions: {} }
options: ScheduleRepairsOptionalParams = { requestOptions: {} },
): Promise<RepairResult>;
}
```
Expand Down Expand Up @@ -1070,12 +1070,12 @@ export type WidgetServiceContext = Client & {
path: {
(
path: "/widgets/{widgetName}:scheduleRepairs",
widgetName: string
widgetName: string,
): {
post(
options: {
body: RepairInfo;
} & RequestParameters
} & RequestParameters,
): StreamableMethod<PostUserDefaultResponse>;
};
};
Expand All @@ -1086,15 +1086,15 @@ export async function scheduleRepairs(
context: Client,
widgetName: string,
body: RepairInfo,
options: ScheduleRepairsOptionalParams = { requestOptions: {} }
options: ScheduleRepairsOptionalParams = { requestOptions: {} },
): Promise<RepairResult>;

// Modular classical client layer
export class WidgetServiceClient {
scheduleRepairs(
widgetName: string,
body: RepairInfo,
options: ScheduleRepairsOptionalParams = { requestOptions: {} }
options: ScheduleRepairsOptionalParams = { requestOptions: {} },
): Promise<RepairResult>;
}
```
Expand Down
4 changes: 2 additions & 2 deletions eng/scripts/check-for-changed-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ if (
if (process.argv[2] !== "publish") {
console.error(
`ERROR: Files above were changed during PR validation, but not included in the PR.
Include any automated changes such as sample output, spec.html, and ThirdPartyNotices.txt in your PR.`
Include any automated changes such as sample output, spec.html, and ThirdPartyNotices.txt in your PR.`,
);
} else {
console.error(
`ERROR: Changes have been made since this publish PR was prepared.
In the future, remember to alert coworkers to avoid merging additional changes while publish PRs are in progress.
Close this PR, run prepare-publish again.`
Close this PR, run prepare-publish again.`,
);
}
run("git", ["diff"], { cwd: coreRepoRoot });
Expand Down
2 changes: 1 addition & 1 deletion eng/scripts/generate-third-party-notices.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function main() {
const rootName = basename(root);
const packages = await findThirdPartyPackages();
const packageRoots = [...packages.keys()].sort((a, b) =>
packages.get(a).name.localeCompare(packages.get(b).name)
packages.get(a).name.localeCompare(packages.get(b).name),
);
let text = `${rootName}
Expand Down
Loading

0 comments on commit cdeb62c

Please sign in to comment.