skillsets 0.2.2 → 0.2.4

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/README.md CHANGED
@@ -33,7 +33,7 @@ npx skillsets install @supercollectible/The_Skillset
33
33
 
34
34
  ### list
35
35
  - `-l, --limit <n>` - Limit number of results
36
- - `-s, --sort <field>` - Sort by: `name`, `stars`, `downloads`
36
+ - `-s, --sort <field>` - Sort by: `name`, `stars`, `downloads`, `recent`
37
37
  - `--json` - Output as JSON
38
38
 
39
39
  ### search
@@ -53,7 +53,7 @@ The CLI fetches live star and download counts from the API, so you always see cu
53
53
  ```bash
54
54
  npm install # Install dependencies
55
55
  npm run build # Build TypeScript
56
- npm test # Run tests (43 tests)
56
+ npm test # Run tests
57
57
  ```
58
58
 
59
59
  ## Documentation
@@ -11,16 +11,18 @@ export async function list(options) {
11
11
  let skillsets = mergeStats(index.skillsets, stats);
12
12
  // Sort
13
13
  const sortBy = options.sort || 'name';
14
- if (sortBy === 'stars') {
15
- skillsets.sort((a, b) => b.stars - a.stars);
14
+ switch (sortBy) {
15
+ case 'stars':
16
+ skillsets.sort((a, b) => b.stars - a.stars);
17
+ break;
18
+ case 'downloads':
19
+ skillsets.sort((a, b) => (b.downloads ?? 0) - (a.downloads ?? 0));
20
+ break;
21
+ case 'name':
22
+ default:
23
+ skillsets.sort((a, b) => a.name.localeCompare(b.name));
24
+ break;
16
25
  }
17
- else if (sortBy === 'downloads') {
18
- skillsets.sort((a, b) => (b.downloads ?? 0) - (a.downloads ?? 0));
19
- }
20
- else if (sortBy === 'name') {
21
- skillsets.sort((a, b) => a.name.localeCompare(b.name));
22
- }
23
- // 'recent' would require a date field - skip for now
24
26
  // Limit
25
27
  const limit = parseInt(options.limit || '0', 10);
26
28
  if (limit > 0) {
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { handleError } from './lib/errors.js';
10
10
  program
11
11
  .name('skillsets')
12
12
  .description('CLI tool for discovering and installing verified skillsets')
13
- .version('0.1.0');
13
+ .version('0.2.4');
14
14
  // === Discovery Commands ===
15
15
  program
16
16
  .command('list')
@@ -9,10 +9,6 @@ export async function computeFileChecksum(filePath) {
9
9
  const content = await fs.readFile(filePath, 'utf-8');
10
10
  return crypto.createHash('sha256').update(content).digest('hex');
11
11
  }
12
- /**
13
- * Verifies checksums of installed skillset against registry.
14
- * Returns validation result with list of mismatches.
15
- */
16
12
  /**
17
13
  * Strips algorithm prefix from checksum (e.g., "sha256:abc123" -> "abc123").
18
14
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillsets",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "CLI tool for discovering and installing verified skillsets",
5
5
  "type": "module",
6
6
  "bin": {