New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/react-form

Package Overview
Dependencies
Maintainers
13
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/react-form - npm Package Compare versions

Comparing version 0.3.8 to 0.3.9

10

CHANGELOG.md

@@ -8,2 +8,12 @@ # Changelog

## [0.3.9]
### Added
- new `positiveIntegerString` validator to validate fractionless numbers [#760](https://github.com/Shopify/quilt/pull/760)
### Fixed
- `notEmptyString` now rejects empty strings, similar to `notEmpty` [#759](https://github.com/Shopify/quilt/pull/759)
## [0.3.4]

@@ -10,0 +20,0 @@

1

dist/validation/validators.d.ts

@@ -10,3 +10,4 @@ import { ErrorContent } from './validator';

export declare function notEmptyString(error: ErrorContent<string>): (input: string) => string | undefined;
export declare function positiveIntegerString(error: ErrorContent<string>): (input: string) => string | undefined;
export declare function positiveNumericString(error: ErrorContent<string>): (input: string) => string | undefined;
export declare function numericString(error: ErrorContent<string>): (input: string) => string | undefined;

14

dist/validation/validators.js

@@ -19,16 +19,16 @@ "use strict";

function notEmptyString(error) {
return validator_1.validator(predicates.notEmptyString)(error);
return validator_1.validator(predicates.notEmptyString, { skipOnEmpty: false })(error);
}
exports.notEmptyString = notEmptyString;
function positiveIntegerString(error) {
return validator_1.validator(predicates.isPositiveIntegerString)(error);
}
exports.positiveIntegerString = positiveIntegerString;
function positiveNumericString(error) {
return validator_1.validator(function (input) {
return input !== '' && (input.match(/[^0-9.,]/g) || []).length === 0;
})(error);
return validator_1.validator(predicates.isPositiveNumericString)(error);
}
exports.positiveNumericString = positiveNumericString;
function numericString(error) {
return validator_1.validator(function (input) {
return input !== '' && (input.match(/[^0-9.,-]/g) || []).length === 0;
})(error);
return validator_1.validator(predicates.isNumericString)(error);
}
exports.numericString = numericString;
{
"name": "@shopify/react-form",
"version": "0.3.8",
"version": "0.3.9",
"license": "MIT",

@@ -30,3 +30,3 @@ "description": "Manage react forms tersely and safely-typed with no magic using React hooks.",

"devDependencies": {
"@shopify/react-testing": "^1.6.0",
"@shopify/react-testing": "^1.6.1",
"@types/faker": "^4.1.5",

@@ -40,3 +40,3 @@ "faker": "^4.1.0",

"dependencies": {
"@shopify/predicates": "^1.1.0",
"@shopify/predicates": "^1.2.0",
"@shopify/react-hooks": "^1.2.1",

@@ -43,0 +43,0 @@ "fast-deep-equal": "^2.0.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc