@@ -41,7 +41,7 @@ def tearDown(self):
41
41
shutil .rmtree (self .dependencies_dir )
42
42
shutil .rmtree (self .temp_dir )
43
43
44
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
44
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
45
45
def test_builds_project_without_dependencies (self , runtime ):
46
46
source_dir = os .path .join (self .TEST_DATA_FOLDER , "no-deps" )
47
47
@@ -75,7 +75,7 @@ def test_builds_project_without_manifest(self, runtime):
75
75
mock_warning .assert_called_once_with ("package.json file not found. Continuing the build without dependencies." )
76
76
self .assertEqual (expected_files , output_files )
77
77
78
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
78
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
79
79
def test_builds_project_and_excludes_hidden_aws_sam (self , runtime ):
80
80
source_dir = os .path .join (self .TEST_DATA_FOLDER , "excluded-files" )
81
81
@@ -91,7 +91,7 @@ def test_builds_project_and_excludes_hidden_aws_sam(self, runtime):
91
91
output_files = set (os .listdir (self .artifacts_dir ))
92
92
self .assertEqual (expected_files , output_files )
93
93
94
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
94
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
95
95
def test_builds_project_with_remote_dependencies (self , runtime ):
96
96
source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
97
97
@@ -111,7 +111,7 @@ def test_builds_project_with_remote_dependencies(self, runtime):
111
111
output_modules = set (os .listdir (os .path .join (self .artifacts_dir , "node_modules" )))
112
112
self .assertEqual (expected_modules , output_modules )
113
113
114
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
114
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
115
115
def test_builds_project_with_npmrc (self , runtime ):
116
116
source_dir = os .path .join (self .TEST_DATA_FOLDER , "npmrc" )
117
117
@@ -137,12 +137,15 @@ def test_builds_project_with_npmrc(self, runtime):
137
137
("nodejs16.x" , "package-lock" ),
138
138
("nodejs18.x" , "package-lock" ),
139
139
("nodejs20.x" , "package-lock" ),
140
+ ("nodejs22.x" , "package-lock" ),
140
141
("nodejs16.x" , "shrinkwrap" ),
141
142
("nodejs18.x" , "shrinkwrap" ),
142
143
("nodejs20.x" , "shrinkwrap" ),
144
+ ("nodejs22.x" , "shrinkwrap" ),
143
145
("nodejs16.x" , "package-lock-and-shrinkwrap" ),
144
146
("nodejs18.x" , "package-lock-and-shrinkwrap" ),
145
147
("nodejs20.x" , "package-lock-and-shrinkwrap" ),
148
+ ("nodejs22.x" , "package-lock-and-shrinkwrap" ),
146
149
]
147
150
)
148
151
def test_builds_project_with_lockfile (self , runtime , dir_name ):
@@ -169,7 +172,7 @@ def test_builds_project_with_lockfile(self, runtime, dir_name):
169
172
170
173
self .assertEqual (expected_files , output_files )
171
174
172
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
175
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
173
176
def test_fails_if_npm_cannot_resolve_dependencies (self , runtime ):
174
177
source_dir = os .path .join (self .TEST_DATA_FOLDER , "broken-deps" )
175
178
@@ -184,7 +187,7 @@ def test_fails_if_npm_cannot_resolve_dependencies(self, runtime):
184
187
185
188
self .assertIn ("No matching version found for aws-sdk@2.997.999" , str (ctx .exception ))
186
189
187
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
190
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
188
191
def test_builds_project_with_remote_dependencies_without_download_dependencies_with_dependencies_dir (self , runtime ):
189
192
source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
190
193
@@ -202,7 +205,7 @@ def test_builds_project_with_remote_dependencies_without_download_dependencies_w
202
205
output_files = set (os .listdir (self .artifacts_dir ))
203
206
self .assertEqual (expected_files , output_files )
204
207
205
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
208
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
206
209
def test_builds_project_with_remote_dependencies_with_download_dependencies_and_dependencies_dir (self , runtime ):
207
210
source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
208
211
@@ -232,7 +235,7 @@ def test_builds_project_with_remote_dependencies_with_download_dependencies_and_
232
235
output_dependencies_files = set (os .listdir (os .path .join (self .dependencies_dir )))
233
236
self .assertNotIn (expected_dependencies_files , output_dependencies_files )
234
237
235
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
238
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
236
239
def test_builds_project_with_remote_dependencies_without_download_dependencies_without_dependencies_dir (
237
240
self , runtime
238
241
):
@@ -253,7 +256,7 @@ def test_builds_project_with_remote_dependencies_without_download_dependencies_w
253
256
output_files = set (os .listdir (self .artifacts_dir ))
254
257
self .assertEqual (expected_files , output_files )
255
258
256
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
259
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
257
260
def test_builds_project_without_combine_dependencies (self , runtime ):
258
261
source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
259
262
@@ -280,7 +283,7 @@ def test_builds_project_without_combine_dependencies(self, runtime):
280
283
output_dependencies_files = set (os .listdir (os .path .join (self .dependencies_dir )))
281
284
self .assertNotIn (expected_dependencies_files , output_dependencies_files )
282
285
283
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
286
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
284
287
def test_build_in_source_with_download_dependencies (self , runtime ):
285
288
source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
286
289
@@ -309,7 +312,7 @@ def test_build_in_source_with_download_dependencies(self, runtime):
309
312
output_files = set (os .listdir (self .artifacts_dir ))
310
313
self .assertEqual (expected_files , output_files )
311
314
312
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
315
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
313
316
def test_build_in_source_with_removed_dependencies (self , runtime ):
314
317
# run a build with default requirements and confirm dependencies are downloaded
315
318
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):
349
352
self .assertIn (".package-lock.json" , set (os .listdir (source_node_modules )))
350
353
self .assertNotIn ("minimal-request-promise" , set (os .listdir (source_node_modules )))
351
354
352
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
355
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
353
356
def test_build_in_source_with_download_dependencies_local_dependency (self , runtime ):
354
357
source_dir = os .path .join (self .temp_testdata_dir , "with-local-dependency" )
355
358
@@ -378,7 +381,7 @@ def test_build_in_source_with_download_dependencies_local_dependency(self, runti
378
381
output_files = set (os .listdir (self .artifacts_dir ))
379
382
self .assertEqual (expected_files , output_files )
380
383
381
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
384
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
382
385
def test_build_in_source_with_download_dependencies_and_dependencies_dir (self , runtime ):
383
386
source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
384
387
@@ -413,7 +416,7 @@ def test_build_in_source_with_download_dependencies_and_dependencies_dir(self, r
413
416
output_files = set (os .listdir (self .artifacts_dir ))
414
417
self .assertEqual (expected_files , output_files )
415
418
416
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
419
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
417
420
def test_build_in_source_with_download_dependencies_and_dependencies_dir_without_combine_dependencies (
418
421
self , runtime
419
422
):
@@ -446,7 +449,7 @@ def test_build_in_source_with_download_dependencies_and_dependencies_dir_without
446
449
output_files = set (os .listdir (self .artifacts_dir ))
447
450
self .assertEqual (expected_files , output_files )
448
451
449
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
452
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
450
453
def test_build_in_source_reuse_saved_dependencies_dir (self , runtime ):
451
454
source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
452
455
@@ -502,7 +505,7 @@ def test_build_in_source_reuse_saved_dependencies_dir(self, runtime):
502
505
output_files = set (os .listdir (self .artifacts_dir ))
503
506
self .assertEqual (expected_files , output_files )
504
507
505
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
508
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
506
509
def test_builds_project_with_manifest_outside_root (self , runtime ):
507
510
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
508
511
source_dir = os .path .join (base_dir , "src" )
@@ -525,7 +528,7 @@ def test_builds_project_with_manifest_outside_root(self, runtime):
525
528
output_modules = set (os .listdir (os .path .join (self .artifacts_dir , "node_modules" )))
526
529
self .assertEqual (expected_modules , output_modules )
527
530
528
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
531
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
529
532
def test_builds_project_with_manifest_outside_root_with_reuse_saved_dependencies_dir (self , runtime ):
530
533
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
531
534
source_dir = os .path .join (base_dir , "src" )
@@ -572,7 +575,7 @@ def test_builds_project_with_manifest_outside_root_with_reuse_saved_dependencies
572
575
output_modules = set (os .listdir (os .path .join (self .artifacts_dir , "node_modules" )))
573
576
self .assertEqual (expected_modules , output_modules )
574
577
575
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
578
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
576
579
def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_not_combine (self , runtime ):
577
580
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
578
581
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
597
600
dependencies_dir_modules = set (os .listdir (os .path .join (self .dependencies_dir , "node_modules" )))
598
601
self .assertEqual (expected_modules , dependencies_dir_modules )
599
602
600
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
603
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
601
604
def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_combine (self , runtime ):
602
605
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
603
606
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
626
629
dependencies_dir_modules = set (os .listdir (os .path .join (self .dependencies_dir , "node_modules" )))
627
630
self .assertEqual (expected_modules , dependencies_dir_modules )
628
631
629
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
632
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
630
633
def test_builds_project_with_manifest_outside_root_and_local_dependencies (self , runtime ):
631
634
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root-with-local-dependency" )
632
635
source_dir = os .path .join (base_dir , "src" )
@@ -654,7 +657,7 @@ def test_builds_project_with_manifest_outside_root_and_local_dependencies(self,
654
657
source_modules = set (os .listdir (os .path .join (source_dir , "node_modules" )))
655
658
self .assertTrue (all (expected_module in source_modules for expected_module in expected_modules ))
656
659
657
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
660
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
658
661
def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_reuse_saved_dependencies_dir (
659
662
self , runtime
660
663
):
@@ -709,7 +712,7 @@ def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_r
709
712
source_modules = set (os .listdir (os .path .join (source_dir , "node_modules" )))
710
713
self .assertTrue (all (expected_module in source_modules for expected_module in expected_modules ))
711
714
712
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
715
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
713
716
def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_dependencies_dir_and_not_combine (
714
717
self , runtime
715
718
):
@@ -741,7 +744,7 @@ def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_d
741
744
source_modules = set (os .listdir (os .path .join (source_dir , "node_modules" )))
742
745
self .assertTrue (all (expected_module in source_modules for expected_module in expected_modules ))
743
746
744
- @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
747
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,), ( "nodejs22.x" ,) ])
745
748
def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_dependencies_dir_and_combine (
746
749
self , runtime
747
750
):
0 commit comments