react-onesignal 3.1.1 → 3.2.1

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.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "react-onesignal",
3
- "version": "3.1.1",
3
+ "version": "3.2.1",
4
4
  "description": "React OneSignal Module: Make it easy to integrate OneSignal with your React App!",
5
- "author": "rgomezp",
5
+ "type": "module",
6
6
  "contributors": [
7
7
  {
8
8
  "name": "Rodrigo Gomez-Palacio"
@@ -12,6 +12,9 @@
12
12
  },
13
13
  {
14
14
  "name": "Graham Marlow"
15
+ },
16
+ {
17
+ "name": "Fadi George"
15
18
  }
16
19
  ],
17
20
  "homepage": "https://onesignal.com",
@@ -19,64 +22,26 @@
19
22
  "license": "MIT",
20
23
  "main": "dist/index.js",
21
24
  "module": "dist/index.es.js",
22
- "jsnext:main": "dist/index.es.js",
23
25
  "types": "dist/index.d.ts",
24
26
  "engines": {
25
- "node": ">=8",
26
- "npm": ">=5"
27
+ "node": ">=14",
28
+ "npm": ">=6"
27
29
  },
28
30
  "scripts": {
29
- "lint": "./node_modules/.bin/eslint ./src --ext .js,.jsx,.ts,.tsx",
30
- "build": "rollup -c",
31
- "prepare": "yarn run build",
32
- "test": "yarn"
33
- },
34
- "peerDependencies": {
35
- "react": ">= 16.8"
31
+ "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
32
+ "build": "vite build",
33
+ "prepare": "npm run build"
36
34
  },
37
35
  "devDependencies": {
38
- "@babel/core": "^7.0.0",
39
- "@babel/plugin-external-helpers": "^7.0.0",
40
- "@babel/plugin-proposal-class-properties": "^7.0.0",
41
- "@babel/plugin-proposal-decorators": "^7.0.0",
42
- "@babel/plugin-proposal-do-expressions": "^7.0.0",
43
- "@babel/plugin-proposal-export-default-from": "^7.0.0",
44
- "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
45
- "@babel/plugin-proposal-function-bind": "^7.0.0",
46
- "@babel/plugin-proposal-function-sent": "^7.0.0",
47
- "@babel/plugin-proposal-json-strings": "^7.0.0",
48
- "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
49
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
50
- "@babel/plugin-proposal-numeric-separator": "^7.0.0",
51
- "@babel/plugin-proposal-optional-chaining": "^7.0.0",
52
- "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
53
- "@babel/plugin-proposal-throw-expressions": "^7.0.0",
54
- "@babel/plugin-syntax-dynamic-import": "^7.0.0",
55
- "@babel/plugin-syntax-import-meta": "^7.0.0",
56
- "@babel/preset-env": "^7.0.0",
57
- "@babel/preset-react": "^7.0.0",
58
- "@types/jest": "^25.1.2",
59
- "@types/lodash.isequal": "^4.5.5",
60
- "@types/react": "^16.9.19",
61
- "@typescript-eslint/eslint-plugin": "^2.19.0",
62
- "@typescript-eslint/parser": "^2.19.0",
63
- "babel-eslint": "^10.0.1",
64
- "cross-env": "^5.2.0",
65
- "eslint": "^6.8.0",
66
- "eslint-config-airbnb": "^18.0.1",
67
- "eslint-plugin-import": "^2.20.1",
68
- "eslint-plugin-jsx-a11y": "^6.2.3",
69
- "eslint-plugin-react": "^7.18.3",
70
- "eslint-plugin-react-hooks": "^1.7.0",
71
- "react": "^16.13.1",
72
- "rollup": "^1.1.2",
73
- "rollup-plugin-babel": "^4.3.2",
74
- "rollup-plugin-commonjs": "^9.2.0",
75
- "rollup-plugin-node-resolve": "^4.0.0",
76
- "rollup-plugin-peer-deps-external": "^2.2.0",
77
- "rollup-plugin-typescript2": "^0.17.0",
78
- "rollup-plugin-url": "^2.1.0",
79
- "typescript": "^3.7.5"
36
+ "@typescript-eslint/eslint-plugin": "^5.20.0",
37
+ "@typescript-eslint/parser": "^5.20.0",
38
+ "eslint": "^8.13.0",
39
+ "eslint-plugin-import": "^2.31.0",
40
+ "eslint-plugin-jsx-a11y": "^6.10.2",
41
+ "eslint-plugin-react": "^7.37.4",
42
+ "typescript": "^5.8.2",
43
+ "vite": "^6.2.1",
44
+ "vite-plugin-dts": "^4.5.3"
80
45
  },
81
46
  "keywords": [
82
47
  "onesignal",
package/tsconfig.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "compilerOptions": {
3
3
  "outDir": "dist",
4
4
  "module": "esnext",
5
- "target": "es6",
6
- "lib": ["es6", "dom", "es2016", "es2017"],
5
+ "target": "es2020",
6
+ "lib": ["dom", "dom.iterable", "esnext"],
7
7
  "sourceMap": true,
8
8
  "allowJs": true,
9
9
  "declaration": true,
@@ -13,7 +13,6 @@
13
13
  "noImplicitThis": true,
14
14
  "noImplicitAny": false,
15
15
  "strictNullChecks": false,
16
- "suppressImplicitAnyIndexErrors": true,
17
16
  "noUnusedLocals": true,
18
17
  "noUnusedParameters": true,
19
18
  "allowSyntheticDefaultImports": true,
package/vite.config.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { defineConfig } from 'vite';
2
+ import dts from 'vite-plugin-dts';
3
+
4
+ export default defineConfig({
5
+ build: {
6
+ sourcemap: true,
7
+ lib: {
8
+ entry: './index.ts',
9
+ name: 'react-onesignal',
10
+ formats: ['es', 'cjs'],
11
+ fileName: (format) => {
12
+ if (format === 'es') {
13
+ return 'index.es.js';
14
+ }
15
+ return 'index.js';
16
+ },
17
+ },
18
+ },
19
+ plugins: [dts()],
20
+ });
package/.eslintrc.js DELETED
@@ -1,51 +0,0 @@
1
- module.exports = {
2
- env: {
3
- browser: true,
4
- es6: true,
5
- node: true,
6
- },
7
- settings: {
8
- "import/resolver": {
9
- node: {
10
- paths: ["src"],
11
- extensions: [
12
- ".js",
13
- ".ts",
14
- ".jsx",
15
- ".tsx",
16
- ],
17
- },
18
- },
19
- },
20
- extends: [
21
- 'plugin:react/recommended',
22
- 'airbnb',
23
- ],
24
- globals: {
25
- Atomics: 'readonly',
26
- SharedArrayBuffer: 'readonly',
27
- },
28
- parser: '@typescript-eslint/parser',
29
- parserOptions: {
30
- ecmaFeatures: {
31
- jsx: true,
32
- },
33
- ecmaVersion: 2018,
34
- sourceType: 'module',
35
- },
36
- plugins: [
37
- 'react',
38
- '@typescript-eslint',
39
- ],
40
- rules: {
41
- "react/jsx-filename-extension": [1, { "extensions": [".tsx", ".jsx"] }],
42
- "react/jsx-props-no-spreading": 0,
43
- "prefer-destructuring": 0,
44
- "no-param-reassign": 0,
45
- "import/extensions": 0,
46
- "dot-notation": 0,
47
- "no-continue": 0,
48
- "no-unused-vars": "off",
49
- "@typescript-eslint/no-unused-vars": ["error"]
50
- },
51
- };