Skip to content

chore: fix formatting with prettier #4087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,24 @@ or [Smithy TypeScript generator][smithy typescript repo], you should include
the generated code change to your PR. Here's how to generate clients:

1. Clone and checkout smithy-typescript repo
```
git clone https://github.com/awslabs/smithy-typescript.git && cd smithy-typescript
git checkout [working_branch]
```

```
git clone https://github.com/awslabs/smithy-typescript.git && cd smithy-typescript
git checkout [working_branch]
```

1. Build the local branch and publish locally:
```
./gradlew clean build publishToMavenLocal
```

```
./gradlew clean build publishToMavenLocal
```

1. Generate service clients in JavaScript SDK repo:
```
yarn generate-clients
```
`generate-clients` is a util script to facilitate the code generation. For more
information, please refer [codegen](./codegen/README.md)
```
yarn generate-clients
```
`generate-clients` is a util script to facilitate the code generation. For more
information, please refer [codegen](./codegen/README.md)

[issues]: https://github.com/aws/aws-sdk-js-v3/issues
[pr]: https://github.com/aws/aws-sdk-js-v3/pulls
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,17 @@ Lastly we have higher level libraries in `/lib`. These are javascript specific l

Certain command outputs include streams, which have different implementations in
Node.js and browsers. For convenience, a set of stream handling methods will be
merged (`Object.assign`) to the output stream object, as defined in
merged (`Object.assign`) to the output stream object, as defined in
[SdkStreamMixin](serde-code-url).

Output types having this feature will be indicated by the `WithSdkStreamMixin<T, StreamKey>`
[wrapper type](serde-code-url), where `T` is the original output type
and `StreamKey` is the output property key having a stream type specific to
and `StreamKey` is the output property key having a stream type specific to
the runtime environment.

[serde-code-url]: https://github.com/aws/aws-sdk-js-v3/blob/main/packages/types/src/serde.ts

Here is an example using `S3::GetObject`.
Here is an example using `S3::GetObject`.

```js
import { S3 } from "@aws-sdk/client-s3";
Expand All @@ -309,7 +309,7 @@ const getObjectResult = await client.getObject({
});

// env-specific stream with added mixin methods.
const bodyStream = getObjectResult.Body;
const bodyStream = getObjectResult.Body;

// one-time transform.
const bodyAsString = await bodyStream.transformToString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"override": 3100
}
},
"in-region": {
},
"in-region": {},
"cross-region": {
"connectTimeoutInMillis": {
"override": 3100
Expand Down Expand Up @@ -52,4 +51,4 @@
"tlsNegotiationTimeoutInMillis": "<p>The maximum amount of time that a TLS handshake is allowed to take from the time the CLIENT HELLO message is sent to ethe time the client and server have fully negotiated ciphers and exchanged keys</p>"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getEndpointFromRegion } from "./utils/getEndpointFromRegion";

export interface EndpointsInputConfig {
/**
* The fully qualified endpoint of the webservice. This is only required when using
* The fully qualified endpoint of the webservice. This is only required when using
* a custom endpoint (for example, when using a local version of S3).
*/
endpoint?: string | Endpoint | Provider<Endpoint>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ export const updateDiscoveredEndpointInCache = async (
resolve();
})
.catch((error: any) => {
// The cache entry must be deleted
// The cache entry must be deleted
// because a subsequent blocking request will be stuck
// in a waiting state if it sees the cache entry
// but we have already flushed the request queue.
// but we have already flushed the request queue.
endpointCache.delete(cacheKey);

const errorToThrow = Object.assign(
Expand Down
1 change: 0 additions & 1 deletion packages/middleware-endpoint/src/endpointMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { getEndpointFromInstructions } from "./adaptors/getEndpointFromInstructi
import { EndpointResolvedConfig } from "./resolveEndpointConfig";
import { EndpointParameterInstructions } from "./types";


/**
* @private
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/url-parser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { parseQueryString } from "@aws-sdk/querystring-parser";
import { Endpoint, QueryParameterBag, UrlParser } from "@aws-sdk/types";

export const parseUrl: UrlParser = (url: string | URL): Endpoint => {
if (typeof url === 'string') {
return parseUrl(new URL(url))
if (typeof url === "string") {
return parseUrl(new URL(url));
}
const { hostname, pathname, port, protocol, search } = url as URL;

Expand Down
8 changes: 4 additions & 4 deletions packages/xhr-http-handler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ handler.on(XhrHttpHandler.EVENTS.PROGRESS, (progress, request) => {
if (progress.lengthComputable) {
console.log(
progress.loaded, // bytes
progress.total, // bytes
progress.total // bytes
);
console.log(
request // contains the request information to differentiate
// requests from the same handler.
)
// requests from the same handler.
);
}
});

Expand Down Expand Up @@ -127,5 +127,5 @@ await client.send(new GetObjectCommand(/*...*/));
```

You can check the source `.ts` file or published `.d.ts` file
for the full list of events, or inspect the `XhrHttpHandler.EVENTS`
for the full list of events, or inspect the `XhrHttpHandler.EVENTS`
object at runtime.
2 changes: 1 addition & 1 deletion packages/xhr-http-handler/src/xhr-http-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type XhrHttpHandlerEvents = {
* differentiation of multiple concurrent request events.
*/
readonly PROGRESS: "xhr.progress";

/**
* Emitted for xhr.upload on progress.
* Payload is the native ProgressEvent and the HttpRequest to allow
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-clients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Prerequisite

* Node.js version >= 12.
* [Build and publish Smithy-TypeScript locally](https://github.com/awslabs/smithy-typescript#steps-to-build).
- Node.js version >= 12.
- [Build and publish Smithy-TypeScript locally](https://github.com/awslabs/smithy-typescript#steps-to-build).

## Options:

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/delete-stale-changesets.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports.deleteStaleChangesets = async (client, stackName) => {
);
}
}
} catch(e) {
} catch (e) {
// non-blocking throttling error, potentially.
console.error(e);
}
Expand Down