Socket
Socket
Sign inDemoInstall

@inquirer/core

Package Overview
Dependencies
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inquirer/core - npm Package Compare versions

Comparing version 8.1.0 to 8.2.0

30

dist/cjs/lib/make-theme.js

@@ -5,7 +5,31 @@ "use strict";

const theme_mjs_1 = require('./theme.js');
function isPlainObject(value) {
if (typeof value !== 'object' || value === null)
return false;
let proto = value;
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto);
}
return Object.getPrototypeOf(value) === proto;
}
function deepMerge(...objects) {
const output = {};
for (const obj of objects) {
for (const [key, value] of Object.entries(obj)) {
const prevValue = output[key];
output[key] =
isPlainObject(prevValue) && isPlainObject(value)
? deepMerge(prevValue, value)
: value;
}
}
return output;
}
function makeTheme(...themes) {
return Object.assign({}, theme_mjs_1.defaultTheme, ...themes, {
style: Object.assign({}, theme_mjs_1.defaultTheme.style, ...themes.map((theme) => theme === null || theme === void 0 ? void 0 : theme.style)),
});
const themesToMerge = [
theme_mjs_1.defaultTheme,
...themes.filter((theme) => theme != null),
];
return deepMerge(...themesToMerge);
}
exports.makeTheme = makeTheme;

8

package.json
{
"name": "@inquirer/core",
"version": "8.1.0",
"version": "8.2.0",
"engines": {

@@ -63,3 +63,3 @@ "node": ">=18"

"@types/mute-stream": "^0.0.4",
"@types/node": "^20.12.7",
"@types/node": "^20.12.11",
"@types/wrap-ansi": "^3.0.0",

@@ -76,3 +76,3 @@ "ansi-escapes": "^4.3.2",

"devDependencies": {
"@inquirer/testing": "^2.1.18"
"@inquirer/testing": "^2.1.19"
},

@@ -100,3 +100,3 @@ "scripts": {

},
"gitHead": "d0e92901ebb7eb77d027786a2e1ac41fc15326b6"
"gitHead": "27d1c0ae9e88edbc9bebcf58901a5104022074a9"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc