Skip to content

Commit

Permalink
[core] fix js - core build (Azure#32277)
Browse files Browse the repository at this point in the history
Document Intelligence bumping its `typescript` dev dependency version to
~5.7.2, and caused some other packages to also use ~5.7.2. This leads to
the
build error in ts-http-runtime, where newer version of lib.dom.d.ts
expects
`bytes` property in `File` type.

`bytes` property was added previously in PR
Azure#31990, but got removed in
PR
Azure#31627 maybe due to bad
merge?

It also seems to be a pnpm or rush bug that the pnpm-lock.yaml file have
[email protected] for other packages that depends on ~5.6.2, for example,
ts-http-runtime:


https://github.com/Azure/azure-sdk-for-js/blob/8a7d4e90ac3795b0494653eb04cebd6bc0f3213d/common/config/rush/pnpm-lock.yaml#L19848

This also results in api.md changes for RestError's `[custom]` logging
method.

While we investigate further into that, this PR should restore
js - core pipeline to green status.
  • Loading branch information
jeremymeng authored Dec 17, 2024
1 parent 708295a commit 1cad81e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 2 additions & 0 deletions sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ export type RequestBodyType = NodeJS.ReadableStream | (() => NodeJS.ReadableStre
// @public
export class RestError extends Error {
constructor(message: string, options?: RestErrorOptions);
// (undocumented)
[x: symbol]: () => string;
code?: string;
details?: unknown;
static readonly PARSE_ERROR: string;
Expand Down
12 changes: 1 addition & 11 deletions sdk/core/ts-http-runtime/review/azure-core-comparison.diff
Original file line number Diff line number Diff line change
Expand Up @@ -2951,7 +2951,7 @@ index 25cf55a..685eaed 100644

/**
diff --git a/src/util/file.ts b/src/util/file.ts
index 48d09e6..73d19de 100644
index 48d09e6..65c0e25 100644
--- a/src/util/file.ts
+++ b/src/util/file.ts
@@ -1,7 +1,7 @@
Expand All @@ -2963,16 +2963,6 @@ index 48d09e6..73d19de 100644
import { isNodeReadableStream } from "./typeGuards.js";

/**
@@ -42,9 +42,6 @@ const unimplementedMethods = {
arrayBuffer: () => {
throw new Error("Not implemented");
},
- bytes: () => {
- throw new Error("Not implemented");
- },
slice: () => {
throw new Error("Not implemented");
},
diff --git a/src/util/helpers.ts b/src/util/helpers.ts
index f6819e8..7272d5d 100644
--- a/src/util/helpers.ts
Expand Down
2 changes: 2 additions & 0 deletions sdk/core/ts-http-runtime/review/ts-http-runtime.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ export interface ResourceMethods<TResponse = PromiseLike<PathUncheckedResponse>>
// @public
export class RestError extends Error {
constructor(message: string, options?: RestErrorOptions);
// (undocumented)
[x: symbol]: () => string;
code?: string;
details?: unknown;
static readonly PARSE_ERROR: string;
Expand Down
3 changes: 3 additions & 0 deletions sdk/core/ts-http-runtime/src/util/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const unimplementedMethods = {
arrayBuffer: () => {
throw new Error("Not implemented");
},
bytes: () => {
throw new Error("Not implemented");
},
slice: () => {
throw new Error("Not implemented");
},
Expand Down

0 comments on commit 1cad81e

Please sign in to comment.