@theholocron/holocron-config 7.2.0 → 7.2.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/README.md +15 -13
- package/dist/configs/node.d.ts +29 -0
- package/dist/configs/node.js +54 -0
- package/dist/index.d.ts +2 -26
- package/dist/index.js +2 -43
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -14,31 +14,33 @@ In your repo's `holocron.config.ts`, import the preset and spread each fragment
|
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
16
|
import { defineConfig } from "@theholocron/cli";
|
|
17
|
-
import
|
|
18
|
-
import { theholocronNode } from "@theholocron/holocron-config";
|
|
17
|
+
import { node } from "@theholocron/holocron-config";
|
|
19
18
|
|
|
20
|
-
const defaults =
|
|
19
|
+
const defaults = node();
|
|
21
20
|
export default defineConfig({
|
|
22
21
|
project: {
|
|
23
22
|
name: "my-repo",
|
|
24
23
|
description: "What this repo does.",
|
|
25
|
-
repo:
|
|
26
|
-
|
|
24
|
+
repo: {
|
|
25
|
+
name: "theholocron/my-repo",
|
|
26
|
+
topics: ["typescript"],
|
|
27
|
+
...defaults.repo,
|
|
28
|
+
},
|
|
27
29
|
workflows: [
|
|
28
30
|
...defaults.workflows,
|
|
29
31
|
{ name: "release", with: { "run-build": true } },
|
|
30
32
|
],
|
|
31
33
|
},
|
|
32
34
|
providers: defaults.providers,
|
|
33
|
-
}
|
|
35
|
+
});
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
`
|
|
38
|
+
`node()` returns three fragments:
|
|
37
39
|
|
|
38
|
-
| Fragment
|
|
39
|
-
|
|
|
40
|
-
| `providers`
|
|
41
|
-
| `
|
|
42
|
-
| `workflows`
|
|
40
|
+
| Fragment | Contents |
|
|
41
|
+
| ----------- | ------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| `providers` | `source: "github"`, `ci: "github"`, `issues: ["github", { labels: … }]` |
|
|
43
|
+
| `repo` | `protection: "strict"`, `properties: { lifecycle: "active", … }` |
|
|
44
|
+
| `workflows` | `lint`, `test`, `typecheck`, `codeql`, `review`, `stale`, `greetings`, `dependencies`, `bookkeeping-pr` |
|
|
43
45
|
|
|
44
|
-
Everything else — `project.name`, `project.description`, `
|
|
46
|
+
Everything else — `project.name`, `project.description`, `repo.name`, `repo.topics`, and any per-repo workflow overrides (e.g. `release`) — stays in the consuming repo's config.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HolocronConfig, RepoConfig } from "@theholocron/cli";
|
|
2
|
+
//#region configs/node.d.ts
|
|
3
|
+
interface HolocronPreset {
|
|
4
|
+
providers: HolocronConfig["providers"];
|
|
5
|
+
repo: Omit<RepoConfig, "name" | "requiredChecks">;
|
|
6
|
+
workflows: NonNullable<HolocronConfig["project"]["workflows"]>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Shared defaults for theholocron Node.js repositories.
|
|
10
|
+
* Spread the returned fragments into `defineConfig()` — only add what's unique per repo.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const defaults = node();
|
|
14
|
+
* export default defineConfig({
|
|
15
|
+
* project: {
|
|
16
|
+
* name: "my-repo",
|
|
17
|
+
* repo: {
|
|
18
|
+
* name: "theholocron/my-repo",
|
|
19
|
+
* topics: ["typescript"],
|
|
20
|
+
* ...defaults.repo,
|
|
21
|
+
* },
|
|
22
|
+
* workflows: [...defaults.workflows, { name: "release", with: { "run-build": true } }],
|
|
23
|
+
* },
|
|
24
|
+
* providers: defaults.providers,
|
|
25
|
+
* });
|
|
26
|
+
*/
|
|
27
|
+
declare function node(): HolocronPreset;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { HolocronPreset, node };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//#region configs/node.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shared defaults for theholocron Node.js repositories.
|
|
4
|
+
* Spread the returned fragments into `defineConfig()` — only add what's unique per repo.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const defaults = node();
|
|
8
|
+
* export default defineConfig({
|
|
9
|
+
* project: {
|
|
10
|
+
* name: "my-repo",
|
|
11
|
+
* repo: {
|
|
12
|
+
* name: "theholocron/my-repo",
|
|
13
|
+
* topics: ["typescript"],
|
|
14
|
+
* ...defaults.repo,
|
|
15
|
+
* },
|
|
16
|
+
* workflows: [...defaults.workflows, { name: "release", with: { "run-build": true } }],
|
|
17
|
+
* },
|
|
18
|
+
* providers: defaults.providers,
|
|
19
|
+
* });
|
|
20
|
+
*/
|
|
21
|
+
function node() {
|
|
22
|
+
return {
|
|
23
|
+
providers: {
|
|
24
|
+
source: "github",
|
|
25
|
+
ci: "github",
|
|
26
|
+
issues: ["github", { labels: {
|
|
27
|
+
inProgress: "status:in-progress",
|
|
28
|
+
inReview: "status:in-review"
|
|
29
|
+
} }]
|
|
30
|
+
},
|
|
31
|
+
repo: {
|
|
32
|
+
protection: "strict",
|
|
33
|
+
properties: {
|
|
34
|
+
lifecycle: "active",
|
|
35
|
+
open_source: true,
|
|
36
|
+
runtime_environment: "node",
|
|
37
|
+
uses_external_packages: true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
workflows: [
|
|
41
|
+
"lint",
|
|
42
|
+
"test",
|
|
43
|
+
"typecheck",
|
|
44
|
+
"codeql",
|
|
45
|
+
"review",
|
|
46
|
+
"stale",
|
|
47
|
+
"greetings",
|
|
48
|
+
"dependencies",
|
|
49
|
+
"bookkeeping-pr"
|
|
50
|
+
]
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { node };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
interface HolocronPreset {
|
|
4
|
-
providers: HolocronConfig["providers"];
|
|
5
|
-
repoPolicy: NonNullable<HolocronConfig["project"]["repoPolicy"]>;
|
|
6
|
-
workflows: NonNullable<HolocronConfig["project"]["workflows"]>;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Shared defaults for theholocron Node.js repositories.
|
|
10
|
-
* Spread the returned fragments into `defineConfig()` — only add what's unique per repo.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* const defaults = theholocronNode();
|
|
14
|
-
* export default defineConfig({
|
|
15
|
-
* project: {
|
|
16
|
-
* name: "my-repo",
|
|
17
|
-
* repo: "theholocron/my-repo",
|
|
18
|
-
* repoPolicy: defaults.repoPolicy,
|
|
19
|
-
* workflows: [...defaults.workflows, { name: "release", with: { "run-build": true } }],
|
|
20
|
-
* },
|
|
21
|
-
* ...defaults.providers,
|
|
22
|
-
* } satisfies HolocronConfig);
|
|
23
|
-
*/
|
|
24
|
-
declare function theholocronNode(): HolocronPreset;
|
|
25
|
-
//#endregion
|
|
26
|
-
export { HolocronPreset, theholocronNode };
|
|
1
|
+
import { HolocronPreset, node } from "./configs/node.js";
|
|
2
|
+
export { type HolocronPreset, node };
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Shared defaults for theholocron Node.js repositories.
|
|
4
|
-
* Spread the returned fragments into `defineConfig()` — only add what's unique per repo.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* const defaults = theholocronNode();
|
|
8
|
-
* export default defineConfig({
|
|
9
|
-
* project: {
|
|
10
|
-
* name: "my-repo",
|
|
11
|
-
* repo: "theholocron/my-repo",
|
|
12
|
-
* repoPolicy: defaults.repoPolicy,
|
|
13
|
-
* workflows: [...defaults.workflows, { name: "release", with: { "run-build": true } }],
|
|
14
|
-
* },
|
|
15
|
-
* ...defaults.providers,
|
|
16
|
-
* } satisfies HolocronConfig);
|
|
17
|
-
*/
|
|
18
|
-
function theholocronNode() {
|
|
19
|
-
return {
|
|
20
|
-
providers: {
|
|
21
|
-
source: "github",
|
|
22
|
-
ci: "github",
|
|
23
|
-
issues: ["github", { labels: {
|
|
24
|
-
inProgress: "status:in-progress",
|
|
25
|
-
inReview: "status:in-review"
|
|
26
|
-
} }]
|
|
27
|
-
},
|
|
28
|
-
repoPolicy: { preset: "strict" },
|
|
29
|
-
workflows: [
|
|
30
|
-
"lint",
|
|
31
|
-
"test",
|
|
32
|
-
"typecheck",
|
|
33
|
-
"codeql",
|
|
34
|
-
"review",
|
|
35
|
-
"stale",
|
|
36
|
-
"greetings",
|
|
37
|
-
"dependencies",
|
|
38
|
-
"bookkeeping-pr"
|
|
39
|
-
]
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
export { theholocronNode };
|
|
1
|
+
import { node } from "./configs/node.js";
|
|
2
|
+
export { node };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-config",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.2",
|
|
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,12 +18,12 @@
|
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@theholocron/cli": "2.0.0-alpha.
|
|
21
|
+
"@theholocron/cli": "2.0.0-alpha.54",
|
|
22
22
|
"tsdown": "^0.22.8",
|
|
23
23
|
"typescript": "^5.9.3",
|
|
24
24
|
"vitest": "^4.0.0",
|
|
25
|
-
"@theholocron/tsconfig": "7.2.
|
|
26
|
-
"@theholocron/vitest-config": "7.2.
|
|
25
|
+
"@theholocron/tsconfig": "7.2.2",
|
|
26
|
+
"@theholocron/vitest-config": "7.2.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@theholocron/cli": ">=2.0.0-alpha.1"
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
"import": "./dist/index.js",
|
|
35
35
|
"default": "./dist/index.js"
|
|
36
36
|
},
|
|
37
|
+
"./node": {
|
|
38
|
+
"types": "./dist/configs/node.d.ts",
|
|
39
|
+
"import": "./dist/configs/node.js",
|
|
40
|
+
"default": "./dist/configs/node.js"
|
|
41
|
+
},
|
|
37
42
|
"./package.json": "./package.json"
|
|
38
43
|
},
|
|
39
44
|
"files": [
|