Add the possibility to set --no-autoinstall
globally for every parcel call using an env variable (e.g. PARCEL_NO_AUTOINSTALL
).
Make it so. I can submit a PR if you would accept this feature.
The autoinstall feature might be great for beginners, but today it worked against me two times in a row:
I don't want to add the --no-autoinstall
flag to every project of mine and having this flag set implicitly (so not specified in the package.json) doesn't change the build output.
It should be fairly easy, feel free to open a PR. I'm personally not a huge fan of making this stuff more complex, but I see the value in it.
PR for this if anyone has a chance: https://github.com/parcel-bundler/parcel/pull/2130
My 2c: installing anything without the user's express knowledge and consent is a huge security risk which will end up compromising someone's system and bringing this project into disrepute.
While this workaround is well-meaning, and arguably better than the status quo, it's still a sticking plaster, which legitimizes the current (mis)behavior rather than fixing the underlying problem: it should be opt in rather than opt out.
@chocolateboy i agree about installing code dependencies, but not about the parsers and such parcel internally uses to process assets as it removes some of the complexity without the need of including them all as parcel dependencies
Sent with GitHawk
Hypothetical example for the security risk: With import React from 'reac';
, parcel installs that dependency (and runs it's postinstall scripts). Without autoinstall, I would have realised my typo while typing yarn add reac
.
Most helpful comment
My 2c: installing anything without the user's express knowledge and consent is a huge security risk which will end up compromising someone's system and bringing this project into disrepute.
While this workaround is well-meaning, and arguably better than the status quo, it's still a sticking plaster, which legitimizes the current (mis)behavior rather than fixing the underlying problem: it should be opt in rather than opt out.