@theholocron/holocron-config 7.26.1 → 7.27.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.
- package/dist/configs/nextjs.d.ts +14 -6
- package/dist/configs/nextjs.js +11 -6
- package/package.json +4 -4
package/dist/configs/nextjs.d.ts
CHANGED
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
import { HolocronPreset } from "./node.js";
|
|
2
2
|
//#region configs/nextjs.d.ts
|
|
3
|
+
interface NextjsOptions {
|
|
4
|
+
/** Extra `with:` inputs merged into the `test` workflow entry (e.g. wait-on-url, run-chromatic). */
|
|
5
|
+
test?: Record<string, unknown>;
|
|
6
|
+
}
|
|
3
7
|
/**
|
|
4
8
|
* Preset for single-package Next.js application repos. Includes Vercel
|
|
5
9
|
* deployment, Lighthouse audit, Storybook + interaction + user-flow tests,
|
|
6
|
-
* and the Conclusion required checks.
|
|
7
|
-
*
|
|
10
|
+
* and the Conclusion required checks.
|
|
11
|
+
*
|
|
12
|
+
* Pass `test` overrides to merge repo-specific options (e.g. `wait-on-url`,
|
|
13
|
+
* `run-chromatic`) into the single test workflow entry so the sync tool sees
|
|
14
|
+
* one complete entry rather than two conflicting ones.
|
|
8
15
|
*
|
|
9
16
|
* @example
|
|
10
|
-
* const { repo, workflows, providers, org, domain } = nextjs(
|
|
17
|
+
* const { repo, workflows, providers, org, domain } = nextjs({
|
|
18
|
+
* test: { "wait-on-url": "http://localhost:3000", "run-chromatic": true },
|
|
19
|
+
* });
|
|
11
20
|
* export default defineConfig({
|
|
12
21
|
* org,
|
|
13
22
|
* domain,
|
|
14
23
|
* repo: { ...repo, name: "theholocron/my-app", topics: ["nextjs"] },
|
|
15
24
|
* workflows: [
|
|
16
25
|
* ...workflows,
|
|
17
|
-
* { name: "test", with: { "run-chromatic": true, "wait-on-url": "http://localhost:3000" } },
|
|
18
26
|
* "sync",
|
|
19
27
|
* { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
|
|
20
28
|
* ],
|
|
21
29
|
* providers,
|
|
22
30
|
* });
|
|
23
31
|
*/
|
|
24
|
-
declare function nextjs(): HolocronPreset & {
|
|
32
|
+
declare function nextjs({ test: testOverrides }?: NextjsOptions): HolocronPreset & {
|
|
25
33
|
org: string;
|
|
26
34
|
domain: string;
|
|
27
35
|
};
|
|
28
36
|
//#endregion
|
|
29
|
-
export { nextjs };
|
|
37
|
+
export { NextjsOptions, nextjs };
|
package/dist/configs/nextjs.js
CHANGED
|
@@ -15,25 +15,29 @@ const REQUIRED_CHECKS = [
|
|
|
15
15
|
/**
|
|
16
16
|
* Preset for single-package Next.js application repos. Includes Vercel
|
|
17
17
|
* deployment, Lighthouse audit, Storybook + interaction + user-flow tests,
|
|
18
|
-
* and the Conclusion required checks.
|
|
19
|
-
*
|
|
18
|
+
* and the Conclusion required checks.
|
|
19
|
+
*
|
|
20
|
+
* Pass `test` overrides to merge repo-specific options (e.g. `wait-on-url`,
|
|
21
|
+
* `run-chromatic`) into the single test workflow entry so the sync tool sees
|
|
22
|
+
* one complete entry rather than two conflicting ones.
|
|
20
23
|
*
|
|
21
24
|
* @example
|
|
22
|
-
* const { repo, workflows, providers, org, domain } = nextjs(
|
|
25
|
+
* const { repo, workflows, providers, org, domain } = nextjs({
|
|
26
|
+
* test: { "wait-on-url": "http://localhost:3000", "run-chromatic": true },
|
|
27
|
+
* });
|
|
23
28
|
* export default defineConfig({
|
|
24
29
|
* org,
|
|
25
30
|
* domain,
|
|
26
31
|
* repo: { ...repo, name: "theholocron/my-app", topics: ["nextjs"] },
|
|
27
32
|
* workflows: [
|
|
28
33
|
* ...workflows,
|
|
29
|
-
* { name: "test", with: { "run-chromatic": true, "wait-on-url": "http://localhost:3000" } },
|
|
30
34
|
* "sync",
|
|
31
35
|
* { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
|
|
32
36
|
* ],
|
|
33
37
|
* providers,
|
|
34
38
|
* });
|
|
35
39
|
*/
|
|
36
|
-
function nextjs() {
|
|
40
|
+
function nextjs({ test: testOverrides = {} } = {}) {
|
|
37
41
|
const base = node();
|
|
38
42
|
return {
|
|
39
43
|
...base,
|
|
@@ -69,7 +73,8 @@ function nextjs() {
|
|
|
69
73
|
"run-unit": false,
|
|
70
74
|
"run-storybook": true,
|
|
71
75
|
"run-interaction": true,
|
|
72
|
-
"run-user-flow": true
|
|
76
|
+
"run-user-flow": true,
|
|
77
|
+
...testOverrides
|
|
73
78
|
}
|
|
74
79
|
}
|
|
75
80
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-config",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.27.0",
|
|
4
4
|
"description": "Shareable holocron configuration presets for theholocron repositories.",
|
|
5
5
|
"homepage": "https://github.com/theholocron/configs/tree/main/packages/holocron-config#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/configs/issues",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@theholocron/cli": "^3.
|
|
21
|
+
"@theholocron/cli": "^3.37.0",
|
|
22
22
|
"tsdown": "^0.22.14",
|
|
23
23
|
"typescript": "^5.9.3",
|
|
24
24
|
"vitest": "^4.1.10",
|
|
25
25
|
"@vitest/coverage-v8": "^4.1.10",
|
|
26
|
-
"@theholocron/
|
|
27
|
-
"@theholocron/
|
|
26
|
+
"@theholocron/vitest-config": "7.27.0",
|
|
27
|
+
"@theholocron/tsconfig": "7.27.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@theholocron/cli": ">=2.0.0-alpha.1"
|