-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link all platforms #17834
Link all platforms #17834
Conversation
This change adds hooks via the `package.json` for a platform plugin to specify hooks for generating platform configurations. This change also adds hooks to allow platform plugins to participate in `link` and `unlink` commands. The goal is to move platform-specific code for platform plugins into their own repositories / node_modules.
@facebook-github-bot label Needs more information @facebook-github-bot large-pr Generated by 🚫 dangerJS |
@@ -126,3 +126,5 @@ exports.dependencyConfig = function dependencyConfigAndroid(folder, userConfig) | |||
|
|||
return { sourceDir, folder, manifest, packageImportPath, packageInstance }; | |||
}; | |||
|
|||
exports.linkConfig = require('../../link/android'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add same for iOS #Closed
local-cli/link/unlink.js
Outdated
}; | ||
const linkConfig = platforms[platform] && platforms[platform].linkConfig && platforms[platform].linkConfig(); | ||
if (!linkConfig || !linkConfig.isInstalled || !linkConfig.unregister) { | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null [](start = 15, length = 4)
return; #Closed
const isIosInstalled = isInstalledIOS(projectConfig, dependencyConfig); | ||
const isPodInstalled = isInstalledPods(projectConfig, dependencyConfig); | ||
if (isIosInstalled) { | ||
const allDependencies = getDependencyConfig(config, getProjectDependencies()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getProjectDependencies [](start = 56, length = 22)
need to import #Closed
const isPodInstalled = isInstalledPods(projectConfig, dependencyConfig); | ||
if (isIosInstalled) { | ||
const allDependencies = getDependencyConfig(config, getProjectDependencies()); | ||
const otherDependencies = filter(allDependencies, d => d.name !== packageName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packageName [](start = 70, length = 11)
name? #Closed
registerDependencyPods(name, dependencyConfig, projectConfig); | ||
} | ||
else { | ||
registerDependencyIOS(name, dependencyConfig, projectConfig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name [](start = 26, length = 4)
I don't think this takes a name param. #Closed
The previous commit added logic to allow platforms to self-configure their link behavior. The commit kept a special case for iOS and Android intact. This commit removes the special cases.
@rozele do you think we should cherry-pick this back to 0.53/0.52/0.51? |
Yup, got it.
…On Tue, 6 Feb 2018 at 14:53 Eric Rozell ***@***.***> wrote:
@grabbou <https://github.com/grabbou> - yes please do cherry-pick back to
these versions (and 0.50 if possible), but this PR was closed in favor of
#17745 <#17745>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17834 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWcxpAllrGDXz0n_VY9Uw0QWK5sZakfks5tSFligaJpZM4R3HXD>
.
|
Motivation
@grabbou requested that we eliminate the special cases for iOS and Android in
link
andunlink
commands.Test Plan
jest
tests continue to work.Related PRs
#17745
Release Notes
[INTERNAL] [ENHANCEMENT ] [local-cli/info/link.js] - Make link and unlink more maintainable for all platforms.