Skip to content

Commit

Permalink
Merge branch 'main' into feat/49472-bank-account-verification
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Oct 28, 2024
2 parents 9c91a30 + 5103b4b commit 16372bf
Show file tree
Hide file tree
Showing 98 changed files with 679 additions and 422 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ module.exports = {
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler', 'lodash', 'deprecation'],
ignorePatterns: ['lib/**'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.resolve(__dirname, './tsconfig.json'),
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ jobs:
- name: Determine "baseline ref" (prev merge commit)
id: getBaselineRef
run: |
previous_merge=$(git rev-list --merges HEAD~1 | head -n 1)
git checkout "$previous_merge"
# Get the name of the current branch
current_branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$current_branch" = "main" ]; then
# On the main branch, find the previous merge commit
previous_merge=$(git rev-list --merges HEAD~1 | head -n 1)
else
# On a feature branch, find the common ancestor of the current branch and main
previous_merge=$(git merge-base HEAD main)
fi
echo "$previous_merge"
echo "BASELINE_REF=$previous_merge" >> "$GITHUB_OUTPUT"
Expand Down
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ package-lock.json
*.markdown
# We need to modify the import here specifically, hence we disable prettier to get rid of the sorted imports
src/libs/E2E/reactNativeLaunchingTest.ts
# Temporary while we keep react-compiler in our repo
lib/**

# Automatically generated files
src/libs/SearchParser/searchParser.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MainApplication : MultiDexApplication(), ReactApplication {
SoLoader.init(this, /* native exopackage */false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
load(bridgelessEnabled = false)
}
if (BuildConfig.DEBUG) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false)
Expand Down
13 changes: 6 additions & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ require('dotenv').config();
const IS_E2E_TESTING = process.env.E2E_TESTING === 'true';

const ReactCompilerConfig = {
runtimeModule: 'react-compiler-runtime',
target: '18',
environment: {
enableTreatRefLikeIdentifiersAsRefs: true,
},
// We exclude 'tests' directory from compilation, but still compile components imported in test files.
sources: (filename) => !filename.includes('tests/') && !filename.includes('node_modules/'),
};

/**
* Setting targets to node 20 to reduce JS bundle size
* It is also recommended by babel:
Expand Down Expand Up @@ -52,6 +55,8 @@ const webpack = {
const metro = {
presets: [require('@react-native/babel-preset')],
plugins: [
['babel-plugin-react-compiler', ReactCompilerConfig], // must run first!

// This is needed due to a react-native bug: https://github.com/facebook/react-native/issues/29084#issuecomment-1030732709
// It is included in metro-react-native-babel-preset but needs to be before plugin-proposal-class-properties or FlatList will break
'@babel/plugin-transform-flow-strip-types',
Expand Down Expand Up @@ -154,11 +159,5 @@ module.exports = (api) => {
const runningIn = api.caller((args = {}) => args.name);
console.debug(' - running in: ', runningIn);

// don't include react-compiler in jest, because otherwise tests will fail
if (runningIn !== 'babel-jest') {
// must run first!
metro.plugins.unshift(['babel-plugin-react-compiler', ReactCompilerConfig]);
}

return ['metro', 'babel-jest'].includes(runningIn) ? metro : webpack;
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions docs/redirects.csv
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ https://community.expensify.com/discussion/6699/faq-troubleshooting-known-bank-s
https://community.expensify.com/discussion/4730/faq-expenses-are-exporting-to-the-wrong-accounts-whys-that,https://help.expensify.com/articles/expensify-classic/connect-credit-cards/company-cards/Company-Card-Settings
https://community.expensify.com/discussion/9000/how-to-integrate-with-deel,https://help.expensify.com/articles/expensify-classic/connections/Deel
https://community.expensify.com/categories/expensify-classroom,https://use.expensify.com
https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/adding-payment-card-subscription-overview,https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/add-a-payment-card-and-view-your-subscription
https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/adding-payment-card-subscription-overview,https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Add-a-payment-card-and-view-your-subscription
https://help.expensify.com/articles/expensify-classic/articles/expensify-classic/expenses/Send-Receive-for-Invoices,https://help.expensify.com/articles/expensify-classic/articles/expensify-classic/expenses/Send-and-Receive-Payment-for-Invoices.md
https://help.expensify.com/articles/expensify-classic/articles/expensify-classic/expenses/Bulk-Upload-Multiple-Invoices,https://help.expensify.com/articles/expensify-classic/articles/expensify-classic/expenses/Add-Invoices-in-Bulk
https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Pay-Bills,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Create-and-Pay-Bills
https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Pay-Bills,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-payments/payments/Create-and-Pay-Bills
https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/add-a-payment-card-and-view-your-subscription,https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Add-a-payment-card-and-view-your-subscription
21 changes: 0 additions & 21 deletions lib/react-compiler-runtime/index.js

This file was deleted.

10 changes: 0 additions & 10 deletions lib/react-compiler-runtime/package.json

This file was deleted.

40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
"babel-jest": "29.4.1",
"babel-loader": "^9.1.3",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-react-compiler": "0.0.0-experimental-334f00b-20240725",
"babel-plugin-react-compiler": "^19.0.0-beta-8a03594-20241020",
"babel-plugin-react-native-web": "^0.18.7",
"babel-plugin-transform-remove-console": "^6.9.4",
"clean-webpack-plugin": "^4.0.0",
Expand All @@ -281,7 +281,7 @@
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-jsdoc": "^46.2.6",
"eslint-plugin-lodash": "^7.4.0",
"eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725",
"eslint-plugin-react-compiler": "^19.0.0-beta-8a03594-20241020",
"eslint-plugin-react-native-a11y": "^3.3.0",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-testing-library": "^6.2.2",
Expand All @@ -304,8 +304,8 @@
"portfinder": "^1.0.28",
"prettier": "^2.8.8",
"pusher-js-mock": "^0.3.3",
"react-compiler-healthcheck": "^0.0.0-experimental-ab3118d-20240725",
"react-compiler-runtime": "file:./lib/react-compiler-runtime",
"react-compiler-healthcheck": "^19.0.0-beta-8a03594-20241020",
"react-compiler-runtime": "^19.0.0-beta-8a03594-20241020",
"react-is": "^18.3.1",
"react-native-clean-project": "^4.0.0-alpha4.0",
"react-test-renderer": "18.3.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
index 03f001c..23d467d 100644
index 03f001c..358c795 100644
--- a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
+++ b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
@@ -65,7 +65,7 @@ function nativeModuleWrapped(namespace, NativeModule, argToPrepend) {
return NativeModule;
}

- const properties = Object.keys(NativeModule);
+ const properties = Object.keys(Object.getPrototypeOf(NativeModule));
+ const properties = [...Object.keys(Object.getPrototypeOf(NativeModule)), ...Object.keys(NativeModule)];

for (let i = 0, len = properties.length; i < len; i++) {
const property = properties[i];
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/react-compiler-healthcheck/dist/index.js b/node_modules/react-compiler-healthcheck/dist/index.js
index b427385..4bf23db 100755
index 5a4060d..460339b 100755
--- a/node_modules/react-compiler-healthcheck/dist/index.js
+++ b/node_modules/react-compiler-healthcheck/dist/index.js
@@ -69154,7 +69154,7 @@ var reactCompilerCheck = {
@@ -56969,7 +56969,7 @@ var reactCompilerCheck = {
compile(source, path);
}
},
Expand All @@ -11,11 +11,11 @@ index b427385..4bf23db 100755
const totalComponents =
SucessfulCompilation.length +
countUniqueLocInEvents(OtherFailures) +
@@ -69164,6 +69164,50 @@ var reactCompilerCheck = {
@@ -56979,6 +56979,50 @@ var reactCompilerCheck = {
`Successfully compiled ${SucessfulCompilation.length} out of ${totalComponents} components.`
)
);
+
+
+ if (verbose) {
+ for (const compilation of [...SucessfulCompilation, ...ActionableFailures, ...OtherFailures]) {
+ const filename = compilation.fnLoc?.filename;
Expand All @@ -38,33 +38,33 @@ index b427385..4bf23db 100755
+ if (compilation.kind === "CompileError") {
+ const { reason, severity, loc } = compilation.detail;
+
+ const lnNo = loc.start?.line;
+ const colNo = loc.start?.column;
+ const lnNo = loc.start?.line;
+ const colNo = loc.start?.column;
+
+ const isTodo = severity === ErrorSeverity.Todo;
+ const isTodo = severity === ErrorSeverity.Todo;
+
+ console.log(
+ chalk[isTodo ? 'yellow' : 'red'](
+ `Failed to compile ${
+ filename
+ }${
+ lnNo !== undefined ? `:${lnNo}${
+ colNo !== undefined ? `:${colNo}` : ""
+ }.` : ""
+ }`
+ ),
+ chalk[isTodo ? 'yellow' : 'red'](reason? `Reason: ${reason}` : "")
+ );
+ console.log("\n");
+ console.log(
+ chalk[isTodo ? 'yellow' : 'red'](
+ `Failed to compile ${
+ filename
+ }${
+ lnNo !== undefined ? `:${lnNo}${
+ colNo !== undefined ? `:${colNo}` : ""
+ }.` : ""
+ }`
+ ),
+ chalk[isTodo ? 'yellow' : 'red'](reason? `Reason: ${reason}` : "")
+ );
+ console.log("\n");
+ }
+ }
+ }
},
};
const JsFileExtensionRE = /(js|ts|jsx|tsx)$/;
@@ -69200,9 +69244,16 @@ function main() {
type: "string",
default: "**/+(*.{js,mjs,jsx,ts,tsx}|package.json)",
@@ -57015,9 +57059,16 @@ function main() {
type: 'string',
default: '**/+(*.{js,mjs,jsx,ts,tsx}|package.json)',
})
+ .option('verbose', {
+ description: 'run with verbose logging',
Expand All @@ -73,13 +73,13 @@ index b427385..4bf23db 100755
+ alias: 'v',
+ })
.parseSync();
const spinner = ora("Checking").start();
const spinner = ora('Checking').start();
let src = argv.src;
+ let verbose = argv.verbose;
const globOptions = {
onlyFiles: true,
ignore: [
@@ -69222,7 +69273,7 @@ function main() {
@@ -57037,7 +57088,7 @@ function main() {
libraryCompatCheck.run(source, path);
}
spinner.stop();
Expand Down
Loading

0 comments on commit 16372bf

Please sign in to comment.