@simplysm/sd-cli 13.0.70 → 13.0.71
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/add-client/__CLIENT__/package.json.hbs +1 -1
- package/templates/add-server/__SERVER__/package.json.hbs +2 -2
- package/templates/init/package.json.hbs +3 -3
- package/tests/infra/WorkerManager.spec.ts +1 -1
- package/tests/replace-deps.spec.ts +2 -2
- package/tests/run-lint.spec.ts +6 -6
- package/tests/run-typecheck.spec.ts +3 -3
- package/tests/sd-cli.spec.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysm/sd-cli",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.71",
|
|
4
4
|
"description": "Simplysm package - CLI tool",
|
|
5
5
|
"author": "simplysm",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"vite-plugin-solid": "^2.11.10",
|
|
44
44
|
"vite-tsconfig-paths": "^6.1.1",
|
|
45
45
|
"yargs": "^18.0.0",
|
|
46
|
-
"@simplysm/core-
|
|
47
|
-
"@simplysm/core-
|
|
48
|
-
"@simplysm/storage": "13.0.
|
|
46
|
+
"@simplysm/core-node": "13.0.71",
|
|
47
|
+
"@simplysm/core-common": "13.0.71",
|
|
48
|
+
"@simplysm/storage": "13.0.71"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/semver": "^7.7.1",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"vitest": "vitest"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@simplysm/sd-cli": "~13.0.
|
|
19
|
-
"@simplysm/sd-claude": "~13.0.
|
|
20
|
-
"@simplysm/lint": "~13.0.
|
|
18
|
+
"@simplysm/sd-cli": "~13.0.71",
|
|
19
|
+
"@simplysm/sd-claude": "~13.0.71",
|
|
20
|
+
"@simplysm/lint": "~13.0.71",
|
|
21
21
|
"@types/node": "^20.19.33",
|
|
22
22
|
"eslint": "^9.39.2",
|
|
23
23
|
"prettier": "^3.8.1",
|
|
@@ -258,12 +258,12 @@ describe("watchReplaceDeps", () => {
|
|
|
258
258
|
beforeEach(async () => {
|
|
259
259
|
tmpDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "sd-watch-replace-"));
|
|
260
260
|
|
|
261
|
-
//
|
|
261
|
+
// Source package (simplysm/packages/solid)
|
|
262
262
|
const sourceDir = path.join(tmpDir, "simplysm", "packages", "solid");
|
|
263
263
|
await fs.promises.mkdir(sourceDir, { recursive: true });
|
|
264
264
|
await fs.promises.writeFile(path.join(sourceDir, "index.js"), "export default 1;");
|
|
265
265
|
|
|
266
|
-
//
|
|
266
|
+
// Target project (.pnpm store style)
|
|
267
267
|
const appRoot = path.join(tmpDir, "app");
|
|
268
268
|
const pnpmStoreTarget = path.join(
|
|
269
269
|
appRoot,
|
package/tests/run-lint.spec.ts
CHANGED
|
@@ -11,7 +11,7 @@ const { mockState, mockJitiImportFn } = vi.hoisted(() => ({
|
|
|
11
11
|
mockJitiImportFn: vi.fn(),
|
|
12
12
|
}));
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// Mock external dependencies
|
|
15
15
|
|
|
16
16
|
vi.mock("eslint", () => {
|
|
17
17
|
class MockESLint {
|
|
@@ -94,7 +94,7 @@ describe("runLint", () => {
|
|
|
94
94
|
originalCwd = process.cwd;
|
|
95
95
|
process.cwd = vi.fn().mockReturnValue("/project");
|
|
96
96
|
|
|
97
|
-
//
|
|
97
|
+
// Reset state
|
|
98
98
|
mockState.lintResults = [];
|
|
99
99
|
mockState.lintedFiles = [];
|
|
100
100
|
mockState.outputFixesCalled = false;
|
|
@@ -237,7 +237,7 @@ describe("runLint", () => {
|
|
|
237
237
|
|
|
238
238
|
await runLint({ targets: [], fix: false, timing: false });
|
|
239
239
|
|
|
240
|
-
// ESLint
|
|
240
|
+
// ESLint is not called, so lintedFiles stays empty
|
|
241
241
|
expect(mockState.lintedFiles).toHaveLength(0);
|
|
242
242
|
expect(process.exitCode).toBeUndefined();
|
|
243
243
|
});
|
|
@@ -293,7 +293,7 @@ describe("runLint", () => {
|
|
|
293
293
|
|
|
294
294
|
await runLint({ targets: [], fix: false, timing: true });
|
|
295
295
|
|
|
296
|
-
// TIMING
|
|
296
|
+
// Verify TIMING is set (set inside the function)
|
|
297
297
|
expect(process.env["TIMING"]).toBe("1");
|
|
298
298
|
|
|
299
299
|
// cleanup
|
|
@@ -350,12 +350,12 @@ describe("executeLint", () => {
|
|
|
350
350
|
originalCwd = process.cwd;
|
|
351
351
|
process.cwd = vi.fn().mockReturnValue("/project");
|
|
352
352
|
|
|
353
|
-
//
|
|
353
|
+
// Reset state
|
|
354
354
|
mockState.lintResults = [];
|
|
355
355
|
mockState.lintedFiles = [];
|
|
356
356
|
mockState.outputFixesCalled = false;
|
|
357
357
|
|
|
358
|
-
//
|
|
358
|
+
// Default ESLint config mock
|
|
359
359
|
const cwd = "/project";
|
|
360
360
|
vi.mocked(fsExists).mockImplementation((filePath: string) => {
|
|
361
361
|
return Promise.resolve(filePath === path.join(cwd, "eslint.config.ts"));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it, vi, beforeEach, afterEach } from "vitest";
|
|
2
2
|
import "@simplysm/core-common"; // Import to use Map.getOrCreate extension method
|
|
3
3
|
|
|
4
|
-
//
|
|
4
|
+
// Mock external dependencies
|
|
5
5
|
vi.mock("typescript", () => {
|
|
6
6
|
const DiagnosticCategory = {
|
|
7
7
|
Error: 1,
|
|
@@ -194,7 +194,7 @@ describe("runTypecheck", () => {
|
|
|
194
194
|
options: [],
|
|
195
195
|
});
|
|
196
196
|
|
|
197
|
-
// Worker
|
|
197
|
+
// Runs via Worker, so exitCode should not be set
|
|
198
198
|
expect(process.exitCode).toBeUndefined();
|
|
199
199
|
});
|
|
200
200
|
|
|
@@ -393,7 +393,7 @@ describe("runTypecheck", () => {
|
|
|
393
393
|
vi.mocked(fsExists).mockResolvedValue(false);
|
|
394
394
|
vi.mocked(fsReadJson).mockResolvedValue({ devDependencies: {} });
|
|
395
395
|
|
|
396
|
-
// Worker
|
|
396
|
+
// Mock Worker to return error results
|
|
397
397
|
const { Worker } = await import("@simplysm/core-node");
|
|
398
398
|
vi.mocked(Worker.create).mockReturnValue({
|
|
399
399
|
build: vi.fn(() =>
|
package/tests/sd-cli.spec.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it, vi, beforeEach, afterEach } from "vitest";
|
|
2
2
|
import { consola, LogLevels } from "consola";
|
|
3
3
|
|
|
4
|
-
// runLint, runTypecheck, runWatch, runCheck
|
|
4
|
+
// Mock runLint, runTypecheck, runWatch, runCheck
|
|
5
5
|
vi.mock("../src/commands/lint", () => ({
|
|
6
6
|
runLint: vi.fn(),
|
|
7
7
|
}));
|