Skip to content

Commit

Permalink
Add nodejs20.x support (#67) (#569)
Browse files Browse the repository at this point in the history
* Add nodejs20.x support

* fix: Fix missing encoding when logging from Makefile (#535)

* Fix missing encoding when logging from Makefile

* Add comment explaining why stderr

* Undo testing code

* Version bump to 1.37.0 (#537)

* Support PEP 600 platform tags for arm64 (#536)



* chore(deps-dev): bump ruff from 0.0.284 to 0.0.287 in /requirements (#539)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.284 to 0.0.287.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](astral-sh/ruff@v0.0.284...v0.0.287)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...




* chore(deps): bump actions/checkout from 3 to 4 (#538)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...




* chore(deps-dev): bump black from 23.3.0 to 23.7.0 in /requirements (#534)

* chore(deps-dev): bump black from 23.3.0 to 23.7.0 in /requirements

Bumps [black](https://github.com/psf/black) from 23.3.0 to 23.7.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.3.0...23.7.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...



* Update requirements/dev.txt

---------





* chore(deps-dev): bump black from 23.7.0 to 23.9.1 in /requirements (#543)

Bumps [black](https://github.com/psf/black) from 23.7.0 to 23.9.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.7.0...23.9.1)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...




* chore(deps-dev): bump ruff from 0.0.287 to 0.0.288 in /requirements (#542)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.287 to 0.0.288.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](astral-sh/ruff@v0.0.287...v0.0.288)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...




* chore(deps-dev): update pyelftools requirement in /requirements (#540)

Updates the requirements on [pyelftools](https://github.com/eliben/pyelftools) to permit the latest version.
- [Changelog](https://github.com/eliben/pyelftools/blob/master/CHANGES)
- [Commits](eliben/pyelftools@v0.29...v0.30)

---
updated-dependencies:
- dependency-name: pyelftools
  dependency-type: direct:development
...




* chore(deps-dev): bump coverage from 7.2.7 to 7.3.1 in /requirements (#541)

* chore(deps-dev): bump coverage from 7.2.7 to 7.3.1 in /requirements

Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.7 to 7.3.1.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](nedbat/coveragepy@7.2.7...7.3.1)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:development
  update-type: version-update:semver-minor
...



* fix: set coverage versions based on python versions

- since coverage 7.3.x python3.7 support has been dropped.

---------






* chore: Version Bump 1.38.0 (#544)

* chore(deps-dev): bump ruff from 0.0.288 to 0.0.290 in /requirements (#545)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.288 to 0.0.290.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](astral-sh/ruff@v0.0.288...v0.0.290)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...




* Update github action to install nodejs 20

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Andrea Culot <[email protected]>
Co-authored-by: Lucas <[email protected]>
Co-authored-by: Daniel Mil <[email protected]>
Co-authored-by: jack-davies <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sriram Madapusi Vasudevan <[email protected]>
Co-authored-by: Sriram Madapusi Vasudevan <[email protected]>
Co-authored-by: Mohamed Elasmar <[email protected]>
Co-authored-by: Mohamed ElAsmar <[email protected]>
  • Loading branch information
10 people authored Nov 10, 2023
1 parent f5d08dd commit 7640b1a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
python-version: ${{ matrix.python }}
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- if: ${{ matrix.npm }}
run: npm install -g npm@${{ matrix.npm }}
- run: npm --version
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
python-version: ${{ matrix.python }}
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- if: ${{ matrix.npm }}
run: npm install -g npm@${{ matrix.npm }}
- run: npm --version
Expand Down
1 change: 1 addition & 0 deletions aws_lambda_builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

# Changing version will trigger a new release!
# Please make the version change as the last step of your development.

__version__ = "1.40.0"
RPC_PROTOCOL_VERSION = "0.3"
1 change: 1 addition & 0 deletions aws_lambda_builders/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"nodejs14.x": [ARM64, X86_64],
"nodejs16.x": [ARM64, X86_64],
"nodejs18.x": [ARM64, X86_64],
"nodejs20.x": [ARM64, X86_64],
"python3.7": [X86_64],
"python3.8": [ARM64, X86_64],
"python3.9": [ARM64, X86_64],
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ pyelftools~=0.30 # Used to verify the generated Go binary architecture in integr
# formatter
black==22.6.0; python_version < "3.8"
black==23.10.1; python_version >= "3.8"
ruff==0.1.4
ruff==0.1.4
33 changes: 18 additions & 15 deletions tests/integration/workflows/nodejs_npm/test_nodejs_npm.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def tearDown(self):
shutil.rmtree(self.dependencies_dir)
shutil.rmtree(self.temp_dir)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_builds_project_without_dependencies(self, runtime):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "no-deps")

Expand All @@ -57,7 +57,7 @@ def test_builds_project_without_dependencies(self, runtime):
output_files = set(os.listdir(self.artifacts_dir))
self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_builds_project_without_manifest(self, runtime):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "no-manifest")

Expand All @@ -75,7 +75,7 @@ def test_builds_project_without_manifest(self, runtime):
mock_warning.assert_called_once_with("package.json file not found. Continuing the build without dependencies.")
self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_builds_project_and_excludes_hidden_aws_sam(self, runtime):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "excluded-files")

Expand All @@ -91,7 +91,7 @@ def test_builds_project_and_excludes_hidden_aws_sam(self, runtime):
output_files = set(os.listdir(self.artifacts_dir))
self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_builds_project_with_remote_dependencies(self, runtime):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "npm-deps")

Expand All @@ -111,7 +111,7 @@ def test_builds_project_with_remote_dependencies(self, runtime):
output_modules = set(os.listdir(os.path.join(self.artifacts_dir, "node_modules")))
self.assertEqual(expected_modules, output_modules)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_builds_project_with_npmrc(self, runtime):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "npmrc")

Expand All @@ -138,14 +138,17 @@ def test_builds_project_with_npmrc(self, runtime):
("nodejs14.x", "package-lock"),
("nodejs16.x", "package-lock"),
("nodejs18.x", "package-lock"),
("nodejs20.x", "package-lock"),
("nodejs12.x", "shrinkwrap"),
("nodejs14.x", "shrinkwrap"),
("nodejs16.x", "shrinkwrap"),
("nodejs18.x", "shrinkwrap"),
("nodejs20.x", "shrinkwrap"),
("nodejs12.x", "package-lock-and-shrinkwrap"),
("nodejs14.x", "package-lock-and-shrinkwrap"),
("nodejs16.x", "package-lock-and-shrinkwrap"),
("nodejs18.x", "package-lock-and-shrinkwrap"),
("nodejs20.x", "package-lock-and-shrinkwrap"),
]
)
def test_builds_project_with_lockfile(self, runtime, dir_name):
Expand All @@ -172,7 +175,7 @@ def test_builds_project_with_lockfile(self, runtime, dir_name):

self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_fails_if_npm_cannot_resolve_dependencies(self, runtime):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "broken-deps")

Expand All @@ -187,7 +190,7 @@ def test_fails_if_npm_cannot_resolve_dependencies(self, runtime):

self.assertIn("No matching version found for [email protected]", str(ctx.exception))

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_builds_project_with_remote_dependencies_without_download_dependencies_with_dependencies_dir(self, runtime):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "npm-deps")

Expand All @@ -205,7 +208,7 @@ def test_builds_project_with_remote_dependencies_without_download_dependencies_w
output_files = set(os.listdir(self.artifacts_dir))
self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_builds_project_with_remote_dependencies_with_download_dependencies_and_dependencies_dir(self, runtime):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "npm-deps")

Expand Down Expand Up @@ -235,7 +238,7 @@ def test_builds_project_with_remote_dependencies_with_download_dependencies_and_
output_dependencies_files = set(os.listdir(os.path.join(self.dependencies_dir)))
self.assertNotIn(expected_dependencies_files, output_dependencies_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_builds_project_with_remote_dependencies_without_download_dependencies_without_dependencies_dir(
self, runtime
):
Expand All @@ -256,7 +259,7 @@ def test_builds_project_with_remote_dependencies_without_download_dependencies_w
output_files = set(os.listdir(self.artifacts_dir))
self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_builds_project_without_combine_dependencies(self, runtime):
source_dir = os.path.join(self.TEST_DATA_FOLDER, "npm-deps")

Expand All @@ -283,7 +286,7 @@ def test_builds_project_without_combine_dependencies(self, runtime):
output_dependencies_files = set(os.listdir(os.path.join(self.dependencies_dir)))
self.assertNotIn(expected_dependencies_files, output_dependencies_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_build_in_source_with_download_dependencies(self, runtime):
source_dir = os.path.join(self.temp_testdata_dir, "npm-deps")

Expand Down Expand Up @@ -312,7 +315,7 @@ def test_build_in_source_with_download_dependencies(self, runtime):
output_files = set(os.listdir(self.artifacts_dir))
self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_build_in_source_with_download_dependencies_local_dependency(self, runtime):
source_dir = os.path.join(self.temp_testdata_dir, "with-local-dependency")

Expand Down Expand Up @@ -341,7 +344,7 @@ def test_build_in_source_with_download_dependencies_local_dependency(self, runti
output_files = set(os.listdir(self.artifacts_dir))
self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_build_in_source_with_download_dependencies_and_dependencies_dir(self, runtime):
source_dir = os.path.join(self.temp_testdata_dir, "npm-deps")

Expand Down Expand Up @@ -376,7 +379,7 @@ def test_build_in_source_with_download_dependencies_and_dependencies_dir(self, r
output_files = set(os.listdir(self.artifacts_dir))
self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_build_in_source_with_download_dependencies_and_dependencies_dir_without_combine_dependencies(
self, runtime
):
Expand Down Expand Up @@ -409,7 +412,7 @@ def test_build_in_source_with_download_dependencies_and_dependencies_dir_without
output_files = set(os.listdir(self.artifacts_dir))
self.assertEqual(expected_files, output_files)

@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",)])
@parameterized.expand([("nodejs12.x",), ("nodejs14.x",), ("nodejs16.x",), ("nodejs18.x",), ("nodejs20.x",)])
def test_build_in_source_reuse_saved_dependencies_dir(self, runtime):
source_dir = os.path.join(self.temp_testdata_dir, "npm-deps")

Expand Down
Loading

0 comments on commit 7640b1a

Please sign in to comment.