deno
00e0b228 - feat(permissions): allow npm packages to read their own data files

Commit
134 days ago
feat(permissions): allow npm packages to read their own data files npm packages frequently ship data files (JSON vocabularies, wasm binaries, lookup tables, etc.) and read them at runtime via `fs`. Until now this required the user to pass `--allow-read`, even though the package code itself was already loaded and executed without an explicit read grant. Grant implicit read access to the local `node_modules` directory and the global npm cache directory so that npm packages can read their own bundled data files without any permission flags. Only read access is granted implicitly; writes still require `--allow-write`, and reads of files outside those directories still require `--allow-read`. Closes #18607 Co-Authored-By: Divy Srivastava <me@littledivy.com>
Author
Parents
Loading