New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-device-info

Package Overview
Dependencies
Maintainers
5
Versions
257
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-device-info - npm Package Compare versions

Comparing version 1.4.3 to 1.5.0

.vscode/ipch/20c0692bec6b12e2/mmap_address.bin

5

CHANGELOG.md
## Release Notes
### Next
### 1.5.0
* feat: Add `getBuildId` method to gets build number of the operating system. (https://github.com/react-native-community/react-native-device-info/pull/640)
### 1.4.3
* chore: Add Xiaomi Mi A2 Lite to devices with notch (https://github.com/react-native-community/react-native-device-info/pull/634)

@@ -5,0 +10,0 @@ * feat: Throw error if native module is null w/steps to help fix (https://github.com/react-native-community/react-native-device-info/pull/630)

1

default/index.js

@@ -17,2 +17,3 @@ /**

systemVersion: '',
buildId: '',
apiLevel: 0,

@@ -19,0 +20,0 @@ bundleId: '',

@@ -14,2 +14,3 @@ // should be imported this way:

getSystemVersion: () => string;
getBuildId: () => string;
getBundleId: () => string;

@@ -16,0 +17,0 @@ getApplicationName: () => string;

@@ -258,2 +258,5 @@ /**

},
getBuildId: function() {
return RNDeviceInfo.buildId;
},
getAPILevel: function() {

@@ -260,0 +263,0 @@ return RNDeviceInfo.apiLevel;

2

package.json
{
"name": "react-native-device-info",
"version": "1.4.3",
"version": "1.5.0",
"description": "Get device information using react-native",

@@ -5,0 +5,0 @@ "main": "deviceinfo.js",

@@ -241,2 +241,3 @@ # react-native-device-info

| [getSystemVersion()](#getsystemversion) | `string` | ✅ | ✅ | ✅ | ? |
| [getBuildId()](#getbuildid) | `string` | ✅ | ✅ | ❌ | ? |
| [getTimezone()](#gettimezone) | `string` | ✅ | ✅ | ✅ | ? |

@@ -761,2 +762,19 @@ | [getTotalDiskCapacity()](#gettotaldiskcapacity) | `number` | ✅ | ✅ | ❌ | 0.15.0 |

### getBuildId()
Gets build number of the operating system.
**Examples**
```js
const osBuildId = DeviceInfo.getBuildId();
// iOS: "12A269"
// tvOS: not available
// Android: "13D15"
// Windows: not available
```
---
### getTimezone()

@@ -832,2 +850,3 @@

// iOS: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143"
// tvOS: not available
// Android: ?

@@ -1171,2 +1190,12 @@ // Windows: ?

</details>
<details>
<summary>[warnings] - I get too many warnings (battery state, etc)</summary>
Some of the APIs (like getBatteryState) will throw warnings in certain conditions like on tvOS or the iOS emulator. This won't be visible in production but even in development it may be irritating. It is useful to have the warnings because these devices return no state, and that can be surprising, leading to github support issues. The warnings is intended to educate you as a developer. If the warnings are troublesome you may try this in your code to suppress them:
```javascript
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings(['Battery state']);
```
</details>

@@ -1173,0 +1202,0 @@ ## Release Notes

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc