Skip to content

Commit

Permalink
feat: upgrade react-native to 0.73.2
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Feb 2, 2024
1 parent 249d92d commit 10ac94d
Show file tree
Hide file tree
Showing 14 changed files with 4,367 additions and 4,167 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ build/
!default.perspectivev3
xcuserdata
*.xccheckout
*.xcode.env.local
*.moved-aside
DerivedData
*.hmap
Expand Down Expand Up @@ -80,4 +81,4 @@ lib/
# Custom
*.xcframework
ios/AgoraRtcWrapper.podspec
appId.*
appId.*
13 changes: 13 additions & 0 deletions .yarn/patches/eslint-npm-8.56.0-6eec398a41.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/linter/linter.js b/lib/linter/linter.js
index f74d0ecd13f2e240aa581d6c36bf382c76628bf0..0d3a77c25c445f8714d6fe15c2da03cb96d117d8 100644
--- a/lib/linter/linter.js
+++ b/lib/linter/linter.js
@@ -46,7 +46,7 @@ const { RuleValidator } = require("../config/rule-validator");
const { assertIsRuleOptions, assertIsRuleSeverity } = require("../config/flat-config-schema");
const { normalizeSeverityToString } = require("../shared/severity");
const debug = require("debug")("eslint:linter");
-const MAX_AUTOFIX_PASSES = 10;
+const MAX_AUTOFIX_PASSES = Number.MAX_VALUE;
const DEFAULT_PARSER_NAME = "espree";
const DEFAULT_ECMA_VERSION = 5;
const commentParser = new ConfigCommentParser();
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/eslint-plugin-auto-import/lib/index.js b/node_modules/eslint-plugin-auto-import/lib/index.js
index 86334aa..4dd0ce8 100644
--- a/node_modules/eslint-plugin-auto-import/lib/index.js
+++ b/node_modules/eslint-plugin-auto-import/lib/index.js
diff --git a/lib/index.js b/lib/index.js
index 86334aa24d167403d3dba15931b28fdebe6a2f06..4dd0ce87d8159f859233085a0e764c80ab37585b 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -10,7 +10,7 @@

var requireIndex = require("requireindex");
Expand All @@ -22,10 +22,10 @@ index 86334aa..4dd0ce8 100644
}
}
\ No newline at end of file
diff --git a/node_modules/eslint-plugin-auto-import/lib/rules/auto-const.js b/node_modules/eslint-plugin-auto-import/lib/rules/auto-const.js
diff --git a/lib/rules/auto-const.js b/lib/rules/auto-const.js
deleted file mode 100644
index 307bae3..0000000
--- a/node_modules/eslint-plugin-auto-import/lib/rules/auto-const.js
index 307bae3924df63dcedf6c00406e0eff19f5b5f2e..0000000000000000000000000000000000000000
--- a/lib/rules/auto-const.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var preferConst = require('eslint/lib/rules/prefer-const')
Expand All @@ -51,24 +51,24 @@ index 307bae3..0000000
- }))
-}
\ No newline at end of file
diff --git a/node_modules/eslint-plugin-auto-import/lib/rules/auto-import.js b/node_modules/eslint-plugin-auto-import/lib/rules/auto-import.js
index 4b4bb22..acf0749 100644
--- a/node_modules/eslint-plugin-auto-import/lib/rules/auto-import.js
+++ b/node_modules/eslint-plugin-auto-import/lib/rules/auto-import.js
diff --git a/lib/rules/auto-import.js b/lib/rules/auto-import.js
index 4b4bb2220b98bc9f860b426bac5ae0eb65d90a5d..7bcd66ea7e6d9bbf5141d5c869fa033a3d75dd05 100644
--- a/lib/rules/auto-import.js
+++ b/lib/rules/auto-import.js
@@ -13,20 +13,20 @@ var fs = require('fs')
// Rule Definition
//------------------------------------------------------------------------------

// Rule Definition
//------------------------------------------------------------------------------

+var sourceFileMap = []
+
function getSourceFile(sourceCode) {
const codeProject = new tsMorph.Project({ useInMemoryFileSystem: true });

return codeProject.createSourceFile('main.tsx', sourceCode);
}

function getSourceFile(sourceCode) {
const codeProject = new tsMorph.Project({ useInMemoryFileSystem: true });

return codeProject.createSourceFile('main.tsx', sourceCode);
}

-
function isDefaultlyExported(path) {
function isDefaultlyExported(path) {
- const sourceCode = fs.readFileSync(path, {encoding: 'utf8'})
-
- const sourceFile = getSourceFile(sourceCode)
Expand All @@ -80,27 +80,27 @@ index 4b4bb22..acf0749 100644
+ sourceFileMap[path] = getSourceFile(sourceCode)
+ }
+ return sourceFileMap[path].getClasses().find(c => c.isDefaultExport()) !== undefined
}

function isStaticRequire(node) {
}

function isStaticRequire(node) {
@@ -38,44 +38,66 @@ function isStaticRequire(node) {
node.arguments[0].type === 'Literal' &&
typeof node.arguments[0].value === 'string'
}
node.arguments[0].type === 'Literal' &&
typeof node.arguments[0].value === 'string'
}
+
/**
* Checks if the given node is the argument of a typeof operator.
* @param {ASTNode} node The AST node being checked.
* @returns {boolean} Whether or not the node is the argument of a typeof operator.
*/
function hasTypeOfOperator(node) {
/**
* Checks if the given node is the argument of a typeof operator.
* @param {ASTNode} node The AST node being checked.
* @returns {boolean} Whether or not the node is the argument of a typeof operator.
*/
function hasTypeOfOperator(node) {
- var parent = node.parent;
+ var parent = node.parent;


- return parent.type === "UnaryExpression" && parent.operator === "typeof";
+ return parent.type === "UnaryExpression" && parent.operator === "typeof";
}

}

-function searchDirectory(path, name, except) {
- var files = fs.readdirSync(path)
- var directories = []
Expand Down Expand Up @@ -142,21 +142,21 @@ index 4b4bb22..acf0749 100644
+ }
+ if (sourceFileMap[filePath].getExportSymbols().find(c => c.getName() === name) !== undefined) {
+ cacheMap[path + name] = basename
return basename
return basename
+ }
}
}
- if (file !== except) {
- var stats = fs.statSync(filePath)
- if (stats.isDirectory()) {
- directories.push(file)
- }
- }
+ }
}
}
+ }
}
}
+ }


- for (var i = 0, l = directories.length; i < l; i++) {
- var directory = directories[i]
- var foundModule = searchDirectory(pathModule.join(path, directory), name)
Expand All @@ -168,15 +168,15 @@ index 4b4bb22..acf0749 100644
+ var foundModule = searchDirectory(pathModule.join(path, directory), name)
+ if (foundModule) {
+ return directory + '/' + foundModule
}
}
+ }
}

//------------------------------------------------------------------------------
}

//------------------------------------------------------------------------------
@@ -83,148 +105,146 @@ function searchDirectory(path, name, except) {
//------------------------------------------------------------------------------

module.exports = {
//------------------------------------------------------------------------------

module.exports = {
- meta: {
- docs: {
- description: "Auto import",
Expand All @@ -196,7 +196,7 @@ index 4b4bb22..acf0749 100644
+ typeof: {
+ type: "boolean"
+ }
},
},
-
- schema: [
- {
Expand Down Expand Up @@ -290,7 +290,7 @@ index 4b4bb22..acf0749 100644
+ foundModule = searchDirectory(pathModule.resolve(__dirname, '../../../..', pckg.modulesIn), undefinedIndentifier, false)
+ if (foundModule) {
+ foundModule = packageName + '/' + foundModule
}
}
- },
- additionalProperties: false
- }
Expand Down Expand Up @@ -330,15 +330,15 @@ index 4b4bb22..acf0749 100644
+ }
+ }
+ }


- MemberExpression: function (node) {
+ isNotDefaultExport = !isDefaultlyExported(pathModule.resolve(pathModule.dirname(filename), foundModule + '.ts'))


- },
+ var importStatement = (isNotDefaultExport ?
+ 'import { ' + undefinedIndentifier + ' }' :
+ 'import ' + undefinedIndentifier) + " from '" + foundModule + "';\n"


- CallExpression(node) {
- if (isStaticRequire(node)) {
- const [ requirePath ] = node.arguments
Expand Down Expand Up @@ -449,12 +449,12 @@ index 4b4bb22..acf0749 100644
+ }
+ return fixer.insertTextAfterRange([0, 0], importStatement + (dependencies.size === 0 ? '\n\n' : ''))
+ }
}
}
- };
- }
+ });
+ });
+ }
+ };
+ }
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/json-bigint/lib/parse.js b/node_modules/json-bigint/lib/parse.js
index bb4e5eb..91ff283 100644
--- a/node_modules/json-bigint/lib/parse.js
+++ b/node_modules/json-bigint/lib/parse.js
diff --git a/lib/parse.js b/lib/parse.js
index bb4e5ebf2e8717ae77b5147668685055c064c098..91ff283a35f0274b319d9c2cbd5da5548ca50dda 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -206,9 +206,9 @@ var json_parse = function (options) {
error('Bad number');
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/react-native-color-picker/dist/HoloColorPicker.js b/node_modules/react-native-color-picker/dist/HoloColorPicker.js
index a177142..e9e1feb
--- a/node_modules/react-native-color-picker/dist/HoloColorPicker.js
+++ b/node_modules/react-native-color-picker/dist/HoloColorPicker.js
diff --git a/dist/HoloColorPicker.js b/dist/HoloColorPicker.js
index a1771428989e9f26f9e4a7a7fbf91450dd07a9ff..e9e1febfa664bfc02902c1f36d9b8738a0079b07 100644
--- a/dist/HoloColorPicker.js
+++ b/dist/HoloColorPicker.js
@@ -12,8 +12,9 @@ var __extends = (this && this.__extends) || (function () {
};
})();
Expand All @@ -13,10 +13,10 @@ index a177142..e9e1feb
import { createPanResponder } from "./utils";
var HoloColorPicker = /** @class */ (function (_super) {
__extends(HoloColorPicker, _super);
diff --git a/node_modules/react-native-color-picker/src/HoloColorPicker.tsx b/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
index 51a7bcc..6707587
--- a/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
+++ b/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
diff --git a/src/HoloColorPicker.tsx b/src/HoloColorPicker.tsx
index 51a7bcc3b43975d8d9c3a1c45b8907ba814b4869..6707587cb0c8a6ea1524f4c99b31cd6f54a9d117 100644
--- a/src/HoloColorPicker.tsx
+++ b/src/HoloColorPicker.tsx
@@ -4,13 +4,12 @@ import {
Image,
InteractionManager,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/ts-interface-builder/dist/index.js b/node_modules/ts-interface-builder/dist/index.js
index 7d82df1..a839205 100644
--- a/node_modules/ts-interface-builder/dist/index.js
+++ b/node_modules/ts-interface-builder/dist/index.js
diff --git a/dist/index.js b/dist/index.js
index 7d82df112a40b76e795d02b43e9c210b842e0297..a839205abbfbc62f7deb2a5a211d11dd03df757d 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -116,7 +116,7 @@ class Compiler {
const name = this.getName(node.name);
const params = node.parameters.map(this.compileNode, this);
Expand Down
4 changes: 4 additions & 0 deletions example/ios/AgoraRtcNgExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
Expand Down
1 change: 0 additions & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ target 'AgoraRtcNgExample' do
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end

Expand Down
Loading

0 comments on commit 10ac94d

Please sign in to comment.