Skip to content

Commit

Permalink
fix: yarn failed on windows (#720)
Browse files Browse the repository at this point in the history
* build: fix yarn on windows

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* ci: add windows check

* Update .prettierrc
  • Loading branch information
LichKing-2234 committed Oct 30, 2023
1 parent 11c6b3d commit f2e2496
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 15 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ on:

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [ ubuntu, windows ]
runs-on: ${{ matrix.platform }}-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -30,7 +33,10 @@ jobs:
run: yarn typecheck

test:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [ ubuntu, windows ]
runs-on: ${{ matrix.platform }}-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -42,7 +48,10 @@ jobs:
run: yarn test --maxWorkers=2 --coverage

build-library:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [ ubuntu, windows ]
runs-on: ${{ matrix.platform }}-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
"useTabs": false,
"endOfLine": "auto"
}
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
checksumBehavior: ignore
nodeLinker: node-modules
nmHoistingLimits: workspaces

Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ PODS:
- React-jsinspector (0.72.5)
- React-logger (0.72.5):
- glog
- react-native-agora (4.2.3):
- react-native-agora (4.2.4):
- AgoraIrisRTC_iOS (= 4.2.3-build.4)
- AgoraRtcEngine_iOS (= 4.2.3)
- RCT-Folly (= 2021.07.22.00)
Expand Down Expand Up @@ -781,7 +781,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: ff70a72027dea5cc7d71cfcc6fad7f599f63987a
React-jsinspector: aef73cbd43b70675f572214d10fa438c89bf11ba
React-logger: 2e4aee3e11b3ec4fa6cfd8004610bbb3b8d6cca4
react-native-agora: b59d2656b3c5b7a05dade5c86fa91ec7616ccf7d
react-native-agora: 38f534bb58937768025bd7055d8e296785db920f
react-native-agora-rawdata: 097895cdccd8fcf3cff5dffe23372f5d3c89fd31
react-native-image-tools: 88218449791389bbf550a2c475a3b564c8233c8b
react-native-safe-area-context: 7aa8e6d9d0f3100a820efb1a98af68aa747f9284
Expand Down
8 changes: 1 addition & 7 deletions scripts/bootstrap.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ module.exports = {

if (
child_process.spawnSync('yarn', ['patch-package'], {
cwd: project.cwd,
env: process.env,
stdio: 'inherit',
encoding: 'utf-8',
shell: true,
Expand All @@ -28,23 +26,19 @@ module.exports = {

if (
child_process.spawnSync('yarn', ['example', 'patch-package'], {
cwd: project.cwd,
env: process.env,
stdio: 'inherit',
encoding: 'utf-8',
shell: true,
}).status !== 0
) {
throw new Error('Failed to run patch-package');
throw new Error('Failed to run patch-package at example');
}

if (
child_process.spawnSync(
'yarn',
['ts-interface-builder', 'src/*.ts', '-o', 'src/ti/'],
{
cwd: project.cwd,
env: process.env,
stdio: 'inherit',
encoding: 'utf-8',
shell: true,
Expand Down
4 changes: 4 additions & 0 deletions scripts/pod-install.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ module.exports = {
return {
hooks: {
afterAllInstalled(project, options) {
if (process.platform !== 'darwin') {
return;
}

if (process.env.POD_INSTALL === '0') {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13539,12 +13539,12 @@ __metadata:

"react-native-agora-rawdata@github:AgoraLibrary/react-native-agora-rawdata":
version: 0.1.0
resolution: "react-native-agora-rawdata@https://github.com/AgoraLibrary/react-native-agora-rawdata.git#commit=7fa07cc6308808f5f7e1c2e56502835471323707"
resolution: "react-native-agora-rawdata@https://github.com/AgoraLibrary/react-native-agora-rawdata.git#commit=15ecaa324f74a228a7cc2ba4686893e76954e0f8"
peerDependencies:
react: "*"
react-native: "*"
react-native-agora: ">=4.1.0"
checksum: bc6259546e34ac7083f27a87e50bb1a9383ce40b64ead8cc7d4ddd247f92102a28213c225d29aea8086bc98453dcc885cf8d4737aff176fb09b1bcd77c29721b
checksum: 6b573e4097de2efbe8243e2cf669130cd460b5b9807add657446eb227821c85ce133dd8529a81866267d54c2160b6df9ee1dd7bb5707868cb07d90fce80e828c
languageName: node
linkType: hard

Expand Down

0 comments on commit f2e2496

Please sign in to comment.