@suffolklitlab/alkiln 5.0.0-experimental2 → 5.0.0-experimental3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/scope.js CHANGED
@@ -2,7 +2,8 @@ const { expect } = require('chai');
2
2
  const cheerio = require('cheerio');
3
3
  const path = require('path');
4
4
  const fs = require('fs');
5
- const { globSync } = require('glob');
5
+ // const { globSync } = require('glob');
6
+ const fg = require('fast-glob');
6
7
  const { AxePuppeteer } = require('@axe-core/puppeteer');
7
8
  const safe_filename = require("sanitize-filename");
8
9
  // "en" is faster to import: https://github.com/faker-js/faker/issues/1114#issuecomment-1169532948
@@ -1794,11 +1795,11 @@ module.exports = {
1794
1795
  }
1795
1796
 
1796
1797
  // Make sure sources directory exists
1797
- let dirs = globSync( `**/data/sources` );
1798
+ let dirs = fg.sync([ `**/data/sources` ], { onlyFiles: false });
1798
1799
  if ( dirs.length === 0 ) {
1799
1800
  await scope.addToReport( scope, {
1800
1801
  type: `warning`,
1801
- value: `ALKiln couldn't find a "sources" directory in "${ process.cwd() }" where it could get files to upload.`
1802
+ value: `The test files need to be in the "sources" directory anywhere within "${ process.cwd() }", but ALKiln couldn't find it.`
1802
1803
  });
1803
1804
  return false;
1804
1805
  }
@@ -1808,7 +1809,7 @@ module.exports = {
1808
1809
  let missing_files = [];
1809
1810
  for ( let name of uploads_names ) {
1810
1811
  let trimmed_name = name.trim();
1811
- let matching_paths = globSync( `${ dir }/${ trimmed_name }` );
1812
+ let matching_paths = fg.sync([ `${ dir }/${ trimmed_name }` ]);
1812
1813
  if ( matching_paths.length === 0 ) {
1813
1814
  missing_files.push( trimmed_name );
1814
1815
  } else {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "5.0.0-experimental1",
3
+ "version": "5.0.0-experimental2",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@suffolklitlab/alkiln",
9
- "version": "5.0.0-experimental1",
9
+ "version": "5.0.0-experimental2",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@axe-core/puppeteer": "4.4.2",
@@ -17,6 +17,7 @@
17
17
  "cheerio": "1.0.0-rc.10",
18
18
  "deep-equal-in-any-order": "^2.0.0",
19
19
  "dotenv": "8.2.0",
20
+ "fast-glob": "^3.2.12",
20
21
  "glob": "^10.2.7",
21
22
  "mocha": "9.2.0",
22
23
  "puppeteer": "13.1.3",
@@ -398,6 +399,38 @@
398
399
  "@jridgewell/sourcemap-codec": "^1.4.10"
399
400
  }
400
401
  },
402
+ "node_modules/@nodelib/fs.scandir": {
403
+ "version": "2.1.5",
404
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
405
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
406
+ "dependencies": {
407
+ "@nodelib/fs.stat": "2.0.5",
408
+ "run-parallel": "^1.1.9"
409
+ },
410
+ "engines": {
411
+ "node": ">= 8"
412
+ }
413
+ },
414
+ "node_modules/@nodelib/fs.stat": {
415
+ "version": "2.0.5",
416
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
417
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
418
+ "engines": {
419
+ "node": ">= 8"
420
+ }
421
+ },
422
+ "node_modules/@nodelib/fs.walk": {
423
+ "version": "1.2.8",
424
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
425
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
426
+ "dependencies": {
427
+ "@nodelib/fs.scandir": "2.1.5",
428
+ "fastq": "^1.6.0"
429
+ },
430
+ "engines": {
431
+ "node": ">= 8"
432
+ }
433
+ },
401
434
  "node_modules/@pkgjs/parseargs": {
402
435
  "version": "0.11.0",
403
436
  "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
@@ -1151,6 +1184,29 @@
1151
1184
  "node >=0.6.0"
1152
1185
  ]
1153
1186
  },
1187
+ "node_modules/fast-glob": {
1188
+ "version": "3.2.12",
1189
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
1190
+ "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
1191
+ "dependencies": {
1192
+ "@nodelib/fs.stat": "^2.0.2",
1193
+ "@nodelib/fs.walk": "^1.2.3",
1194
+ "glob-parent": "^5.1.2",
1195
+ "merge2": "^1.3.0",
1196
+ "micromatch": "^4.0.4"
1197
+ },
1198
+ "engines": {
1199
+ "node": ">=8.6.0"
1200
+ }
1201
+ },
1202
+ "node_modules/fastq": {
1203
+ "version": "1.15.0",
1204
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
1205
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
1206
+ "dependencies": {
1207
+ "reusify": "^1.0.4"
1208
+ }
1209
+ },
1154
1210
  "node_modules/fd-slicer": {
1155
1211
  "version": "1.1.0",
1156
1212
  "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
@@ -1677,6 +1733,26 @@
1677
1733
  "node": ">=10"
1678
1734
  }
1679
1735
  },
1736
+ "node_modules/merge2": {
1737
+ "version": "1.4.1",
1738
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
1739
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
1740
+ "engines": {
1741
+ "node": ">= 8"
1742
+ }
1743
+ },
1744
+ "node_modules/micromatch": {
1745
+ "version": "4.0.5",
1746
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
1747
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
1748
+ "dependencies": {
1749
+ "braces": "^3.0.2",
1750
+ "picomatch": "^2.3.1"
1751
+ },
1752
+ "engines": {
1753
+ "node": ">=8.6"
1754
+ }
1755
+ },
1680
1756
  "node_modules/minimatch": {
1681
1757
  "version": "9.0.1",
1682
1758
  "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
@@ -2215,6 +2291,25 @@
2215
2291
  "url": "https://github.com/sponsors/ljharb"
2216
2292
  }
2217
2293
  },
2294
+ "node_modules/queue-microtask": {
2295
+ "version": "1.2.3",
2296
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
2297
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
2298
+ "funding": [
2299
+ {
2300
+ "type": "github",
2301
+ "url": "https://github.com/sponsors/feross"
2302
+ },
2303
+ {
2304
+ "type": "patreon",
2305
+ "url": "https://www.patreon.com/feross"
2306
+ },
2307
+ {
2308
+ "type": "consulting",
2309
+ "url": "https://feross.org/support"
2310
+ }
2311
+ ]
2312
+ },
2218
2313
  "node_modules/randombytes": {
2219
2314
  "version": "2.1.0",
2220
2315
  "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -2308,6 +2403,15 @@
2308
2403
  "node": ">=8"
2309
2404
  }
2310
2405
  },
2406
+ "node_modules/reusify": {
2407
+ "version": "1.0.4",
2408
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
2409
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
2410
+ "engines": {
2411
+ "iojs": ">=1.0.0",
2412
+ "node": ">=0.10.0"
2413
+ }
2414
+ },
2311
2415
  "node_modules/rimraf": {
2312
2416
  "version": "3.0.2",
2313
2417
  "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -2352,6 +2456,28 @@
2352
2456
  "node": "*"
2353
2457
  }
2354
2458
  },
2459
+ "node_modules/run-parallel": {
2460
+ "version": "1.2.0",
2461
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
2462
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
2463
+ "funding": [
2464
+ {
2465
+ "type": "github",
2466
+ "url": "https://github.com/sponsors/feross"
2467
+ },
2468
+ {
2469
+ "type": "patreon",
2470
+ "url": "https://www.patreon.com/feross"
2471
+ },
2472
+ {
2473
+ "type": "consulting",
2474
+ "url": "https://feross.org/support"
2475
+ }
2476
+ ],
2477
+ "dependencies": {
2478
+ "queue-microtask": "^1.2.2"
2479
+ }
2480
+ },
2355
2481
  "node_modules/safe-buffer": {
2356
2482
  "version": "5.2.1",
2357
2483
  "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -3166,6 +3292,29 @@
3166
3292
  "@jridgewell/sourcemap-codec": "^1.4.10"
3167
3293
  }
3168
3294
  },
3295
+ "@nodelib/fs.scandir": {
3296
+ "version": "2.1.5",
3297
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
3298
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
3299
+ "requires": {
3300
+ "@nodelib/fs.stat": "2.0.5",
3301
+ "run-parallel": "^1.1.9"
3302
+ }
3303
+ },
3304
+ "@nodelib/fs.stat": {
3305
+ "version": "2.0.5",
3306
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
3307
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="
3308
+ },
3309
+ "@nodelib/fs.walk": {
3310
+ "version": "1.2.8",
3311
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
3312
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
3313
+ "requires": {
3314
+ "@nodelib/fs.scandir": "2.1.5",
3315
+ "fastq": "^1.6.0"
3316
+ }
3317
+ },
3169
3318
  "@pkgjs/parseargs": {
3170
3319
  "version": "0.11.0",
3171
3320
  "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
@@ -3757,6 +3906,26 @@
3757
3906
  "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.0.tgz",
3758
3907
  "integrity": "sha1-4mifjzVvrWLMplo6kcXfX5VRaS8="
3759
3908
  },
3909
+ "fast-glob": {
3910
+ "version": "3.2.12",
3911
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
3912
+ "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
3913
+ "requires": {
3914
+ "@nodelib/fs.stat": "^2.0.2",
3915
+ "@nodelib/fs.walk": "^1.2.3",
3916
+ "glob-parent": "^5.1.2",
3917
+ "merge2": "^1.3.0",
3918
+ "micromatch": "^4.0.4"
3919
+ }
3920
+ },
3921
+ "fastq": {
3922
+ "version": "1.15.0",
3923
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
3924
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
3925
+ "requires": {
3926
+ "reusify": "^1.0.4"
3927
+ }
3928
+ },
3760
3929
  "fd-slicer": {
3761
3930
  "version": "1.1.0",
3762
3931
  "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
@@ -4112,6 +4281,20 @@
4112
4281
  "yallist": "^4.0.0"
4113
4282
  }
4114
4283
  },
4284
+ "merge2": {
4285
+ "version": "1.4.1",
4286
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
4287
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="
4288
+ },
4289
+ "micromatch": {
4290
+ "version": "4.0.5",
4291
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
4292
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
4293
+ "requires": {
4294
+ "braces": "^3.0.2",
4295
+ "picomatch": "^2.3.1"
4296
+ }
4297
+ },
4115
4298
  "minimatch": {
4116
4299
  "version": "9.0.1",
4117
4300
  "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
@@ -4497,6 +4680,11 @@
4497
4680
  "side-channel": "^1.0.4"
4498
4681
  }
4499
4682
  },
4683
+ "queue-microtask": {
4684
+ "version": "1.2.3",
4685
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
4686
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="
4687
+ },
4500
4688
  "randombytes": {
4501
4689
  "version": "2.1.0",
4502
4690
  "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -4569,6 +4757,11 @@
4569
4757
  "resolve-from": "^5.0.0"
4570
4758
  }
4571
4759
  },
4760
+ "reusify": {
4761
+ "version": "1.0.4",
4762
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
4763
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw=="
4764
+ },
4572
4765
  "rimraf": {
4573
4766
  "version": "3.0.2",
4574
4767
  "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -4600,6 +4793,14 @@
4600
4793
  }
4601
4794
  }
4602
4795
  },
4796
+ "run-parallel": {
4797
+ "version": "1.2.0",
4798
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
4799
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
4800
+ "requires": {
4801
+ "queue-microtask": "^1.2.2"
4802
+ }
4803
+ },
4603
4804
  "safe-buffer": {
4604
4805
  "version": "5.2.1",
4605
4806
  "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "5.0.0-experimental2",
3
+ "version": "5.0.0-experimental3",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -41,6 +41,7 @@
41
41
  "cheerio": "1.0.0-rc.10",
42
42
  "deep-equal-in-any-order": "^2.0.0",
43
43
  "dotenv": "8.2.0",
44
+ "fast-glob": "^3.2.12",
44
45
  "glob": "^10.2.7",
45
46
  "mocha": "9.2.0",
46
47
  "puppeteer": "13.1.3",