@dword-design/base 16.2.5 → 16.2.6
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/get-generated-files/get-github-workflow/index.js +11 -1
- package/dist/get-generated-files/get-github-workflow/strategies/job-matrix.d.ts +8 -2
- package/dist/get-generated-files/get-github-workflow/strategies/job-matrix.js +3 -12
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/package.json +1 -1
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import jobMatrixStrategy from "./strategies/job-matrix.js";
|
|
2
2
|
import simpleStrategy from "./strategies/simple.js";
|
|
3
3
|
export default function () {
|
|
4
|
+
const environments = [...this.config.supportedNodeVersions.map(version => ({
|
|
5
|
+
node: version,
|
|
6
|
+
os: "ubuntu-latest"
|
|
7
|
+
})), ...(this.config.macos ? [{
|
|
8
|
+
node: this.config.nodeVersion,
|
|
9
|
+
os: "macos-latest"
|
|
10
|
+
}] : []), ...(this.config.windows ? [{
|
|
11
|
+
node: this.config.nodeVersion,
|
|
12
|
+
os: "windows-latest"
|
|
13
|
+
}] : [])];
|
|
4
14
|
return {
|
|
5
15
|
concurrency: {
|
|
6
16
|
"cancel-in-progress": true,
|
|
7
17
|
group: "${{ github.workflow }}-${{ github.ref }}"
|
|
8
18
|
},
|
|
9
|
-
jobs:
|
|
19
|
+
jobs: environments.length > 1 && !this.config.testInContainer ? jobMatrixStrategy.call(this, environments) : simpleStrategy.call(this),
|
|
10
20
|
name: "build",
|
|
11
21
|
on: {
|
|
12
22
|
pull_request: {},
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export default function (
|
|
1
|
+
export default function (environments: Array<{
|
|
2
|
+
node: string;
|
|
3
|
+
os: string;
|
|
4
|
+
}>): {
|
|
2
5
|
release: {
|
|
3
6
|
needs: string;
|
|
4
7
|
'runs-on': string;
|
|
@@ -9,7 +12,10 @@ export default function (): {
|
|
|
9
12
|
steps: any[];
|
|
10
13
|
strategy: {
|
|
11
14
|
matrix: {
|
|
12
|
-
include:
|
|
15
|
+
include: {
|
|
16
|
+
node: string;
|
|
17
|
+
os: string;
|
|
18
|
+
}[];
|
|
13
19
|
};
|
|
14
20
|
};
|
|
15
21
|
};
|
|
@@ -7,7 +7,7 @@ import gitHubAction from "tagged-template-noop";
|
|
|
7
7
|
import coverageSteps from "../steps/coverage.js";
|
|
8
8
|
import getReleaseSteps from "../steps/get-release.js";
|
|
9
9
|
import getTestSteps from "../steps/get-test.js";
|
|
10
|
-
export default function () {
|
|
10
|
+
export default function (environments) {
|
|
11
11
|
const envSchemaPath = findUpSync(path => {
|
|
12
12
|
if (fs.existsSync(pathLib.join(path, ".env.schema.json"))) {
|
|
13
13
|
return ".env.schema.json";
|
|
@@ -79,21 +79,12 @@ export default function () {
|
|
|
79
79
|
}, {
|
|
80
80
|
run: "pnpm install --frozen-lockfile"
|
|
81
81
|
}, ...getTestSteps.call(this), ...coverageSteps.map(step => ({
|
|
82
|
-
if: `matrix.os == 'ubuntu-latest' && matrix.node == ${this.config.nodeVersion}`,
|
|
82
|
+
if: `matrix.os == 'ubuntu-latest'${this.config.supportedNodeVersions.length > 1 ? ` && matrix.node == ${this.config.nodeVersion}` : ""}`,
|
|
83
83
|
...step
|
|
84
84
|
}))],
|
|
85
85
|
strategy: {
|
|
86
86
|
matrix: {
|
|
87
|
-
include:
|
|
88
|
-
node: version,
|
|
89
|
-
os: "ubuntu-latest"
|
|
90
|
-
})), ...(this.config.macos ? [{
|
|
91
|
-
node: this.config.nodeVersion,
|
|
92
|
-
os: "macos-latest"
|
|
93
|
-
}] : []), ...(this.config.windows ? [{
|
|
94
|
-
node: this.config.nodeVersion,
|
|
95
|
-
os: "windows-latest"
|
|
96
|
-
}] : [])]
|
|
87
|
+
include: environments
|
|
97
88
|
}
|
|
98
89
|
}
|
|
99
90
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -205,12 +205,11 @@ class Base {
|
|
|
205
205
|
`,
|
|
206
206
|
renovateConfig: {},
|
|
207
207
|
seeAlso: [],
|
|
208
|
-
supportedNodeVersions: [22
|
|
208
|
+
supportedNodeVersions: [22],
|
|
209
209
|
syncKeywords: true,
|
|
210
210
|
testInContainer: false,
|
|
211
211
|
typecheck: () => {},
|
|
212
212
|
typescriptConfig: {},
|
|
213
|
-
useJobMatrix: true,
|
|
214
213
|
windows: true
|
|
215
214
|
};
|
|
216
215
|
const inheritedConfigPath = config.name && config.name === this.packageConfig.name ? pathLib.resolve(this.cwd, "src", "index.ts") : config.name;
|