From a7a4d664cd629b3b96370c188696e1e8e8cee88a Mon Sep 17 00:00:00 2001 From: Nemikolh Date: Fri, 29 Jan 2021 20:53:09 +0000 Subject: [PATCH] Fix lint issue. --- .github/workflows/npm-publish.yml | 3 ++- CHANGELOG.md | 4 ++++ package.json | 2 +- src/index.ts | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 32e0a1a..d06b6dc 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -33,6 +33,7 @@ jobs: node-version: 12 registry-url: https://registry.npmjs.org/ - run: yarn + - run: yarn run build - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/CHANGELOG.md b/CHANGELOG.md index 79701b8..edd5bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Version 0.4.6 + + No API changes + # Version 0.4.5 * Add support for dictionaries: arbitrary keys with a validated type. diff --git a/package.json b/package.json index 3d017f8..e5447b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typesafe-schema", - "version": "0.4.5", + "version": "0.4.6", "description": "Validate your data and get a well typed value out of it!", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/index.ts b/src/index.ts index cff812f..6ad2a78 100644 --- a/src/index.ts +++ b/src/index.ts @@ -426,6 +426,7 @@ function validateObject(value: any, schema: T, path: string, stri if (typeofVal !== 'object') { return error(path, `Expected dictionary (object) got '${typeofVal}'`); } + // tslint:disable-next-line: forin for (const prop in value) { const res = validateObject(value[prop], schema.elementSchema, path + '[' + prop + ']', strict); if (res.type === 'error') {