function resolve( results, entries, builtins ) {
	var opts;
	var len;
	var pkg;
	var res;
	var i;
	var k;

	len = entries.length;

	opts = {
		'walk': true,
		'builtins': builtins,
		'aliases': null
	};
	debug( 'Options: %s', JSON.stringify( opts ) );

	debug( 'Resolving %d packages...', len );
	for ( i = 0; i < len; i++ ) {
		pkg = entries[ i ].pkg;
		k = i + 1;

		debug( 'Resolving package: %s (%d of %d)...', pkg, k, len );
		opts.aliases = results[ i ].aliases;
		res = pkgDeps( entries[ i ].entries, opts );
		if ( res instanceof Error ) {
			debug( 'Encountered an error when resolving package dependencies: %s (%d of %d). Error: %s', pkg, k, len, res.message );
			return res;
		}
		debug( 'Successfully resolved package dependencies: %s (%d of %d).', pkg, k, len );
		res = transform( res );
		results[ i ].files = append( results[ i ].files, res.files );
		results[ i ].deps = append( results[ i ].deps, res.deps );
	}
	debug( 'Resolved all packages.' );
	return results;
}
Synchronously resolves package dependencies.

@private
@param {ObjectArray} results - results object
@param {ObjectArray} entries - entry points
@param {boolean} builtins - boolean indicating whether to include built-in package dependencies
@returns {(ObjectArray|Error)} results or an error