@@ -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 ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
44
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.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
@@ -57,7 +57,7 @@ def test_builds_project_without_dependencies(self, runtime):
57
57
output_files = set (os .listdir (self .artifacts_dir ))
58
58
self .assertEqual (expected_files , output_files )
59
59
60
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
60
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
61
61
def test_builds_project_without_manifest (self , runtime ):
62
62
source_dir = os .path .join (self .TEST_DATA_FOLDER , "no-manifest" )
63
63
@@ -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 ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
78
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.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 ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
94
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.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 ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
114
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.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
@@ -134,18 +134,12 @@ def test_builds_project_with_npmrc(self, runtime):
134
134
135
135
@parameterized .expand (
136
136
[
137
- ("nodejs12.x" , "package-lock" ),
138
- ("nodejs14.x" , "package-lock" ),
139
137
("nodejs16.x" , "package-lock" ),
140
138
("nodejs18.x" , "package-lock" ),
141
139
("nodejs20.x" , "package-lock" ),
142
- ("nodejs12.x" , "shrinkwrap" ),
143
- ("nodejs14.x" , "shrinkwrap" ),
144
140
("nodejs16.x" , "shrinkwrap" ),
145
141
("nodejs18.x" , "shrinkwrap" ),
146
142
("nodejs20.x" , "shrinkwrap" ),
147
- ("nodejs12.x" , "package-lock-and-shrinkwrap" ),
148
- ("nodejs14.x" , "package-lock-and-shrinkwrap" ),
149
143
("nodejs16.x" , "package-lock-and-shrinkwrap" ),
150
144
("nodejs18.x" , "package-lock-and-shrinkwrap" ),
151
145
("nodejs20.x" , "package-lock-and-shrinkwrap" ),
@@ -175,7 +169,7 @@ def test_builds_project_with_lockfile(self, runtime, dir_name):
175
169
176
170
self .assertEqual (expected_files , output_files )
177
171
178
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
172
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
179
173
def test_fails_if_npm_cannot_resolve_dependencies (self , runtime ):
180
174
source_dir = os .path .join (self .TEST_DATA_FOLDER , "broken-deps" )
181
175
@@ -190,7 +184,7 @@ def test_fails_if_npm_cannot_resolve_dependencies(self, runtime):
190
184
191
185
self .
assertIn (
"No matching version found for [email protected] " ,
str (
ctx .
exception ))
192
186
193
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
187
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
194
188
def test_builds_project_with_remote_dependencies_without_download_dependencies_with_dependencies_dir (self , runtime ):
195
189
source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
196
190
@@ -208,7 +202,7 @@ def test_builds_project_with_remote_dependencies_without_download_dependencies_w
208
202
output_files = set (os .listdir (self .artifacts_dir ))
209
203
self .assertEqual (expected_files , output_files )
210
204
211
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
205
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
212
206
def test_builds_project_with_remote_dependencies_with_download_dependencies_and_dependencies_dir (self , runtime ):
213
207
source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
214
208
@@ -238,7 +232,7 @@ def test_builds_project_with_remote_dependencies_with_download_dependencies_and_
238
232
output_dependencies_files = set (os .listdir (os .path .join (self .dependencies_dir )))
239
233
self .assertNotIn (expected_dependencies_files , output_dependencies_files )
240
234
241
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
235
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
242
236
def test_builds_project_with_remote_dependencies_without_download_dependencies_without_dependencies_dir (
243
237
self , runtime
244
238
):
@@ -259,7 +253,7 @@ def test_builds_project_with_remote_dependencies_without_download_dependencies_w
259
253
output_files = set (os .listdir (self .artifacts_dir ))
260
254
self .assertEqual (expected_files , output_files )
261
255
262
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
256
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
263
257
def test_builds_project_without_combine_dependencies (self , runtime ):
264
258
source_dir = os .path .join (self .TEST_DATA_FOLDER , "npm-deps" )
265
259
@@ -286,7 +280,7 @@ def test_builds_project_without_combine_dependencies(self, runtime):
286
280
output_dependencies_files = set (os .listdir (os .path .join (self .dependencies_dir )))
287
281
self .assertNotIn (expected_dependencies_files , output_dependencies_files )
288
282
289
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
283
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
290
284
def test_build_in_source_with_download_dependencies (self , runtime ):
291
285
source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
292
286
@@ -315,7 +309,7 @@ def test_build_in_source_with_download_dependencies(self, runtime):
315
309
output_files = set (os .listdir (self .artifacts_dir ))
316
310
self .assertEqual (expected_files , output_files )
317
311
318
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
312
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
319
313
def test_build_in_source_with_removed_dependencies (self , runtime ):
320
314
# run a build with default requirements and confirm dependencies are downloaded
321
315
source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
@@ -355,7 +349,7 @@ def test_build_in_source_with_removed_dependencies(self, runtime):
355
349
self .assertIn (".package-lock.json" , set (os .listdir (source_node_modules )))
356
350
self .assertNotIn ("minimal-request-promise" , set (os .listdir (source_node_modules )))
357
351
358
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
352
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
359
353
def test_build_in_source_with_download_dependencies_local_dependency (self , runtime ):
360
354
source_dir = os .path .join (self .temp_testdata_dir , "with-local-dependency" )
361
355
@@ -384,7 +378,7 @@ def test_build_in_source_with_download_dependencies_local_dependency(self, runti
384
378
output_files = set (os .listdir (self .artifacts_dir ))
385
379
self .assertEqual (expected_files , output_files )
386
380
387
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
381
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
388
382
def test_build_in_source_with_download_dependencies_and_dependencies_dir (self , runtime ):
389
383
source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
390
384
@@ -419,7 +413,7 @@ def test_build_in_source_with_download_dependencies_and_dependencies_dir(self, r
419
413
output_files = set (os .listdir (self .artifacts_dir ))
420
414
self .assertEqual (expected_files , output_files )
421
415
422
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
416
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
423
417
def test_build_in_source_with_download_dependencies_and_dependencies_dir_without_combine_dependencies (
424
418
self , runtime
425
419
):
@@ -452,7 +446,7 @@ def test_build_in_source_with_download_dependencies_and_dependencies_dir_without
452
446
output_files = set (os .listdir (self .artifacts_dir ))
453
447
self .assertEqual (expected_files , output_files )
454
448
455
- @parameterized .expand ([("nodejs12.x" ,), ( "nodejs14.x" ,), ( " nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
449
+ @parameterized .expand ([("nodejs16.x" ,), ("nodejs18.x" ,), ("nodejs20.x" ,)])
456
450
def test_build_in_source_reuse_saved_dependencies_dir (self , runtime ):
457
451
source_dir = os .path .join (self .temp_testdata_dir , "npm-deps" )
458
452
@@ -508,7 +502,7 @@ def test_build_in_source_reuse_saved_dependencies_dir(self, runtime):
508
502
output_files = set (os .listdir (self .artifacts_dir ))
509
503
self .assertEqual (expected_files , output_files )
510
504
511
- @parameterized .expand ([("nodejs12 .x" ,), ("nodejs14 .x" ,), ("nodejs16.x" ,), ( "nodejs18 .x" ,)])
505
+ @parameterized .expand ([("nodejs16 .x" ,), ("nodejs18 .x" ,), ("nodejs20 .x" ,)])
512
506
def test_builds_project_with_manifest_outside_root (self , runtime ):
513
507
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
514
508
source_dir = os .path .join (base_dir , "src" )
@@ -531,7 +525,7 @@ def test_builds_project_with_manifest_outside_root(self, runtime):
531
525
output_modules = set (os .listdir (os .path .join (self .artifacts_dir , "node_modules" )))
532
526
self .assertEqual (expected_modules , output_modules )
533
527
534
- @parameterized .expand ([("nodejs12 .x" ,), ("nodejs14 .x" ,), ("nodejs16.x" ,), ( "nodejs18 .x" ,)])
528
+ @parameterized .expand ([("nodejs16 .x" ,), ("nodejs18 .x" ,), ("nodejs20 .x" ,)])
535
529
def test_builds_project_with_manifest_outside_root_with_reuse_saved_dependencies_dir (self , runtime ):
536
530
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
537
531
source_dir = os .path .join (base_dir , "src" )
@@ -578,7 +572,7 @@ def test_builds_project_with_manifest_outside_root_with_reuse_saved_dependencies
578
572
output_modules = set (os .listdir (os .path .join (self .artifacts_dir , "node_modules" )))
579
573
self .assertEqual (expected_modules , output_modules )
580
574
581
- @parameterized .expand ([("nodejs12 .x" ,), ("nodejs14 .x" ,), ("nodejs16.x" ,), ( "nodejs18 .x" ,)])
575
+ @parameterized .expand ([("nodejs16 .x" ,), ("nodejs18 .x" ,), ("nodejs20 .x" ,)])
582
576
def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_not_combine (self , runtime ):
583
577
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
584
578
source_dir = os .path .join (base_dir , "src" )
@@ -603,7 +597,7 @@ def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_not
603
597
dependencies_dir_modules = set (os .listdir (os .path .join (self .dependencies_dir , "node_modules" )))
604
598
self .assertEqual (expected_modules , dependencies_dir_modules )
605
599
606
- @parameterized .expand ([("nodejs12 .x" ,), ("nodejs14 .x" ,), ("nodejs16.x" ,), ( "nodejs18 .x" ,)])
600
+ @parameterized .expand ([("nodejs16 .x" ,), ("nodejs18 .x" ,), ("nodejs20 .x" ,)])
607
601
def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_combine (self , runtime ):
608
602
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root" )
609
603
source_dir = os .path .join (base_dir , "src" )
@@ -632,7 +626,7 @@ def test_builds_project_with_manifest_outside_root_with_dependencies_dir_and_com
632
626
dependencies_dir_modules = set (os .listdir (os .path .join (self .dependencies_dir , "node_modules" )))
633
627
self .assertEqual (expected_modules , dependencies_dir_modules )
634
628
635
- @parameterized .expand ([("nodejs12 .x" ,), ("nodejs14 .x" ,), ("nodejs16.x" ,), ( "nodejs18 .x" ,)])
629
+ @parameterized .expand ([("nodejs16 .x" ,), ("nodejs18 .x" ,), ("nodejs20 .x" ,)])
636
630
def test_builds_project_with_manifest_outside_root_and_local_dependencies (self , runtime ):
637
631
base_dir = os .path .join (self .temp_testdata_dir , "manifest-outside-root-with-local-dependency" )
638
632
source_dir = os .path .join (base_dir , "src" )
@@ -660,7 +654,7 @@ def test_builds_project_with_manifest_outside_root_and_local_dependencies(self,
660
654
source_modules = set (os .listdir (os .path .join (source_dir , "node_modules" )))
661
655
self .assertTrue (all (expected_module in source_modules for expected_module in expected_modules ))
662
656
663
- @parameterized .expand ([("nodejs12 .x" ,), ("nodejs14 .x" ,), ("nodejs16.x" ,), ( "nodejs18 .x" ,)])
657
+ @parameterized .expand ([("nodejs16 .x" ,), ("nodejs18 .x" ,), ("nodejs20 .x" ,)])
664
658
def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_reuse_saved_dependencies_dir (
665
659
self , runtime
666
660
):
@@ -715,7 +709,7 @@ def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_r
715
709
source_modules = set (os .listdir (os .path .join (source_dir , "node_modules" )))
716
710
self .assertTrue (all (expected_module in source_modules for expected_module in expected_modules ))
717
711
718
- @parameterized .expand ([("nodejs12 .x" ,), ("nodejs14 .x" ,), ("nodejs16.x" ,), ( "nodejs18 .x" ,)])
712
+ @parameterized .expand ([("nodejs16 .x" ,), ("nodejs18 .x" ,), ("nodejs20 .x" ,)])
719
713
def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_dependencies_dir_and_not_combine (
720
714
self , runtime
721
715
):
@@ -747,7 +741,7 @@ def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_d
747
741
source_modules = set (os .listdir (os .path .join (source_dir , "node_modules" )))
748
742
self .assertTrue (all (expected_module in source_modules for expected_module in expected_modules ))
749
743
750
- @parameterized .expand ([("nodejs12 .x" ,), ("nodejs14 .x" ,), ("nodejs16.x" ,), ( "nodejs18 .x" ,)])
744
+ @parameterized .expand ([("nodejs16 .x" ,), ("nodejs18 .x" ,), ("nodejs20 .x" ,)])
751
745
def test_builds_project_with_manifest_outside_root_and_local_dependencies_with_dependencies_dir_and_combine (
752
746
self , runtime
753
747
):
0 commit comments