@@ -41,7 +41,7 @@ def tearDown(self):
4141 shutil .rmtree (self .dependencies_dir )
4242 shutil .rmtree (self .temp_dir )
4343
44- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
44+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
4545 def test_builds_project_without_dependencies (self , runtime ):
4646 source_dir = os .path .join (self .TEST_DATA_FOLDER , "no-deps" )
4747
@@ -75,7 +75,7 @@ def test_builds_project_without_manifest(self, runtime):
7575 mock_warning .assert_called_once_with ("package.json file not found. Continuing the build without dependencies." )
7676 self .assertEqual (expected_files , output_files )
7777
78- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
78+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
7979 def test_builds_project_and_excludes_hidden_aws_sam (self , runtime ):
8080 source_dir = os .path .join (self .TEST_DATA_FOLDER , "excluded-files" )
8181
@@ -91,7 +91,7 @@ def test_builds_project_and_excludes_hidden_aws_sam(self, runtime):
9191 output_files = set (os .listdir (self .artifacts_dir ))
9292 self .assertEqual (expected_files , output_files )
9393
94- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
94+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
9595 def test_builds_project_with_remote_dependencies (self , runtime ):
9696 source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
9797
@@ -111,7 +111,7 @@ def test_builds_project_with_remote_dependencies(self, runtime):
111111 output_modules = set (os .listdir (os .path .join (self .artifacts_dir , "node_modules" )))
112112 self .assertEqual (expected_modules , output_modules )
113113
114- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
114+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
115115 def test_builds_project_with_npmrc (self , runtime ):
116116 source_dir = os .path .join (self .TEST_DATA_FOLDER , "npmrc" )
117117
@@ -137,12 +137,15 @@ def test_builds_project_with_npmrc(self, runtime):
137137 ("nodejs16.x" , "package-lock" ),
138138 ("nodejs18.x" , "package-lock" ),
139139 ("nodejs20.x" , "package-lock" ),
140+ ("nodejs22.x" , "package-lock" ),
140141 ("nodejs16.x" , "shrinkwrap" ),
141142 ("nodejs18.x" , "shrinkwrap" ),
142143 ("nodejs20.x" , "shrinkwrap" ),
144+ ("nodejs22.x" , "shrinkwrap" ),
143145 ("nodejs16.x" , "package-lock-and-shrinkwrap" ),
144146 ("nodejs18.x" , "package-lock-and-shrinkwrap" ),
145147 ("nodejs20.x" , "package-lock-and-shrinkwrap" ),
148+ ("nodejs22.x" , "package-lock-and-shrinkwrap" ),
146149 ]
147150 )
148151 def test_builds_project_with_lockfile (self , runtime , dir_name ):
@@ -169,7 +172,7 @@ def test_builds_project_with_lockfile(self, runtime, dir_name):
169172
170173 self .assertEqual (expected_files , output_files )
171174
172- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
175+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
173176 def test_fails_if_npm_cannot_resolve_dependencies (self , runtime ):
174177 source_dir = os .path .join (self .TEST_DATA_FOLDER , "broken-deps" )
175178
@@ -184,7 +187,7 @@ def test_fails_if_npm_cannot_resolve_dependencies(self, runtime):
184187
185188 self .
assertIn (
"No matching version found for [email protected] " ,
str (
ctx .
exception ))
186189
187- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
190+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
188191 def test_builds_project_with_remote_dependencies_without_download_dependencies_with_dependencies_dir (self , runtime ):
189192 source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
190193
@@ -202,7 +205,7 @@ def test_builds_project_with_remote_dependencies_without_download_dependencies_w
202205 output_files = set (os .listdir (self .artifacts_dir ))
203206 self .assertEqual (expected_files , output_files )
204207
205- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
208+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
206209 def test_builds_project_with_remote_dependencies_with_download_dependencies_and_dependencies_dir (self , runtime ):
207210 source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
208211
@@ -232,7 +235,7 @@ def test_builds_project_with_remote_dependencies_with_download_dependencies_and_
232235 output_dependencies_files = set (os .listdir (os .path .join (self .dependencies_dir )))
233236 self .assertNotIn (expected_dependencies_files , output_dependencies_files )
234237
235- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
238+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
236239 def test_builds_project_with_remote_dependencies_without_download_dependencies_without_dependencies_dir (
237240 self , runtime
238241 ):
@@ -253,7 +256,7 @@ def test_builds_project_with_remote_dependencies_without_download_dependencies_w
253256 output_files = set (os .listdir (self .artifacts_dir ))
254257 self .assertEqual (expected_files , output_files )
255258
256- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
259+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
257260 def test_builds_project_without_combine_dependencies (self , runtime ):
258261 source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
259262
@@ -280,7 +283,7 @@ def test_builds_project_without_combine_dependencies(self, runtime):
280283 output_dependencies_files = set (os .listdir (os .path .join (self .dependencies_dir )))
281284 self .assertNotIn (expected_dependencies_files , output_dependencies_files )
282285
283- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
286+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
284287 def test_build_in_source_with_download_dependencies (self , runtime ):
285288 source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
286289
@@ -309,7 +312,7 @@ def test_build_in_source_with_download_dependencies(self, runtime):
309312 output_files = set (os .listdir (self .artifacts_dir ))
310313 self .assertEqual (expected_files , output_files )
311314
312- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
315+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
313316 def test_build_in_source_with_removed_dependencies (self , runtime ):
314317 # run a build with default requirements and confirm dependencies are downloaded
315318 source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
@@ -349,7 +352,7 @@ def test_build_in_source_with_removed_dependencies(self, runtime):
349352 self .assertIn (".package-lock.json" , set (os .listdir (source_node_modules )))
350353 self .assertNotIn ("minimal-request-promise" , set (os .listdir (source_node_modules )))
351354
352- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
355+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
353356 def test_build_in_source_with_download_dependencies_local_dependency (self , runtime ):
354357 source_dir = os .path .join (self .temp_testdata_dir , "with-local-dependency" )
355358
@@ -378,7 +381,7 @@ def test_build_in_source_with_download_dependencies_local_dependency(self, runti
378381 output_files = set (os .listdir (self .artifacts_dir ))
379382 self .assertEqual (expected_files , output_files )
380383
381- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
384+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
382385 def test_build_in_source_with_download_dependencies_and_dependencies_dir (self , runtime ):
383386 source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
384387
@@ -413,7 +416,7 @@ def test_build_in_source_with_download_dependencies_and_dependencies_dir(self, r
413416 output_files = set (os .listdir (self .artifacts_dir ))
414417 self .assertEqual (expected_files , output_files )
415418
416- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
419+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
417420 def test_build_in_source_with_download_dependencies_and_dependencies_dir_without_combine_dependencies (
418421 self , runtime
419422 ):
@@ -446,7 +449,7 @@ def test_build_in_source_with_download_dependencies_and_dependencies_dir_without
446449 output_files = set (os .listdir (self .artifacts_dir ))
447450 self .assertEqual (expected_files , output_files )
448451
449- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
452+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
450453 def test_build_in_source_reuse_saved_dependencies_dir (self , runtime ):
451454 source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
452455
@@ -502,7 +505,7 @@ def test_build_in_source_reuse_saved_dependencies_dir(self, runtime):
502505 output_files = set (os .listdir (self .artifacts_dir ))
503506 self .assertEqual (expected_files , output_files )
504507
505- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
508+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
506509 def test_builds_project_with_manifest_outside_root (self , runtime ):
507510 base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
508511 source_dir = os .path .join (base_dir , "src" )
@@ -525,7 +528,7 @@ def test_builds_project_with_manifest_outside_root(self, runtime):
525528 output_modules = set (os .listdir (os .path .join (self .artifacts_dir , "node_modules" )))
526529 self .assertEqual (expected_modules , output_modules )
527530
528- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
531+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
529532 def test_builds_project_with_manifest_outside_root_with_reuse_saved_dependencies_dir (self , runtime ):
530533 base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
531534 source_dir = os .path .join (base_dir , "src" )
@@ -572,7 +575,7 @@ def test_builds_project_with_manifest_outside_root_with_reuse_saved_dependencies
572575 output_modules = set (os .listdir (os .path .join (self .artifacts_dir , "node_modules" )))
573576 self .assertEqual (expected_modules , output_modules )
574577
575- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
578+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
576579 def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_not_combine (self , runtime ):
577580 base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
578581 source_dir = os .path .join (base_dir , "src" )
@@ -597,7 +600,7 @@ def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_not
597600 dependencies_dir_modules = set (os .listdir (os .path .join (self .dependencies_dir , "node_modules" )))
598601 self .assertEqual (expected_modules , dependencies_dir_modules )
599602
600- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
603+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
601604 def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_combine (self , runtime ):
602605 base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
603606 source_dir = os .path .join (base_dir , "src" )
@@ -626,7 +629,7 @@ def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_com
626629 dependencies_dir_modules = set (os .listdir (os .path .join (self .dependencies_dir , "node_modules" )))
627630 self .assertEqual (expected_modules , dependencies_dir_modules )
628631
629- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
632+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
630633 def test_builds_project_with_manifest_outside_root_and_local_dependencies (self , runtime ):
631634 base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root-with-local-dependency" )
632635 source_dir = os .path .join (base_dir , "src" )
@@ -654,7 +657,7 @@ def test_builds_project_with_manifest_outside_root_and_local_dependencies(self,
654657 source_modules = set (os .listdir (os .path .join (source_dir , "node_modules" )))
655658 self .assertTrue (all (expected_module in source_modules for expected_module in expected_modules ))
656659
657- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
660+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
658661 def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_reuse_saved_dependencies_dir (
659662 self , runtime
660663 ):
@@ -709,7 +712,7 @@ def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_r
709712 source_modules = set (os .listdir (os .path .join (source_dir , "node_modules" )))
710713 self .assertTrue (all (expected_module in source_modules for expected_module in expected_modules ))
711714
712- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
715+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
713716 def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_dependencies_dir_and_not_combine (
714717 self , runtime
715718 ):
@@ -741,7 +744,7 @@ def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_d
741744 source_modules = set (os .listdir (os .path .join (source_dir , "node_modules" )))
742745 self .assertTrue (all (expected_module in source_modules for expected_module in expected_modules ))
743746
744- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
747+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
745748 def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_dependencies_dir_and_combine (
746749 self , runtime
747750 ):
0 commit comments