trello-cli-unofficial 0.10.2 โ†’ 0.10.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.10.3](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.10.2...v0.10.3) (2025-11-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add Windows USERPROFILE support for config directory ([36f72ca](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/36f72ca4685236e5bb2f03a5966e81b14815ad9c))
7
+
1
8
  ## [0.10.2](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.10.1...v0.10.2) (2025-11-14)
2
9
 
3
10
 
package/README.md CHANGED
@@ -350,6 +350,119 @@ bun run typecheck
350
350
  bun run lint
351
351
  ```
352
352
 
353
+ ## ๐Ÿงช Cross-Platform Development Testing
354
+
355
+ This project includes tools for testing cross-platform compatibility during development:
356
+
357
+ ### Quick Cross-Platform Test
358
+
359
+ ```bash
360
+ # Run comprehensive cross-platform tests
361
+ bun run test:cross-platform
362
+
363
+ # This will test:
364
+ # โœ… Build process
365
+ # โœ… Installation process
366
+ # โœ… CLI functionality (--version, --help)
367
+ # โœ… File system operations
368
+ # โœ… Environment variable handling
369
+ # โœ… Platform-specific features
370
+ ```
371
+
372
+ ### Individual Test Commands
373
+
374
+ ```bash
375
+ # Test build process only
376
+ bun run test:build
377
+
378
+ # Test installation process
379
+ bun run test:install
380
+
381
+ # Quick smoke tests
382
+ bun run test:smoke
383
+ ```
384
+
385
+ ### Docker-Based Cross-Platform Testing
386
+
387
+ For comprehensive testing across platforms, use Docker containers:
388
+
389
+ ```bash
390
+ # Test on all platforms (Linux + Windows when available)
391
+ npm run test:docker
392
+
393
+ # Test specific platforms
394
+ npm run test:docker:ubuntu # Ubuntu Linux
395
+ npm run test:docker:alpine # Alpine Linux
396
+ npm run test:docker:windows # Windows (requires Windows host or WSL2)
397
+ ```
398
+
399
+ **Platform Support:**
400
+ - โœ… **Linux**: Ubuntu 22.04, Ubuntu 20.04, Alpine Linux
401
+ - โœ… **Windows**: Windows Server Core 2022 (via Docker Desktop)
402
+ - โœ… **macOS**: Tested via GitHub Actions CI/CD
403
+
404
+ **Requirements:**
405
+ - Docker Desktop installed
406
+ - 4GB+ RAM allocated to Docker
407
+ - For Windows containers: Windows 10/11 Pro+ or WSL2
408
+
409
+ See [`WINDOWS_TESTING.md`](./WINDOWS_TESTING.md) for detailed Windows setup instructions.
410
+
411
+ ### Manual Windows Testing Checklist
412
+
413
+ When testing on Windows, verify these scenarios:
414
+
415
+ 1. **Installation Methods:**
416
+ ```powershell
417
+ # Method 1: NPM global install
418
+ npm install -g trello-cli-unofficial
419
+
420
+ # Method 2: From source
421
+ bun install
422
+ bun link # or bun run install-global
423
+ ```
424
+
425
+ 2. **Command Availability:**
426
+ ```powershell
427
+ # Test both command names
428
+ tcu --version
429
+ trello-cli-unofficial --version
430
+
431
+ # Test in different terminals
432
+ # - Command Prompt (cmd)
433
+ # - PowerShell
434
+ # - Windows Terminal
435
+ ```
436
+
437
+ 3. **PATH Configuration:**
438
+ ```powershell
439
+ # Check if commands are in PATH
440
+ where tcu
441
+ where trello-cli-unofficial
442
+
443
+ # Refresh environment (PowerShell)
444
+ $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
445
+ ```
446
+
447
+ 4. **File System Operations:**
448
+ - Config directory creation: `%USERPROFILE%\.trello-cli-unofficial\`
449
+ - File read/write permissions
450
+ - Path separator handling (`\` vs `/`)
451
+
452
+ 5. **Environment Variables:**
453
+ - `TRELLO_TOKEN` handling
454
+ - Language detection (`LANG`, `LC_ALL`, etc.)
455
+ - Node.js/Bun path resolution
456
+
457
+ ### Common Windows Issues & Solutions
458
+
459
+ | Issue | Symptom | Solution |
460
+ |-------|---------|----------|
461
+ | PATH not updated | `tcu command not found` | Restart terminal or run `refreshenv` |
462
+ | Permission denied | Installation fails | Run as Administrator |
463
+ | Antivirus blocking | Installation interrupted | Temporarily disable or whitelist |
464
+ | Node version conflicts | Runtime errors | Use Node 18+ or Bun 1.0+ |
465
+
353
466
  ## ๐Ÿ”’ Security
354
467
 
355
468
  - Token saved locally in protected file (`~/.trello-cli-unofficial/config.json`)
@@ -441,6 +554,8 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
441
554
 
442
555
  ---
443
556
 
557
+ ---
558
+
444
559
  **Note**: This is an unofficial project and is not affiliated with Atlassian or Trello.
445
560
 
446
561
  ---
package/dist/main.js CHANGED
@@ -28638,7 +28638,8 @@ class FileConfigRepository {
28638
28638
  configDir;
28639
28639
  configFile;
28640
28640
  constructor() {
28641
- this.configDir = path3.join(process.env.HOME || "~", ".trello-cli-unofficial");
28641
+ const homeDir = process.env.HOME || process.env.USERPROFILE || "~";
28642
+ this.configDir = path3.join(homeDir, ".trello-cli-unofficial");
28642
28643
  this.configFile = path3.join(this.configDir, "config.json");
28643
28644
  }
28644
28645
  async load() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trello-cli-unofficial",
3
3
  "type": "module",
4
- "version": "0.10.2",
4
+ "version": "0.10.3",
5
5
  "private": false,
6
6
  "description": "Unofficial Trello CLI using Power-Up authentication, built with Bun for maximum performance",
7
7
  "author": "Matheus Caiser <matheus.kaiser@gmail.com> (https://www.mrdeveloper.com.br/)",
@@ -61,6 +61,15 @@
61
61
  "test:integration": "bun test tests/integration",
62
62
  "test:coverage": "bun test --coverage",
63
63
  "test:coverage:threshold": "bun test --coverage --coverage-reporter=lcov && bun run scripts/check-coverage.js",
64
+ "test:cross-platform": "node scripts/test-cross-platform.js",
65
+ "test:build": "bun run build && echo 'โœ… Build successful'",
66
+ "test:install": "bun run build && npm pack && npm install -g *.tgz && tcu --version && echo 'โœ… Installation successful'",
67
+ "test:smoke": "bun run test:install && tcu --help > /dev/null && echo 'โœ… Smoke tests passed'",
68
+ "test:docker": "./docker/test-all.sh",
69
+ "test:docker:ubuntu": "./docker/test-ubuntu.sh",
70
+ "test:docker:alpine": "./docker/test-alpine.sh",
71
+ "test:docker:windows": "./docker/test-windows.sh",
72
+ "test:docker:node": "./docker/test-node-versions.sh",
64
73
  "lint": "eslint .",
65
74
  "lint:fix": "eslint . --fix",
66
75
  "lint:json": "node -e \"JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8')); console.log('JSON is valid')\" --",
@@ -0,0 +1,140 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Cross-Platform Testing Script
5
+ *
6
+ * This script helps identify potential cross-platform compatibility issues
7
+ * by simulating different environments and testing edge cases.
8
+ */
9
+
10
+ import { execSync } from 'node:child_process';
11
+ import fs from 'node:fs';
12
+ import os from 'node:os';
13
+ import path from 'node:path';
14
+ import process from 'node:process';
15
+
16
+ console.log('๐Ÿงช Cross-Platform Compatibility Tests\n');
17
+
18
+ // Test 1: Build verification
19
+ console.log('1๏ธโƒฃ Testing build process...');
20
+ try {
21
+ execSync('bun run build', { stdio: 'inherit' });
22
+ console.log('โœ… Build successful\n');
23
+ }
24
+ catch (error) {
25
+ console.error('โŒ Build failed:', error.message);
26
+ process.exit(1);
27
+ }
28
+
29
+ // Test 2: Installation simulation
30
+ console.log('2๏ธโƒฃ Testing installation process...');
31
+ try {
32
+ execSync('npm pack', { stdio: 'inherit' });
33
+ execSync('npm install -g *.tgz', { stdio: 'inherit' });
34
+ console.log('โœ… Installation successful\n');
35
+ }
36
+ catch (error) {
37
+ console.error('โŒ Installation failed:', error.message);
38
+ process.exit(1);
39
+ }
40
+
41
+ // Test 3: CLI functionality
42
+ console.log('3๏ธโƒฃ Testing CLI functionality...');
43
+ try {
44
+ const version = execSync('tcu --version', { encoding: 'utf8' }).trim();
45
+ console.log(`โœ… Version command works: ${version}`);
46
+
47
+ execSync('tcu --help > /dev/null', { stdio: 'inherit' });
48
+ console.log('โœ… Help command works\n');
49
+ }
50
+ catch (error) {
51
+ console.error('โŒ CLI functionality failed:', error.message);
52
+ process.exit(1);
53
+ }
54
+
55
+ // Test 4: Path handling (Windows vs Unix)
56
+ console.log('4๏ธโƒฃ Testing path handling...');
57
+ try {
58
+ const configDir = path.join(os.homedir(), '.trello-cli-unofficial');
59
+ console.log(`Config directory: ${configDir}`);
60
+
61
+ // Test if we can create the config directory
62
+ if (!fs.existsSync(configDir)) {
63
+ fs.mkdirSync(configDir, { recursive: true });
64
+ console.log('โœ… Config directory creation works');
65
+ }
66
+ else {
67
+ console.log('โœ… Config directory exists');
68
+ }
69
+
70
+ // Test file operations
71
+ const testFile = path.join(configDir, 'test-config.json');
72
+ fs.writeFileSync(testFile, JSON.stringify({ test: true }, null, 2));
73
+ fs.unlinkSync(testFile);
74
+
75
+ console.log('โœ… File operations work\n');
76
+ }
77
+ catch (error) {
78
+ console.error('โŒ Path handling failed:', error.message);
79
+ process.exit(1);
80
+ }
81
+
82
+ // Test 5: Environment variables
83
+ console.log('5๏ธโƒฃ Testing environment variables...');
84
+ try {
85
+ // Test LANG detection
86
+ const langVars = ['LANG', 'LANGUAGE', 'LC_ALL', 'LC_MESSAGES'];
87
+ let detectedLang = 'en';
88
+
89
+ for (const varName of langVars) {
90
+ const value = process.env[varName];
91
+ if (value && value.toLowerCase().includes('pt')) {
92
+ detectedLang = 'pt';
93
+ break;
94
+ }
95
+ }
96
+
97
+ console.log(`โœ… Language detection works: ${detectedLang}`);
98
+
99
+ // Test TRELLO_TOKEN handling
100
+ const token = process.env.TRELLO_TOKEN;
101
+ if (token) {
102
+ console.log('โœ… TRELLO_TOKEN environment variable detected');
103
+ }
104
+ else {
105
+ console.log('โ„น๏ธ No TRELLO_TOKEN environment variable (expected)');
106
+ }
107
+ console.log('');
108
+ }
109
+ catch (error) {
110
+ console.error('โŒ Environment variable testing failed:', error.message);
111
+ process.exit(1);
112
+ }
113
+
114
+ // Test 6: Platform-specific checks
115
+ console.log('6๏ธโƒฃ Testing platform-specific features...');
116
+ try {
117
+ console.log(`Platform: ${os.platform()}`);
118
+ console.log(`Architecture: ${os.arch()}`);
119
+ console.log(`Node version: ${process.version}`);
120
+ console.log(`Working directory: ${process.cwd()}`);
121
+
122
+ // Test process.argv handling
123
+ console.log(`Arguments count: ${process.argv.length}`);
124
+ console.log(`First argument: ${process.argv[0]}`);
125
+ console.log(`Script name: ${process.argv[1]}`);
126
+
127
+ console.log('โœ… Platform detection works\n');
128
+ }
129
+ catch (error) {
130
+ console.error('โŒ Platform testing failed:', error.message);
131
+ process.exit(1);
132
+ }
133
+
134
+ console.log('๐ŸŽ‰ All cross-platform tests passed!');
135
+ console.log('\n๐Ÿ“‹ Recommendations for Windows testing:');
136
+ console.log('1. Test on Windows PowerShell/Command Prompt');
137
+ console.log('2. Test with different Node.js versions (18.x, 20.x)');
138
+ console.log('3. Test with and without Bun installed');
139
+ console.log('4. Test global installation: npm install -g trello-cli-unofficial');
140
+ console.log('5. Test PATH configuration and command availability'); ;
@@ -9,10 +9,9 @@ export class FileConfigRepository implements ConfigRepository {
9
9
  private readonly configFile: string;
10
10
 
11
11
  constructor() {
12
- this.configDir = path.join(
13
- process.env.HOME || '~',
14
- '.trello-cli-unofficial',
15
- );
12
+ // Cross-platform home directory detection
13
+ const homeDir = process.env.HOME || process.env.USERPROFILE || '~';
14
+ this.configDir = path.join(homeDir, '.trello-cli-unofficial');
16
15
  this.configFile = path.join(this.configDir, 'config.json');
17
16
  }
18
17