mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-16 02:15:23 +00:00
chore: complete TypeScript migration (Phase 05-06)
Phase 05: Migrate test imports from bin/ to dist/ - Update 19 test files to import from dist/ instead of bin/ - Update CLI path in cli.test.js and special-commands.test.js - Update cross-platform.test.js to check dist/ directory Phase 06: Cleanup & validation - Remove bin/ directory (32 JS files) - Fix ClaudeSymlinkManager import in doctor.ts - Update postinstall.js to use dist/ modules - Regenerate package-lock.json (now points to dist/ccs.js) All 39 tests passing. TypeScript migration complete.
This commit is contained in:
1 parent
26e279decf
commit
1c3c4aade0
54 files changed
+29
-9340
No files matched your search
@@ -5,7 +5,7 @@ const fs = require('fs');
|
||||
const os = require('os');
|
||||
|
||||
describe('npm CLI', () => {
|
||||
const ccsPath = path.join(__dirname, '..', '..', 'bin', 'ccs.js');
|
||||
const ccsPath = path.join(__dirname, '..', '..', 'dist', 'ccs.js');
|
||||
const ccsDir = path.join(os.homedir(), '.ccs');
|
||||
const configPath = path.join(ccsDir, 'config.json');
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ const assert = require('assert');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
|
||||
// Import the expandPath function from bin/utils/helpers.js
|
||||
// Import the expandPath function from dist/utils/helpers.js
|
||||
let expandPath;
|
||||
try {
|
||||
expandPath = require('../../bin/utils/helpers').expandPath;
|
||||
expandPath = require('../../dist/utils/helpers').expandPath;
|
||||
} catch (e) {
|
||||
// If helpers module doesn't exist or doesn't export expandPath, create a mock
|
||||
expandPath = function(p) {
|
||||
@@ -110,9 +110,9 @@ describe('cross-platform', () => {
|
||||
describe('npm package structure', () => {
|
||||
it('has required executable files', () => {
|
||||
const fs = require('fs');
|
||||
const binDir = path.join(__dirname, '..', '..', 'bin');
|
||||
const distDir = path.join(__dirname, '..', '..', 'dist');
|
||||
|
||||
assert(fs.existsSync(path.join(binDir, 'ccs.js')), 'ccs.js should exist in bin directory');
|
||||
assert(fs.existsSync(path.join(distDir, 'ccs.js')), 'ccs.js should exist in dist directory');
|
||||
});
|
||||
|
||||
it('has required script files', () => {
|
||||
|
||||
@@ -3,7 +3,7 @@ const { execSync } = require('child_process');
|
||||
const path = require('path');
|
||||
|
||||
describe('integration: special commands', () => {
|
||||
const ccsPath = path.join(__dirname, '..', '..', 'bin', 'ccs.js');
|
||||
const ccsPath = path.join(__dirname, '..', '..', 'dist', 'ccs.js');
|
||||
|
||||
it('shows version with --version', () => {
|
||||
const output = execSync(`node ${ccsPath} --version`, { encoding: 'utf8' });
|
||||
|
||||
Reference in new issue
Block a user