@kitschpatrol/create-project 1.2.7 → 1.2.8
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/package.json +4 -4
- package/templates/cli/package.json +11 -4
- package/templates/cli/pnpm-workspace.yaml +0 -2
- package/templates/cli/test/cli.test.ts +39 -0
- package/templates/cli/test/index.test.ts +7 -0
- package/templates/cli/tsdown.config.ts +3 -1
- package/templates/cli+library/package.json +11 -4
- package/templates/cli+library/pnpm-workspace.yaml +0 -2
- package/templates/cli+library/test/cli.test.ts +39 -0
- package/templates/cli+library/test/index.test.ts +7 -0
- package/templates/cli+library/tsdown.config.ts +3 -1
- package/templates/electron/package.json +5 -4
- package/templates/electron/pnpm-workspace.yaml +0 -2
- package/templates/electron/test/index.test.ts +7 -0
- package/templates/library/package.json +11 -4
- package/templates/library/pnpm-workspace.yaml +0 -2
- package/templates/library/test/index.test.ts +7 -0
- package/templates/minimal/pnpm-workspace.yaml +0 -2
- package/templates/unplugin/package.json +3 -3
- package/templates/unplugin/pnpm-workspace.yaml +0 -2
- package/templates/unplugin/tsdown.config.ts +3 -1
- package/templates/web/package.json +3 -2
- package/templates/web/pnpm-workspace.yaml +0 -2
- package/templates/web/test/index.test.ts +7 -0
- /package/templates/unplugin/{tests → test}/__snapshots__/rollup.test.ts.snap +0 -0
- /package/templates/unplugin/{tests → test}/fixtures/basic.js +0 -0
- /package/templates/unplugin/{tests → test}/rollup.test.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/create-project",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "Kitschpatrol's TypeScript project templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"@kitschpatrol/shared-config": "^6.0.2",
|
|
39
39
|
"@types/node": "~20.19.35",
|
|
40
40
|
"bumpp": "^10.4.1",
|
|
41
|
-
"mdat": "^1.
|
|
42
|
-
"taze": "^19.
|
|
43
|
-
"tsdown": "^0.
|
|
41
|
+
"mdat": "^1.4.0",
|
|
42
|
+
"taze": "^19.10.0",
|
|
43
|
+
"tsdown": "^0.21.0",
|
|
44
44
|
"typescript": "~5.9.3",
|
|
45
45
|
"vitest": "^4.0.18"
|
|
46
46
|
},
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"fix": "ksc fix",
|
|
33
33
|
"lint": "ksc lint",
|
|
34
34
|
"release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$({{{npm-auth-command}}}) && pnpm publish",
|
|
35
|
-
"test": "
|
|
35
|
+
"test": "vitest run"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@types/node": "~20.19.35",
|
|
39
39
|
"@types/yargs": "^17.0.35",
|
|
40
|
-
"lognow": "^0.
|
|
40
|
+
"lognow": "^0.5.2",
|
|
41
41
|
"yargs": "^18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
@@ -45,11 +45,18 @@
|
|
|
45
45
|
"bumpp": "^10.4.1",
|
|
46
46
|
"mdat-plugin-cli-help": "^1.0.7",
|
|
47
47
|
"publint": "^0.3.18",
|
|
48
|
-
"tsdown": "^0.
|
|
49
|
-
"typescript": "~5.9.3"
|
|
48
|
+
"tsdown": "^0.21.0",
|
|
49
|
+
"typescript": "~5.9.3",
|
|
50
|
+
"vitest": "^4.0.18"
|
|
50
51
|
},
|
|
51
52
|
"packageManager": "pnpm@10.30.3",
|
|
52
53
|
"engines": {
|
|
53
54
|
"node": ">=20.19.0"
|
|
55
|
+
},
|
|
56
|
+
"devEngines": {
|
|
57
|
+
"runtime": {
|
|
58
|
+
"name": "node",
|
|
59
|
+
"version": ">=22.18.0"
|
|
60
|
+
}
|
|
54
61
|
}
|
|
55
62
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { describe, expect, it } from 'vitest'
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
6
|
+
const cliPath = path.resolve(import.meta.dirname, '../dist/index.js')
|
|
7
|
+
|
|
8
|
+
async function run(...args: string[]): Promise<{ code: number; stderr: string; stdout: string }> {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
execFile('node', [cliPath, ...args], (error, stdout, stderr) => {
|
|
11
|
+
if (error && error.code === undefined) {
|
|
12
|
+
reject(new Error(error.message))
|
|
13
|
+
return
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
resolve({ code: typeof error?.code === 'number' ? error.code : 0, stderr, stdout })
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
describe('cli', () => {
|
|
22
|
+
it('should print version with --version', async () => {
|
|
23
|
+
const { code, stdout } = await run('--version')
|
|
24
|
+
expect(code).toBe(0)
|
|
25
|
+
expect(stdout.trim()).toMatch(/\d+\.\d+\.\d+/)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('should print help with --help', async () => {
|
|
29
|
+
const { code, stdout } = await run('--help')
|
|
30
|
+
expect(code).toBe(0)
|
|
31
|
+
expect(stdout).toContain('--help')
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
it('should run the default command', async () => {
|
|
35
|
+
const { code, stdout } = await run()
|
|
36
|
+
expect(code).toBe(0)
|
|
37
|
+
expect(stdout.trim()).toBe('Did something!')
|
|
38
|
+
})
|
|
39
|
+
})
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { defineConfig } from 'tsdown'
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
|
+
deps: {
|
|
5
|
+
alwaysBundle: /.+/,
|
|
6
|
+
},
|
|
4
7
|
dts: false,
|
|
5
8
|
entry: 'src/bin/cli.ts',
|
|
6
9
|
fixedExtension: false,
|
|
7
10
|
minify: true,
|
|
8
|
-
noExternal: /.+/,
|
|
9
11
|
outDir: 'dist/bin',
|
|
10
12
|
platform: 'node',
|
|
11
13
|
publint: true,
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"fix": "ksc fix",
|
|
42
42
|
"lint": "ksc lint",
|
|
43
43
|
"release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$({{{npm-auth-command}}}) && pnpm publish",
|
|
44
|
-
"test": "
|
|
44
|
+
"test": "vitest run"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@types/node": "~20.19.35",
|
|
48
48
|
"@types/yargs": "^17.0.35",
|
|
49
|
-
"lognow": "^0.
|
|
49
|
+
"lognow": "^0.5.2",
|
|
50
50
|
"yargs": "^18.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
@@ -55,11 +55,18 @@
|
|
|
55
55
|
"bumpp": "^10.4.1",
|
|
56
56
|
"mdat-plugin-cli-help": "^1.0.7",
|
|
57
57
|
"publint": "^0.3.18",
|
|
58
|
-
"tsdown": "^0.
|
|
59
|
-
"typescript": "~5.9.3"
|
|
58
|
+
"tsdown": "^0.21.0",
|
|
59
|
+
"typescript": "~5.9.3",
|
|
60
|
+
"vitest": "^4.0.18"
|
|
60
61
|
},
|
|
61
62
|
"packageManager": "pnpm@10.30.3",
|
|
62
63
|
"engines": {
|
|
63
64
|
"node": ">=20.19.0"
|
|
65
|
+
},
|
|
66
|
+
"devEngines": {
|
|
67
|
+
"runtime": {
|
|
68
|
+
"name": "node",
|
|
69
|
+
"version": ">=22.18.0"
|
|
70
|
+
}
|
|
64
71
|
}
|
|
65
72
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { describe, expect, it } from 'vitest'
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
6
|
+
const cliPath = path.resolve(import.meta.dirname, '../dist/bin/cli.js')
|
|
7
|
+
|
|
8
|
+
async function run(...args: string[]): Promise<{ code: number; stderr: string; stdout: string }> {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
execFile('node', [cliPath, ...args], (error, stdout, stderr) => {
|
|
11
|
+
if (error && error.code === undefined) {
|
|
12
|
+
reject(new Error(error.message))
|
|
13
|
+
return
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
resolve({ code: typeof error?.code === 'number' ? error.code : 0, stderr, stdout })
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
describe('cli', () => {
|
|
22
|
+
it('should print version with --version', async () => {
|
|
23
|
+
const { code, stdout } = await run('--version')
|
|
24
|
+
expect(code).toBe(0)
|
|
25
|
+
expect(stdout.trim()).toMatch(/\d+\.\d+\.\d+/)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('should print help with --help', async () => {
|
|
29
|
+
const { code, stdout } = await run('--help')
|
|
30
|
+
expect(code).toBe(0)
|
|
31
|
+
expect(stdout).toContain('--help')
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
it('should run the default command', async () => {
|
|
35
|
+
const { code, stdout } = await run()
|
|
36
|
+
expect(code).toBe(0)
|
|
37
|
+
expect(stdout.trim()).toBe('Did something!')
|
|
38
|
+
})
|
|
39
|
+
})
|
|
@@ -3,11 +3,13 @@ import { defineConfig } from 'tsdown'
|
|
|
3
3
|
export default defineConfig([
|
|
4
4
|
// CLI tool
|
|
5
5
|
{
|
|
6
|
+
deps: {
|
|
7
|
+
alwaysBundle: /.+/,
|
|
8
|
+
},
|
|
6
9
|
dts: false,
|
|
7
10
|
entry: 'src/bin/cli.ts',
|
|
8
11
|
fixedExtension: false,
|
|
9
12
|
minify: true,
|
|
10
|
-
noExternal: /.+/,
|
|
11
13
|
outDir: 'dist/bin',
|
|
12
14
|
platform: 'node',
|
|
13
15
|
},
|
|
@@ -28,20 +28,21 @@
|
|
|
28
28
|
"fix": "ksc fix",
|
|
29
29
|
"lint": "ksc lint",
|
|
30
30
|
"release": "bumpp --commit 'Release: %s' && pnpm run build && electron-builder build --publish always",
|
|
31
|
-
"test": "
|
|
31
|
+
"test": "vitest run"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@types/node": "~22.19.13",
|
|
35
|
-
"lognow": "^0.
|
|
35
|
+
"lognow": "^0.5.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@kitschpatrol/shared-config": "^6.0.2",
|
|
39
39
|
"bumpp": "^10.4.1",
|
|
40
|
-
"electron": "^40.
|
|
40
|
+
"electron": "^40.7.0",
|
|
41
41
|
"electron-builder": "^26.8.1",
|
|
42
42
|
"typescript": "~5.9.3",
|
|
43
43
|
"vite": "npm:rolldown-vite@7.3.1",
|
|
44
|
-
"vite-plugin-electron": "^0.29.0"
|
|
44
|
+
"vite-plugin-electron": "^0.29.0",
|
|
45
|
+
"vitest": "^4.0.18"
|
|
45
46
|
},
|
|
46
47
|
"packageManager": "pnpm@10.30.3",
|
|
47
48
|
"engines": {
|
|
@@ -36,22 +36,29 @@
|
|
|
36
36
|
"fix": "ksc fix",
|
|
37
37
|
"lint": "ksc lint",
|
|
38
38
|
"release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$({{{npm-auth-command}}}) && pnpm publish",
|
|
39
|
-
"test": "
|
|
39
|
+
"test": "vitest run"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@types/node": "~20.19.35",
|
|
43
|
-
"lognow": "^0.
|
|
43
|
+
"lognow": "^0.5.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@arethetypeswrong/core": "^0.18.2",
|
|
47
47
|
"@kitschpatrol/shared-config": "^6.0.2",
|
|
48
48
|
"bumpp": "^10.4.1",
|
|
49
49
|
"publint": "^0.3.18",
|
|
50
|
-
"tsdown": "^0.
|
|
51
|
-
"typescript": "~5.9.3"
|
|
50
|
+
"tsdown": "^0.21.0",
|
|
51
|
+
"typescript": "~5.9.3",
|
|
52
|
+
"vitest": "^4.0.18"
|
|
52
53
|
},
|
|
53
54
|
"packageManager": "pnpm@10.30.3",
|
|
54
55
|
"engines": {
|
|
55
56
|
"node": ">=20.19.0"
|
|
57
|
+
},
|
|
58
|
+
"devEngines": {
|
|
59
|
+
"runtime": {
|
|
60
|
+
"name": "node",
|
|
61
|
+
"version": ">=22.18.0"
|
|
62
|
+
}
|
|
56
63
|
}
|
|
57
64
|
}
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"fix": "ksc fix",
|
|
62
62
|
"lint": "ksc lint",
|
|
63
63
|
"release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish",
|
|
64
|
-
"test": "vitest"
|
|
64
|
+
"test": "vitest run"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@types/node": "~22.16.5",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"@kitschpatrol/shared-config": "^6.0.2",
|
|
73
73
|
"@sxzz/test-utils": "^0.5.15",
|
|
74
74
|
"bumpp": "^10.4.1",
|
|
75
|
-
"tsdown": "^0.
|
|
75
|
+
"tsdown": "^0.21.0",
|
|
76
76
|
"typescript": "~5.9.3",
|
|
77
77
|
"vitest": "^4.0.18"
|
|
78
78
|
},
|
|
79
79
|
"packageManager": "pnpm@10.30.3",
|
|
80
80
|
"engines": {
|
|
81
|
-
"node": ">=22.
|
|
81
|
+
"node": ">=22.18.0"
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lint": "ksc lint",
|
|
29
29
|
"preview": "poptab ; vite preview",
|
|
30
30
|
"release": "bumpp --commit 'Release: %s'",
|
|
31
|
-
"test": "
|
|
31
|
+
"test": "vitest run"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@types/node": "~20.19.35"
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"poptab": "^1.0.4",
|
|
40
40
|
"typescript": "~5.9.3",
|
|
41
41
|
"vite": "npm:rolldown-vite@7.1.17",
|
|
42
|
-
"vite-plugin-mkcert": "^1.17.10"
|
|
42
|
+
"vite-plugin-mkcert": "^1.17.10",
|
|
43
|
+
"vitest": "^4.0.18"
|
|
43
44
|
},
|
|
44
45
|
"packageManager": "pnpm@10.30.3",
|
|
45
46
|
"engines": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|