
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Use the Node fs
API in Chrome Apps
This module is used by chromiumify
This library can be used directly with your browserify builds with targeting Chrome Packaged Apps.
$ npm install chrome-fs --save
$ browserify -r chrome-fs:fs index.js -o bundle.js
This list is based on the node.js documentation https://nodejs.org/api/fs.html Sync apis won't be supported they are listed here https://github.com/No9/chrome-fs/wiki/API-Mapping
$ npm test
This will load the folder test/chrome-app
as an unpacked extension in chrome.
Test currently designed for Chrome on Windows and Linux Canary on Mac other variants accepted
It is recommended that the following permissions are added to your chrome packaged app for this module.
"permissions": [
"unlimitedStorage"
]
Chrome Packaged Apps don't have the notion of current working directory CWD
.
So relative paths are not escapted they are trimmed to be relative from root
i.e.
../../direct1/file1
Will resolve to /direct1/file1
.
Will resolve to /
Chrome Packaged Apps allow you to see and edit the filesystem from the dev tools so the chown, fchown, chmod, fmod
calls are there for compatibility only.
Any chown call will not be reflected in stat
Best effort has been made to support stat
but the Chrome File System is not a complete implementation.
Files have size
and last modified
but directories have no size and default to the start of epoc for last modified.
Currently only UTF-8 is supported
There seems to be an issue around saving files in chomefs
anton whalley @no9
FAQs
Use the Node `fs` API in Chrome Apps
The npm package chrome-fs receives a total of 4 weekly downloads. As such, chrome-fs popularity was classified as not popular.
We found that chrome-fs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.