react-onesignal 3.0.1 → 3.2.0

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,72 +1,47 @@
1
1
  {
2
2
  "name": "react-onesignal",
3
- "version": "3.0.1",
3
+ "version": "3.2.0",
4
4
  "description": "React OneSignal Module: Make it easy to integrate OneSignal with your React App!",
5
- "author": "rgomezp",
6
- "contributors": [{ "name": "Rodrigo Gomez-Palacio" }, { "name": "Pedro Bini" }, { "name": "Graham Marlow" }],
5
+ "type": "module",
6
+ "contributors": [
7
+ {
8
+ "name": "Rodrigo Gomez-Palacio"
9
+ },
10
+ {
11
+ "name": "Pedro Bini"
12
+ },
13
+ {
14
+ "name": "Graham Marlow"
15
+ },
16
+ {
17
+ "name": "Fadi George"
18
+ }
19
+ ],
7
20
  "homepage": "https://onesignal.com",
8
21
  "repository": "https://github.com/OneSignal/react-onesignal.git",
9
22
  "license": "MIT",
10
23
  "main": "dist/index.js",
11
24
  "module": "dist/index.es.js",
12
- "jsnext:main": "dist/index.es.js",
13
25
  "types": "dist/index.d.ts",
14
26
  "engines": {
15
- "node": ">=8",
16
- "npm": ">=5"
27
+ "node": ">=22",
28
+ "npm": ">=10"
17
29
  },
18
30
  "scripts": {
19
- "lint": "./node_modules/.bin/eslint ./src --ext .js,.jsx,.ts,.tsx",
20
- "build": "rollup -c",
21
- "prepare": "yarn run build",
22
- "test": "yarn"
23
- },
24
- "peerDependencies": {
25
- "react": ">= 16.8"
31
+ "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
32
+ "build": "vite build",
33
+ "prepare": "npm run build"
26
34
  },
27
35
  "devDependencies": {
28
- "@babel/core": "^7.0.0",
29
- "@babel/plugin-external-helpers": "^7.0.0",
30
- "@babel/plugin-proposal-class-properties": "^7.0.0",
31
- "@babel/plugin-proposal-decorators": "^7.0.0",
32
- "@babel/plugin-proposal-do-expressions": "^7.0.0",
33
- "@babel/plugin-proposal-export-default-from": "^7.0.0",
34
- "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
35
- "@babel/plugin-proposal-function-bind": "^7.0.0",
36
- "@babel/plugin-proposal-function-sent": "^7.0.0",
37
- "@babel/plugin-proposal-json-strings": "^7.0.0",
38
- "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
39
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
40
- "@babel/plugin-proposal-numeric-separator": "^7.0.0",
41
- "@babel/plugin-proposal-optional-chaining": "^7.0.0",
42
- "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
43
- "@babel/plugin-proposal-throw-expressions": "^7.0.0",
44
- "@babel/plugin-syntax-dynamic-import": "^7.0.0",
45
- "@babel/plugin-syntax-import-meta": "^7.0.0",
46
- "@babel/preset-env": "^7.0.0",
47
- "@babel/preset-react": "^7.0.0",
48
- "@types/jest": "^25.1.2",
49
- "@types/lodash.isequal": "^4.5.5",
50
- "@types/react": "^16.9.19",
51
- "@typescript-eslint/eslint-plugin": "^2.19.0",
52
- "@typescript-eslint/parser": "^2.19.0",
53
- "babel-eslint": "^10.0.1",
54
- "cross-env": "^5.2.0",
55
- "eslint": "^6.8.0",
56
- "eslint-config-airbnb": "^18.0.1",
57
- "eslint-plugin-import": "^2.20.1",
58
- "eslint-plugin-jsx-a11y": "^6.2.3",
59
- "eslint-plugin-react": "^7.18.3",
60
- "eslint-plugin-react-hooks": "^1.7.0",
61
- "react": "^16.13.1",
62
- "rollup": "^1.1.2",
63
- "rollup-plugin-babel": "^4.3.2",
64
- "rollup-plugin-commonjs": "^9.2.0",
65
- "rollup-plugin-node-resolve": "^4.0.0",
66
- "rollup-plugin-peer-deps-external": "^2.2.0",
67
- "rollup-plugin-typescript2": "^0.17.0",
68
- "rollup-plugin-url": "^2.1.0",
69
- "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"
70
45
  },
71
46
  "keywords": [
72
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
- };