Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@balena/sbvr-types

Package Overview
Dependencies
Maintainers
3
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@balena/sbvr-types - npm Package Compare versions

Comparing version 3.4.2 to 4.0.0-true-boolean-4d20b304f0092f3c3bbe389588059c11e679e08d

5

CHANGELOG.md

@@ -7,2 +7,7 @@ # Change Log

# v4.0.0
## (2021-05-04)
* Switch `Boolean` to use `BOOLEAN` db type instead of `INTEGER` [Pagan Gazzard]
# v3.4.2

@@ -9,0 +14,0 @@ ## (2021-03-22)

4

out/types/boolean.d.ts

@@ -12,5 +12,5 @@ import * as TypeUtils from '../type-utils';

export declare const validate: {
(value: any, required: true): Promise<number>;
(value: any, required: true): Promise<boolean>;
(value: null | undefined, required: false): Promise<null>;
<U>(value: U, required: boolean): Promise<number | null>;
<U>(value: U, required: boolean): Promise<boolean | null>;
};

@@ -5,4 +5,4 @@ "use strict";

const TypeUtils = require("../type-utils");
const typeFunc = (necessity, index, defaultValue = ' DEFAULT 0') => 'INTEGER' + defaultValue + necessity + index;
typeFunc.castType = 'INTEGER';
const typeFunc = (necessity, index, defaultValue = ' DEFAULT FALSE') => 'BOOLEAN' + defaultValue + necessity + index;
typeFunc.castType = 'BOOLEAN';
exports.types = {

@@ -16,3 +16,3 @@ postgres: typeFunc,

};
const fetchProcessing = (data) => data === 1;
const fetchProcessing = (data) => data === true || data === 1;
exports.fetchProcessing = fetchProcessing;

@@ -24,4 +24,4 @@ exports.validate = TypeUtils.validate.checkRequired((originalValue) => {

}
return value;
return value === 1;
});
//# sourceMappingURL=boolean.js.map
{
"name": "@balena/sbvr-types",
"version": "3.4.2",
"version": "4.0.0-true-boolean-4d20b304f0092f3c3bbe389588059c11e679e08d",
"description": "SBVR type definitions.",

@@ -18,3 +18,3 @@ "main": "out",

"dependencies": {
"@types/bcrypt": "^3.0.0",
"@types/bcrypt": "^3.0.1",
"@types/sha.js": "^2.4.0"

@@ -28,3 +28,3 @@ },

"devDependencies": {
"@balena/lint": "^5.4.1",
"@balena/lint": "^5.4.2",
"@types/lodash": "^4.14.168",

@@ -41,3 +41,3 @@ "bluebird": "^3.7.2",

"require-npm4-to-publish": "^1.0.0",
"typescript": "^4.2.3"
"typescript": "^4.2.4"
},

@@ -44,0 +44,0 @@ "husky": {

@@ -6,5 +6,5 @@ import * as TypeUtils from '../type-utils';

index: string,
defaultValue = ' DEFAULT 0',
) => 'INTEGER' + defaultValue + necessity + index;
typeFunc.castType = 'INTEGER';
defaultValue = ' DEFAULT FALSE',
) => 'BOOLEAN' + defaultValue + necessity + index;
typeFunc.castType = 'BOOLEAN';

@@ -20,3 +20,4 @@ export const types = {

export const fetchProcessing = (data: any) => data === 1;
// `BOOLEAN` on sqlite/websql is just an alias for `INTEGER` hence the `=== 1` check
export const fetchProcessing = (data: any) => data === true || data === 1;

@@ -33,3 +34,3 @@ export const validate = TypeUtils.validate.checkRequired((originalValue) => {

}
return value;
return value === 1;
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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