Skip to content
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
4 changes: 2 additions & 2 deletions packages/parameters/src/appconfig/AppConfigProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ class AppConfigProvider extends BaseProvider {
{ value: string; expiration: number }
>();
protected valueStore = new Map<string, Uint8Array>();
private application?: string;
private environment: string;
private readonly application?: string;
private readonly environment: string;

/**
* It initializes the AppConfigProvider class.
Expand Down
2 changes: 1 addition & 1 deletion packages/parameters/src/base/BaseProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ abstract class BaseProvider implements BaseProviderInterface {
public async get(
name: string,
options?: GetOptionsInterface
): Promise<unknown | undefined> {
): Promise<unknown> {
const configs = new GetOptions(options);
const key = [name, configs.transform].toString();

Expand Down
6 changes: 2 additions & 4 deletions packages/parameters/src/dynamodb/DynamoDBProvider.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import type { JSONValue } from '@aws-lambda-powertools/commons/types';
import type {
GetItemCommandInput,
QueryCommandInput,
} from '@aws-sdk/client-dynamodb';
import {
DynamoDBClient,
type DynamoDBPaginationConfiguration,
GetItemCommand,
type GetItemCommandInput,
paginateQuery,
type QueryCommandInput,
} from '@aws-sdk/client-dynamodb';
import { marshall, unmarshall } from '@aws-sdk/util-dynamodb';
import { BaseProvider } from '../base/BaseProvider.js';
Expand Down
4 changes: 2 additions & 2 deletions packages/parameters/src/ssm/SSMProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ class SSMProvider extends BaseProvider {
* @param {boolean} throwOnError - Whether to throw an error if any of the parameters' retrieval throws an error or handle them gracefully
*/
protected static handleAnyInvalidGetParameterErrors(
result: GetParametersCommandOutput,
result: Partial<GetParametersCommandOutput>,
throwOnError: boolean
): string[] {
const errors: string[] = [];
Expand Down Expand Up @@ -920,7 +920,7 @@ class SSMProvider extends BaseProvider {
* @param {boolean} throwOnError - Whether to throw an error if any of the parameters' retrieval throws an error or handle them gracefully
*/
protected transformAndCacheGetParametersResponse(
response: GetParametersCommandOutput,
response: Partial<GetParametersCommandOutput>,
parameters: Record<string, SSMGetParametersByNameOptions>,
throwOnError: boolean
): Record<string, unknown> {
Expand Down
2 changes: 1 addition & 1 deletion packages/parameters/tests/helpers/tinyLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Console } from 'node:console';
* the function code is working as expected.
*/
export class TinyLogger {
private console = new Console({
private readonly console: Console = new Console({
stdout: process.stdout,
stderr: process.stderr,
});
Expand Down
4 changes: 2 additions & 2 deletions packages/parameters/tests/unit/BaseProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TestProvider extends BaseProvider {
public constructor() {
super({
awsSdkV3ClientPrototype: class {
#name = 'TestProvider';
readonly #name: string = 'TestProvider';

public hello(): string {
return this.#name;
Expand Down Expand Up @@ -412,7 +412,7 @@ describe('Class: BaseProvider', () => {
// Act & Assess
await expect(
provider.getMultiple('my-path', {
// @ts-ignore - we want to test an unexpected runtime error
// @ts-expect-error - we want to test an unexpected runtime error
transform: 1,
throwOnTransformError: true,
})
Expand Down
4 changes: 2 additions & 2 deletions packages/parameters/tests/unit/SSMProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ describe('Class: SSMProvider', () => {
throwOnError: boolean
): string[] {
return SSMProvider.handleAnyInvalidGetParameterErrors(
result as GetParametersCommandOutput,
result,
throwOnError
);
}
Expand Down Expand Up @@ -1232,7 +1232,7 @@ describe('Class: SSMProvider', () => {
throwOnError: boolean
): Record<string, unknown> {
return super.transformAndCacheGetParametersResponse(
response as GetParametersCommandOutput,
response,
parameters,
throwOnError
);
Expand Down
Loading