@icebreakers/monorepo-templates 1.3.1 → 1.3.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 +6 -0
- package/README.zh-CN.md +6 -0
- package/assets/.github/workflows/ci.yml +11 -0
- package/assets/.github/workflows/release-intent-check.yml +57 -0
- package/assets/CONTRIBUTING.md +3 -1
- package/assets/package.json +54 -11
- package/assets/pnpm-workspace.yaml +13 -0
- package/assets/repoctl.config.ts +6 -1
- package/assets/turbo.json +13 -0
- package/package.json +4 -4
- package/templates/client/eslint.config.js +1 -1
- package/templates/client/package.json +10 -10
- package/templates/client/worker-configuration.d.ts +301 -16
- package/templates/server/package.json +3 -3
- package/templates/server/worker-configuration.d.ts +301 -16
- package/templates/vitepress/package.json +3 -3
- package/templates/vitepress/zh/learn/tools/turborepo.md +10 -10
- package/templates/vue-lib/package.json +3 -3
package/README.md
CHANGED
|
@@ -22,3 +22,9 @@ const vitepress = getTemplateDefinition('vitepress')
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
The source workspaces under the repository's `templates/` directory are private. This package is their supported distribution boundary.
|
|
25
|
+
|
|
26
|
+
## Project links
|
|
27
|
+
|
|
28
|
+
- Documentation: https://repoctl.icebreaker.top
|
|
29
|
+
- Repository: https://github.com/sonofmagic/repoctl/tree/main/packages/monorepo-templates
|
|
30
|
+
- Issues: https://github.com/sonofmagic/repoctl/issues
|
package/README.zh-CN.md
CHANGED
|
@@ -14,3 +14,9 @@ const vitepress = getTemplateDefinition('vitepress')
|
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
仓库 `templates/` 下的源码工作区均为私有,本包是这些模板的正式分发边界。
|
|
17
|
+
|
|
18
|
+
## 项目链接
|
|
19
|
+
|
|
20
|
+
- 文档:https://repoctl.icebreaker.top
|
|
21
|
+
- 仓库:https://github.com/sonofmagic/repoctl/tree/main/packages/monorepo-templates
|
|
22
|
+
- 问题反馈:https://github.com/sonofmagic/repoctl/issues
|
|
@@ -5,6 +5,11 @@ on:
|
|
|
5
5
|
# branches: ['main']
|
|
6
6
|
pull_request:
|
|
7
7
|
types: [opened, synchronize]
|
|
8
|
+
paths-ignore:
|
|
9
|
+
- '**/*.md'
|
|
10
|
+
- 'docs/**'
|
|
11
|
+
- '.changeset/**'
|
|
12
|
+
- 'LICENSE*'
|
|
8
13
|
workflow_dispatch:
|
|
9
14
|
|
|
10
15
|
permissions:
|
|
@@ -43,6 +48,12 @@ jobs:
|
|
|
43
48
|
- name: Install dependencies
|
|
44
49
|
run: pnpm install --frozen-lockfile
|
|
45
50
|
|
|
51
|
+
- name: Check tracked build artifacts
|
|
52
|
+
run: pnpm check:no-tracked-build-artifacts
|
|
53
|
+
|
|
54
|
+
- name: Check CI/CD workflow contracts
|
|
55
|
+
run: pnpm check:workflows
|
|
56
|
+
|
|
46
57
|
- name: Security Audit
|
|
47
58
|
run: pnpm audit --audit-level=moderate
|
|
48
59
|
continue-on-error: true
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Release Intent Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release-intent:
|
|
12
|
+
name: Require release intent for publishable changes
|
|
13
|
+
if: ${{ !github.event.pull_request.draft }}
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout repository
|
|
17
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Skip generated release PRs
|
|
22
|
+
if: startsWith(github.head_ref, 'pnpm-release/') || startsWith(github.head_ref, 'release/pnpm-version')
|
|
23
|
+
run: echo "Generated pnpm release PR detected; skipping validation"
|
|
24
|
+
|
|
25
|
+
- name: Validate release intent presence
|
|
26
|
+
if: ${{ !startsWith(github.head_ref, 'pnpm-release/') && !startsWith(github.head_ref, 'release/pnpm-version') }}
|
|
27
|
+
shell: bash
|
|
28
|
+
run: |
|
|
29
|
+
set -euo pipefail
|
|
30
|
+
|
|
31
|
+
base_sha="${{ github.event.pull_request.base.sha }}"
|
|
32
|
+
head_sha="${{ github.event.pull_request.head.sha }}"
|
|
33
|
+
changed_files="$(git diff --name-only "$base_sha" "$head_sha")"
|
|
34
|
+
|
|
35
|
+
publishable_changes="$(printf '%s\n' "$changed_files" | \
|
|
36
|
+
rg '^packages/[^/]+/' \
|
|
37
|
+
| rg -v '/dist/' \
|
|
38
|
+
|| true)"
|
|
39
|
+
|
|
40
|
+
if [ -z "$publishable_changes" ]; then
|
|
41
|
+
echo "No publishable package changes detected"
|
|
42
|
+
exit 0
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
release_intents="$(printf '%s\n' "$changed_files" | rg '^\.changeset/.+\.md$' || true)"
|
|
46
|
+
|
|
47
|
+
if [ -n "$release_intents" ]; then
|
|
48
|
+
echo "pnpm release intent detected"
|
|
49
|
+
exit 0
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
echo "Publishable package changes require a pnpm release intent in .changeset/*.md."
|
|
53
|
+
echo "Create one with: pnpm change"
|
|
54
|
+
echo
|
|
55
|
+
echo "Changed files:"
|
|
56
|
+
printf '%s\n' "$publishable_changes"
|
|
57
|
+
exit 1
|
package/assets/CONTRIBUTING.md
CHANGED
|
@@ -6,7 +6,7 @@ repoctl accepts bug fixes, documentation improvements, tests, and focused featur
|
|
|
6
6
|
|
|
7
7
|
## Development setup
|
|
8
8
|
|
|
9
|
-
1. Use Node.js 22.
|
|
9
|
+
1. Use Node.js 22.13+ and enable Corepack.
|
|
10
10
|
2. Run `pnpm install`.
|
|
11
11
|
3. Create a focused branch from `main`.
|
|
12
12
|
4. Add or update tests with the implementation.
|
|
@@ -23,6 +23,8 @@ pnpm test
|
|
|
23
23
|
|
|
24
24
|
Changes to publishable packages require a pnpm change intent created with `pnpm change`. Commits must use Conventional Commit syntax.
|
|
25
25
|
|
|
26
|
+
The repository includes repoctl's CLI and monorepo engine, template assets, shared lint/config packages, and the `apps/mock` fixture demo. Keep package APIs and independent version lines intact when working across these areas.
|
|
27
|
+
|
|
26
28
|
When changing templates or managed root assets, update their source first and refresh packaged copies with `pnpm --filter @icebreakers/monorepo-templates sync:assets`.
|
|
27
29
|
|
|
28
30
|
Report bugs at https://github.com/sonofmagic/repoctl/issues and use discussions for design questions that do not yet have a concrete implementation.
|
package/assets/package.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@11.
|
|
7
|
-
"description": "Source workspace for repoctl
|
|
6
|
+
"packageManager": "pnpm@11.25.0",
|
|
7
|
+
"description": "Source workspace for repoctl and Icebreaker's shared development packages",
|
|
8
8
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
9
9
|
"homepage": "https://repoctl.icebreaker.top",
|
|
10
10
|
"repository": {
|
|
@@ -22,17 +22,20 @@
|
|
|
22
22
|
"typescript"
|
|
23
23
|
],
|
|
24
24
|
"engines": {
|
|
25
|
-
"node": ">=22.
|
|
25
|
+
"node": ">=22.13.0"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "turbo run build",
|
|
29
29
|
"tooling:build": "turbo run build --filter=@icebreakers/monorepo --filter=repoctl",
|
|
30
30
|
"dev": "turbo run dev --parallel",
|
|
31
|
-
"test": "vitest run",
|
|
31
|
+
"test": "node -e \"require('node:fs').mkdirSync('coverage/.tmp', { recursive: true })\" && pnpm check:no-tracked-build-artifacts && vitest run && pnpm test:types",
|
|
32
32
|
"test:packaged-doctor": "node scripts/smoke-packaged-doctor.mjs",
|
|
33
|
-
"test:dev": "vitest",
|
|
33
|
+
"test:dev": "node -e \"require('node:fs').mkdirSync('coverage/.tmp', { recursive: true })\" && pnpm check:no-tracked-build-artifacts && vitest",
|
|
34
34
|
"lint": "pnpm run tooling:build && turbo run lint",
|
|
35
35
|
"tsd": "turbo run tsd",
|
|
36
|
+
"test:types": "turbo run test:types",
|
|
37
|
+
"check:no-tracked-build-artifacts": "node ./scripts/check-no-tracked-build-artifacts.mjs",
|
|
38
|
+
"check:workflows": "node ./scripts/check-workflows.mjs",
|
|
36
39
|
"audit": "pnpm audit --audit-level=moderate",
|
|
37
40
|
"audit:fix": "pnpm audit --fix",
|
|
38
41
|
"cf-typegen": "pnpm --filter @icebreakers/client --filter @icebreakers/server run cf-typegen",
|
|
@@ -47,8 +50,12 @@
|
|
|
47
50
|
"------": "--------------",
|
|
48
51
|
"preinstall": "npx only-allow pnpm",
|
|
49
52
|
"prepare": "husky",
|
|
53
|
+
"postinstall": "pnpm run build",
|
|
50
54
|
"commit": "commit",
|
|
51
55
|
"commitlint": "commitlint --edit",
|
|
56
|
+
"sync": "turbo run sync",
|
|
57
|
+
"inspector": "npx @eslint/config-inspector",
|
|
58
|
+
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
52
59
|
"-------": "---------------",
|
|
53
60
|
"repo:init": "repo init",
|
|
54
61
|
"repo:new": "repo new",
|
|
@@ -64,30 +71,66 @@
|
|
|
64
71
|
},
|
|
65
72
|
"devDependencies": {
|
|
66
73
|
"@commitlint/cli": "^21.2.2",
|
|
74
|
+
"@eslint/config-inspector": "^3.4.0",
|
|
75
|
+
"@eslint/eslintrc": "^3.3.7",
|
|
76
|
+
"@icebreakers/commitlint-config": "workspace:*",
|
|
77
|
+
"@icebreakers/eslint-config": "workspace:*",
|
|
78
|
+
"@icebreakers/stylelint-config": "workspace:*",
|
|
79
|
+
"@next/eslint-plugin-next": "^16.3.4",
|
|
80
|
+
"@prettier/plugin-xml": "^3.4.2",
|
|
81
|
+
"@tanstack/eslint-plugin-query": "^5.102.8",
|
|
82
|
+
"@types/eslint-plugin-tailwindcss": "^3.17.0",
|
|
83
|
+
"@types/fs-extra": "^11.0.4",
|
|
84
|
+
"@types/lodash": "^4.17.25",
|
|
85
|
+
"@types/lodash-es": "^4.17.12",
|
|
86
|
+
"@types/micromatch": "^4.0.10",
|
|
67
87
|
"@icebreakers/monorepo": "workspace:*",
|
|
68
|
-
"@types/node": "^26.
|
|
88
|
+
"@types/node": "^26.4.1",
|
|
69
89
|
"@types/semver": "^7.8.0",
|
|
90
|
+
"@types/set-value": "^4.0.3",
|
|
91
|
+
"@typescript-eslint/types": "^8.69.0",
|
|
92
|
+
"@unocss/eslint-plugin": "66.9.2",
|
|
70
93
|
"@vitest/coverage-v8": "~4.1.11",
|
|
94
|
+
"astro-eslint-parser": "^3.1.0",
|
|
71
95
|
"ci-info": "^4.4.0",
|
|
72
96
|
"cross-env": "^10.1.0",
|
|
73
97
|
"defu": "^6.1.7",
|
|
74
|
-
"es-toolkit": "^1.
|
|
98
|
+
"es-toolkit": "^1.52.0",
|
|
75
99
|
"eslint": "^10.9.1",
|
|
100
|
+
"eslint-plugin-astro": "^3.1.0",
|
|
101
|
+
"eslint-plugin-mdx": "3.8.1",
|
|
102
|
+
"eslint-plugin-svelte": "^3.23.0",
|
|
103
|
+
"execa": "^10.0.1",
|
|
104
|
+
"fast-glob": "^3.3.3",
|
|
105
|
+
"fs-extra": "^11.4.0",
|
|
106
|
+
"get-value": "^4.1.0",
|
|
76
107
|
"husky": "^9.1.7",
|
|
77
|
-
"
|
|
108
|
+
"jiti": "^2.7.0",
|
|
109
|
+
"lint-staged": "^17.4.1",
|
|
110
|
+
"lodash": "^4.18.1",
|
|
111
|
+
"lodash-es": "^4.18.1",
|
|
112
|
+
"micromatch": "^4.0.8",
|
|
78
113
|
"only-allow": "^1.2.2",
|
|
79
114
|
"pathe": "^2.0.3",
|
|
80
115
|
"pkg-types": "^2.3.1",
|
|
116
|
+
"prettier": "^3.9.6",
|
|
117
|
+
"prettier-plugin-astro": "^0.14.1",
|
|
81
118
|
"repoctl": "workspace:*",
|
|
119
|
+
"rimraf": "^6.1.3",
|
|
120
|
+
"set-value": "^4.1.0",
|
|
82
121
|
"stylelint": "^17.14.1",
|
|
122
|
+
"svelte": "^5.57.0",
|
|
123
|
+
"svelte-eslint-parser": "^1.8.1",
|
|
83
124
|
"tailwindcss": "^4.3.3",
|
|
84
125
|
"tsd": "^0.33.0",
|
|
85
126
|
"tsdown": "0.22.14",
|
|
86
127
|
"tslib": "^2.8.1",
|
|
87
|
-
"tsx": "^4.23.
|
|
88
|
-
"turbo": "^2.10.
|
|
89
|
-
"type-fest": "^5.
|
|
128
|
+
"tsx": "^4.23.13",
|
|
129
|
+
"turbo": "^2.10.12",
|
|
130
|
+
"type-fest": "^5.9.0",
|
|
131
|
+
"tsup": "^8.5.1",
|
|
90
132
|
"typescript": "^6.0.3",
|
|
133
|
+
"unbuild": "^3.6.1",
|
|
91
134
|
"vitest": "~4.1.11",
|
|
92
135
|
"yaml": "^2.9.0"
|
|
93
136
|
},
|
|
@@ -14,3 +14,16 @@ allowBuilds:
|
|
|
14
14
|
sharp: true
|
|
15
15
|
vue-demi: true
|
|
16
16
|
workerd: true
|
|
17
|
+
overrides:
|
|
18
|
+
prettier: 3.9.6
|
|
19
|
+
typescript: 6.0.3
|
|
20
|
+
vite: 8.2.2
|
|
21
|
+
postcss: 8.5.26
|
|
22
|
+
postcss-selector-parser: 7.1.5
|
|
23
|
+
js-yaml: 5.4.1
|
|
24
|
+
nanoid: 6.0.1
|
|
25
|
+
brace-expansion: 5.0.9
|
|
26
|
+
cross-spawn: 7.0.6
|
|
27
|
+
adm-zip: 0.6.0
|
|
28
|
+
uuid: 14.0.2
|
|
29
|
+
esbuild: 0.28.2
|
package/assets/repoctl.config.ts
CHANGED
|
@@ -20,10 +20,15 @@ export default {
|
|
|
20
20
|
extends: ['@commitlint/config-conventional'],
|
|
21
21
|
},
|
|
22
22
|
eslint: {
|
|
23
|
+
astro: true,
|
|
23
24
|
ignores: ['**/fixtures/**'],
|
|
25
|
+
svelte: true,
|
|
26
|
+
vue: true,
|
|
24
27
|
},
|
|
25
28
|
stylelint: {
|
|
26
|
-
rules: {
|
|
29
|
+
rules: {
|
|
30
|
+
'media-feature-range-notation': 'prefix',
|
|
31
|
+
},
|
|
27
32
|
},
|
|
28
33
|
lintStaged: {
|
|
29
34
|
monorepoCommand: 'pnpm exec repo',
|
package/assets/turbo.json
CHANGED
|
@@ -52,6 +52,19 @@
|
|
|
52
52
|
"coverage/**"
|
|
53
53
|
]
|
|
54
54
|
},
|
|
55
|
+
"test:types": {
|
|
56
|
+
"dependsOn": [
|
|
57
|
+
"build",
|
|
58
|
+
"^build"
|
|
59
|
+
],
|
|
60
|
+
"inputs": [
|
|
61
|
+
"test-d/**",
|
|
62
|
+
"package.json",
|
|
63
|
+
"tsconfig*.json",
|
|
64
|
+
"dist/**"
|
|
65
|
+
],
|
|
66
|
+
"outputs": []
|
|
67
|
+
},
|
|
55
68
|
"typecheck": {
|
|
56
69
|
"dependsOn": [
|
|
57
70
|
"^typecheck"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/monorepo-templates",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"description": "Built-in project templates and managed workspace assets for repoctl",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"node": ">=18.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@inquirer/checkbox": "^5.2.
|
|
49
|
-
"@inquirer/input": "^5.1.
|
|
50
|
-
"@inquirer/select": "^5.2.
|
|
48
|
+
"@inquirer/checkbox": "^5.2.3",
|
|
49
|
+
"@inquirer/input": "^5.1.4",
|
|
50
|
+
"@inquirer/select": "^5.2.3",
|
|
51
51
|
"commander": "^15.0.0",
|
|
52
52
|
"nanoexec": "^1.1.0",
|
|
53
53
|
"yaml": "^2.9.0"
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@faker-js/faker": "^10.6.0",
|
|
35
|
-
"@tanstack/vue-query": "^5.102.
|
|
36
|
-
"@tanstack/vue-query-devtools": "^6.1.
|
|
37
|
-
"@tanstack/vue-table": "^9.
|
|
35
|
+
"@tanstack/vue-query": "^5.102.8",
|
|
36
|
+
"@tanstack/vue-query-devtools": "^6.1.48",
|
|
37
|
+
"@tanstack/vue-table": "^9.2.4",
|
|
38
38
|
"@tanstack/vue-virtual": "^3.13.36",
|
|
39
39
|
"@trpc/client": "^11.18.0",
|
|
40
40
|
"clsx": "^2.1.1",
|
|
41
41
|
"pinia": "^4.0.3",
|
|
42
42
|
"tailwind-merge": "^3.6.0",
|
|
43
43
|
"tailwind-variants": "^3.3.1",
|
|
44
|
-
"vue": "^3.5.
|
|
45
|
-
"vue-i18n": "^11.4.
|
|
46
|
-
"vue-router": "^5.
|
|
44
|
+
"vue": "^3.5.42",
|
|
45
|
+
"vue-i18n": "^11.4.10",
|
|
46
|
+
"vue-router": "^5.3.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@cloudflare/vite-plugin": "^1.
|
|
49
|
+
"@cloudflare/vite-plugin": "^1.54.3",
|
|
50
50
|
"@hono/node-server": "^2.1.1",
|
|
51
51
|
"@hono/trpc-server": "^0.4.2",
|
|
52
52
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"@vitejs/plugin-vue-jsx": "^5.1.6",
|
|
56
56
|
"@vue/tsconfig": "^0.9.1",
|
|
57
57
|
"consola": "^3.4.2",
|
|
58
|
-
"hono": "^4.13.
|
|
58
|
+
"hono": "^4.13.5",
|
|
59
59
|
"tailwindcss": "^4.3.3",
|
|
60
60
|
"typescript": "~6.0.3",
|
|
61
61
|
"vite": "^8.2.2",
|
|
62
62
|
"vite-plugin-vue-devtools": "^8.2.1",
|
|
63
63
|
"vite-tsconfig-paths": "^6.1.1",
|
|
64
64
|
"vue-tsc": "3.3.11",
|
|
65
|
-
"wrangler": "^4.
|
|
66
|
-
"zod": "^4.4
|
|
65
|
+
"wrangler": "^4.128.0",
|
|
66
|
+
"zod": "^4.5.4"
|
|
67
67
|
}
|
|
68
68
|
}
|