extensions/npm/src/tasks.ts/hasPackageJson
export async function hasPackageJson(): Promise<boolean> {
	const token = new CancellationTokenSource();
	// Search for files for max 1 second.
	const timeout = setTimeout(() => token.cancel(), 1000);
	const files = await workspace.findFiles('**/package.json', undefined, 1, token.token);
	clearTimeout(timeout);
	return files.length > 0 || await hasRootPackageJson();
}