react-native-qrcode-svg 6.3.35 → 6.3.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,8 @@
11
11
  "prettier": "prettier --write ./src/**/*.{tsx,ts}",
12
12
  "start": "react-native start",
13
13
  "test": "jest",
14
- "tsc": "tsc"
14
+ "tsc": "tsc",
15
+ "postinstall": "node scripts/patchMetroImageSize.js"
15
16
  },
16
17
  "dependencies": {
17
18
  "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
@@ -50,6 +51,9 @@
50
51
  "resolutions": {
51
52
  "selfsigned": "^5.5.0"
52
53
  },
54
+ "resolutions": {
55
+ "image-size": "2.0.4"
56
+ },
53
57
  "engines": {
54
58
  "node": ">=18"
55
59
  }
@@ -0,0 +1,14 @@
1
+ // image-size is pinned to 2.x via "resolutions" to fix Dependabot alerts. Metro 0.80 still
2
+ // calls the 1.x API (a callable default export that also accepts file paths), so adapt it.
3
+ const fs = require('fs');
4
+
5
+ const assetsPath = require.resolve('metro/src/Assets.js');
6
+ const source = fs.readFileSync(assetsPath, 'utf8');
7
+ const original = 'const getImageSize = require("image-size");';
8
+ const patched =
9
+ 'const { imageSize } = require("image-size");\n' +
10
+ 'const getImageSize = input => imageSize(typeof input === "string" ? fs.readFileSync(input) : input);';
11
+
12
+ if (source.includes(original)) {
13
+ fs.writeFileSync(assetsPath, source.replace(original, patched));
14
+ }
package/Example/yarn.lock CHANGED
@@ -5012,11 +5012,9 @@ ignore@^5.0.5, ignore@^5.2.0, ignore@^5.3.1:
5012
5012
  integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==
5013
5013
 
5014
5014
  image-size@^1.0.2:
5015
- version "1.2.0"
5016
- resolved "https://registry.yarnpkg.com/image-size/-/image-size-1.2.0.tgz#312af27a2ff4ff58595ad00b9344dd684c910df6"
5017
- integrity sha512-4S8fwbO6w3GeCVN6OPtA9I5IGKkcDMPcKndtUlpJuCwu7JLjtj7JZpwqLuyY2nrmQT3AWsCJLSKPsc2mPBSl3w==
5018
- dependencies:
5019
- queue "6.0.2"
5015
+ version "2.0.4"
5016
+ resolved "https://registry.yarnpkg.com/image-size/-/image-size-2.0.4.tgz#bbc1933173e4ee1adbbdf9d4958ded15fdb710e3"
5017
+ integrity sha512-QRUkFFsRV/6fuESxb9Vkq+a0LkSrgKXuc2NEqfikiXxxN/G3tjWt5EVUlMaImRBZRZK/jRBEbYvpPYZL8t08Zw==
5020
5018
 
5021
5019
  import-fresh@^2.0.0:
5022
5020
  version "2.0.0"
@@ -7091,6 +7089,12 @@ queue-microtask@^1.2.2:
7091
7089
  resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
7092
7090
  integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
7093
7091
 
7092
+ randombytes@^2.1.0:
7093
+ version "2.1.0"
7094
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
7095
+ integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==
7096
+ dependencies:
7097
+ safe-buffer "^5.1.0"
7094
7098
  queue@6.0.2:
7095
7099
  version "6.0.2"
7096
7100
  resolved "https://registry.yarnpkg.com/queue/-/queue-6.0.2.tgz#b91525283e2315c7553d2efa18d83e76432fed65"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-qrcode-svg",
3
- "version": "6.3.35",
3
+ "version": "6.3.36",
4
4
  "description": "A QR Code generator for React Native based on react-native-svg and javascript-qrcode.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -85,6 +85,7 @@
85
85
  "standard": "^16.0.4"
86
86
  },
87
87
  "overrides": {
88
+ "image-size": "2.0.4",
88
89
  "selfsigned": "^5.5.0"
89
90
  }
90
91
  }