fix: failed build in node and bad lints (#10444)

* fix: failed build in node and bad lints

* chore: update tsconfigs

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Almeida
2024-08-20 23:40:37 +01:00
committed by GitHub
parent dd795da790
commit 00accf7470
6 changed files with 24 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import { execSync } from 'node:child_process';
import process from 'node:process';
import picocolors from 'picocolors';
import { DEFAULT_PACKAGE_MANAGER } from '../util/constants.js';
import { DEFAULT_PACKAGE_MANAGER, NODE_PACKAGE_MANAGERS } from '../util/constants.js';
/**
* A union of supported package managers.
@@ -110,3 +110,12 @@ export function install(packageManager: PackageManager) {
env,
});
}
/**
* Whether the provided package manager is a Node package manager.
*
* @param packageManager - The package manager to check
*/
export function isNodePackageManager(packageManager: PackageManager): packageManager is 'npm' | 'pnpm' | 'yarn' {
return NODE_PACKAGE_MANAGERS.includes(packageManager as any);
}