git0 0.2.12 → 0.2.13

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "git0",
3
3
  "description": "CLI tool to search GitHub repositories, download source & releases for your system, and instantly set up, then install dependencies and open code editor.",
4
- "version": "0.2.12",
4
+ "version": "0.2.13",
5
5
  "author": "vtempest",
6
6
  "dependencies": {
7
7
  "chalk": "^5.4.1",
package/src/fm.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
+ import fs from 'fs';
3
+ import path from 'path';
4
+ import readline from 'readline';
5
+ import { execSync } from 'child_process';
6
+ import os from 'os';
2
7
 
3
- const fs = require('fs');
4
- const path = require('path');
5
- const readline = require('readline');
6
- const { execSync } = require('child_process');
7
- const os = require('os');
8
8
 
9
9
  class FileManager {
10
10
  constructor() {
package/src/git0.js CHANGED
@@ -4,7 +4,6 @@ import chalk from 'chalk';
4
4
  import { execSync, spawn } from 'child_process';
5
5
  import fs from 'fs';
6
6
  import path from 'path';
7
- import ora from 'ora';
8
7
  import GithubAPI from './github-api.js'
9
8
 
10
9
  const Github = new GithubAPI({ debug: false })
@@ -41,7 +40,7 @@ async function showPackageMenu(selectedRepo) {
41
40
 
42
41
  platforms.forEach(platform => {
43
42
  const assets = release.platformAssets[platform];
44
- if (assets.length > 0) {
43
+ if (assets?.length > 0) {
45
44
  // Add platform header
46
45
  const platformEmoji = {
47
46
  windows: '🪟',
@@ -63,7 +62,7 @@ async function showPackageMenu(selectedRepo) {
63
62
  : chalk.gray(`${platformEmoji[platform]} ${platformName[platform]}`);
64
63
 
65
64
  // Add separator if not first platform in this release
66
- const needsSeparator = releaseChoices.length > 0 &&
65
+ const needsSeparator = releaseChoices?.length > 0 &&
67
66
  !releaseChoices[releaseChoices.length - 1].name.includes('────');
68
67
 
69
68
  if (needsSeparator) {
@@ -96,7 +95,7 @@ async function showPackageMenu(selectedRepo) {
96
95
  });
97
96
  });
98
97
 
99
- if (releaseChoices.filter(choice => !choice.disabled).length === 0) {
98
+ if (releaseChoices.filter(choice => !choice.disabled)?.length === 0) {
100
99
  log(chalk.yellow('No packages found for download.'));
101
100
  return;
102
101
  }