Add internal plugins as workspaces to single package.json
Summary: We cannot just add internal plugins as workspaces to the root package.json in "sonar/desktop" as they are not open-sourced, so public build will break. Instead, I have created root package.json for internal plugins and added all internal plugins as workspaces there. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically. Reviewed By: mweststrate Differential Revision: D20806237 fbshipit-source-id: f8b3327166963dec7da8ac74079682aebe4527e1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bcc133026e
commit
452c52c291
@@ -209,7 +209,11 @@ function entryPointForPluginFolder(pluginPath: string) {
|
||||
} catch (e) {}
|
||||
if (packageJSON) {
|
||||
try {
|
||||
const pkg = JSON.parse(packageJSON) as PluginManifest;
|
||||
const json = JSON.parse(packageJSON);
|
||||
if (json.workspaces) {
|
||||
return null;
|
||||
}
|
||||
const pkg = json as PluginManifest;
|
||||
const plugin: PluginInfo = {
|
||||
manifest: pkg,
|
||||
name: pkg.name,
|
||||
|
||||
Reference in New Issue
Block a user