browser-extension-manager 1.2.8 → 1.2.9
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/dist/commands/setup.js +11 -0
- package/package.json +1 -1
package/dist/commands/setup.js
CHANGED
|
@@ -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
|
}
|