formsy-react
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -7,2 +7,14 @@ ### Changelog | ||
#### [v2.1.0](https://github.com/formsy/formsy-react/compare/v2.0.3...v2.1.0) | ||
> 27 July 2020 | ||
- Refactor index file, extract Formsy class to a separate file [`#530`](https://github.com/formsy/formsy-react/pull/530) | ||
- chore(deps): Bump lodash from 4.17.15 to 4.17.19 [`#527`](https://github.com/formsy/formsy-react/pull/527) | ||
- Automatic library bumps [`#511`](https://github.com/formsy/formsy-react/pull/511) | ||
- Improve initial render [`#490`](https://github.com/formsy/formsy-react/pull/490) | ||
- fix: UMD version used in production build, closes #488 [`#489`](https://github.com/formsy/formsy-react/pull/489) | ||
- Add FormsyInjectedProps type [`#470`](https://github.com/formsy/formsy-react/pull/470) | ||
- fix: UMD version used in production build, closes #488 (#489) [`#488`](https://github.com/formsy/formsy-react/issues/488) | ||
#### [v2.0.3](https://github.com/formsy/formsy-react/compare/v2.0.2...v2.0.3) | ||
@@ -180,3 +192,2 @@ | ||
- Fix isValidValue call in documentation [`#99`](https://github.com/formsy/formsy-react/issues/99) | ||
- Add np comment for easier releases [`8ffac25`](https://github.com/formsy/formsy-react/commit/8ffac255f2a22c87ae58a5b1f4397ca274130a86) | ||
- fix: removed useless default for innerRef prop from the HOC to prevent warnings when the wrapped component is a SFC [`3284327`](https://github.com/formsy/formsy-react/commit/32843279adbaa64248709e3a2b208e54ad2ab0c6) | ||
@@ -183,0 +194,0 @@ |
@@ -6,2 +6,3 @@ import PropTypes from 'prop-types'; | ||
declare type FormHTMLAttributesCleaned = Omit<React.FormHTMLAttributes<HTMLFormElement>, 'onChange' | 'onSubmit'>; | ||
declare type OnSubmitCallback = (model: IModel, resetModel: IResetModel, updateInputsWithError: IUpdateInputsWithError, event: React.SyntheticEvent<React.FormHTMLAttributes<any>>) => void; | ||
export interface FormsyProps extends FormHTMLAttributesCleaned { | ||
@@ -12,7 +13,7 @@ disabled: boolean; | ||
onInvalid: () => void; | ||
onInvalidSubmit: (model: IModel, resetModel: IResetModel, updateInputsWithError: IUpdateInputsWithError) => void; | ||
onReset?: () => void; | ||
onSubmit?: (model: IModel, resetModel: IResetModel, updateInputsWithError: IUpdateInputsWithError) => void; | ||
onSubmit?: OnSubmitCallback; | ||
onValidSubmit?: OnSubmitCallback; | ||
onInvalidSubmit: OnSubmitCallback; | ||
onValid: () => void; | ||
onValidSubmit?: (model: IModel, resetModel: IResetModel, updateInputsWithError: IUpdateInputsWithError) => void; | ||
preventDefaultSubmit?: boolean; | ||
@@ -50,2 +51,3 @@ preventExternalInvalidation?: boolean; | ||
static defaultProps: Partial<FormsyProps>; | ||
private readonly throttledValidateForm; | ||
constructor(props: FormsyProps); | ||
@@ -74,3 +76,3 @@ componentDidMount: () => void; | ||
isChanged: () => boolean; | ||
submit: (event?: any) => void; | ||
submit: (event?: React.SyntheticEvent) => void; | ||
updateInputsWithError: IUpdateInputsWithError; | ||
@@ -77,0 +79,0 @@ updateInputsWithValue: IUpdateInputsWithValue<any>; |
@@ -0,0 +0,0 @@ import React from 'react'; |
@@ -0,0 +0,0 @@ import validationRules, { addValidationRule } from './validationRules'; |
@@ -0,0 +0,0 @@ import React, { ComponentClass } from 'react'; |
@@ -22,2 +22,3 @@ import { ValidationError, Validations, Values } from './interfaces'; | ||
export declare function runRules<V>(value: V, currentValues: Values, validations: Validations<V>, validationRules: Validations<V>): RulesResult; | ||
export declare function throttle(callback: any, interval: any): (...args: any[]) => void; | ||
export {}; |
@@ -0,0 +0,0 @@ import { ValidationFunction, Values } from './interfaces'; |
@@ -0,0 +0,0 @@ import PropTypes from 'prop-types'; |
108
package.json
{ | ||
"name": "formsy-react", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "A form input builder and validator for React", | ||
@@ -13,25 +13,2 @@ "keywords": [ | ||
], | ||
"standard-version": { | ||
"skip": { | ||
"tag": true | ||
} | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "pretty-quick --staged" | ||
} | ||
}, | ||
"jest": { | ||
"collectCoverage": true, | ||
"collectCoverageFrom": [ | ||
"src/**/*.tsx", | ||
"src/**/*.ts" | ||
], | ||
"transform": { | ||
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest" | ||
}, | ||
"setupFilesAfterEnv": [ | ||
"./setupTests.ts" | ||
] | ||
}, | ||
"license": "MIT", | ||
@@ -45,19 +22,21 @@ "homepage": "https://github.com/formsy/formsy-react", | ||
"author": "Christian Alfoni and the Formsy Authors", | ||
"main": "dist/index.js", | ||
"module": "dist/formsy-react.esm.js", | ||
"typings": "dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
"dist", | ||
"src" | ||
], | ||
"main": "dist/formsy-react.cjs.js", | ||
"module": "dist/formsy-react.esm.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "npm run build:clean && npm run build:types && npm run build:js", | ||
"start": "tsdx watch", | ||
"build": "tsdx build", | ||
"test": "tsdx test --passWithNoTests", | ||
"lint": "tsdx lint", | ||
"prepare": "tsdx build", | ||
"build:clean": "rm -r dist/* || true", | ||
"build:js": "rollup -c", | ||
"build:types": "tsc --emitDeclarationOnly", | ||
"changelog": "auto-changelog", | ||
"deploy": "np", | ||
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,md}\"", | ||
"lint": "eslint .", | ||
"preversion": "npm run lint", | ||
"test": "jest", | ||
"version": "npm run build && git add dist && npm run changelog && git add CHANGELOG.md" | ||
@@ -73,11 +52,2 @@ }, | ||
"devDependencies": { | ||
"@babel/cli": "^7.5.5", | ||
"@babel/core": "^7.5.5", | ||
"@babel/node": "^7.5.5", | ||
"@babel/plugin-proposal-class-properties": "^7.5.5", | ||
"@babel/preset-env": "^7.5.5", | ||
"@babel/preset-react": "^7.0.0", | ||
"@babel/preset-typescript": "^7.3.3", | ||
"@rollup/plugin-commonjs": "^13.0.0", | ||
"@rollup/plugin-node-resolve": "^8.0.1", | ||
"@types/enzyme": "^3.10.3", | ||
@@ -90,34 +60,17 @@ "@types/jest": "^26.0.0", | ||
"@types/prop-types": "^15.7.1", | ||
"@types/react": "^16.9.19", | ||
"@types/react-dom": "^16.9.5", | ||
"@typescript-eslint/eslint-plugin": "^2.14.0", | ||
"@typescript-eslint/parser": "^2.14.0", | ||
"@types/react": "^16.9.43", | ||
"@types/react-dom": "^16.9.8", | ||
"auto-changelog": "^2.0.0", | ||
"babel-eslint": "^10.0.2", | ||
"babel-jest": "^26.0.1", | ||
"babel-loader": "^8.0.6", | ||
"babelrc-rollup": "^3.0.0", | ||
"coveralls": "^3.0.9", | ||
"enzyme": "^3.10.0", | ||
"enzyme-adapter-react-16": "^1.14.0", | ||
"eslint": "^6.1.0", | ||
"eslint-config-airbnb": "^18.0.1", | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-config-react": "^1.1.7", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jsx-a11y": "^6.0.3", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-react": "^7.14.3", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"husky": "^4.2.1", | ||
"jest": "^26.0.1", | ||
"np": "^5.0.0", | ||
"prettier": "^2.0.2", | ||
"pretty-quick": "^2.0.0", | ||
"react": "^16.2.0 || ^16.0.0", | ||
"react-dom": "^16.2.0 || ^16.0.0", | ||
"rollup": "^2.7.6", | ||
"rollup-plugin-babel": "^4.3.3", | ||
"rollup-plugin-peer-deps-external": "^2.2.0", | ||
"sinon": "^9.0.0", | ||
"typescript": "^3.5.3" | ||
"tsdx": "^0.13.2", | ||
"tslib": "^2.0.0", | ||
"typescript": "^3.9.7" | ||
}, | ||
@@ -127,3 +80,30 @@ "peerDependencies": { | ||
"react-dom": "^16.0.0" | ||
}, | ||
"standard-version": { | ||
"skip": { | ||
"tag": true | ||
} | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "tsdx lint" | ||
} | ||
}, | ||
"prettier": { | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleQuote": true, | ||
"proseWrap": "always", | ||
"trailingComma": "all" | ||
}, | ||
"jest": { | ||
"collectCoverage": true, | ||
"collectCoverageFrom": [ | ||
"src/**/*.tsx", | ||
"src/**/*.ts" | ||
], | ||
"setupFilesAfterEnv": [ | ||
"./setupTests.ts" | ||
] | ||
} | ||
} |
# formsy-react | ||
[![GitHub release](https://img.shields.io/github/release/formsy/formsy-react.svg)](https://github.com/formsy/formsy-react/releases) | ||
[![Build status](https://travis-ci.org/formsy/formsy-react.svg?branch=master)](https://travis-ci.org/formsy/formsy-react) | ||
![CI](https://github.com/formsy/formsy-react/workflows/CI/badge.svg) | ||
[![Coverage Status](https://coveralls.io/repos/github/formsy/formsy-react/badge.svg?branch=master)](https://coveralls.io/github/formsy/formsy-react?branch=master) | ||
@@ -6,0 +6,0 @@ [![Gzipped size](http://img.badgesize.io/https://unpkg.com/formsy-react?compression=gzip)](https://unpkg.com/formsy-react) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
22
25
1
2
350047
2933
1