@dword-design/base 8.7.0 → 8.7.2
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/dist/config.js
CHANGED
|
@@ -68,11 +68,15 @@ const defaultConfig = {
|
|
|
68
68
|
|
|
69
69
|
let inheritedConfig = _importCwd.default.silent(_rawConfig.default.name) || require(_rawConfig.default.name);
|
|
70
70
|
|
|
71
|
+
const mergeOptions = {
|
|
72
|
+
customMerge: key => key === 'supportedNodeVersions' ? (a, b) => b : undefined
|
|
73
|
+
};
|
|
74
|
+
|
|
71
75
|
if (typeof inheritedConfig === 'function') {
|
|
72
|
-
inheritedConfig = inheritedConfig(_deepmerge.default
|
|
76
|
+
inheritedConfig = inheritedConfig((0, _deepmerge.default)(defaultConfig, _rawConfig.default, mergeOptions));
|
|
73
77
|
}
|
|
74
78
|
|
|
75
|
-
var _default = _deepmerge.default.all([defaultConfig, inheritedConfig, _rawConfig.default]);
|
|
79
|
+
var _default = _deepmerge.default.all([defaultConfig, inheritedConfig, _rawConfig.default], mergeOptions);
|
|
76
80
|
|
|
77
81
|
exports.default = _default;
|
|
78
82
|
module.exports = exports.default;
|
|
@@ -231,6 +231,293 @@ Object {
|
|
|
231
231
|
}
|
|
232
232
|
`;
|
|
233
233
|
|
|
234
|
+
exports[`index package.json same path as .env.schema.json 1`] = `
|
|
235
|
+
Object {
|
|
236
|
+
"jobs": Object {
|
|
237
|
+
"cancel-existing": Object {
|
|
238
|
+
"if": "!contains(github.event.head_commit.message, '[skip ci]')",
|
|
239
|
+
"runs-on": "ubuntu-latest",
|
|
240
|
+
"steps": Array [
|
|
241
|
+
Object {
|
|
242
|
+
"env": Object {
|
|
243
|
+
"GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
|
|
244
|
+
},
|
|
245
|
+
"uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
"release": Object {
|
|
250
|
+
"needs": "test",
|
|
251
|
+
"runs-on": "ubuntu-latest",
|
|
252
|
+
"steps": Array [
|
|
253
|
+
Object {
|
|
254
|
+
"uses": "actions/checkout@v3",
|
|
255
|
+
"with": Object {
|
|
256
|
+
"lfs": true,
|
|
257
|
+
"ref": "\${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || '' }}",
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
Object {
|
|
261
|
+
"uses": "actions/setup-node@v3",
|
|
262
|
+
"with": Object {
|
|
263
|
+
"node-version": 14,
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
Object {
|
|
267
|
+
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
268
|
+
},
|
|
269
|
+
Object {
|
|
270
|
+
"run": "git config --global user.name \\"GitHub Actions\\"",
|
|
271
|
+
},
|
|
272
|
+
Object {
|
|
273
|
+
"run": "yarn --frozen-lockfile",
|
|
274
|
+
},
|
|
275
|
+
Object {
|
|
276
|
+
"run": "yarn checkUnknownFiles",
|
|
277
|
+
},
|
|
278
|
+
Object {
|
|
279
|
+
"run": "yarn lint",
|
|
280
|
+
},
|
|
281
|
+
Object {
|
|
282
|
+
"env": Object {
|
|
283
|
+
"GITHUB_REPOSITORY": "\${{ secrets.GITHUB_REPOSITORY }}",
|
|
284
|
+
"GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
|
|
285
|
+
},
|
|
286
|
+
"name": "Push changed files",
|
|
287
|
+
"run": "yarn dw-ci push-changed-files",
|
|
288
|
+
},
|
|
289
|
+
Object {
|
|
290
|
+
"env": Object {
|
|
291
|
+
"GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
|
|
292
|
+
"NPM_TOKEN": "\${{ secrets.NPM_TOKEN }}",
|
|
293
|
+
},
|
|
294
|
+
"if": "github.ref == 'refs/heads/master'",
|
|
295
|
+
"name": "Release",
|
|
296
|
+
"run": "yarn semantic-release",
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
"test": Object {
|
|
301
|
+
"needs": "cancel-existing",
|
|
302
|
+
"runs-on": "\${{ matrix.os }}",
|
|
303
|
+
"steps": Array [
|
|
304
|
+
Object {
|
|
305
|
+
"uses": "actions/checkout@v3",
|
|
306
|
+
"with": Object {
|
|
307
|
+
"fetch-depth": 0,
|
|
308
|
+
"lfs": true,
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
Object {
|
|
312
|
+
"uses": "actions/setup-node@v3",
|
|
313
|
+
"with": Object {
|
|
314
|
+
"node-version": "\${{ matrix.node }}",
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
Object {
|
|
318
|
+
"run": "yarn --frozen-lockfile",
|
|
319
|
+
},
|
|
320
|
+
Object {
|
|
321
|
+
"env": Object {
|
|
322
|
+
"TEST_FOO": "\${{ secrets.TEST_FOO }}",
|
|
323
|
+
},
|
|
324
|
+
"run": "yarn test",
|
|
325
|
+
},
|
|
326
|
+
Object {
|
|
327
|
+
"if": "failure()",
|
|
328
|
+
"uses": "actions/upload-artifact@v3",
|
|
329
|
+
"with": Object {
|
|
330
|
+
"name": "Image Snapshot Diffs",
|
|
331
|
+
"path": "**/__image_snapshots__/__diff_output__",
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
Object {
|
|
335
|
+
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 14",
|
|
336
|
+
"uses": "codecov/codecov-action@v2",
|
|
337
|
+
"with": Object {
|
|
338
|
+
"fail_ci_if_error": true,
|
|
339
|
+
"token": "\${{ secrets.CODECOV_TOKEN }}",
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
"strategy": Object {
|
|
344
|
+
"matrix": Object {
|
|
345
|
+
"include": Array [
|
|
346
|
+
Object {
|
|
347
|
+
"node": 12,
|
|
348
|
+
"os": "ubuntu-latest",
|
|
349
|
+
},
|
|
350
|
+
Object {
|
|
351
|
+
"node": 14,
|
|
352
|
+
"os": "ubuntu-latest",
|
|
353
|
+
},
|
|
354
|
+
Object {
|
|
355
|
+
"os": "macos-latest",
|
|
356
|
+
"version": 14,
|
|
357
|
+
},
|
|
358
|
+
Object {
|
|
359
|
+
"os": "windows-latest",
|
|
360
|
+
"version": 14,
|
|
361
|
+
},
|
|
362
|
+
],
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
"name": "build",
|
|
368
|
+
"on": Object {
|
|
369
|
+
"pull_request": Object {},
|
|
370
|
+
"push": Object {
|
|
371
|
+
"branches": Array [
|
|
372
|
+
"master",
|
|
373
|
+
],
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
}
|
|
377
|
+
`;
|
|
378
|
+
|
|
379
|
+
exports[`index subdir 1`] = `
|
|
380
|
+
Object {
|
|
381
|
+
"jobs": Object {
|
|
382
|
+
"cancel-existing": Object {
|
|
383
|
+
"if": "!contains(github.event.head_commit.message, '[skip ci]')",
|
|
384
|
+
"runs-on": "ubuntu-latest",
|
|
385
|
+
"steps": Array [
|
|
386
|
+
Object {
|
|
387
|
+
"env": Object {
|
|
388
|
+
"GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
|
|
389
|
+
},
|
|
390
|
+
"uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
|
|
391
|
+
},
|
|
392
|
+
],
|
|
393
|
+
},
|
|
394
|
+
"release": Object {
|
|
395
|
+
"needs": "test",
|
|
396
|
+
"runs-on": "ubuntu-latest",
|
|
397
|
+
"steps": Array [
|
|
398
|
+
Object {
|
|
399
|
+
"uses": "actions/checkout@v3",
|
|
400
|
+
"with": Object {
|
|
401
|
+
"lfs": true,
|
|
402
|
+
"ref": "\${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || '' }}",
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
Object {
|
|
406
|
+
"uses": "actions/setup-node@v3",
|
|
407
|
+
"with": Object {
|
|
408
|
+
"node-version": 14,
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
Object {
|
|
412
|
+
"run": "git config --global user.email \\"actions@github.com\\"",
|
|
413
|
+
},
|
|
414
|
+
Object {
|
|
415
|
+
"run": "git config --global user.name \\"GitHub Actions\\"",
|
|
416
|
+
},
|
|
417
|
+
Object {
|
|
418
|
+
"run": "yarn --frozen-lockfile",
|
|
419
|
+
},
|
|
420
|
+
Object {
|
|
421
|
+
"run": "yarn checkUnknownFiles",
|
|
422
|
+
},
|
|
423
|
+
Object {
|
|
424
|
+
"run": "yarn lint",
|
|
425
|
+
},
|
|
426
|
+
Object {
|
|
427
|
+
"env": Object {
|
|
428
|
+
"GITHUB_REPOSITORY": "\${{ secrets.GITHUB_REPOSITORY }}",
|
|
429
|
+
"GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
|
|
430
|
+
},
|
|
431
|
+
"name": "Push changed files",
|
|
432
|
+
"run": "yarn dw-ci push-changed-files",
|
|
433
|
+
},
|
|
434
|
+
Object {
|
|
435
|
+
"env": Object {
|
|
436
|
+
"GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
|
|
437
|
+
"NPM_TOKEN": "\${{ secrets.NPM_TOKEN }}",
|
|
438
|
+
},
|
|
439
|
+
"if": "github.ref == 'refs/heads/master'",
|
|
440
|
+
"name": "Release",
|
|
441
|
+
"run": "yarn semantic-release",
|
|
442
|
+
},
|
|
443
|
+
],
|
|
444
|
+
},
|
|
445
|
+
"test": Object {
|
|
446
|
+
"needs": "cancel-existing",
|
|
447
|
+
"runs-on": "\${{ matrix.os }}",
|
|
448
|
+
"steps": Array [
|
|
449
|
+
Object {
|
|
450
|
+
"uses": "actions/checkout@v3",
|
|
451
|
+
"with": Object {
|
|
452
|
+
"fetch-depth": 0,
|
|
453
|
+
"lfs": true,
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
Object {
|
|
457
|
+
"uses": "actions/setup-node@v3",
|
|
458
|
+
"with": Object {
|
|
459
|
+
"node-version": "\${{ matrix.node }}",
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
Object {
|
|
463
|
+
"run": "yarn --frozen-lockfile",
|
|
464
|
+
},
|
|
465
|
+
Object {
|
|
466
|
+
"run": "yarn test",
|
|
467
|
+
},
|
|
468
|
+
Object {
|
|
469
|
+
"if": "failure()",
|
|
470
|
+
"uses": "actions/upload-artifact@v3",
|
|
471
|
+
"with": Object {
|
|
472
|
+
"name": "Image Snapshot Diffs",
|
|
473
|
+
"path": "**/__image_snapshots__/__diff_output__",
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
Object {
|
|
477
|
+
"if": "matrix.os == 'ubuntu-latest' && matrix.node == 14",
|
|
478
|
+
"uses": "codecov/codecov-action@v2",
|
|
479
|
+
"with": Object {
|
|
480
|
+
"fail_ci_if_error": true,
|
|
481
|
+
"token": "\${{ secrets.CODECOV_TOKEN }}",
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
],
|
|
485
|
+
"strategy": Object {
|
|
486
|
+
"matrix": Object {
|
|
487
|
+
"include": Array [
|
|
488
|
+
Object {
|
|
489
|
+
"node": 12,
|
|
490
|
+
"os": "ubuntu-latest",
|
|
491
|
+
},
|
|
492
|
+
Object {
|
|
493
|
+
"node": 14,
|
|
494
|
+
"os": "ubuntu-latest",
|
|
495
|
+
},
|
|
496
|
+
Object {
|
|
497
|
+
"os": "macos-latest",
|
|
498
|
+
"version": 14,
|
|
499
|
+
},
|
|
500
|
+
Object {
|
|
501
|
+
"os": "windows-latest",
|
|
502
|
+
"version": 14,
|
|
503
|
+
},
|
|
504
|
+
],
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
"name": "build",
|
|
510
|
+
"on": Object {
|
|
511
|
+
"pull_request": Object {},
|
|
512
|
+
"push": Object {
|
|
513
|
+
"branches": Array [
|
|
514
|
+
"master",
|
|
515
|
+
],
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
}
|
|
519
|
+
`;
|
|
520
|
+
|
|
234
521
|
exports[`index test environment variables 1`] = `
|
|
235
522
|
Object {
|
|
236
523
|
"jobs": Object {
|
|
@@ -15,11 +15,25 @@ var _constantCase = require("constant-case");
|
|
|
15
15
|
|
|
16
16
|
var _findUp = _interopRequireDefault(require("find-up"));
|
|
17
17
|
|
|
18
|
+
var _fsExtra = require("fs-extra");
|
|
19
|
+
|
|
20
|
+
var _path = _interopRequireDefault(require("path"));
|
|
21
|
+
|
|
18
22
|
var _ref, _ref2, _ref3, _envVariableNames;
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
25
|
|
|
22
|
-
const envSchemaPath = _findUp.default.sync(
|
|
26
|
+
const envSchemaPath = _findUp.default.sync(path => {
|
|
27
|
+
if ((0, _fsExtra.existsSync)('.env.schema.json')) {
|
|
28
|
+
return '.env.schema.json';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if ((0, _fsExtra.existsSync)(_path.default.join(path, 'package.json'))) {
|
|
32
|
+
return _findUp.default.stop;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return undefined;
|
|
36
|
+
});
|
|
23
37
|
|
|
24
38
|
const envVariableNames = (_ref = (_ref2 = envSchemaPath ? require(envSchemaPath) : {}, (0, _keys.default)(_ref2)), (0, _map.default)(name => {
|
|
25
39
|
var _name;
|