-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MAJOR] Migrate from shelljs to fs-extra #781
Comments
Re the included comment: I don't think Cordova Android 9.0.0 was planned to drop Node 8. |
Yes, node 8 EOL is in December, so the thinking was that by dropping both 6 and 8 at the same time (targeting a release roughly somewhere in the fall) we’d avoid needing to do two major version bumps and go through all the release work again so soon. EDIT: This hasn’t been decided yet, and should probably be brought up on the list for discussion. |
If no one has already started working on this, this is something I'm willing to tackle over my available weekends. |
Go for it, every contribution is much appreciated :) |
There was a rejection to drop Node 8 at the same time as 6, in the sense that Node 8 should only be dropped in December. If the 9.0 milestone is only going to be release after December, then I can continue with this ticket with the assumption that node 8 support will be dropped. |
// checks if file exists and then deletes. Error if doesn't exist
function removeFile (project_dir, src) {
var file = path.resolve(project_dir, src);
shell.rm('-Rf', file);
}
// deletes file/directory without checking
function removeFileF (file) {
shell.rm('-Rf', file);
} @brodybits Do you think these two functions could be merged into one? They both appear to be doing essentially the same thing, and I believe the comments are also out-dated... as |
Hmm ... the difference I see is that one uses I would probably favor merging these functions, maybe with some kind of a note. I did took a quick look though |
All cases of |
cordova-android/bin/lib/create.js Lines 75 to 95 in c35a990
These snippet of contains a lot of shell usages, and where it uses |
Hi @breautek, I wonder if you should raise a draft PR with your ongoing work on this? I think a draft PR with your ideas would be much easier for us to discuss than random pointers to the old code. Thanks for all of your work on this so far! |
Think that might be a good idea, but I'll at least refactor everything that is simple enough to refactor. Then if there is any edge cases, I may skip over them until I can point them out in the draft for discussion. |
I should a draft PR for this sometime next week. Just finished refactoring, and fixing all the errors and messes I've made in doing so, at least back to the point where the unit tests is all green. Next week I'll be manually testing my branch and if I'm happy with it, a PR will soon follow. |
As discussed during review of PR #764 (aab support). This idea originally comes from Apache CB-14140 (jira) which was done on the common/library packages. Here are some PRs to check out as examples:
One thing to watch out for: We did encounter apache/cordova#121 on Windows, which was eventually solved by a workaround on fs-extra@8.
A few more pointers:
For spawning external processes, we migrated from Node.js “child_process” to cross-spawn in apache/cordova-common#50, started discussing further work in apache/cordova#16.
From @erisu (quoted from #764 (comment); see apache/cordova#79 for larger discussion on deprecating at least Node.js 6):
The text was updated successfully, but these errors were encountered: