Skip to content

Commit

Permalink
Remove non-null argument and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Doko-Demo-Doa committed Mar 20, 2023
1 parent 62b1b3f commit e0e12ca
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
- run: npm i -g typescript
- run: npm install
- uses: JS-DevTools/npm-publish@v1 # https://github.com/JS-DevTools/npm-publish
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-shake",
"version": "5.1.1",
"description": "Detect shake event on Android and iOS",
"version": "5.2.0",
"description": "A library to detect shake event on Android and iOS",
"homepage": "https://github.com/Doko-Demo-Doa/react-native-shake",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -30,7 +30,7 @@
"url": "https://github.com/Doko-Demo-Doa/react-native-shake.git"
},
"scripts": {
"compile": "rm -rf lib && tsc -p .",
"compile": "rimraf lib && tsc -p .",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"prepare": "npm run compile",
"test": "jest"
Expand All @@ -41,20 +41,18 @@
"@react-native-community/eslint-config": "3.0.1",
"@types/jest": "26.0.22",
"@types/react-native": "0.64.2",
"@types/react-test-renderer": "17.0.1",
"babel-jest": "26.6.3",
"eslint": "7.23.0",
"eslint-plugin-simple-import-sort": "7.0.0",
"jest": "26.6.3",
"eslint-plugin-simple-import-sort": "10.0.0",
"jest": "29.5.0",
"metro-react-native-babel-preset": "0.65.2",
"react": "17.0.2",
"react-native": "^0.64.0",
"react-test-renderer": "17.0.2",
"typescript": "4.2.3"
"react": "18.2.0",
"rimraf": "4.4.0",
"typescript": "4.9.5"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
"react-native": "0.71.4"
},
"jest": {
"preset": "react-native",
Expand Down
6 changes: 2 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NativeEventEmitter, NativeModules } from 'react-native'
import { NativeEventEmitter } from 'react-native'

const _eventEmitter = new NativeEventEmitter(NativeModules.RNShakeEvent)
const _eventEmitter = new NativeEventEmitter()

export default {
addListener: (callback: () => void | undefined) => {
Expand All @@ -12,6 +12,4 @@ export default {
},

removeAllListeners: () => _eventEmitter.removeAllListeners('ShakeEvent'),

removeCurrentListener: () => _eventEmitter.removeCurrentListener(),
}

0 comments on commit e0e12ca

Please sign in to comment.