Firstly, thanks for your work on this project! š
Today I used patch-package to patch i18n-js@4.1.1 for the project I'm working on.
I was trying to find a solution for the annoying warning I get everytime I run my React Native app:
**WARN** Require cycle: node_modules\i18n-js\dist\import\helpers\index.js -> node_modules\i18n-js\dist\import\helpers\formatNumber.js -> node_modules\i18n-js\dist\import\helpers\index.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoalues. Consider refactoring to remove alues. Consider refactoring to remove the need for a cycle.
Here is the diff that solved my problem:
diff --git a/node_modules/i18n-js/dist/import/helpers/formatNumber.js b/node_modules/i18n-js/dist/import/helpers/formatNumber.js
index 5c39971..8856136 100644
--- a/node_modules/i18n-js/dist/import/helpers/formatNumber.js
+++ b/node_modules/i18n-js/dist/import/helpers/formatNumber.js
@@ -1,6 +1,7 @@
import BigNumber from "bignumber.js";
import { repeat } from "lodash";
-import { roundNumber } from ".";
+import { roundNumber } from "./roundNumber";
+
function replaceInFormat(format, { formattedNumber, unit }) {
return format.replace("%n", formattedNumber).replace("%u", unit);
}
Hi! š
Firstly, thanks for your work on this project! š
Today I used patch-package to patch
i18n-js@4.1.1
for the project I'm working on.I was trying to find a solution for the annoying warning I get everytime I run my React Native app:
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.