function mergeDependencies (pkgJson, fields) {
	const allDependencies = {}
	for (let i = 0; i < fields.length; i++) {
		const field = fields[i]
		const dependencies = pkgJson[field] || {}
		const names = Object.keys(dependencies)
		for (let j = 0; j < names.length; j++) {
			const name = names[j]
			allDependencies[name] = dependencies[name]
		}
	}
	return allDependencies
}
merge dependency fields.
@param  {Object} pkgJson - `package.json` object from which the dependencies
should be obtained.
@param  {Array.<String>} fields - property names of dependencies to be merged
together.
@return {Object} - merged dependencies.