Skip to content

Commit

Permalink
chore(deps-dev): bump prettier to 2.8.5 (#4549)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Mar 20, 2023
1 parent cb43993 commit 81e6cfe
Show file tree
Hide file tree
Showing 22 changed files with 49 additions and 47 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"lerna": "5.5.2",
"lint-staged": "^10.0.1",
"mocha": "10.0.0",
"prettier": "2.7.1",
"prettier": "2.8.5",
"puppeteer": "^5.1.0",
"rimraf": "3.0.2",
"ts-jest": "28.0.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import { AwsCredentialIdentityProvider } from "@aws-sdk/types";
* fromIni() provider. The source credential needs to be refreshed every time
* fromIni() is called.
*/
export const resolveCredentialSource = (credentialSource: string, profileName: string): AwsCredentialIdentityProvider => {
export const resolveCredentialSource = (
credentialSource: string,
profileName: string
): AwsCredentialIdentityProvider => {
const sourceProvidersMap: Record<string, () => AwsCredentialIdentityProvider> = {
EcsContainer: fromContainerMetadata,
Ec2InstanceMetadata: fromInstanceMetadata,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@ export interface ProcessProfile extends Profile {
}

export const isProcessProfile = (arg: any): arg is ProcessProfile =>
Boolean(arg) &&
typeof arg === "object" &&
typeof arg.credential_process === "string";
Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";

export const resolveProcessCredentials = async (
options: FromIniInit,
profile: string,
): Promise<Credentials> =>
export const resolveProcessCredentials = async (options: FromIniInit, profile: string): Promise<Credentials> =>
fromProcess({
...options,
profile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ describe(resolveSsoCredentials.name, () => {
sso_role_name: "mock_sso_role_name",
});

const getMockValidatedSsoProfile = <T>(add: T = {} as T) =>
({
sso_start_url: "mock_validated_sso_start_url",
sso_account_id: "mock_validated_sso_account_id",
sso_region: "mock_validated_sso_region",
sso_role_name: "mock_validated_sso_role_name",
...add,
});
const getMockValidatedSsoProfile = <T>(add: T = {} as T) => ({
sso_start_url: "mock_validated_sso_start_url",
sso_account_id: "mock_validated_sso_account_id",
sso_region: "mock_validated_sso_region",
sso_role_name: "mock_validated_sso_role_name",
...add,
});

afterEach(() => {
jest.clearAllMocks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { AwsCredentialIdentity } from "@aws-sdk/types";

import { ProcessCredentials } from "./ProcessCredentials";

export const getValidatedProcessCredentials = (profileName: string, data: ProcessCredentials): AwsCredentialIdentity => {
export const getValidatedProcessCredentials = (
profileName: string,
data: ProcessCredentials
): AwsCredentialIdentity => {
if (data.Version !== 1) {
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import { promisify } from "util";
import { getValidatedProcessCredentials } from "./getValidatedProcessCredentials";
import { ProcessCredentials } from "./ProcessCredentials";

export const resolveProcessCredentials = async (profileName: string, profiles: ParsedIniData): Promise<AwsCredentialIdentity> => {
export const resolveProcessCredentials = async (
profileName: string,
profiles: ParsedIniData
): Promise<AwsCredentialIdentity> => {
const profile = profiles[profileName];

if (profiles[profileName]) {
Expand Down
3 changes: 2 additions & 1 deletion packages/credential-providers/src/fromContainerMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ export interface RemoteProviderInit extends _RemoteProviderInit {}
* });
* ```
*/
export const fromContainerMetadata = (init?: RemoteProviderInit): AwsCredentialIdentityProvider => _fromContainerMetadata(init);
export const fromContainerMetadata = (init?: RemoteProviderInit): AwsCredentialIdentityProvider =>
_fromContainerMetadata(init);
3 changes: 2 additions & 1 deletion packages/credential-providers/src/fromInstanceMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ import { AwsCredentialIdentityProvider } from "@aws-sdk/types";
* });
* ```
*/
export const fromInstanceMetadata = (init?: _RemoteProviderInit): AwsCredentialIdentityProvider => _fromInstanceMetadata(init);
export const fromInstanceMetadata = (init?: _RemoteProviderInit): AwsCredentialIdentityProvider =>
_fromInstanceMetadata(init);
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CredentialsProviderError } from "@aws-sdk/property-provider";
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, Pluggable } from "@aws-sdk/types";

export interface FromTemporaryCredentialsOptions {
params: Omit<AssumeRoleCommandInput, "RoleSessionName"> & { RoleSessionName?: string; };
params: Omit<AssumeRoleCommandInput, "RoleSessionName"> & { RoleSessionName?: string };
masterCredentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
clientConfig?: STSClientConfig;
clientPlugins?: Pluggable<any, any>[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe(EventStreamPayloadHandler.name, () => {
eventSigner: expect.anything(),
});
});

it("should start piping to request payload through event signer if downstream middleware returns", async () => {
const authorization =
"AWS4-HMAC-SHA256 Credential=AKID/20200510/us-west-2/foo/aws4_request, SignedHeaders=host, Signature=1234567890";
Expand Down
2 changes: 1 addition & 1 deletion packages/middleware-endpoint-discovery/src/getCacheKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AwsCredentialIdentity, Provider } from "@aws-sdk/types";
*/
export const getCacheKey = async (
commandName: string,
config: { credentials: Provider<AwsCredentialIdentity>; },
config: { credentials: Provider<AwsCredentialIdentity> },
options: {
identifiers?: Record<string, string>;
}
Expand Down
1 change: 0 additions & 1 deletion packages/middleware-host-header/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe("hostHeaderMiddleware", () => {
expect(mockNextHandler.mock.calls[0][0].request.headers.host).toBe("foo.amazonaws.com");
});


it("should include port in host header when set", async () => {
expect.assertions(2);
const middleware = hostHeaderMiddleware({ requestHandler: {} as any });
Expand Down
4 changes: 3 additions & 1 deletion packages/middleware-token/src/normalizeTokenProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ const isTokenWithExpiry = (token: TokenIdentity) => token.expiration !== undefin
const isTokenExpiringWithinFiveMins = (token: TokenIdentity) =>
isTokenWithExpiry(token) && token.expiration!.getTime() - Date.now() < 300000;

export const normalizeTokenProvider = (token: TokenIdentity | TokenIdentityProvider): MemoizedProvider<TokenIdentity> => {
export const normalizeTokenProvider = (
token: TokenIdentity | TokenIdentityProvider
): MemoizedProvider<TokenIdentity> => {
if (typeof token === "function") {
return memoize(token, isTokenExpiringWithinFiveMins, isTokenWithExpiry);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/checksum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ export interface Checksum {
* lexical scope of the constructor.
*/
export interface ChecksumConstructor {
new(secret?: SourceData): Checksum;
new (secret?: SourceData): Checksum;
}
2 changes: 1 addition & 1 deletion packages/types/src/credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Provider } from "./util";
*
* @deprecated Use {@link AwsCredentialIdentity}
*/
export interface Credentials extends AwsCredentialIdentity { }
export interface Credentials extends AwsCredentialIdentity {}

/**
* @public
Expand Down
10 changes: 5 additions & 5 deletions packages/types/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ export interface SerializeHandlerArguments<Input extends object> extends Initial
/**
* @public
*/
export interface SerializeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> { }
export interface SerializeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {}

/**
* @public
*/
export interface BuildHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> { }
export interface BuildHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {}

/**
* @public
*/
export interface BuildHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> { }
export interface BuildHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {}

/**
* @public
Expand All @@ -64,12 +64,12 @@ export interface FinalizeHandlerArguments<Input extends object> extends Serializ
/**
* @public
*/
export interface FinalizeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> { }
export interface FinalizeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {}

/**
* @public
*/
export interface DeserializeHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> { }
export interface DeserializeHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {}

/**
* @public
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type IniSection = Record<string, string | undefined>;
*
* @deprecated Please use {@link IniSection}
*/
export interface Profile extends IniSection { }
export interface Profile extends IniSection {}

/**
* @public
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/serde.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ declare global {
/**
* @public
*/
export interface ReadableStream { }
export interface ReadableStream {}
/**
* @public
*/
export interface Blob { }
export interface Blob {}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Provider } from "./util";
*
* @deprecated Use {@link TokenIdentity}
*/
export interface Token extends TokenIdentity { }
export interface Token extends TokenIdentity {}

/**
* @public
Expand Down
6 changes: 1 addition & 5 deletions packages/types/src/util.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { Endpoint } from "./http";
import {
FinalizeHandler,
FinalizeHandlerArguments,
FinalizeHandlerOutput,
} from "./middleware";
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware";
import { MetadataBearer } from "./response";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/util-waiter/src/waiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { WaiterConfiguration as WaiterConfiguration__ } from "@aws-sdk/types";
/**
* @internal
*/
export interface WaiterConfiguration<T> extends WaiterConfiguration__<T> { }
export interface WaiterConfiguration<T> extends WaiterConfiguration__<T> {}

/**
* @internal
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9530,10 +9530,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier@2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
prettier@2.8.5:
version "2.8.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.5.tgz#3dd8ae1ebddc4f6aa419c9b64d8c8319a7e0d982"
integrity sha512-3gzuxrHbKUePRBB4ZeU08VNkUcqEHaUaouNt0m7LGP4Hti/NuB07C7PPTM/LkWqXoJYJn2McEo5+kxPNrtQkLQ==

prettier@^2.0.4:
version "2.8.3"
Expand Down

0 comments on commit 81e6cfe

Please sign in to comment.