@charcoal-ui/tailwind-diff
Advanced tools
Comparing version 3.2.0 to 3.3.0-beta.0
@@ -11,7 +11,7 @@ "use strict"; | ||
function detectPackageManager(base) { | ||
const upperbounds = [os_1.default.homedir(), path_1.default.resolve('/')]; | ||
const upperBounds = [os_1.default.homedir(), path_1.default.resolve('/')]; | ||
let dir = fs_1.default.statSync(base).isDirectory() ? base : path_1.default.dirname(base); | ||
while (!fs_1.default.existsSync(path_1.default.join(dir, 'package.json'))) { | ||
const parent = path_1.default.dirname(dir); | ||
if (upperbounds.includes(parent)) { | ||
if (upperBounds.includes(parent)) { | ||
throw new Error('No node project found.'); | ||
@@ -45,3 +45,3 @@ } | ||
dir = path_1.default.dirname(dir); | ||
} while (!upperbounds.includes(dir)); | ||
} while (!upperBounds.includes(dir)); | ||
return { | ||
@@ -48,0 +48,0 @@ type, |
@@ -5,6 +5,6 @@ import { PackageManagerInfo } from './packageManager'; | ||
* | ||
* @param packageDescripters 欲しいパッケージの一覧 | ||
* @param packageDescriptors 欲しいパッケージの一覧 | ||
* @param callback 実行したい処理 | ||
*/ | ||
export declare function withPackages<T>(packageManagerInfo: PackageManagerInfo, packageDescripters: readonly string[], callback: () => T | Promise<T>): Promise<T>; | ||
export declare function withPackages<T>(packageManagerInfo: PackageManagerInfo, packageDescriptors: readonly string[], callback: () => T | Promise<T>): Promise<T>; | ||
//# sourceMappingURL=withPackages.d.ts.map |
@@ -15,7 +15,7 @@ "use strict"; | ||
* | ||
* @param packageDescripters 欲しいパッケージの一覧 | ||
* @param packageDescriptors 欲しいパッケージの一覧 | ||
* @param callback 実行したい処理 | ||
*/ | ||
async function withPackages(packageManagerInfo, packageDescripters, callback) { | ||
if (packageDescripters.length === 0) { | ||
async function withPackages(packageManagerInfo, packageDescriptors, callback) { | ||
if (packageDescriptors.length === 0) { | ||
return callback(); | ||
@@ -49,11 +49,11 @@ } | ||
case 'npm': | ||
cmd = `npm install ${packageDescripters.join(' ')}`; | ||
cmd = `npm install ${packageDescriptors.join(' ')}`; | ||
recoverCmd = 'npm install'; | ||
break; | ||
case 'yarn': | ||
cmd = `yarn add ${packageDescripters.join(' ')}`; | ||
cmd = `yarn add ${packageDescriptors.join(' ')}`; | ||
recoverCmd = 'yarn install'; | ||
break; | ||
case 'pnpm': | ||
cmd = `pnpm add ${packageDescripters.join(' ')}`; | ||
cmd = `pnpm add ${packageDescriptors.join(' ')}`; | ||
recoverCmd = 'pnpm install'; | ||
@@ -60,0 +60,0 @@ break; |
{ | ||
"name": "@charcoal-ui/tailwind-diff", | ||
"version": "3.2.0", | ||
"version": "3.3.0-beta.0", | ||
"bin": "bin/tailwind-diff.js", | ||
@@ -28,3 +28,3 @@ "scripts": { | ||
}, | ||
"gitHead": "495dc492d64a159618461a074b2315547eeda99f" | ||
"gitHead": "aa4321ee5b76734602f8e135caa5e91388ca9403" | ||
} |
@@ -14,3 +14,3 @@ import fs from 'fs' | ||
export function detectPackageManager(base: string): PackageManagerInfo { | ||
const upperbounds = [os.homedir(), path.resolve('/')] | ||
const upperBounds = [os.homedir(), path.resolve('/')] | ||
let dir = fs.statSync(base).isDirectory() ? base : path.dirname(base) | ||
@@ -20,3 +20,3 @@ | ||
const parent = path.dirname(dir) | ||
if (upperbounds.includes(parent)) { | ||
if (upperBounds.includes(parent)) { | ||
throw new Error('No node project found.') | ||
@@ -55,3 +55,3 @@ } | ||
dir = path.dirname(dir) | ||
} while (!upperbounds.includes(dir)) | ||
} while (!upperBounds.includes(dir)) | ||
@@ -58,0 +58,0 @@ return { |
@@ -11,3 +11,3 @@ import child_process from 'child_process' | ||
* | ||
* @param packageDescripters 欲しいパッケージの一覧 | ||
* @param packageDescriptors 欲しいパッケージの一覧 | ||
* @param callback 実行したい処理 | ||
@@ -17,6 +17,6 @@ */ | ||
packageManagerInfo: PackageManagerInfo, | ||
packageDescripters: readonly string[], | ||
packageDescriptors: readonly string[], | ||
callback: () => T | Promise<T> | ||
): Promise<T> { | ||
if (packageDescripters.length === 0) { | ||
if (packageDescriptors.length === 0) { | ||
return callback() | ||
@@ -61,11 +61,11 @@ } | ||
case 'npm': | ||
cmd = `npm install ${packageDescripters.join(' ')}` | ||
cmd = `npm install ${packageDescriptors.join(' ')}` | ||
recoverCmd = 'npm install' | ||
break | ||
case 'yarn': | ||
cmd = `yarn add ${packageDescripters.join(' ')}` | ||
cmd = `yarn add ${packageDescriptors.join(' ')}` | ||
recoverCmd = 'yarn install' | ||
break | ||
case 'pnpm': | ||
cmd = `pnpm add ${packageDescripters.join(' ')}` | ||
cmd = `pnpm add ${packageDescriptors.join(' ')}` | ||
recoverCmd = 'pnpm install' | ||
@@ -72,0 +72,0 @@ break |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
45900
2