Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[node-plop] instanceof Array is not working with array from vm script #404

Open
niandalu opened this issue Nov 17, 2023 · 0 comments
Open

Comments

@niandalu
Copy link

niandalu commented Nov 17, 2023

There's a validation for generator.actions while running runGeneratorActions.

I'm using vm to load plopfile and programmatically register it to node plop api instance.
But the instanceof Array would fail when the actions come from vm script. Maybe node-plop should use Array.isArray instead.

const vm = require('vm')
const s = new vm.Script(`[]`).runInNewContext()
s instanceof Array // false
Array.isArray(s) // true

Related to nodejs/node#37921

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant