You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an addon, parent, that has as a dependency, another addon, insecure-child. I'd like to include parent in my application, but insecure-child has an unpatched security problem, so I'd like to block it. (It's critical only to parts of parent that my application doesn't use.)
The problem with this is that shouldIncludeChildAddon is called before config is called. I could call this.parent.config(), but I don't have an environment to pass it.
The text was updated successfully, but these errors were encountered:
// parent/index.jsconstshouldExcludeInsecureChild=process.env.EXCLUDE_INSECURE_CHILD==='true'init(){if(shouldExcludeInsecureChild)returnif(this.parent.addonPackages['insecure-child']!=null)returnconsole.warn(`WARNING: in v2.0, parent will change insecure-child to an optionalDependency.If you want to use insecure-child, add it to your project's package.json as a dependency.If you do not want to use insecure-child, set EXCLUDE_INSECURE_CHILD to "true" `)}shouldIncludeChildAddon(child){returnchild.name!=='insecure-child'||!shouldExcludeInsecureChild}
I have an addon,
parent
, that has as adependency
, another addon,insecure-child
. I'd like to includeparent
in my application, butinsecure-child
has an unpatched security problem, so I'd like to block it. (It's critical only to parts ofparent
that my application doesn't use.)Things I've tried:
Blacklist
ember-cli throws an exception saying that
child
is not found.Monkey-Patch
shouldIncludeChildAddon
This doesn't work because ember-cli-preprocessor-registry runs before
ember-cli-build
loads.Configurable child blacklist
If I control
parent
, I can overrideshouldIncludeChildAddon
there. My first instinct wasThe problem with this is that
shouldIncludeChildAddon
is called beforeconfig
is called. I could callthis.parent.config()
, but I don't have anenvironment
to pass it.The text was updated successfully, but these errors were encountered: