@typescript-tools/io-ts
Advanced tools
Comparing version
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.1.0](https://github.com/typescript-tools/typescript-tools/compare/@typescript-tools/io-ts@1.0.4...@typescript-tools/io-ts@1.1.0) (2020-12-19) | ||
### Features | ||
* add command use-hoisted-version ([45b78bf](https://github.com/typescript-tools/typescript-tools/commit/45b78bf890fb17b6d9aa07f6ce45882ac9eaeebf)) | ||
## [1.0.4](https://github.com/typescript-tools/typescript-tools/compare/@typescript-tools/io-ts@1.0.3...@typescript-tools/io-ts@1.0.4) (2020-11-05) | ||
@@ -8,0 +19,0 @@ |
import * as t from 'io-ts'; | ||
export declare const LernaPackage: t.TypeC<{ | ||
name: t.StringC; | ||
version: t.StringC; | ||
name: t.BrandC<t.StringC, import("./PackageName").PackageNameBrand>; | ||
version: t.BrandC<t.StringC, import("./PackageVersion").PackageVersionBrand>; | ||
location: t.StringC; | ||
@@ -6,0 +6,0 @@ private: t.BooleanC; |
@@ -24,5 +24,7 @@ "use strict"; | ||
const t = __importStar(require("io-ts")); | ||
const PackageName_1 = require("./PackageName"); | ||
const PackageVersion_1 = require("./PackageVersion"); | ||
exports.LernaPackage = t.type({ | ||
name: t.string, | ||
version: t.string, | ||
name: PackageName_1.PackageName, | ||
version: PackageVersion_1.PackageVersion, | ||
location: t.string, | ||
@@ -29,0 +31,0 @@ private: t.boolean |
@@ -26,5 +26,6 @@ "use strict"; | ||
const pipeable_1 = require("fp-ts/pipeable"); | ||
exports.StringifiedJSON = (codec) => new t.Type(`StringifiedJSON`.concat(codec.name), (u) => typeof u !== 'string' | ||
const StringifiedJSON = (codec) => new t.Type(`StringifiedJSON`.concat(codec.name), (u) => typeof u !== 'string' | ||
? false | ||
: pipeable_1.pipe(E.parseJSON(u, E.toError), E.fold(() => false, codec.is)), (u, c) => E.either.chain(t.string.validate(u, c), string => pipeable_1.pipe(E.parseJSON(string, E.toError), E.fold(() => t.failure(u, c), codec.decode.bind(null)))), codec.encode); | ||
exports.StringifiedJSON = StringifiedJSON; | ||
//# sourceMappingURL=StringifiedJSON.js.map |
{ | ||
"name": "@typescript-tools/io-ts", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "Internal io-ts codecs", | ||
@@ -27,4 +27,3 @@ "scripts": { | ||
"watch:test": "nodemon -e 'ts json' -x 'npm test || true'", | ||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", | ||
"typedoc": "typedoc" | ||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov" | ||
}, | ||
@@ -67,4 +66,2 @@ "lint-staged": { | ||
"ts-node": "^9.0.0", | ||
"typedoc": "^0.19.2", | ||
"typedoc-plugin-markdown": "^3.0.11", | ||
"typescript": "^4.0.5" | ||
@@ -101,3 +98,3 @@ }, | ||
}, | ||
"gitHead": "22908ac74de3f5b123c57f69de6f09dcca060c96" | ||
"gitHead": "53bd9176fc96bf160d271212fff1a206eb0da53a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
20020
96.7%15
-11.76%27
145.45%189
182.09%