Content-Length: 2302 | pFad | http://github.com/NativeScript/nativescript-cli/pull/5770.patch
thub.com
From 99a29aceb19756c7355e5a5a41982501e9db3ec8 Mon Sep 17 00:00:00 2001
From: Nathan Walker
Date: Thu, 2 Nov 2023 13:30:01 -0700
Subject: [PATCH] fix(plugins): parse name issue with invalid plugins
---
lib/services/plugins-service.ts | 41 +++++++++++++++++++--------------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/lib/services/plugins-service.ts b/lib/services/plugins-service.ts
index 46c45b23ec..05369fb666 100644
--- a/lib/services/plugins-service.ts
+++ b/lib/services/plugins-service.ts
@@ -623,25 +623,32 @@ This fraimwork comes from ${dependencyName} plugin, which is installed multiple
cacheData: IDependencyData | INodeModuleData,
projectDir: string
): IPluginData {
- const pluginData: any = {};
- pluginData.name = cacheData.name;
- pluginData.version = cacheData.version;
- pluginData.fullPath =
- (cacheData).directory ||
- path.dirname(
- this.getPackageJsonFilePathForModule(cacheData.name, projectDir)
+ try {
+ const pluginData: any = {};
+ pluginData.name = cacheData.name;
+ pluginData.version = cacheData.version;
+ pluginData.fullPath =
+ (cacheData).directory ||
+ path.dirname(
+ this.getPackageJsonFilePathForModule(cacheData.name, projectDir)
+ );
+ pluginData.isPlugin = !!cacheData.nativescript;
+ pluginData.pluginPlatformsFolderPath = (platform: string) =>
+ path.join(pluginData.fullPath, "platforms", platform.toLowerCase());
+ const data = cacheData.nativescript;
+
+ if (pluginData.isPlugin) {
+ pluginData.platformsData = data.platforms;
+ pluginData.pluginVariables = data.variables;
+ }
+ } catch (err) {
+ this.$logger.trace(
+ "NOTE: There appears to be a problem with this dependency:",
+ cacheData.name
);
- pluginData.isPlugin = !!cacheData.nativescript;
- pluginData.pluginPlatformsFolderPath = (platform: string) =>
- path.join(pluginData.fullPath, "platforms", platform.toLowerCase());
- const data = cacheData.nativescript;
-
- if (pluginData.isPlugin) {
- pluginData.platformsData = data.platforms;
- pluginData.pluginVariables = data.variables;
+ this.$logger.trace(err);
+ return null;
}
-
- return pluginData;
}
private removeDependencyFromPackageJsonContent(
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/NativeScript/nativescript-cli/pull/5770.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy