Skip to content

Commit 2d7d1b5

Browse files
author
Your Name
committed
fix: Change flash-install command to use direct CLI implementation for better reliability
1 parent 7a0e8b3 commit 2d7d1b5

8 files changed

Lines changed: 89 additions & 68 deletions

File tree

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Changelog
2+
3+
## Version 1.8.1 (2024-07-10)
4+
5+
### Breaking Changes
6+
- Changed the `flash-install` command to use the direct CLI implementation for better reliability and performance
7+
- Removed the React-based terminal UI to avoid compatibility issues with React versions
8+
9+
### Bug Fixes
10+
- Fixed critical error when running `flash-install` after downloading
11+
- Fixed React version compatibility issues by downgrading React from 19.1.0 to 18.3.1
12+
- Updated the postinstall script to make the direct CLI executable
13+
14+
### Documentation
15+
- Updated README and documentation to reflect the new command usage
16+
- Clarified that `flash-install install` is the recommended command
17+
- Added more examples of command usage
18+
19+
## Version 1.8.0
20+
21+
Initial release with full feature set.

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -333,25 +333,26 @@ Contributions are welcome! Please feel free to submit a Pull Request.
333333

334334

335335

336-
## Direct CLI Interface
336+
## CLI Interface
337337

338-
flash-install provides two CLI interfaces:
338+
The `flash-install` command uses a direct CLI implementation for better reliability and performance. When you run `flash-install`, you're using the direct CLI interface which provides all the core functionality you need.
339339

340-
1. **Main CLI Interface** (`flash-install`): The primary interface with all core commands and features.
341-
2. **Direct CLI Interface** (`flash-install-direct`): A simplified interface with direct implementations of commands.
340+
```bash
341+
# Basic usage
342+
flash-install install
342343
343-
The direct CLI interface can be accessed by running:
344+
# Create a snapshot
345+
flash-install snapshot
344346
345-
```bash
346-
node dist/cli-direct.js <command>
347+
# Restore from a snapshot
348+
flash-install restore
347349
```
348350

349-
This interface is useful for:
350-
- Debugging issues with the main CLI
351-
- Running commands with minimal overhead
352-
- Accessing experimental features not yet available in the main CLI
353-
354-
> **Note:** Some commands may behave slightly differently between the two interfaces. The main CLI interface is recommended for most users.
351+
This implementation:
352+
- Provides reliable progress reporting
353+
- Has minimal overhead
354+
- Works consistently across different environments
355+
- Avoids compatibility issues with terminal UI libraries
355356

356357
## Documentation
357358

docs/docs/getting-started.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,9 @@ npm install -g @flash-install/cli
2626

2727
This will make the `flash-install`, `flash-direct`, and `flash-install-direct` commands available globally on your system.
2828

29-
## CLI Interfaces
29+
## CLI Interface
3030

31-
flash-install provides two CLI interfaces:
32-
33-
1. **Main CLI Interface** (`flash-install`): The primary interface with all core commands and features.
34-
2. **Direct CLI Interface** (`flash-direct` or `flash-install-direct`): A simplified interface with direct implementations of commands.
35-
36-
The direct CLI interface is useful for:
37-
- Debugging issues with the main CLI
38-
- Running commands with minimal overhead
39-
- Accessing experimental features not yet available in the main CLI
40-
41-
> **Note:** Some commands may behave slightly differently between the two interfaces. The main CLI interface is recommended for most users.
31+
The `flash-install` command provides a reliable and efficient interface for all your dependency management needs. It uses a direct implementation that avoids compatibility issues with terminal UI libraries.
4232

4333
## Basic Usage
4434

@@ -48,10 +38,10 @@ Replace your regular `npm install` command with `flash-install`:
4838

4939
```bash
5040
# Standard installation
51-
flash-install
41+
flash-install install
5242

53-
# Or use direct mode for better progress reporting
54-
flash-direct
43+
# Or simply
44+
flash-install
5545
```
5646

5747
flash-install will automatically detect your package manager (npm, yarn, or pnpm) based on the lock files in your project.

docs/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ <h2 class="section-title">Installation</h2>
427427
<div class="section">
428428
<h2 class="section-title">Basic Usage</h2>
429429
<pre><code><span class="code-comment"># Standard installation</span>
430+
flash-install install
431+
432+
<span class="code-comment"># Or simply</span>
430433
flash-install
431434

432435
<span class="code-comment"># Create a snapshot</span>

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ Replace your regular `npm install` command with `flash-install`:
105105

106106
```bash
107107
# Standard installation
108-
flash-install
108+
flash-install install
109109

110-
# Or use direct mode for better progress reporting
111-
flash-direct
110+
# Or simply
111+
flash-install
112112
```
113113

114114
[Get Started with flash-install]({{ site.baseurl }}/docs/getting-started){: .btn }

package-lock.json

Lines changed: 35 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"$schema": "https://json.schemastore.org/package.json",
33
"name": "@flash-install/cli",
4-
"version": "1.8.0",
4+
"version": "1.8.1",
55
"description": "A fast, drop-in replacement for npm install with deterministic caching",
66
"type": "module",
77
"main": "dist/index.js",
88
"bin": {
9-
"flash-install": "dist/cli.js",
10-
"flash": "dist/cli.js",
9+
"flash-install": "dist/cli-direct.js",
10+
"flash": "dist/cli-direct.js",
1111
"flash-direct": "dist/cli-direct.js",
1212
"flash-install-direct": "dist/cli-direct.js"
1313
},
@@ -80,8 +80,8 @@
8080
"js-yaml": "^4.1.0",
8181
"jsonc-parser": "^3.2.0",
8282
"lodash": "^4.17.21",
83-
"react": "^19.1.0",
84-
"react-dom": "^19.1.0",
83+
"react": "^18.3.1",
84+
"react-dom": "^18.3.1",
8585
"readable-stream": "^4.7.0",
8686
"semver": "^7.5.4",
8787
"tar-stream": "^3.1.6",
@@ -97,8 +97,8 @@
9797
"@types/jest": "^29.5.0",
9898
"@types/js-yaml": "^4.0.9",
9999
"@types/node": "^18.15.11",
100-
"@types/react": "^19.1.2",
101-
"@types/react-dom": "^19.1.2",
100+
"@types/react": "^18.2.0",
101+
"@types/react-dom": "^18.2.0",
102102
"@types/semver": "^7.5.3",
103103
"@types/tar-stream": "^3.1.3",
104104
"@typescript-eslint/eslint-plugin": "^5.57.1",

scripts/postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const __filename = fileURLToPath(import.meta.url);
99
const __dirname = path.dirname(__filename);
1010

1111
// Make the CLI file executable
12-
const cliPath = path.join(__dirname, '..', 'dist', 'cli.js');
12+
const cliPath = path.join(__dirname, '..', 'dist', 'cli-direct.js');
1313

1414
try {
1515
// Check if the file exists

0 commit comments

Comments
 (0)