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: Add nodejs22.x support #513

Merged
merged 29 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5509e79
feat: Add nodejs22.x support
hnnasit Oct 21, 2024
c6989e9
chore: update comments
hnnasit Oct 21, 2024
d0493b7
Merge branch 'master' into nodejs22-support
hnnasit Nov 16, 2024
38506b6
Fix gql app tests and bump happy-dom version
hnnasit Nov 16, 2024
838ee01
Update nodejs22.x/cw-event/README.md
hnnasit Nov 20, 2024
ca97987
Update nodejs22.x/full-stack/README.md
hnnasit Nov 20, 2024
b4e2da7
Update nodejs22.x/full-stack/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
04fd321
Update nodejs22.x/cw-event/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
963f22c
Update nodejs22.x/hello-img/README.md
hnnasit Nov 20, 2024
afbb784
Update nodejs22.x/hello-img/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
24a8548
Update nodejs22.x/sqs/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
acce2fa
Update nodejs22.x/step-func/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
7ff3886
Update nodejs22.x/step-func/README.md
hnnasit Nov 20, 2024
63f4c6e
Update nodejs22.x/web/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
4a34e8e
Update nodejs22.x/web/README.md
hnnasit Nov 20, 2024
2b2b1aa
Update nodejs22.x/hello-ts-pt/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
c6ce79e
Update nodejs22.x/hello-ts/README.md
hnnasit Nov 20, 2024
33962c6
Update nodejs22.x/hello-ts/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
7210673
Update nodejs22.x/sqs/README.md
hnnasit Nov 20, 2024
0995ee8
Update nodejs22.x/hello/README.md
hnnasit Nov 20, 2024
59b1167
Update nodejs22.x/sns/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
fbc76a0
Update nodejs22.x/hello/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
4262644
Update nodejs22.x/response-streaming/README.md
hnnasit Nov 20, 2024
da49718
Update nodejs22.x/sns/README.md
hnnasit Nov 20, 2024
cc38b2a
Update nodejs22.x/response-streaming/{{cookiecutter.project_name}}/RE…
hnnasit Nov 20, 2024
956a1c5
Update nodejs22.x/s3/README.md
hnnasit Nov 20, 2024
a08bdf7
Update nodejs22.x/s3/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
e4f7b90
Update nodejs22.x/scratch/{{cookiecutter.project_name}}/README.md
hnnasit Nov 20, 2024
51bfcd3
Update nodejs22.x/scratch/README.md
hnnasit Nov 20, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/build_test_invoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ jobs:
- version: '20'
type: 'Invoke'
file: 'tests/integration/build_invoke/node/test_node_20.py'
- version: '22'
type: 'Test'
file: 'tests/integration/unit_test/test_unit_test_nodejs22_x.py'
- version: '22'
type: 'Invoke'
file: 'tests/integration/build_invoke/node/test_node_22.py'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
116 changes: 116 additions & 0 deletions manifest-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,122 @@
"useCaseName": "Hello World Example"
}
],
"nodejs22.x": [
{
"directory": "nodejs22.x/hello",
"displayName": "Hello World Example",
"dependencyManager": "npm",
"appTemplate": "hello-world",
"packageType": "Zip",
"useCaseName": "Hello World Example"
},
{
"directory": "nodejs22.x/hello-gql",
"displayName": "GraphQLApi Hello World Example",
"dependencyManager": "npm",
"appTemplate": "graphql-api-sample-app",
"packageType": "Zip",
"useCaseName": "GraphQLApi Hello World Example"
},
{
"directory": "nodejs22.x/hello-ts",
"displayName": "Hello World Example TypeScript",
"dependencyManager": "npm",
"appTemplate": "hello-world-typescript",
"packageType": "Zip",
"useCaseName": "Hello World Example"
},
{
"directory": "nodejs22.x/hello-ts-pt",
"displayName": "Hello World Example TypeScript With Powertools for AWS Lambda",
"dependencyManager": "npm",
"appTemplate": "hello-world-powertools-typescript",
"packageType": "Zip",
"useCaseName": "Hello World Example with Powertools for AWS Lambda"
},
{
"directory": "nodejs22.x/step-func",
"displayName": "Step Functions Sample App (Stock Trader)",
"dependencyManager": "npm",
"appTemplate": "step-functions-sample-app",
"packageType": "Zip",
"useCaseName": "Multi-step workflow"
},
{
"directory": "nodejs22.x/scratch",
"displayName": "Quick Start: From Scratch",
"dependencyManager": "npm",
"appTemplate": "quick-start-from-scratch",
"packageType": "Zip",
"useCaseName": "Standalone function"
},
{
"directory": "nodejs22.x/cw-event",
"displayName": "Quick Start: Scheduled Events",
"dependencyManager": "npm",
"appTemplate": "quick-start-cloudwatch-events",
"packageType": "Zip",
"useCaseName": "Scheduled task"
},
{
"directory": "nodejs22.x/s3",
"displayName": "Quick Start: S3",
"dependencyManager": "npm",
"appTemplate": "quick-start-s3",
"packageType": "Zip",
"useCaseName": "Data processing"
},
{
"directory": "nodejs22.x/sns",
"displayName": "Quick Start: SNS",
"dependencyManager": "npm",
"appTemplate": "quick-start-sns",
"packageType": "Zip",
"useCaseName": "Data processing"
},
{
"directory": "nodejs22.x/sqs",
"displayName": "Quick Start: SQS",
"dependencyManager": "npm",
"appTemplate": "quick-start-sqs",
"packageType": "Zip",
"useCaseName": "Data processing"
},
{
"directory": "nodejs22.x/web",
"displayName": "Quick Start: Web Backend",
"dependencyManager": "npm",
"appTemplate": "quick-start-web",
"packageType": "Zip",
"useCaseName": "Serverless API"
},
{
"directory": "nodejs22.x/full-stack",
"displayName": "Quick Start: Full Stack Application",
"dependencyManager": "npm",
"appTemplate": "quick-start-full-stack",
"packageType": "Zip",
"useCaseName": "Full Stack"
},
{
"directory": "nodejs22.x/response-streaming",
"displayName": "Lambda function using Response Streaming",
"dependencyManager": "npm",
"appTemplate": "response-streaming",
"packageType": "Zip",
"useCaseName": "Lambda Response Streaming"
}
],
"amazon/nodejs22.x-base": [
{
"directory": "nodejs22.x/hello-img",
"displayName": "Hello World Image Example",
"dependencyManager": "npm",
"appTemplate": "hello-world-lambda-image",
"packageType": "Image",
"useCaseName": "Hello World Example"
}
],
"python3.8": [
{
"directory": "python3.8/hello",
Expand Down
229 changes: 229 additions & 0 deletions nodejs22.x/cw-event/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@

# Created by https://www.toptal.com/developers/gitignore/api/osx,linux,python,windows,sam
# Edit at https://www.toptal.com/developers/gitignore?templates=osx,linux,python,windows,sam

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### OSX ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
doc/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
#poetry.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
# .env
.env/
.venv/
env/
venv/
ENV/
env.bak/
venv.bak/
pythonenv*

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# operating system-related files
# file properties cache/storage on macOS
*.DS_Store
# thumbnail cache on Windows
Thumbs.db

# profiling data
.prof


### SAM ###
# Ignore build directories for the AWS Serverless Application Model (SAM)
# Info: https://aws.amazon.com/serverless/sam/
# Docs: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-reference.html

**/.aws-sam

### Windows ###
# Windows thumbnail cache files
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/osx,linux,python,windows,sam
Expand Down
20 changes: 20 additions & 0 deletions nodejs22.x/cw-event/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Cookiecutter NodeJS CloudWatch Events Quick Start Application

A cookiecutter template to create a NodeJS CloudWatch Events Quick Start Application using [Serverless Application Model (SAM)](https://github.com/awslabs/serverless-application-model).

## Requirements

* [AWS SAM CLI](https://github.com/awslabs/aws-sam-cli)

## Usage

Generate a boilerplate template in your current project directory using the following syntax:

* **NodeJS 20**: `sam init --runtime nodejs22.x --app-template quick-start-cloudwatch-events --name cwe-app`
hnnasit marked this conversation as resolved.
Show resolved Hide resolved

> **NOTE**: ``--name`` allows you to specify a different project folder name

# Credits

* This project has been generated with [Cookiecutter](https://github.com/audreyr/cookiecutter)

10 changes: 10 additions & 0 deletions nodejs22.x/cw-event/cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"project_name": "Name of the project",
"runtime": "nodejs22.x",
"architectures": {
"value": ["x86_64", "arm64"]
},
"_copy_without_render": [
".gitignore"
]
}
Loading
Loading