create-template-project 1.2.2 → 1.2.3
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/config/dependencies.json +14 -14
- package/dist/index.js +1 -1
- package/dist/templates/base/files/_oxc.config.ts +5 -3
- package/dist/templates/cli/files/src/index.test.ts +11 -9
- package/dist/templates/web-app/files/src/App.test.tsx +6 -4
- package/dist/templates/web-fullstack/files/server/src/index.ts +3 -3
- package/dist/templates/web-vanilla/files/src/index.test.ts +9 -7
- package/package.json +11 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"vite": {
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.10",
|
|
5
5
|
"description": "Native-ESM powered web dev build tool"
|
|
6
6
|
},
|
|
7
7
|
"@vitejs/plugin-react": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"description": "The default Vite plugin for React projects."
|
|
10
10
|
},
|
|
11
11
|
"@vitest/browser": {
|
|
12
|
-
"version": "4.1.
|
|
12
|
+
"version": "4.1.5",
|
|
13
13
|
"description": "Run Vitest in the browser."
|
|
14
14
|
},
|
|
15
15
|
"@vitest/browser-playwright": {
|
|
16
|
-
"version": "4.1.
|
|
16
|
+
"version": "4.1.5",
|
|
17
17
|
"description": "Playwright provider for Vitest browser mode."
|
|
18
18
|
},
|
|
19
19
|
"playwright": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"description": "TypeScript definitions for Node.js."
|
|
42
42
|
},
|
|
43
43
|
"@vitest/coverage-v8": {
|
|
44
|
-
"version": "4.1.
|
|
44
|
+
"version": "4.1.5",
|
|
45
45
|
"description": "V8 coverage provider for Vitest."
|
|
46
46
|
},
|
|
47
47
|
"conventional-changelog": {
|
|
@@ -53,23 +53,23 @@
|
|
|
53
53
|
"description": "Modern native git hooks made easy."
|
|
54
54
|
},
|
|
55
55
|
"oxlint": {
|
|
56
|
-
"version": "1.
|
|
56
|
+
"version": "1.62.0",
|
|
57
57
|
"description": "A JavaScript linter written in Rust."
|
|
58
58
|
},
|
|
59
59
|
"oxlint-tsgolint": {
|
|
60
|
-
"version": "0.
|
|
60
|
+
"version": "0.22.1",
|
|
61
61
|
"description": "TypeScript-specific rules for oxlint."
|
|
62
62
|
},
|
|
63
63
|
"oxfmt": {
|
|
64
|
-
"version": "0.
|
|
64
|
+
"version": "0.47.0",
|
|
65
65
|
"description": "High performance JavaScript / TypeScript formatter."
|
|
66
66
|
},
|
|
67
67
|
"typescript": {
|
|
68
|
-
"version": "6.0.
|
|
68
|
+
"version": "6.0.3",
|
|
69
69
|
"description": "A superset of JavaScript that compiles to clean JavaScript output."
|
|
70
70
|
},
|
|
71
71
|
"vitest": {
|
|
72
|
-
"version": "4.1.
|
|
72
|
+
"version": "4.1.5",
|
|
73
73
|
"description": "A Vite-native unit test framework."
|
|
74
74
|
},
|
|
75
75
|
"commander": {
|
|
@@ -129,15 +129,15 @@
|
|
|
129
129
|
"description": "End-to-end testing framework."
|
|
130
130
|
},
|
|
131
131
|
"@trpc/server": {
|
|
132
|
-
"version": "11.
|
|
132
|
+
"version": "11.17.0",
|
|
133
133
|
"description": "tRPC server library."
|
|
134
134
|
},
|
|
135
135
|
"@trpc/client": {
|
|
136
|
-
"version": "11.
|
|
136
|
+
"version": "11.17.0",
|
|
137
137
|
"description": "tRPC client library."
|
|
138
138
|
},
|
|
139
139
|
"@trpc/react-query": {
|
|
140
|
-
"version": "11.
|
|
140
|
+
"version": "11.17.0",
|
|
141
141
|
"description": "tRPC integration for React Query."
|
|
142
142
|
},
|
|
143
143
|
"@tanstack/react-query": {
|
|
@@ -149,11 +149,11 @@
|
|
|
149
149
|
"description": "TypeScript-first schema validation with static type inference."
|
|
150
150
|
},
|
|
151
151
|
"react-router-dom": {
|
|
152
|
-
"version": "7.14.
|
|
152
|
+
"version": "7.14.2",
|
|
153
153
|
"description": "Declarative routing for React web applications."
|
|
154
154
|
},
|
|
155
155
|
"release-it": {
|
|
156
|
-
"version": "20.0.
|
|
156
|
+
"version": "20.0.1",
|
|
157
157
|
"description": "Interactive release-tool for Git repositories."
|
|
158
158
|
},
|
|
159
159
|
"cors": {
|
package/dist/index.js
CHANGED
|
@@ -773,7 +773,7 @@ Restrictions & Behavior:
|
|
|
773
773
|
process.exit(0);
|
|
774
774
|
}
|
|
775
775
|
const directory = await p.text({
|
|
776
|
-
message: "Target directory:",
|
|
776
|
+
message: "Target parent directory (project name will be appended):",
|
|
777
777
|
initialValue: "."
|
|
778
778
|
});
|
|
779
779
|
if (p.isCancel(directory)) {
|
|
@@ -84,7 +84,6 @@ export const linter = defineConfig({
|
|
|
84
84
|
'import/no-nodejs-modules': 'off',
|
|
85
85
|
'import/prefer-default-export': 'off',
|
|
86
86
|
'import/no-default-export': 'off',
|
|
87
|
-
// FIXME: remove all jest rules
|
|
88
87
|
'jest/consistent-test-it': 'off',
|
|
89
88
|
'jest/expect-expect': 'off',
|
|
90
89
|
'jest/max-expects': 'off',
|
|
@@ -113,12 +112,12 @@ export const linter = defineConfig({
|
|
|
113
112
|
'jest/no-test-return-statement': 'off',
|
|
114
113
|
'jest/no-unneeded-async-expect-function': 'off',
|
|
115
114
|
'jest/no-untyped-mock-factory': 'off',
|
|
116
|
-
//'jest/padding-around-after-all-blocks': 'off',
|
|
117
115
|
'jest/padding-around-test-blocks': 'off',
|
|
118
116
|
'jest/prefer-called-with': 'off',
|
|
119
117
|
'jest/prefer-comparison-matcher': 'off',
|
|
120
118
|
'jest/prefer-each': 'off',
|
|
121
119
|
'jest/prefer-equality-matcher': 'off',
|
|
120
|
+
'jest/prefer-expect-assertions': 'off',
|
|
122
121
|
'jest/prefer-expect-resolves': 'off',
|
|
123
122
|
'jest/prefer-hooks-in-order': 'off',
|
|
124
123
|
'jest/prefer-hooks-on-top': 'off',
|
|
@@ -126,7 +125,6 @@ export const linter = defineConfig({
|
|
|
126
125
|
'jest/prefer-lowercase-title': 'off',
|
|
127
126
|
'jest/prefer-mock-promise-shorthand': 'off',
|
|
128
127
|
'jest/prefer-mock-return-shorthand': 'off',
|
|
129
|
-
//'jest/prefer-snapshot-hint': 'off',
|
|
130
128
|
'jest/prefer-spy-on': 'off',
|
|
131
129
|
'jest/prefer-strict-equal': 'off',
|
|
132
130
|
'jest/prefer-to-be': 'off',
|
|
@@ -157,8 +155,11 @@ export const linter = defineConfig({
|
|
|
157
155
|
'unicorn/prefer-module': 'off', // TODO: consider enabling
|
|
158
156
|
'react/jsx-filename-extension': 'off',
|
|
159
157
|
'react/react-in-jsx-scope': 'off',
|
|
158
|
+
'vitest/max-expects': 'off',
|
|
159
|
+
'vitest/no-hooks': 'off',
|
|
160
160
|
'vitest/no-importing-vitest-globals': 'off',
|
|
161
161
|
'vitest/prefer-describe-function-title': 'off',
|
|
162
|
+
'vitest/prefer-expect-assertions': 'off',
|
|
162
163
|
'vitest/prefer-to-be-falsy': 'off', // NOTE: Pick strictness: keep prefer-strict-boolean-matchers, disable truthy/falsy rules.
|
|
163
164
|
'vitest/prefer-to-be-truthy': 'off', // NOTE: Pick strictness: keep prefer-strict-boolean-matchers, disable truthy/falsy rules.
|
|
164
165
|
'vitest/require-test-timeout': 'off',
|
|
@@ -172,6 +173,7 @@ export const linter = defineConfig({
|
|
|
172
173
|
'typescript/no-explicit-any': 'off',
|
|
173
174
|
'typescript/no-unsafe-assignment': 'off',
|
|
174
175
|
'typescript/no-unsafe-member-access': 'off',
|
|
176
|
+
'no-useless-undefined': 'off',
|
|
175
177
|
},
|
|
176
178
|
},
|
|
177
179
|
{
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {expect,
|
|
1
|
+
import {describe, expect, it} from 'vitest';
|
|
2
2
|
import {greet, calculateProgress} from './lib.js';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
describe('lib', () => {
|
|
5
|
+
it('greet returns correct message', () => {
|
|
6
|
+
expect(greet('Vitest')).toBe('Hello, Vitest! Welcome to your new CLI.');
|
|
7
|
+
});
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
it('calculateProgress works correctly', () => {
|
|
10
|
+
expect(calculateProgress(50, 100)).toBe(50);
|
|
11
|
+
expect(calculateProgress(1, 3)).toBe(33);
|
|
12
|
+
expect(calculateProgress(0, 100)).toBe(0);
|
|
13
|
+
expect(calculateProgress(50, 0)).toBe(0);
|
|
14
|
+
});
|
|
13
15
|
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {expect,
|
|
1
|
+
import {describe, expect, it} from 'vitest';
|
|
2
2
|
import {render} from 'vitest-browser-react';
|
|
3
3
|
import {page} from 'vitest/browser';
|
|
4
4
|
import {App} from './App.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
describe('App', () => {
|
|
7
|
+
it('renders hello message in the browser', async () => {
|
|
8
|
+
await render(<App />);
|
|
9
|
+
await expect.element(page.getByText(/Hello from React!/i)).toBeVisible();
|
|
10
|
+
});
|
|
9
11
|
});
|
|
@@ -5,7 +5,7 @@ import {appRouter} from './routers/_app.js';
|
|
|
5
5
|
import {createContext} from './context.js';
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const rootDir = import.meta.dirname;
|
|
9
9
|
const app = express();
|
|
10
10
|
const port = Number(process.env['PORT'] ?? 3001);
|
|
11
11
|
|
|
@@ -20,10 +20,10 @@ app.use(
|
|
|
20
20
|
}),
|
|
21
21
|
);
|
|
22
22
|
|
|
23
|
-
app.use(express.static(path.join(
|
|
23
|
+
app.use(express.static(path.join(rootDir, '../../client/dist')));
|
|
24
24
|
|
|
25
25
|
app.get('*', (_req, res) => {
|
|
26
|
-
res.sendFile(path.join(
|
|
26
|
+
res.sendFile(path.join(rootDir, '../../client/dist/index.html'));
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
app.listen(port, () => {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {expect,
|
|
1
|
+
import {describe, expect, it} from 'vitest';
|
|
2
2
|
import {page} from 'vitest/browser';
|
|
3
3
|
import {formatMessage, createHeading} from './lib.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
describe('lib', () => {
|
|
6
|
+
it('formatMessage returns correct string', () => {
|
|
7
|
+
expect(formatMessage('World')).toBe('Hello, World!');
|
|
8
|
+
});
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
it('createHeading renders in the browser', async () => {
|
|
11
|
+
document.body.append(createHeading('Browser Test'));
|
|
12
|
+
await expect.element(page.getByRole('heading', {name: 'Browser Test'})).toBeVisible();
|
|
13
|
+
});
|
|
12
14
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-template-project",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "An ultra-modular, type-safe Node.js CLI tool used to scaffold new project templates (CLI, Webpage, Webapp, Fullstack) with best-practice configurations pre-installed.",
|
|
6
6
|
"keywords": [
|
|
@@ -79,25 +79,25 @@
|
|
|
79
79
|
"zod": "4.3.6"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@commitlint/cli": "20.5.
|
|
82
|
+
"@commitlint/cli": "20.5.2",
|
|
83
83
|
"@commitlint/config-conventional": "20.5.0",
|
|
84
84
|
"@types/cli-progress": "3.11.6",
|
|
85
85
|
"@types/debug": "4.1.13",
|
|
86
86
|
"@types/node": "25.6.0",
|
|
87
|
-
"@vitest/coverage-v8": "4.1.
|
|
87
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
88
88
|
"conventional-changelog": "7.2.0",
|
|
89
89
|
"conventional-changelog-angular": "8.3.1",
|
|
90
90
|
"eslint-plugin-regexp": "3.1.0",
|
|
91
91
|
"husky": "9.1.7",
|
|
92
|
-
"oxfmt": "0.
|
|
93
|
-
"oxlint": "1.
|
|
94
|
-
"oxlint-tsgolint": "0.
|
|
95
|
-
"pnpm": "10.33.
|
|
96
|
-
"release-it": "20.0.
|
|
92
|
+
"oxfmt": "0.47.0",
|
|
93
|
+
"oxlint": "1.62.0",
|
|
94
|
+
"oxlint-tsgolint": "0.22.1",
|
|
95
|
+
"pnpm": "10.33.2",
|
|
96
|
+
"release-it": "20.0.1",
|
|
97
97
|
"rimraf": "6.1.3",
|
|
98
|
-
"typescript": "6.0.
|
|
99
|
-
"vite": "8.0.
|
|
100
|
-
"vitest": "4.1.
|
|
98
|
+
"typescript": "6.0.3",
|
|
99
|
+
"vite": "8.0.10",
|
|
100
|
+
"vitest": "4.1.5"
|
|
101
101
|
},
|
|
102
102
|
"engines": {
|
|
103
103
|
"node": ">=22"
|