plop
Advanced tools
Comparing version 3.0.3 to 3.0.4
{ | ||
"name": "plop", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "Micro-generator framework that makes it easy for an entire team to create files with a level of uniformity", | ||
@@ -5,0 +5,0 @@ "main": "./src/plop.js", |
@@ -55,3 +55,3 @@ import chalk from "chalk"; | ||
namedBypassArr = promptNames.map((name) => | ||
plopArgV[name] ? plopArgV[name] : undefined | ||
plopArgV[name] !== undefined ? plopArgV[name] : undefined | ||
); | ||
@@ -58,0 +58,0 @@ } |
@@ -9,8 +9,2 @@ export default function (plop) { | ||
message: "What is your name?", | ||
validate: function (value) { | ||
if (/.+/.test(value)) { | ||
return true; | ||
} | ||
return "name is required"; | ||
}, | ||
}, | ||
@@ -17,0 +11,0 @@ { |
@@ -97,2 +97,11 @@ import { resolve, dirname } from "node:path"; | ||
test("Should allow for empty string bypassing", async () => { | ||
const { queryByText, findByText } = await renderPlop(["--", "--name", `""`], { | ||
cwd: resolve(__dirname, "./examples/prompt-only"), | ||
}); | ||
expect(await queryByText("What is your name?")).toBeFalsy(); | ||
expect(await findByText("What pizza toppings do you like?")).toBeTruthy(); | ||
}); | ||
test.todo("Dynamic actions"); |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
99192
1778
5