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): Fix Node 12 fs/promises error in AppDelegate Expo plugin #5591

Merged
merged 1 commit into from
Aug 13, 2021

Conversation

barthap
Copy link
Contributor

@barthap barthap commented Aug 13, 2021

Description

#5584 (comment)
I feel bad at myself not double-checking this earlier. 🤦

Related issues

#5584

Test Plan

This time checked that it is the only occurrence of fs/promises in published v12.5.0:

mkdir rnfb_fs_promises && cd rnfb_fs_promises
yarn init
yarn add @react-native-firebase/app @react-native-firebase/perf @react-native-firebase/crashlytics
grep -r fs/promises node_modules

The grep output:

~/dev/temp/rnfb_fs_promises » grep -r fs/promises node_modules
node_modules/@react-native-firebase/app/CHANGELOG.md:- **app, expo:** Use `fs/promises` in Node 12 compatible way ([#5585](https://github.com/invertase/react-native-firebase/issues/5585)) ([64f569a](https://github.com/invertase/react-native-firebase/commit/64f569acd2cea284baa305451df9533f138539e7))
node_modules/@react-native-firebase/app/plugin/build/ios/appDelegate.js:const promises_1 = __importDefault(require("fs/promises"));

The react-native-firebase repository still have some occurences in __tests__ but they're not used in prod nor published:

~/dev/react-native-firebase(master) » grep -r fs/promises . 
./CHANGELOG.md:* **app, expo:** Use `fs/promises` in Node 12 compatible way ([#5585](https://github.com/invertase/react-native-firebase/issues/5585)) ([64f569a](https://github.com/invertase/react-native-firebase/commit/64f569acd2cea284baa305451df9533f138539e7))
./packages/crashlytics/plugin/__tests__/androidPlugin.test.ts:import fs from 'fs/promises';
./packages/app/CHANGELOG.md:- **app, expo:** Use `fs/promises` in Node 12 compatible way ([#5585](https://github.com/invertase/react-native-firebase/issues/5585)) ([64f569a](https://github.com/invertase/react-native-firebase/commit/64f569acd2cea284baa305451df9533f138539e7))
./packages/app/plugin/__tests__/iosPlugin.test.ts:import fs from 'fs/promises';
./packages/app/plugin/__tests__/androidPlugin.test.ts:import fs from 'fs/promises';
./packages/app/plugin/src/ios/appDelegate.ts:import fs from 'fs/promises';
./packages/perf/plugin/__tests__/androidPlugin.test.ts:import fs from 'fs/promises';

@vercel
Copy link

vercel bot commented Aug 13, 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 – ./

🔍 Inspect: https://vercel.com/invertase/react-native-firebase/HJcTru7eYcKqNzWHm5hYz3TsqwKN
✅ Preview: https://react-native-firebase-git-fork-barthap-more-fs-3d11f4-invertase.vercel.app

react-native-firebase-next – ./website_modular

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

@codecov
Copy link

codecov bot commented Aug 13, 2021

Codecov Report

Merging #5591 (aaa37d5) into master (90476b8) will increase coverage by 6.74%.
The diff coverage is 33.34%.

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

@@             Coverage Diff              @@
##             master    #5591      +/-   ##
============================================
+ Coverage     67.36%   74.10%   +6.74%     
============================================
  Files           202      107      -95     
  Lines          9708     4420    -5288     
  Branches       1514      942     -572     
============================================
- Hits           6539     3275    -3264     
+ Misses         2754     1073    -1681     
+ Partials        415       72     -343     

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.

Well it's nice to have the fix style confirmed on the android side :-), this should sort it out - thanks @barthap !

@mikehardy mikehardy merged commit 97f9090 into invertase:master Aug 13, 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.

2 participants