Skip to content
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

feat(type-safe-api): support python 3.13 and node 22 lambda runtimes #899

Merged
merged 2 commits into from
Dec 20, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class NodeRuntimeVersionUtils {
return "NODEJS_18_X";
case NodeVersion.NODE_20:
return "NODEJS_20_X";
case NodeVersion.NODE_22:
return "NODEJS_22_X";
default:
throw new Error(`Unsupported node runtime ${runtimeVersion}`);
}
Expand All @@ -75,6 +77,8 @@ class NodeRuntimeVersionUtils {
runtimeVersion: NodeVersion
): string => {
switch (runtimeVersion) {
case NodeVersion.NODE_22:
return "node22";
case NodeVersion.NODE_20:
return "node20";
case NodeVersion.NODE_18:
Expand All @@ -99,6 +103,8 @@ class PythonRuntimeVersionUtils {
return "PYTHON_3_11";
case PythonVersion.PYTHON_3_12:
return "PYTHON_3_12";
case PythonVersion.PYTHON_3_13:
return "PYTHON_3_13";
default:
throw new Error(`Unsupported python runtime ${runtimeVersion}`);
}
Expand Down Expand Up @@ -131,6 +137,8 @@ class PythonRuntimeVersionUtils {
runtimeVersion: PythonVersion
): string => {
switch (runtimeVersion) {
case PythonVersion.PYTHON_3_13:
return "3.13";
case PythonVersion.PYTHON_3_12:
return "3.12";
case PythonVersion.PYTHON_3_11:
Expand Down
2 changes: 2 additions & 0 deletions packages/type-safe-api/src/project/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export enum Language {
export enum NodeVersion {
NODE_18 = "NODE_18",
NODE_20 = "NODE_20",
NODE_22 = "NODE_22",
}

/**
Expand All @@ -33,6 +34,7 @@ export enum JavaVersion {
export enum PythonVersion {
PYTHON_3_11 = "PYTHON_3_11",
PYTHON_3_12 = "PYTHON_3_12",
PYTHON_3_13 = "PYTHON_3_13",
}

/**
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ describe("TypeScript ESM Generator Tests", () => {
"x-handlers-typescript-asset-path": "test/ts/dist",
"x-handlers-python-asset-path": "test/py/dist",
"x-handlers-java-asset-path": "test/java/dist",
"x-handlers-node-lambda-runtime-version": "NODEJS_20_X",
"x-handlers-python-lambda-runtime-version": "PYTHON_3_12",
"x-handlers-node-lambda-runtime-version": "NODEJS_22_X",
"x-handlers-python-lambda-runtime-version": "PYTHON_3_13",
"x-handlers-java-lambda-runtime-version": "JAVA_21",
}
)}'`,
Expand Down
Loading