Skip to content
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

fix(app, expo): Missing fs/promises import in Node 12 #5585

Merged
merged 1 commit into from
Aug 11, 2021

Conversation

barthap
Copy link
Contributor

@barthap barthap commented Aug 11, 2021

Looks like fs.promises was introduced even in Node 10: https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_fspromises_copyfile_src_dest_flags

Description

Node 12 doesn't have fs/promises import. But according to the docs, the fs.promises was introduced in Node 10.

I prefer the asynchronous approach because of better error handling.

Related issues

Resolves #5584

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

CI tests


Think react-native-firebase is great? Please consider supporting the project with any of the below:

@vercel
Copy link

vercel bot commented Aug 11, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

react-native-firebase-next – ./website_modular

🔍 Inspect: https://vercel.com/invertase/react-native-firebase-next/4AWnvhbkScN3inDPwXeiz4V6VHUB
✅ Preview: Canceled

react-native-firebase – ./

🔍 Inspect: https://vercel.com/invertase/react-native-firebase/EGg71WNQN3s6bwpNGfVL8Wc3LVRK
✅ Preview: https://react-native-firebase-git-fork-barthap-patch-1-invertase.vercel.app

@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #5585 (fb92e8c) into master (d4b2015) will decrease coverage by 46.98%.
The diff coverage is n/a.

❗ Current head fb92e8c differs from pull request most recent head b53b077. Consider uploading reports for the commit b53b077 to get more accurate results

@@             Coverage Diff             @@
##           master    #5585       +/-   ##
===========================================
- Coverage   71.17%   24.20%   -46.97%     
===========================================
  Files         106       92       -14     
  Lines        4405     3993      -412     
  Branches      941      941               
===========================================
- Hits         3135      966     -2169     
- Misses       1173     2446     +1273     
- Partials       97      581      +484     

@barthap barthap marked this pull request as ready for review August 11, 2021 13:23
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the doc link to the v10 reference to match your assertion (which does check out - the v10 version of the link works as well) so yes this does seem to be just a "how we reference the API" issue and this should fix it. Thanks for the quick PR @barthap !

@mikehardy mikehardy merged commit 64f569a into invertase:master Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: Cannot find module 'fs/promises'
2 participants