Skip to content

Commit

Permalink
Bump compiler version to v0.47.0 & Bump the emitter version (#1968)
Browse files Browse the repository at this point in the history
* Bump the tsp compiler version

* Upgrade the cadl-ranch version

* Update pnpm-lock

* Update the CHANGELOG.md

* Regeneate code after upgrading

* Update the autorest rlc lro test case

* Regenerate with latest cadl-ranch
  • Loading branch information
MaryGao authored Aug 15, 2023
1 parent e3cc0f4 commit 523ef99
Show file tree
Hide file tree
Showing 41 changed files with 493 additions and 450 deletions.
323 changes: 162 additions & 161 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions packages/autorest.typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 6.0.8 (2023-08-15)

- [Feature] Support custom http authentication in RLC, Please refer to pr [#1959](https://github.com/Azure/autorest.typescript/pull/1959).
- [Feature] Add ts-node to dev dependencies, Please refer to pr [#1953](https://github.com/Azure/autorest.typescript/pull/1953).
- [Feature] Allow to generate code under sources folder for typespec input, Please refer to pr [#1960](https://github.com/Azure/autorest.typescript/pull/1960).
- [Feature] Generate metadata and testing files if relevant files are absent for typespec input, Please refer to pr [#1967](https://github.com/Azure/autorest.typescript/pull/1967).
- [Bugfix] Fix some issues found in latest OpenAI typespec, Please refer to issue [#1941](https://github.com/Azure/autorest.typescript/issues/1941).

## 6.0.7 (2023-07-26)

- [Feature] Uprage M4 to v4.26.2, Please refer to pr [#1930](https://github.com/Azure/autorest.typescript/pull/1930).
Expand Down
4 changes: 2 additions & 2 deletions packages/autorest.typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/typescript",
"version": "6.0.7",
"version": "6.0.8",
"scripts": {
"build": "tsc -p . && npm run copyFiles",
"build:test:browser": "tsc -p tsconfig.browser-test.json && webpack --config webpack.config.test.js",
Expand Down Expand Up @@ -74,7 +74,7 @@
"source-map-support": "^0.5.16",
"ts-morph": "^15.1.0",
"@azure/core-auth": "^1.3.2",
"@azure-tools/rlc-common": "workspace:^0.14.0"
"@azure-tools/rlc-common": "workspace:^0.15.0"
},
"devDependencies": {
"@azure-tools/test-recorder": "^3.0.0",
Expand Down
18 changes: 7 additions & 11 deletions packages/autorest.typescript/test/rlcIntegration/lroRest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,14 @@ describe("LRO Rest Client", () => {
.path("/lro/put/201/created/failed/200")
.put();

const poller = await getLongRunningPoller(client, initialResponse, {
intervalInMs: 0
});

const response = await poller.pollUntilDone();
if (isUnexpected(response)) {
const error = `Unexpected status code ${response.status}`;
assert.fail(error);
try {
await getLongRunningPoller(client, initialResponse, {
intervalInMs: 0,
resolveOnUnsuccessful: false
});
} catch (e) {
assert.equal(e.message, "The long-running operation has failed");
}
assert.equal(poller.getOperationState().status, "failed");
assert.equal(response.status, "200");
assert.deepEqual(response.body.properties?.provisioningState, "Failed");
});
});

Expand Down
9 changes: 9 additions & 0 deletions packages/rlc-common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 0.15.0 (2023-08-15)

- [Feature] Support custom http authentication in RLC, Please refer to pr [#1959](https://github.com/Azure/autorest.typescript/pull/1959).
- [Feature] Add ts-node to dev dependencies, Please refer to pr [#1953](https://github.com/Azure/autorest.typescript/pull/1953).
- [Feature] Allow to generate code under sources folder for typespec input, Please refer to pr [#1960](https://github.com/Azure/autorest.typescript/pull/1960).
- [Feature] Generate metadata and testing files if relevant files are absent for typespec input, Please refer to pr [#1967](https://github.com/Azure/autorest.typescript/pull/1967).
- [Feature] Add converter for uint8array map to string in modular, Please refer to pr [#1934](https://github.com/Azure/autorest.typescript/pull/1934).
- [Bugfix] Fix some issues found in latest OpenAI typespec, Please refer to issue [#1941](https://github.com/Azure/autorest.typescript/issues/1941).

## 0.14.0 (2023-07-26)

- [Feature] Support multi-client in Modular, Please refer to pr [#1830](https://github.com/Azure/autorest.typescript/pull/1830).
Expand Down
2 changes: 1 addition & 1 deletion packages/rlc-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/rlc-common",
"version": "0.14.0",
"version": "0.15.0",
"description": "",
"type": "module",
"main": "dist/index.js",
Expand Down
22 changes: 11 additions & 11 deletions packages/typespec-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"version": "1.0.0",
"type": "module",
"dependencies": {
"@typespec/compiler": ">=0.46.0 <1.0.0",
"@azure-tools/typespec-ts": "workspace:^0.14.0",
"@typespec/http": ">=0.46.0 <1.0.0",
"@typespec/rest": ">=0.46.0 <1.0.0",
"@typespec/openapi": ">=0.46.0 <1.0.0",
"@typespec/versioning": ">=0.46.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.32.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.32.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.32.0 <1.0.0",
"@typespec/openapi3": ">=0.46.0 <1.0.0",
"@typespec/prettier-plugin-typespec": ">=0.46.0 <1.0.0",
"@typespec/compiler": ">=0.47.0 <1.0.0",
"@azure-tools/typespec-ts": "workspace:^0.15.0",
"@typespec/http": ">=0.47.0 <1.0.0",
"@typespec/rest": ">=0.47.0 <1.0.0",
"@typespec/openapi": ">=0.47.0 <1.0.0",
"@typespec/versioning": ">=0.47.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.33.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.33.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.33.0 <1.0.0",
"@typespec/openapi3": ">=0.47.0 <1.0.0",
"@typespec/prettier-plugin-typespec": ">=0.47.0 <1.0.0",
"prettier": "2.7.1"
},
"devDependencies": {
Expand Down
110 changes: 62 additions & 48 deletions packages/typespec-test/test/authoring/generated/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,7 @@
"200": {
"description": "The request has succeeded.",
"schema": {
"type": "object",
"description": "Paged collection of Project items",
"properties": {
"value": {
"type": "array",
"description": "The Project items on this page",
"items": {
"$ref": "#/definitions/Project"
},
"x-ms-identifiers": []
},
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
}
},
"required": [
"value"
]
"$ref": "#/definitions/PagedProject"
}
},
"default": {
Expand Down Expand Up @@ -201,7 +182,8 @@
}
}
}
}
},
"x-ms-long-running-operation": true
},
"delete": {
"operationId": "Projects_Delete",
Expand Down Expand Up @@ -263,7 +245,8 @@
}
}
}
}
},
"x-ms-long-running-operation": true
}
},
"/authoring/analyze-text/projects/{projectName}:export": {
Expand Down Expand Up @@ -308,7 +291,8 @@
}
}
}
}
},
"x-ms-long-running-operation": true
}
},
"/authoring/analyze-text/projects/{projectName}:importx": {
Expand Down Expand Up @@ -350,7 +334,8 @@
}
}
}
}
},
"x-ms-long-running-operation": true
}
},
"/authoring/analyze-text/projects/{projectName}:train": {
Expand Down Expand Up @@ -401,7 +386,8 @@
}
}
}
}
},
"x-ms-long-running-operation": true
}
},
"/authoring/analyze-text/projects/{projectName}/deployments": {
Expand All @@ -424,26 +410,7 @@
"200": {
"description": "The request has succeeded.",
"schema": {
"type": "object",
"description": "Paged collection of Deployment items",
"properties": {
"value": {
"type": "array",
"description": "The Deployment items on this page",
"items": {
"$ref": "#/definitions/Deployment"
},
"x-ms-identifiers": []
},
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
}
},
"required": [
"value"
]
"$ref": "#/definitions/PagedDeployment"
}
},
"default": {
Expand Down Expand Up @@ -578,7 +545,8 @@
}
}
}
}
},
"x-ms-long-running-operation": true
},
"delete": {
"operationId": "Deployments_DeleteDeployment",
Expand Down Expand Up @@ -647,7 +615,8 @@
}
}
}
}
},
"x-ms-long-running-operation": true
}
},
"/authoring/analyze-text/projects/{projectName}/deployments/{deploymentName}/jobs/{jobId}": {
Expand Down Expand Up @@ -796,7 +765,8 @@
}
}
}
}
},
"x-ms-long-running-operation": true
}
},
"/authoring/analyze-text/projects/global/languages": {
Expand Down Expand Up @@ -1154,6 +1124,50 @@
"message"
]
},
"PagedDeployment": {
"type": "object",
"description": "Paged collection of Deployment items",
"properties": {
"value": {
"type": "array",
"description": "The Deployment items on this page",
"items": {
"$ref": "#/definitions/Deployment"
},
"x-ms-identifiers": []
},
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
}
},
"required": [
"value"
]
},
"PagedProject": {
"type": "object",
"description": "Paged collection of Project items",
"properties": {
"value": {
"type": "array",
"description": "The Project items on this page",
"items": {
"$ref": "#/definitions/Project"
},
"x-ms-identifiers": []
},
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
}
},
"required": [
"value"
]
},
"PagedSupportedLanguage": {
"type": "object",
"description": "A collection of SupportedLanguage resources.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ export interface DeploymentJobOutput {
warnings: Array<JobWarningOutput>;
}

// @public
export type DeploymentListOutput = Paged<DeploymentOutput>;

// @public
export interface DeploymentOutput {
readonly name: string;
Expand Down Expand Up @@ -624,7 +621,7 @@ export interface ListDeployments {
// @public
export interface ListDeployments200Response extends HttpResponse {
// (undocumented)
body: DeploymentListOutput;
body: PagedDeploymentOutput;
// (undocumented)
status: "200";
}
Expand Down Expand Up @@ -655,7 +652,7 @@ export interface ListProjects {
// @public
export interface ListProjects200Response extends HttpResponse {
// (undocumented)
body: ProjectListOutput;
body: PagedProjectOutput;
// (undocumented)
status: "200";
}
Expand Down Expand Up @@ -729,6 +726,12 @@ export interface OperationStatusOutput {
status: string;
}

// @public
export type PagedDeploymentOutput = Paged<DeploymentOutput>;

// @public
export type PagedProjectOutput = Paged<ProjectOutput>;

// @public
export type PagedSupportedLanguageOutput = Paged<SupportedLanguageOutput>;

Expand Down Expand Up @@ -760,9 +763,6 @@ export interface Project {
storageInputContainerName: string;
}

// @public
export type ProjectListOutput = Paged<ProjectOutput>;

// @public
export interface ProjectOutput {
readonly createdDateTime: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ export interface TrainingConfigVersionOutput {
}

/** Paged collection of Project items */
export type ProjectListOutput = Paged<ProjectOutput>;
export type PagedProjectOutput = Paged<ProjectOutput>;
/** Paged collection of Deployment items */
export type DeploymentListOutput = Paged<DeploymentOutput>;
export type PagedDeploymentOutput = Paged<DeploymentOutput>;
/** A collection of SupportedLanguage resources. */
export type PagedSupportedLanguageOutput = Paged<SupportedLanguageOutput>;
/** A collection of TrainingConfigVersion resources. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { HttpResponse, ErrorResponse } from "@azure-rest/core-client";
import {
ProjectOutput,
OperationStatusOutput,
ProjectListOutput,
PagedProjectOutput,
DeploymentOutput,
DeploymentListOutput,
PagedDeploymentOutput,
DeploymentJobOutput,
SwapDeploymentsJobOutput,
PagedSupportedLanguageOutput,
Expand Down Expand Up @@ -105,7 +105,7 @@ export interface DeleteLogicalResponse extends HttpResponse {
/** The request has succeeded. */
export interface ListProjects200Response extends HttpResponse {
status: "200";
body: ProjectListOutput;
body: PagedProjectOutput;
}

export interface ListProjectsDefaultHeaders {
Expand Down Expand Up @@ -290,7 +290,7 @@ export interface DeleteDeploymentLogicalResponse extends HttpResponse {
/** The request has succeeded. */
export interface ListDeployments200Response extends HttpResponse {
status: "200";
body: DeploymentListOutput;
body: PagedDeploymentOutput;
}

export interface ListDeploymentsDefaultHeaders {
Expand Down
Loading

0 comments on commit 523ef99

Please sign in to comment.