From 1eca23e9a25a87733870c2b29209864cfd48edde Mon Sep 17 00:00:00 2001 From: Alex Forsyth Date: Thu, 22 Oct 2020 12:39:13 -0400 Subject: [PATCH 1/2] fix: not all services support empty starting pagination token --- .../amazon/smithy/typescript/codegen/PaginationGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/PaginationGenerator.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/PaginationGenerator.java index c446fe7a573..3937497d5ba 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/PaginationGenerator.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/PaginationGenerator.java @@ -137,7 +137,7 @@ private void writePager() { writer.openBlock( "export async function* $LPaginate(config: $L, input: $L, ...additionalArguments: any): Paginator<$L>{", "}", methodName, paginationType, inputTypeName, outputTypeName, () -> { - writer.write("let token: string | undefined = config.startingToken || '';"); + writer.write("let token: string | undefined = config.startingToken || undefined;"); writer.write("let hasNext = true;"); writer.write("let page: $L;", outputTypeName); From 50b729a250f35386bcf035a6a849cb4defcb83ea Mon Sep 17 00:00:00 2001 From: Alex Forsyth Date: Mon, 2 Nov 2020 12:30:22 -0500 Subject: [PATCH 2/2] fix(package.json): migrate aws-sdk types into devDependencies --- .../amazon/smithy/typescript/codegen/TypeScriptDependency.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDependency.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDependency.java index f9211a833db..a7d6acb0537 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDependency.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDependency.java @@ -29,7 +29,7 @@ public enum TypeScriptDependency implements SymbolDependencyContainer { AWS_SDK_CLIENT_DOCGEN("devDependencies", "@aws-sdk/client-documentation-generator", "1.0.0-rc.0", true), - AWS_SDK_TYPES("dependencies", "@aws-sdk/types", "1.0.0-rc.0", true), + AWS_SDK_TYPES("devDependencies", "@aws-sdk/types", "1.0.0-rc.0", true), AWS_SMITHY_CLIENT("dependencies", "@aws-sdk/smithy-client", "1.0.0-rc.0", true), INVALID_DEPENDENCY("dependencies", "@aws-sdk/invalid-dependency", "1.0.0-rc.0", true), CONFIG_RESOLVER("dependencies", "@aws-sdk/config-resolver", "1.0.0-rc.0", true),