browser-extension-manager 1.2.8 → 1.2.10

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.
@@ -95,6 +95,11 @@ async function updateManager() {
95
95
  const isUpToDate = version.is(installedVersion, '>=', latestVersion);
96
96
  const levelDifference = version.levelDifference(installedVersion, latestVersion);
97
97
 
98
+ // Check if installedVersion is truthy or throw error
99
+ if (!installedVersion) {
100
+ throw new Error(`No installed version of ${package.name} found in devDependencies.`);
101
+ }
102
+
98
103
  // Log
99
104
  logVersionCheck(package.name, installedVersion, latestVersion, isUpToDate);
100
105
 
@@ -172,6 +177,12 @@ function setupScripts() {
172
177
  function checkLocality() {
173
178
  const installedVersion = project.devDependencies[package.name];
174
179
 
180
+ // Check if installedVersion is truthy or throw error
181
+ if (!installedVersion) {
182
+ throw new Error(`No installed version of ${package.name} found in devDependencies.`);
183
+ }
184
+
185
+ // Warn if using local version
175
186
  if (installedVersion.startsWith('file:')) {
176
187
  logger.warn(`⚠️⚠️⚠️ You are using the local version of ${package.name}. This WILL NOT WORK when published. ⚠️⚠️⚠️`);
177
188
  }
@@ -31,6 +31,16 @@ const LANGUAGES = [
31
31
  const localesDir = path.join(process.cwd(), 'src', '_locales');
32
32
  const enMessagesPath = path.join(localesDir, 'en', 'messages.json');
33
33
 
34
+ // Check if Claude CLI is installed
35
+ async function isClaudeInstalled() {
36
+ try {
37
+ await execute('which claude');
38
+ return true;
39
+ } catch (e) {
40
+ return false;
41
+ }
42
+ }
43
+
34
44
  // Main translate task
35
45
  async function translate(complete) {
36
46
  // Only run in build mode
@@ -39,6 +49,12 @@ async function translate(complete) {
39
49
  return complete();
40
50
  }
41
51
 
52
+ // Check if Claude CLI is installed
53
+ if (!await isClaudeInstalled()) {
54
+ logger.log('Skipping translation (Claude CLI not installed)');
55
+ return complete();
56
+ }
57
+
42
58
  // Log
43
59
  logger.log('Starting translation...');
44
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-extension-manager",
3
- "version": "1.2.8",
3
+ "version": "1.2.10",
4
4
  "description": "Browser Extension Manager dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {