fix(AppData, dev dependencies, settings): Improve boolean conversion in AppData, update @types/node dependency, and add local settings file.
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/npmextra',
|
||||
version: '5.1.3',
|
||||
version: '5.1.4',
|
||||
description: 'A utility to enhance npm with additional configuration, tool management capabilities, and a key-value store for project setups.'
|
||||
}
|
||||
|
@@ -135,9 +135,19 @@ export class AppData<T = any> {
|
||||
}
|
||||
|
||||
// lets format the env value
|
||||
if (envValue) {
|
||||
if (typeof envValue === 'string' && convert === 'boolean') {
|
||||
envValue = envValue === 'true';
|
||||
if (envValue !== undefined && envValue !== null) {
|
||||
if (convert === 'boolean') {
|
||||
// Handle both string and boolean inputs
|
||||
if (typeof envValue === 'boolean') {
|
||||
// Already boolean, keep as-is
|
||||
envValue = envValue;
|
||||
} else if (typeof envValue === 'string') {
|
||||
// Convert string to boolean
|
||||
envValue = envValue === 'true';
|
||||
} else {
|
||||
// Any other type, convert to boolean
|
||||
envValue = Boolean(envValue);
|
||||
}
|
||||
}
|
||||
if (
|
||||
typeof envValue === 'string' &&
|
||||
|
Reference in New Issue
Block a user