function resolveRemote (nodeModules, parentTarget, name, version) {
	const source = `${name}@${version}`
	log(`resolving ${source} from remote registry`)

	const parsedSpec = cachedNpa(source)

	switch (parsedSpec.type) {
		case 'range':
		case 'version':
		case 'tag':
			return resolveFromNpm(nodeModules, parentTarget, parsedSpec)
		case 'remote':
			return resolveFromTarball(nodeModules, parentTarget, parsedSpec)
		case 'hosted':
			return resolveFromHosted(nodeModules, parentTarget, parsedSpec)
		case 'git':
			return resolveFromGit(nodeModules, parentTarget, parsedSpec)
		default:
			throw new Error(`Unknown package spec: ${parsedSpec.type} for ${name}`)
	}
}
resolve a dependency's `package.json` file from a remote registry.
@param	{String} nodeModules - `node_modules` base directory.
@param	{String} parentTarget - relative parent's node_modules path.
@param	{String} name - name of the dependency.
@param	{String} version - version of the dependency.
@return {Observable} - observable sequence of `package.json` objects.