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

chore: remove eval to allow execution without unsafe-eval CSP #46

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from

Conversation

taras
Copy link

@taras taras commented Jan 10, 2022

Motivation

Closes #45

Approach

Remove code that uses eval to require('util').inspect. This might be the wrong solution but we can use this as a starting point to figure out what the right solution should be.

@TonalidadeHidrica
Copy link

I'm stuck at unsafe-eval. I hope @iarna would review this!

}
/* istanbul ignore next */
const _inspect = _custom || 'inspect'
const _inspect = 'inspect'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://nodejs.org/api/util.html#util_util_inspect_custom

Suggested change
const _inspect = 'inspect'
const _inspect = Symbol.for('nodejs.util.inspect.custom')

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

Successfully merging this pull request may close these issues.

Package doesn't work with Content Security Policy unsafe-eval
3 participants