Skip to content

Commit

Permalink
feat: support 4.3.0 (#748)
Browse files Browse the repository at this point in the history
* feat: bump native sdk to 4.3.0

* feat: add IH265Transcoder

* fix: AgoraRtcSurfaceViewNativeComponent & AgoraRtcTextureViewNativeComponent extension filename mismatch #768 

---------

Co-authored-by: sda-rob <[email protected]>
Co-authored-by: guoxianzhe <[email protected]>
Co-authored-by: liutongxue <[email protected]>
  • Loading branch information
4 people authored Feb 28, 2024
1 parent 419dc0d commit 8ed72a2
Show file tree
Hide file tree
Showing 108 changed files with 4,994 additions and 6,741 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ concurrency:

on:
workflow_dispatch:
pull_request:
types: [labeled, synchronize]
inputs:
force:
description: 'force build'
required: false
type: boolean
default: false
build_ios:
description: 'build iOS'
required: false
type: boolean
default: true

jobs:
build-android:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:dep-update') }}
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
Expand Down Expand Up @@ -70,8 +78,8 @@ jobs:

- name: Build example for Android
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --force="${{ inputs.force }}"
- name: Upload APK
uses: actions/upload-artifact@v3
with:
Expand All @@ -81,7 +89,7 @@ jobs:
if-no-files-found: error

build-ios:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:dep-update') }}
if: ${{ inputs.build_ios }}
runs-on: macos-latest
env:
TURBO_CACHE_DIR: .turbo/ios
Expand All @@ -92,7 +100,7 @@ jobs:

- name: Setup
uses: ./.github/actions/setup

- name: Setup fastlane
run: |
brew install fastlane
Expand All @@ -106,6 +114,7 @@ jobs:
${{ runner.os }}-turborepo-ios-
- name: Check turborepo cache for iOS
if: ${{ !inputs.force }}
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
Expand All @@ -125,7 +134,7 @@ jobs:
${{ runner.os }}-cocoapods-0-
- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
if: ${{ inputs.force }} || (env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true')
run: |
yarn pod-install example/ios
Expand Down Expand Up @@ -166,8 +175,8 @@ jobs:
- name: Build example for iOS
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --force="${{ inputs.force }}"
- name: Upload IPA
uses: actions/upload-artifact@v3
with:
Expand All @@ -186,7 +195,7 @@ jobs:

notification:
runs-on: ubuntu-latest
needs: [ build-android, build-ios ]
needs: [build-android, build-ios]
steps:
- run: |
curl -X POST "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${{ secrets.WECHAT_KEY }}" -d '{"msgtype":"text","text":{"content":"ReactNative Example:\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\nDownload Link:\nhttps://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}"}}'
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:

- name: Build example for iOS
run: |
yarn turbo run detox:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
yarn turbo run detox:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --force=true
- uses: futureware-tech/simulator-action@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
generate-code: false
generate-comment: true
generate-comment-command: |
sh generate-prepare.sh
sh generate-comment.sh
- name: Create pull request
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
generate-code: true
generate-comment: true
generate-code-command: |
sh generate-prepare.sh
sh generate-code.sh
generate-comment-command: |
sh generate-comment.sh
Expand Down
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.*
2 changes: 1 addition & 1 deletion .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "file allow lists"
paths = [
'''gitleaks.toml''',
'''plugin-(.*?)-tool.cjs''',
'''plugin-(.*?)-tools.cjs''',
'''yarn-(.*?)(.cjs)''',
]

Expand Down
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
Loading

0 comments on commit 8ed72a2

Please sign in to comment.