json-typescript
Advanced tools
Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "json-typescript", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "TypeScript type definitions for JSON objects", | ||
@@ -9,3 +9,5 @@ "main": "index.ts", | ||
"lint": "./node_modules/.bin/tslint -p .", | ||
"watch": "./node_modules/.bin/nodemon $(which npm) test" | ||
"watch": "./node_modules/.bin/nodemon $(which npm) test", | ||
"travis-deploy-once": "travis-deploy-once", | ||
"semantic-release": "semantic-release" | ||
}, | ||
@@ -27,11 +29,21 @@ "repository": { | ||
"devDependencies": { | ||
"@commitlint/cli": "7.2.1", | ||
"@commitlint/config-conventional": "7.1.2", | ||
"@commitlint/travis-cli": "7.2.1", | ||
"@mike-north/js-lib-renovate-config": "^0.0.1", | ||
"@mike-north/js-lib-semantic-release-config": "^0.0.0-development", | ||
"@types/chai": "^4.0.10", | ||
"@types/mocha": "^2.2.44", | ||
"@types/node": "^10.12.3", | ||
"chai": "^4.1.2", | ||
"chalk": "^2.3.0", | ||
"dtslint": "^0.2.0", | ||
"mocha": "^4.0.1", | ||
"dtslint": "^0.3.0", | ||
"husky": "1.1.2", | ||
"mocha": "^5.0.0", | ||
"mocha-typescript": "^1.1.12", | ||
"nodemon": "^1.17.5", | ||
"ts-node": "^4.0.1", | ||
"nyc": "^13.1.0", | ||
"semantic-release": "^15.10.8", | ||
"travis-deploy-once": "^5.0.9", | ||
"ts-node": "^7.0.1", | ||
"tsconfig": "^7.0.0", | ||
@@ -41,3 +53,16 @@ "tslint": "^5.8.0", | ||
"typings-tester": "^0.3.0" | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "./node_modules/.bin/commitlint -e $HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"release": { | ||
"extends": "@mike-north/js-lib-semantic-release-config" | ||
} | ||
} |
@@ -1,5 +0,7 @@ | ||
# JSON-typescript <a href="https://travis-ci.org/mike-north/json-typescript" align='right'><img src="https://travis-ci.org/mike-north/json-typescript.svg?branch=master"></a> | ||
# JSON-typescript | ||
TypeScript type information for compile-time validation of [JSON objects](https://www.json.org/). | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/mike-north/json-typescript.svg)](https://greenkeeper.io/) | ||
[![Build Status](https://travis-ci.org/mike-north/json-typescript.svg?branch=master)](https://travis-ci.org/mike-north/json-typescript) | ||
[![Version](https://img.shields.io/npm/v/json-typescript.svg)](https://www.npmjs.com/package/json-typescript) | ||
@@ -15,3 +17,3 @@ ## How to use this | ||
```ts | ||
import _JSON from 'json-typescript'; | ||
import * as _JSON from 'json-typescript'; | ||
``` | ||
@@ -22,6 +24,6 @@ | ||
```ts | ||
import _JSON from 'json-typescript'; | ||
import * as { Value as JSONValue, Object as JSONObject } from 'json-typescript'; | ||
// ✅ This should be OK | ||
let doc: _JSON.Value = { | ||
let doc: JSONValue = { | ||
data: { | ||
@@ -34,3 +36,3 @@ type: 'articles', | ||
// ⛔️ This should NOT be OK ( functions are not allowed ) | ||
let doc: _JSON.Value = { | ||
let doc: JSONValue = { | ||
foo() { | ||
@@ -41,4 +43,4 @@ return bar; | ||
// ⛔️ This should NOT be OK ( Array is not a JSON.Object ) | ||
let doc: _JSON.Object = []; | ||
// ⛔️ This should NOT be OK ( Array is not a JSONObject ) | ||
let doc: JSONObject = []; | ||
``` | ||
@@ -45,0 +47,0 @@ |
@@ -8,2 +8,3 @@ { | ||
"no-misused-new": false, | ||
"file-name-casing": false, | ||
@@ -10,0 +11,0 @@ // these are disabled because of rfc176 module exports |
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
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
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
284777
12
56
46
23
1