transduck 0.6.5 → 0.6.6

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/cli.js CHANGED
@@ -544,7 +544,7 @@ export async function runStats(opts) {
544
544
  }
545
545
  // CLI entry point
546
546
  const program = new Command();
547
- program.name('transduck').description('AI-native translation tool').version('0.6.5');
547
+ program.name('transduck').description('AI-native translation tool').version('0.6.6');
548
548
  program.command('init')
549
549
  .description('Initialize a new transduck project')
550
550
  .action(async () => {
package/dist/scanner.js CHANGED
@@ -27,12 +27,15 @@ const TEMPLATE_EXTENSIONS = new Set(['.html', '.jinja', '.jinja2']);
27
27
  // Supported file extensions for scanning
28
28
  const SCAN_EXTENSIONS = new Set(['.py', '.js', '.ts', '.tsx', '.jsx', '.html', '.jinja', '.jinja2']);
29
29
  // Directories to skip
30
- const SKIP_DIRS = new Set(['node_modules', '.venv', 'venv', '__pycache__', '.git', 'dist', 'build', '.next']);
30
+ const SKIP_DIRS = new Set(['node_modules', '.venv', 'venv', '__pycache__', '.git', 'dist', 'build', '.next', 'site-packages']);
31
31
  function shouldSkipDir(dirname) {
32
32
  if (SKIP_DIRS.has(dirname))
33
33
  return true;
34
34
  if (dirname.includes('egg-info'))
35
35
  return true;
36
+ // Skip venv variants: venv312, .venv3, env, .env, etc.
37
+ if (dirname.startsWith('venv') || dirname.startsWith('.venv') || dirname.startsWith('env') || dirname.startsWith('.env'))
38
+ return true;
36
39
  return false;
37
40
  }
38
41
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "transduck",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "AI-native translation tool using source text as keys",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/cli.ts CHANGED
@@ -661,7 +661,7 @@ export async function runStats(opts: StatsOptions): Promise<string> {
661
661
  // CLI entry point
662
662
  const program = new Command();
663
663
 
664
- program.name('transduck').description('AI-native translation tool').version('0.6.5');
664
+ program.name('transduck').description('AI-native translation tool').version('0.6.6');
665
665
 
666
666
  program.command('init')
667
667
  .description('Initialize a new transduck project')
package/src/scanner.ts CHANGED
@@ -53,11 +53,13 @@ const TEMPLATE_EXTENSIONS = new Set(['.html', '.jinja', '.jinja2']);
53
53
  const SCAN_EXTENSIONS = new Set(['.py', '.js', '.ts', '.tsx', '.jsx', '.html', '.jinja', '.jinja2']);
54
54
 
55
55
  // Directories to skip
56
- const SKIP_DIRS = new Set(['node_modules', '.venv', 'venv', '__pycache__', '.git', 'dist', 'build', '.next']);
56
+ const SKIP_DIRS = new Set(['node_modules', '.venv', 'venv', '__pycache__', '.git', 'dist', 'build', '.next', 'site-packages']);
57
57
 
58
58
  function shouldSkipDir(dirname: string): boolean {
59
59
  if (SKIP_DIRS.has(dirname)) return true;
60
60
  if (dirname.includes('egg-info')) return true;
61
+ // Skip venv variants: venv312, .venv3, env, .env, etc.
62
+ if (dirname.startsWith('venv') || dirname.startsWith('.venv') || dirname.startsWith('env') || dirname.startsWith('.env')) return true;
61
63
  return false;
62
64
  }
63
65
 
@@ -261,6 +261,29 @@ describe('scanDirectory', () => {
261
261
  expect(result).toHaveLength(1);
262
262
  });
263
263
 
264
+ it('skips venv with suffix (venv312)', () => {
265
+ const tmp = makeTmpDir();
266
+ const venv = join(tmp, 'venv312');
267
+ mkdirSync(venv);
268
+ writeFileSync(join(venv, 'lib.py'), 'ait("Hidden")');
269
+ writeFileSync(join(tmp, 'app.py'), 'ait("Visible")');
270
+ const result = scanDirectory([tmp]);
271
+ expect(result).toHaveLength(1);
272
+ expect(result[0].text).toBe('Visible');
273
+ });
274
+
275
+ it('skips env and .env directories', () => {
276
+ const tmp = makeTmpDir();
277
+ for (const name of ['env', '.env']) {
278
+ const d = join(tmp, name);
279
+ mkdirSync(d);
280
+ writeFileSync(join(d, 'lib.py'), 'ait("Hidden")');
281
+ }
282
+ writeFileSync(join(tmp, 'app.py'), 'ait("Visible")');
283
+ const result = scanDirectory([tmp]);
284
+ expect(result).toHaveLength(1);
285
+ });
286
+
264
287
  it('filters extensions', () => {
265
288
  const tmp = makeTmpDir();
266
289
  writeFileSync(join(tmp, 'readme.md'), 'ait("Not a code file")');