-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Today we leak the FileSystemEntity api from dart:io or package:node_io respectively out to users, even though they don't all need this functionality. This also means the public api of this package actually changes on the node platform, which is less than ideal.
I propose that we migrate the list api to use package:file, and accept an optional require a file system as a parameter. We would also rename these apis to listFileSystem By default it would use the dart:io file system and if not available it would throw.
We will also provide an extension method in a separate library in this package, which can be used to glob the local file system without providing it explicitly, and this would match exactly the current api (list, listSync).
This would be a breaking change, and would require a new dependency on package:file. We would release this with null safety. The premise is that package:file is at least a more general package, and better than leaking a node specific dep to all downstream users.
cc @nex3 for thoughts as well since I believe that Sass is the primary user of the Node functionality.