@dword-design/base 12.0.18 → 12.1.0

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.
@@ -8,6 +8,7 @@ Object {
8
8
  "deployEnv": Object {},
9
9
  "deployPlugins": Array [],
10
10
  "editorIgnore": Array [],
11
+ "fetchGitHistory": false,
11
12
  "git": undefined,
12
13
  "gitignore": Array [],
13
14
  "macos": true,
@@ -53,6 +54,7 @@ Object {
53
54
  "editorIgnore": Array [
54
55
  "foo",
55
56
  ],
57
+ "fetchGitHistory": false,
56
58
  "git": undefined,
57
59
  "gitignore": Array [
58
60
  "foo",
@@ -31,5 +31,5 @@ export default async function (options) {
31
31
  stderr: options.stderr
32
32
  });
33
33
  }
34
- await this.config.prepare(options);
34
+ await this.config.prepare.call(this, options);
35
35
  }
@@ -2,19 +2,11 @@
2
2
 
3
3
  exports[`index job matrix 1`] = `
4
4
  Object {
5
+ "concurrency": Object {
6
+ "cancel-in-progress": true,
7
+ "group": "\${{ github.workflow }}-\${{ github.ref }}",
8
+ },
5
9
  "jobs": Object {
6
- "cancel-existing": Object {
7
- "if": "!contains(github.event.head_commit.message, '[skip ci]')",
8
- "runs-on": "ubuntu-latest",
9
- "steps": Array [
10
- Object {
11
- "env": Object {
12
- "GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
13
- },
14
- "uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
15
- },
16
- ],
17
- },
18
10
  "release": Object {
19
11
  "needs": "test",
20
12
  "runs-on": "ubuntu-latest",
@@ -69,13 +61,11 @@ Object {
69
61
  ],
70
62
  },
71
63
  "test": Object {
72
- "needs": "cancel-existing",
73
64
  "runs-on": "\${{ matrix.os }}",
74
65
  "steps": Array [
75
66
  Object {
76
67
  "uses": "actions/checkout@v4",
77
68
  "with": Object {
78
- "fetch-depth": 0,
79
69
  "lfs": true,
80
70
  },
81
71
  },
@@ -154,19 +144,11 @@ test-results/*/**",
154
144
 
155
145
  exports[`index job matrix no macos 1`] = `
156
146
  Object {
147
+ "concurrency": Object {
148
+ "cancel-in-progress": true,
149
+ "group": "\${{ github.workflow }}-\${{ github.ref }}",
150
+ },
157
151
  "jobs": Object {
158
- "cancel-existing": Object {
159
- "if": "!contains(github.event.head_commit.message, '[skip ci]')",
160
- "runs-on": "ubuntu-latest",
161
- "steps": Array [
162
- Object {
163
- "env": Object {
164
- "GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
165
- },
166
- "uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
167
- },
168
- ],
169
- },
170
152
  "release": Object {
171
153
  "needs": "test",
172
154
  "runs-on": "ubuntu-latest",
@@ -221,13 +203,11 @@ Object {
221
203
  ],
222
204
  },
223
205
  "test": Object {
224
- "needs": "cancel-existing",
225
206
  "runs-on": "\${{ matrix.os }}",
226
207
  "steps": Array [
227
208
  Object {
228
209
  "uses": "actions/checkout@v4",
229
210
  "with": Object {
230
- "fetch-depth": 0,
231
211
  "lfs": true,
232
212
  },
233
213
  },
@@ -302,19 +282,11 @@ test-results/*/**",
302
282
 
303
283
  exports[`index job matrix no windows 1`] = `
304
284
  Object {
285
+ "concurrency": Object {
286
+ "cancel-in-progress": true,
287
+ "group": "\${{ github.workflow }}-\${{ github.ref }}",
288
+ },
305
289
  "jobs": Object {
306
- "cancel-existing": Object {
307
- "if": "!contains(github.event.head_commit.message, '[skip ci]')",
308
- "runs-on": "ubuntu-latest",
309
- "steps": Array [
310
- Object {
311
- "env": Object {
312
- "GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
313
- },
314
- "uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
315
- },
316
- ],
317
- },
318
290
  "release": Object {
319
291
  "needs": "test",
320
292
  "runs-on": "ubuntu-latest",
@@ -369,13 +341,11 @@ Object {
369
341
  ],
370
342
  },
371
343
  "test": Object {
372
- "needs": "cancel-existing",
373
344
  "runs-on": "\${{ matrix.os }}",
374
345
  "steps": Array [
375
346
  Object {
376
347
  "uses": "actions/checkout@v4",
377
348
  "with": Object {
378
- "fetch-depth": 0,
379
349
  "lfs": true,
380
350
  },
381
351
  },
@@ -450,21 +420,18 @@ test-results/*/**",
450
420
 
451
421
  exports[`index no job matrix 1`] = `
452
422
  Object {
423
+ "concurrency": Object {
424
+ "cancel-in-progress": true,
425
+ "group": "\${{ github.workflow }}-\${{ github.ref }}",
426
+ },
453
427
  "jobs": Object {
454
428
  "build": Object {
455
429
  "if": "!contains(github.event.head_commit.message, '[skip ci]')",
456
430
  "runs-on": "ubuntu-latest",
457
431
  "steps": Array [
458
- Object {
459
- "env": Object {
460
- "GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
461
- },
462
- "uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
463
- },
464
432
  Object {
465
433
  "uses": "actions/checkout@v4",
466
434
  "with": Object {
467
- "fetch-depth": 0,
468
435
  "lfs": true,
469
436
  "ref": "\${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || '' }}",
470
437
  },
@@ -546,19 +513,11 @@ test-results/*/**",
546
513
 
547
514
  exports[`index package.json 1`] = `
548
515
  Object {
516
+ "concurrency": Object {
517
+ "cancel-in-progress": true,
518
+ "group": "\${{ github.workflow }}-\${{ github.ref }}",
519
+ },
549
520
  "jobs": Object {
550
- "cancel-existing": Object {
551
- "if": "!contains(github.event.head_commit.message, '[skip ci]')",
552
- "runs-on": "ubuntu-latest",
553
- "steps": Array [
554
- Object {
555
- "env": Object {
556
- "GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
557
- },
558
- "uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
559
- },
560
- ],
561
- },
562
521
  "release": Object {
563
522
  "needs": "test",
564
523
  "runs-on": "ubuntu-latest",
@@ -614,13 +573,11 @@ Object {
614
573
  ],
615
574
  },
616
575
  "test": Object {
617
- "needs": "cancel-existing",
618
576
  "runs-on": "\${{ matrix.os }}",
619
577
  "steps": Array [
620
578
  Object {
621
579
  "uses": "actions/checkout@v4",
622
580
  "with": Object {
623
- "fetch-depth": 0,
624
581
  "lfs": true,
625
582
  },
626
583
  },
@@ -699,19 +656,11 @@ test-results/*/**",
699
656
 
700
657
  exports[`index package.json same path as .env.schema.json 1`] = `
701
658
  Object {
659
+ "concurrency": Object {
660
+ "cancel-in-progress": true,
661
+ "group": "\${{ github.workflow }}-\${{ github.ref }}",
662
+ },
702
663
  "jobs": Object {
703
- "cancel-existing": Object {
704
- "if": "!contains(github.event.head_commit.message, '[skip ci]')",
705
- "runs-on": "ubuntu-latest",
706
- "steps": Array [
707
- Object {
708
- "env": Object {
709
- "GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
710
- },
711
- "uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
712
- },
713
- ],
714
- },
715
664
  "release": Object {
716
665
  "needs": "test",
717
666
  "runs-on": "ubuntu-latest",
@@ -767,13 +716,11 @@ Object {
767
716
  ],
768
717
  },
769
718
  "test": Object {
770
- "needs": "cancel-existing",
771
719
  "runs-on": "\${{ matrix.os }}",
772
720
  "steps": Array [
773
721
  Object {
774
722
  "uses": "actions/checkout@v4",
775
723
  "with": Object {
776
- "fetch-depth": 0,
777
724
  "lfs": true,
778
725
  },
779
726
  },
@@ -999,21 +946,18 @@ Object {
999
946
 
1000
947
  exports[`index test environment variables 1`] = `
1001
948
  Object {
949
+ "concurrency": Object {
950
+ "cancel-in-progress": true,
951
+ "group": "\${{ github.workflow }}-\${{ github.ref }}",
952
+ },
1002
953
  "jobs": Object {
1003
954
  "build": Object {
1004
955
  "if": "!contains(github.event.head_commit.message, '[skip ci]')",
1005
956
  "runs-on": "ubuntu-latest",
1006
957
  "steps": Array [
1007
- Object {
1008
- "env": Object {
1009
- "GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
1010
- },
1011
- "uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
1012
- },
1013
958
  Object {
1014
959
  "uses": "actions/checkout@v4",
1015
960
  "with": Object {
1016
- "fetch-depth": 0,
1017
961
  "lfs": true,
1018
962
  "ref": "\${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || '' }}",
1019
963
  },
@@ -1097,21 +1041,18 @@ test-results/*/**",
1097
1041
 
1098
1042
  exports[`index testInContainer 1`] = `
1099
1043
  Object {
1044
+ "concurrency": Object {
1045
+ "cancel-in-progress": true,
1046
+ "group": "\${{ github.workflow }}-\${{ github.ref }}",
1047
+ },
1100
1048
  "jobs": Object {
1101
1049
  "build": Object {
1102
1050
  "if": "!contains(github.event.head_commit.message, '[skip ci]')",
1103
1051
  "runs-on": "ubuntu-latest",
1104
1052
  "steps": Array [
1105
- Object {
1106
- "env": Object {
1107
- "GITHUB_TOKEN": "\${{ secrets.GITHUB_TOKEN }}",
1108
- },
1109
- "uses": "rokroskar/workflow-run-cleanup-action@v0.3.3",
1110
- },
1111
1053
  Object {
1112
1054
  "uses": "actions/checkout@v4",
1113
1055
  "with": Object {
1114
- "fetch-depth": 0,
1115
1056
  "lfs": true,
1116
1057
  "ref": "\${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || '' }}",
1117
1058
  },
@@ -2,6 +2,10 @@ import jobMatrixStrategy from "./strategies/job-matrix.js";
2
2
  import simpleStrategy from "./strategies/simple.js";
3
3
  export default function () {
4
4
  return {
5
+ concurrency: {
6
+ 'cancel-in-progress': true,
7
+ group: '${{ github.workflow }}-${{ github.ref }}'
8
+ },
5
9
  jobs: (this.config.useJobMatrix && !this.config.testInContainer ? jobMatrixStrategy : simpleStrategy).call(this),
6
10
  name: 'build',
7
11
  on: {
@@ -1,6 +1,5 @@
1
1
  import { map } from '@dword-design/functions';
2
2
  import gitHubAction from 'tagged-template-noop';
3
- import cancelExistingSteps from "../steps/cancel-existing.js";
4
3
  import checkUnknownFilesSteps from "../steps/check-unknown-files.js";
5
4
  import coverageSteps from "../steps/coverage.js";
6
5
  import getReleaseSteps from "../steps/get-release.js";
@@ -8,11 +7,6 @@ import getTestSteps from "../steps/get-test.js";
8
7
  export default function () {
9
8
  var _coverageSteps;
10
9
  return {
11
- 'cancel-existing': {
12
- if: "!contains(github.event.head_commit.message, '[skip ci]')",
13
- 'runs-on': 'ubuntu-latest',
14
- steps: cancelExistingSteps
15
- },
16
10
  release: {
17
11
  needs: 'test',
18
12
  'runs-on': 'ubuntu-latest',
@@ -40,12 +34,13 @@ export default function () {
40
34
  }, ...getReleaseSteps.call(this)]
41
35
  },
42
36
  test: {
43
- needs: 'cancel-existing',
44
37
  'runs-on': '${{ matrix.os }}',
45
38
  steps: [{
46
39
  uses: gitHubAction`actions/checkout@v4`,
47
40
  with: {
48
- 'fetch-depth': 0,
41
+ ...(this.config.fetchGitHistory && {
42
+ 'fetch-depth': 0
43
+ }),
49
44
  lfs: true
50
45
  }
51
46
  }, {
@@ -1,5 +1,4 @@
1
1
  import gitHubAction from 'tagged-template-noop';
2
- import cancelExistingSteps from "../steps/cancel-existing.js";
3
2
  import checkUnknownFilesSteps from "../steps/check-unknown-files.js";
4
3
  import coverageSteps from "../steps/coverage.js";
5
4
  import getReleaseSteps from "../steps/get-release.js";
@@ -9,10 +8,12 @@ export default function () {
9
8
  build: {
10
9
  if: "!contains(github.event.head_commit.message, '[skip ci]')",
11
10
  'runs-on': 'ubuntu-latest',
12
- steps: [...cancelExistingSteps, {
11
+ steps: [{
13
12
  uses: gitHubAction`actions/checkout@v4`,
14
13
  with: {
15
- 'fetch-depth': 0,
14
+ ...(this.config.fetchGitHistory && {
15
+ 'fetch-depth': 0
16
+ }),
16
17
  lfs: true,
17
18
  ref: "${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || '' }}"
18
19
  }
package/dist/index.js CHANGED
@@ -80,6 +80,7 @@ class Base {
80
80
  deployEnv: {},
81
81
  deployPlugins: [],
82
82
  editorIgnore: [],
83
+ fetchGitHistory: false,
83
84
  git: getGitInfo({
84
85
  cwd: this.cwd
85
86
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base",
3
- "version": "12.0.18",
3
+ "version": "12.1.0",
4
4
  "description": "Base package for projects.",
5
5
  "repository": "dword-design/base",
6
6
  "funding": "https://github.com/sponsors/dword-design",