Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 36.4k
file.path is only a getter #55538
Copy link
Copy link
Closed
Labels
deprecationsIssues and PRs related to deprecations.Issues and PRs related to deprecations.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.tsc-agendaIssues and PRs to discuss during the meetings of the TSC.Issues and PRs to discuss during the meetings of the TSC.
Description
Metadata
Metadata
Assignees
Labels
deprecationsIssues and PRs related to deprecations.Issues and PRs related to deprecations.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.tsc-agendaIssues and PRs to discuss during the meetings of the TSC.Issues and PRs to discuss during the meetings of the TSC.
Version
23
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Since
withFileTypeshas been around for years, this will happen with every library that I created that useswithFileTypes.What is the expected behavior? Why is that the expected behavior?
file.pathshould be the absolute path to the file if it's going to be decorated, since this is a well established convention for every file and path library I've ever seen.What do you see instead?
I see an error with a read only property, and a warning that
pathis deprecated. I have to say this is completely absurd.parentPath? Since node has existeddirnamehas been the name of directories.Why is someone deciding to name it
parentPath? Who made this decision? Is there a precedent for this or a spec you can point to? FWIW I've created hundreds of path libraries and I have never seen that term used anywhere.Additional information
I think whoever is making these decisions should be involving people with more experience in Node.js. These decisions are going to cause massive headaches for existing code that use firmly establish conventions that have existed for years.
If you're going to finally fix file/dirent objects to be more useful, why not just use conventions of tooling that has already proliferated in the ecosystem, like vinyl files? I'm really interested in the reasoning here.