Skip to content

Commit

Permalink
Add streamify to fix resolve ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
iM-GeeKy committed Jul 16, 2024
1 parent b772b51 commit 0102e14
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI
on:
push:
branches:
- master
- fix-ci-example-deploy
pull_request:
branches:
- master
- fix-ci-example-deploy

jobs:
lint:
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-example:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
# if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"react-dom": "18.2.0",
"react-native": "0.73.6",
"react-native-paper": "^5.12.3",
"react-native-web": "~0.19.12"
"react-native-web": "~0.19.12",
"stream-browserify": "^3.0.0"
},
"devDependencies": {
"@babel/core": "^7.24.8",
Expand Down
3 changes: 2 additions & 1 deletion example/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ module.exports = async function (env, argv) {
'react-native-web': path.join(node_modules, 'react-native-web'),
})

// Add fallback for crypto module
// Add fallback for crypto and stream module
config.resolve.fallback = {
...config.resolve.fallback,
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
}

return config
Expand Down
12 changes: 10 additions & 2 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5408,7 +5408,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"

inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@~2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
Expand Down Expand Up @@ -7821,7 +7821,7 @@ readable-stream@^2.0.1, readable-stream@^2.3.8, readable-stream@~2.3.6:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"

readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.6.0:
readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0:
version "3.6.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
Expand Down Expand Up @@ -8540,6 +8540,14 @@ statuses@2.0.1:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

stream-browserify@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f"
integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==
dependencies:
inherits "~2.0.4"
readable-stream "^3.5.0"

stream-buffers@2.2.x:
version "2.2.0"
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
Expand Down

0 comments on commit 0102e14

Please sign in to comment.