From a8ca83123eaa5b08a763bfdacb4a8190b3295981 Mon Sep 17 00:00:00 2001 From: divlo Date: Mon, 26 Oct 2020 02:56:36 +0100 Subject: [PATCH] fix: polyfill-object.fromentries --- .eslintrc | 3 +- .travis.yml | 4 --- example/src/index.tsx | 1 + package-lock.json | 67 ++++++++++++++++++++++++++++++++++--------- package.json | 5 +++- src/index.tsx | 2 ++ src/typings.d.ts | 2 ++ 7 files changed, 65 insertions(+), 19 deletions(-) delete mode 100644 .travis.yml diff --git a/.eslintrc b/.eslintrc index 50c2521..7972eb1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -30,6 +30,7 @@ "react/jsx-fragments": 0, "react/no-unused-prop-types": 0, "import/export": 0, - "no-use-before-define": [0] + "no-use-before-define": "off", + "@typescript-eslint/no-use-before-define": "off" } } diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c66a67b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 12 - - 10 diff --git a/example/src/index.tsx b/example/src/index.tsx index eac2014..81c7fe7 100644 --- a/example/src/index.tsx +++ b/example/src/index.tsx @@ -1,3 +1,4 @@ +//eslint-disable-next-line import React from 'react' import ReactDOM from 'react-dom' import Form, { HandleForm } from 'react-component-form' diff --git a/package-lock.json b/package-lock.json index 0f63b49..dce62f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-component-form", - "version": "1.2.1", + "version": "1.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3085,7 +3085,7 @@ }, "@testing-library/jest-dom": { "version": "5.11.4", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.11.4.tgz", + "resolved": false, "integrity": "sha512-6RRn3epuweBODDIv3dAlWjOEHQLpGJHB2i912VS3JQtsD22+ENInhdDNl4ZZQiViLlIfFinkSET/J736ytV9sw==", "dev": true, "requires": { @@ -3101,7 +3101,7 @@ }, "@testing-library/react": { "version": "11.0.4", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.0.4.tgz", + "resolved": false, "integrity": "sha512-U0fZO2zxm7M0CB5h1+lh31lbAwMSmDMEMGpMT3BUPJwIjDEKYWOV4dx7lb3x2Ue0Pyt77gmz/VropuJnSz/Iew==", "dev": true, "requires": { @@ -3111,7 +3111,7 @@ }, "@testing-library/user-event": { "version": "12.1.7", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-12.1.7.tgz", + "resolved": false, "integrity": "sha512-wuJiPqSQTVIHsYuumv1PAOBjblSrYA5vyN1nkUDF5HgfuWGz44jQsO22u7PQNkuACGYJE4eU0sybX8CzsySv+Q==", "dev": true, "requires": { @@ -3220,7 +3220,7 @@ }, "@types/jest": { "version": "26.0.14", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.14.tgz", + "resolved": false, "integrity": "sha512-Hz5q8Vu0D288x3iWXePSn53W7hAjP0H7EQ6QvDO9c7t46mR0lNOLlfuwQ+JkVxuhygHzlzPX+0jKdA3ZgSh+Vg==", "dev": true, "requires": { @@ -3294,7 +3294,7 @@ }, "@types/react-dom": { "version": "16.9.8", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.8.tgz", + "resolved": false, "integrity": "sha512-ykkPQ+5nFknnlU6lDd947WbQ6TE3NNzbQAkInC2EKY1qeYdTKp7onFusmYZb+ityzx2YviqT6BXSu+LyWWJwcA==", "dev": true, "requires": { @@ -5002,6 +5002,16 @@ "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -8564,6 +8574,13 @@ "schema-utils": "^2.5.0" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "filename-reserved-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", @@ -11531,7 +11548,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "is-number": { "version": "3.0.0", @@ -14207,6 +14228,13 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true, + "optional": true + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -15370,6 +15398,11 @@ "ts-pnp": "^1.1.6" } }, + "polyfill-object.fromentries": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/polyfill-object.fromentries/-/polyfill-object.fromentries-1.0.1.tgz", + "integrity": "sha512-zlEL/n2S73hX7BQXIPapzirQw4yM/VC7slrcOyfbsH0ZyUQ/lLh4NF9wshSJ354v0F3KDMC8FCxeTQ7UUPpu9g==" + }, "portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -17091,7 +17124,7 @@ }, "react": { "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", + "resolved": false, "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", "dev": true, "requires": { @@ -17590,7 +17623,7 @@ }, "react-dom": { "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", + "resolved": false, "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", "dev": true, "requires": { @@ -17614,7 +17647,7 @@ }, "react-scripts": { "version": "3.4.3", - "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.4.3.tgz", + "resolved": false, "integrity": "sha512-oSnoWmii/iKdeQiwaO6map1lUaZLmG0xIUyb/HwCVFLT7gNbj8JZ9RmpvMCZ4fB98ZUMRfNmp/ft8uy/xD1RLA==", "dev": true, "requires": { @@ -20714,7 +20747,7 @@ }, "typescript": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", + "resolved": false, "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==", "dev": true }, @@ -21142,7 +21175,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", @@ -21745,7 +21782,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", diff --git a/package.json b/package.json index 138b1b2..81931ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-component-form", - "version": "1.2.1", + "version": "1.2.2", "description": "Manage React Forms with ease.", "author": "Divlo ", "license": "MIT", @@ -78,5 +78,8 @@ "react-dom": "^16.13.1", "react-scripts": "^3.4.3", "typescript": "^4.0.3" + }, + "dependencies": { + "polyfill-object.fromentries": "^1.0.1" } } diff --git a/src/index.tsx b/src/index.tsx index a8456e2..2a750d4 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,4 +1,6 @@ +// eslint-disable-next-line import React, { useRef } from 'react' +import 'polyfill-object.fromentries' export interface FormDataObject { [key: string]: FormDataEntryValue diff --git a/src/typings.d.ts b/src/typings.d.ts index 9f89ebb..dd9c9a4 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -16,3 +16,5 @@ declare module '*.svg' { export default svgUrl export { svgComponent as ReactComponent } } + +declare module 'polyfill-object.fromentries'