Skip to content

Commit

Permalink
Merge branch 'next' into PLAT-4923/suppress-warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench authored Sep 3, 2020
2 parents 02e172f + eaa6115 commit 8332754
Show file tree
Hide file tree
Showing 78 changed files with 333 additions and 372 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixed

- (react-native): Suppress unchecked cast warnings for React Native Android [#1027](https://github.com/bugsnag/bugsnag-js/pull/1027)
- (react-native): Provide proguard rules to ensure reflection works on minified/obfuscated Android builds [#1030](https://github.com/bugsnag/bugsnag-js/pull/1030)

## 7.3.3 (2020-08-26)

Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
testMatch: [
testsForPackage('browser'),
testsForPackage('delivery-x-domain-request'),
testsForPackage('delivery-xml-http-request'),
testsForPackage('plugin-react'),
testsForPackage('plugin-vue'),
testsForPackage('plugin-browser-context'),
Expand Down
6 changes: 6 additions & 0 deletions packages/delivery-xml-http-request/delivery.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Delivery } from '@bugsnag/core/client'
import { Client } from '@bugsnag/core'

declare const delivery: (client: Client, window?: Window) => Delivery

export default delivery
7 changes: 1 addition & 6 deletions packages/delivery-xml-http-request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,10 @@
"files": [
"*.js"
],
"scripts": {
"test": "nyc --reporter=lcov -- jasmine '!(node_modules)/**/*.test.js'"
},
"author": "Bugsnag",
"license": "MIT",
"devDependencies": {
"@bugsnag/core": "^7.3.3",
"jasmine": "^3.1.0",
"nyc": "^12.0.2"
"@bugsnag/core": "^7.3.3"
},
"peerDependencies": {
"@bugsnag/core": "^7.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
const { describe, it, expect } = global
import delivery from '../'
import { Client } from '@bugsnag/core'
import { EventDeliveryPayload } from '@bugsnag/core/client'

const delivery = require('../')
interface MockXMLHttpRequest {
method: string | null
url: string | null
data: string | null
headers: { [key: string]: string }
readyState: string | null
}

describe('delivery:XMLHttpRequest', () => {
it('sends events successfully', done => {
const requests = []
const requests: MockXMLHttpRequest[] = []

// mock XMLHttpRequest class
function XMLHttpRequest () {
function XMLHttpRequest (this: MockXMLHttpRequest) {
this.method = null
this.url = null
this.data = null
Expand All @@ -16,26 +24,26 @@ describe('delivery:XMLHttpRequest', () => {
requests.push(this)
}
XMLHttpRequest.DONE = 4
XMLHttpRequest.prototype.open = function (method, url) {
XMLHttpRequest.prototype.open = function (method: string, url: string) {
this.method = method
this.url = url
}
XMLHttpRequest.prototype.setRequestHeader = function (key, val) {
XMLHttpRequest.prototype.setRequestHeader = function (key: string, val: string) {
this.headers[key] = val
}
XMLHttpRequest.prototype.send = function (data) {
XMLHttpRequest.prototype.send = function (data: string) {
this.data = data
this.readyState = XMLHttpRequest.DONE
this.onreadystatechange()
}

const payload = { sample: 'payload' }
const payload = { sample: 'payload' } as unknown as EventDeliveryPayload
const config = {
apiKey: 'aaaaaaaa',
endpoints: { notify: '/echo/' },
redactedKeys: []
}
delivery({ logger: {}, _config: config }, { XMLHttpRequest }).sendEvent(payload, (err) => {
delivery({ logger: {}, _config: config } as unknown as Client, { XMLHttpRequest } as unknown as Window).sendEvent(payload, (err: any) => {
expect(err).toBe(null)
expect(requests.length).toBe(1)
expect(requests[0].method).toBe('POST')
Expand All @@ -50,10 +58,10 @@ describe('delivery:XMLHttpRequest', () => {
})

it('sends sessions successfully', done => {
const requests = []
const requests: MockXMLHttpRequest[] = []

// mock XMLHttpRequest class
function XMLHttpRequest () {
function XMLHttpRequest (this: MockXMLHttpRequest) {
this.method = null
this.url = null
this.data = null
Expand All @@ -62,26 +70,26 @@ describe('delivery:XMLHttpRequest', () => {
requests.push(this)
}
XMLHttpRequest.DONE = 4
XMLHttpRequest.prototype.open = function (method, url) {
XMLHttpRequest.prototype.open = function (method: string, url: string) {
this.method = method
this.url = url
}
XMLHttpRequest.prototype.setRequestHeader = function (key, val) {
XMLHttpRequest.prototype.setRequestHeader = function (key: string, val: string) {
this.headers[key] = val
}
XMLHttpRequest.prototype.send = function (data) {
XMLHttpRequest.prototype.send = function (data: string) {
this.data = data
this.readyState = XMLHttpRequest.DONE
this.onreadystatechange()
}

const payload = { sample: 'payload' }
const payload = { sample: 'payload' } as unknown as EventDeliveryPayload
const config = {
apiKey: 'aaaaaaaa',
endpoints: { notify: '/', sessions: '/echo/' },
redactedKeys: []
}
delivery({ _config: config, logger: {} }, { XMLHttpRequest }).sendSession(payload, (err) => {
delivery({ _config: config, logger: {} } as unknown as Client, { XMLHttpRequest } as unknown as Window).sendSession(payload, (err) => {
expect(err).toBe(null)
expect(requests.length).toBe(1)
expect(requests[0].method).toBe('POST')
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ android {
}

dependencies {
api "com.bugsnag:bugsnag-android:5.0.1-react-native"
api "com.bugsnag:bugsnag-plugin-react-native:5.0.1-react-native"
api "com.bugsnag:bugsnag-android:5.0.2-react-native"
api "com.bugsnag:bugsnag-plugin-react-native:5.0.2-react-native"
implementation 'com.facebook.react:react-native:+'

testImplementation "junit:junit:4.12"
Expand Down

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN PGP SIGNATURE-----
Version: BCPG v1.64

iQGcBAABCgAGBQJfT6daAAoJEO8eQUNdoVGt7NAMAJrk89oQHVF7Yd4ezN3jqIjZ
z+xWj/w9Vor6DwRsaJIJiFVoNRHgyicnRvfqzY/N6hvs3vtFs9NUHh3jlWIlRhrM
HqNrkS6ESXmmhe66A+ROYRUlT3Tzn2w7AZeU/gqDlM2bhNFtocZH6scjHqONtboD
4Epa7165Ds2jByocx6elvONlyN7v+dvgLfd/Jm5K4ri7AsLfEIh7nhwTWbvMxttO
mNCewqJp8V7WgZySz2Fd+gOym2KmxR1eS5LW8OEM5VoBD7eceuRzBIblhDb9mnpI
9OuQ7Ujn+/VbYEND0ZYr0WI4GXCBp+tlXOzpaVXvS2oYUm0LIRSnLFF1hTzgWrgU
AaXo8AhpVp+iaDpbIFjpX8ZbPmImStUkydCP5IGx8OBNfo8TDAxYIO3zJzP/+3Oo
+UNmvougRfPFMNjGiH/RTq3XK35dOaP+TveMyiSLTG4+a/9U+fNcd8j/HCEtNyUd
V0LvD0gMNLZvUV9KFhHh5mRhSsUNwn/q8SxIx9WdHg==
=BtAn
-----END PGP SIGNATURE-----
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN PGP SIGNATURE-----
Version: BCPG v1.64

iQGcBAABCgAGBQJfT6daAAoJEO8eQUNdoVGtJlEL/26t6wHqrW2uKvzLdkUuydqu
g4TOuqTTOIYxG9gIHShm1fLsODK+zubVSbAkfADfn0XxTzpD8QrZPlTK8YojJTIA
aXwDsz7o+VE/4gEEqM1P/QyH6E4aM5GUrpu6iItFxPikY+wDhgPAB9purGM745YB
UymkP1t4zrPgqfuMcCvXUsQloMcrm1NFeE/hCvPEha9TSDqiyl0N9aAspgSB9xto
DIVXbIVbJ5hdb4FKBY6FgkS7ITJUwFnHbGJVXwlBD9XC4zN/lDBQ49ILSl2UK7Fo
o3k4hRFrYcOwY6dMTLnsSfss2i6CSDNcOYnSczQjLj2z1+4DZFtp1bV+3QJS3OMK
yWmavy+hQ2jKCfi5eme7LwmaIMakOI0jxyL4g9qUnnwlQxyJh1xUkv0Srpn/+Cgb
0eAR2AVqXuKpyiD3xIqeiKmFWoLzySOT/ArigStD5Cnj/A9XAB94CnHG91B9qMBQ
JmY8wLUcaW2H9lL21V5onNpmasg85WfZm01LuQF+Qw==
=EWQC
-----END PGP SIGNATURE-----
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.bugsnag</groupId>
<artifactId>bugsnag-android-core</artifactId>
<version>5.0.1-react-native</version>
<version>5.0.2-react-native</version>
<packaging>aar</packaging>
<name>Bugsnag Android Core</name>
<description>Official Bugsnag notifier for Android applications</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN PGP SIGNATURE-----
Version: BCPG v1.64

iQGcBAABCgAGBQJfT6daAAoJEO8eQUNdoVGtIaML/04idrzJUM62NaB6bIN3PGMX
hsq8C+yd5fU1Lgpu1XXoV4Bxi4VeAtxR3o96u3JIhuNvmD8qawz30SDxV/7cDP3f
WYpOIMTDnkXsca/RThM1294lkgzMk+Zwn4uzUNtDjfyd9ehSeVp9Fgc9kZZAJIE3
TeI2ULH0g4dFUMdH8v6VTPk36NIst2UMGD6eF9pCJYX1SiSKBOQXQnVYac+wtBLL
mXIhRT4MZOiit4sKpq4jfZXc+EvjhZCVHt3DRZvfSviHhb/JnDtwuTPgdcpYE5QE
P+55J9YJfdsstdXzg6rxDJeCfd0Lw33nrLJFLTC3q7HoHMdcwKm9NR+6KE23+M1m
2IQWfDvHlhnY8zFtsQAuq9LwwtbI6CDP4npLkno03uZVFqzk33+/2kLtPiK8RdOv
CIkWtwm9hdfuZlxi06CzBtdOPn7FQmZUA+UUSWk+9WFLt9tXk11lHrBI08AgDmo2
DGV/DIBjkUxzU/j7LhrcdwwQrxR/mmBdKEIoZ40MPg==
=UURW
-----END PGP SIGNATURE-----
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<groupId>com.bugsnag</groupId>
<artifactId>bugsnag-android-core</artifactId>
<versioning>
<latest>5.0.1-react-native</latest>
<release>5.0.1-react-native</release>
<latest>5.0.2-react-native</latest>
<release>5.0.2-react-native</release>
<versions>
<version>5.0.1-react-native</version>
<version>5.0.2-react-native</version>
</versions>
<lastUpdated>20200807213741</lastUpdated>
<lastUpdated>20200902140826</lastUpdated>
</versioning>
</metadata>
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN PGP SIGNATURE-----
Version: BCPG v1.64

iQGcBAABCgAGBQJfT2K5AAoJEO8eQUNdoVGt6GQL/1K00v5XkxP4/hRw2njN6VNJ
u1CNw0bmIKx8NxoMZ1L/6reUlih7abHKilOxWdCuc1mHB55hzRa0jAwYslukrwjK
4Wg124N9nOMXmXre6/N7xKQv7i1mmfkSbVUFu5DfHioP92DAYfyn5EycTvOIS4NW
VH2KlrYKNv50NdVj/pL392XIrpKzucqy6/a5+6VTEuZTi270WK8dEGoU8Rm2GE1b
qR+W3YMYyJKdroxaVNC+FYSopC4Ezsi5/2/nLgPQ+rz8sTbnWRaH0SK/WomqjBpA
HoRJHs6OC7fT1lXhW2F/niyeiSsTl4ypHGgoGounVCONC6Zfj18zEFnQTKLRy+R+
mIcFwJz4V1xZnpIk/IqcWu0DtXDKFToRYYlqEusFYqD2yDo+z6aboog16lSc1rp/
9livEEzac39QKM/d2zXUA35MutNt54Fa2J3GJHXzVG0MA8uhCl1WhdewdIWScFXS
jaYwPaRgYwji/8Xd6OEHVRg/N9O0T7oEzVabMLCFAQ==
=hrMS
-----END PGP SIGNATURE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN PGP SIGNATURE-----
Version: BCPG v1.64

iQGcBAABCgAGBQJfT2K5AAoJEO8eQUNdoVGtVGQL/08ZrfxuEOk1Owrux2EUg9GR
4RHU9FFsTOjNmhvO6O5urA27vvDN64swN6TA6V9e1Mp0Kq0BZtSiqsd94M0U3+Yh
3iCAo8Pi6GrMEuLZut5FqWcN3C5qv8qeIH81aJrOzKM4a50c/qhWs0IsPEZ/y4C7
IvThyeXXMvjlTX9bopUTJkrCFP6Z7OUZhF6LV8bFBuvUGwb30n5XhDedvcz0UxpU
hU2Qqqx65u9lKognvGQyG/D12W6RGWAdQ8mSWNoJZaLlw/oTTE26m5XXZvkgjqod
Nz+KuQRqhVXNfYPtvamW4bzgL+ql3kY4ZKNws/H4ZZgdTxXYfl+5P4d31+k7kjdS
raoxefOlz8BqRqILgqfMAlpfZOW69zHHsGbX970Afg/QWXBZ1EzUgJytLhTOIitS
MH5/O/HMbj6vkhhNzk7XiHIYxaHKom7r9NjhXDkCuk1FflYbeCN536RIOU6+m+4D
eAGvurcbDFAriSYCCPEUwxtrTwELblsCX4J7AfsYOQ==
=NbHp
-----END PGP SIGNATURE-----
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.bugsnag</groupId>
<artifactId>bugsnag-android-ndk</artifactId>
<version>5.0.1-react-native</version>
<version>5.0.2-react-native</version>
<packaging>aar</packaging>
<name>Bugsnag Android NDK</name>
<description>Official Bugsnag notifier for Android applications</description>
Expand All @@ -30,19 +30,19 @@
<dependency>
<groupId>com.bugsnag</groupId>
<artifactId>bugsnag-android-core</artifactId>
<version>5.0.1-react-native</version>
<version>5.0.2-react-native</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.bugsnag</groupId>
<artifactId>bugsnag-plugin-android-anr</artifactId>
<version>5.0.1-react-native</version>
<version>5.0.2-react-native</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.bugsnag</groupId>
<artifactId>bugsnag-plugin-android-ndk</artifactId>
<version>5.0.1-react-native</version>
<version>5.0.2-react-native</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Loading

0 comments on commit 8332754

Please sign in to comment.