diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4986de5..bb8dd502 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,10 @@ name: CI on: push: branches: - - master + - fix-ci-example-deploy pull_request: branches: - - master + - fix-ci-example-deploy jobs: lint: @@ -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 diff --git a/example/package.json b/example/package.json index 709fe234..ee27e2b1 100644 --- a/example/package.json +++ b/example/package.json @@ -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", diff --git a/example/webpack.config.js b/example/webpack.config.js index dd67be5d..fe40a8e6 100644 --- a/example/webpack.config.js +++ b/example/webpack.config.js @@ -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 diff --git a/example/yarn.lock b/example/yarn.lock index a1826575..53705510 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -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== @@ -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== @@ -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"