@waiting/shared-types
Advanced tools
Comparing version 1.1.0 to 3.1.0
@@ -0,1 +1,24 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
# 3.1.0 (2019-11-16) | ||
### Features | ||
* add types ([1a2d9cd](https://github.com/waitingsong/shared-types/commit/1a2d9cd16e93786f8a553805d0d4c872206a1704)) | ||
* change types JsonResp ([ea34168](https://github.com/waitingsong/shared-types/commit/ea341681a42e4ee0ec6de905f014d357de7b909c)) | ||
* update type JsonResp ([9700bcd](https://github.com/waitingsong/shared-types/commit/9700bcd0c934be548af715fde083e03bf4bc8dab)) | ||
### BREAKING CHANGES | ||
* use `code` instead of `err`, and generics accepts `any` | ||
# Changelog | ||
@@ -2,0 +25,0 @@ |
@@ -11,5 +11,5 @@ /** Value of key-value pairs object */ | ||
/** Custom response json data structure */ | ||
export interface JsonResp<T extends JsonType | PlainJsonValue | PlainJsonValue[] | JsonType[] = JsonType> extends JsonType { | ||
export interface JsonResp<T extends JsonType | PlainJsonValue | PlainJsonValue[] | JsonType[] | any = any> { | ||
/** 0: no error */ | ||
err: number; | ||
code: number; | ||
/** payload */ | ||
@@ -16,0 +16,0 @@ dat?: T; |
100
package.json
{ | ||
"name": "@waiting/shared-types", | ||
"author": "waiting", | ||
"version": "1.1.0", | ||
"version": "3.1.0", | ||
"description": "shared typescript types", | ||
@@ -11,5 +11,2 @@ "keywords": [ | ||
], | ||
"engines": { | ||
"node": ">=10.13.0" | ||
}, | ||
"bin": {}, | ||
@@ -30,7 +27,30 @@ "browser": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"cross-env": "6" | ||
}, | ||
"engines": { | ||
"node": ">=10.16.0" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "npm run tsc && npm run rp", | ||
"devbuild": "npm run tsc && npm run rp", | ||
"clean": "rm -rf dist/* .vscode/.tsbuildinfo .vscode/.tsbuildinfo.* ", | ||
"cov": "cross-env TS_NODE_PROJECT=test/tsconfig.json nyc mocha", | ||
"lint": "eslint --fix --cache {src,test}/**/*.ts", | ||
"lint:nofix": "eslint --cache {src,test}/**/*.ts", | ||
"rp": "rollup -c rollup.config.js", | ||
"rp:w": "npm run tsc:w | rollup -wc rollup.config.js", | ||
"test": "cross-env TS_NODE_PROJECT=test/tsconfig.json mocha --opts test/mocha.opts", | ||
"test:browser": "cd .config && npm run browser && cd ..", | ||
"tsc": "tsc -p tsconfig.json", | ||
"tsc:w": "tsc -p tsconfig.json -w" | ||
}, | ||
"nyc": { | ||
"include": [ | ||
"src/**/*.ts" | ||
], | ||
"exclude": [ | ||
"**/*.js", | ||
"**/*.test.ts", | ||
"**/*.d.ts", | ||
".githooks", | ||
@@ -40,10 +60,15 @@ "dist", | ||
"src/bin", | ||
"test*" | ||
"src/domain.ts", | ||
"src/interface.ts", | ||
"test*", | ||
"**/node_modules*", | ||
"**/*.d.ts", | ||
"**/*.js" | ||
], | ||
"extension": [ | ||
".ts", | ||
".tsx" | ||
".ts" | ||
], | ||
"reporter": [ | ||
"text-summary", | ||
"json", | ||
"html" | ||
@@ -53,56 +78,3 @@ ], | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@types/mocha": "*", | ||
"@types/node": "*", | ||
"@types/power-assert": "*", | ||
"@types/rewire": "*", | ||
"@types/rimraf": "*", | ||
"@types/yargs": "^13.0.0", | ||
"@waiting/eslint-config": "^2.1.0", | ||
"coveralls": "^3.0.5", | ||
"cross-env": "^5.2.0", | ||
"eslint": "^6.2.0", | ||
"espower-typescript": "^9.0.2", | ||
"intelli-espower-loader": "^1.0.1", | ||
"mocha": "^6.1.4", | ||
"mocha-lcov-reporter": "^1.3.0", | ||
"nyc": "^14.1.1", | ||
"power-assert": ">=1.5", | ||
"rewire": "^4.0.0", | ||
"rimraf": "^3.0.0", | ||
"rollup-plugin-commonjs": "^10.0.0", | ||
"rollup-plugin-node-resolve": "^5.0.1", | ||
"rollup-plugin-terser": "^5.0.0", | ||
"rxrunscript": "^5.2.0", | ||
"ts-node": "^8.3.0", | ||
"typescript": "^3.5.0", | ||
"yargs": "^14.0.0" | ||
}, | ||
"scripts": { | ||
"bp:add": "git remote add bp https://github.com/waitingsong/npm-base", | ||
"bp:sync": "git fetch --all -v && git merge bp/master -m \"Merge remote-tracking branch 'bp/master'\"", | ||
"build": "npm run lint && npm run tsc && npm run rp", | ||
"devbuild": "npm run clean && npm run tsc:dev && npm run rp", | ||
"clean": "rm -rf dist/* .vscode/.tsbuildinfo .vscode/.tsbuildinfo.* ", | ||
"cov": "cross-env TS_NODE_PROJECT=test/tsconfig.json nyc mocha", | ||
"cov:coveralls": "cross-env TS_NODE_PROJECT=test/tsconfig.json nyc mocha && nyc report --reporter=text-lcov | coveralls", | ||
"doc": "typedoc --includes src/", | ||
"jslint": "eslint --fix dist/**/*.js", | ||
"link_global": "npm link typescript", | ||
"lint": "eslint --fix {src,test}/**/*.ts", | ||
"postpublish": "git push origin --follow-tags", | ||
"prepublishOnly": "npm run clean && npm run build", | ||
"release": "standard-version -r", | ||
"release:first": "standard-version --first-release", | ||
"repo:init": "sh .githooks/init-repo.sh", | ||
"rp": "rollup -c rollup.config.js", | ||
"rp:w": "npm run tsc:w | rollup -wc rollup.config.js", | ||
"test": "cross-env TS_NODE_PROJECT=test/tsconfig.json mocha --opts test/mocha.opts", | ||
"test:browser": "cd .config && npm run browser && cd ..", | ||
"browser:debug": "cd .config && npm run debug && cd ..", | ||
"tsc": "tsc -p tsconfig.json", | ||
"tsc:dev": "tsc -p tsconfig.dev.json", | ||
"tsc:w": "tsc -p tsconfig.json -w" | ||
} | ||
"gitHead": "a60084fdc2ac3fd6f66d1021c834c30644144faa" | ||
} |
@@ -0,0 +0,0 @@ # [Shared-types](https://waitingsong.github.io/shared-types/) |
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
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
1
53
7848
15