Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dex4er committed Jun 4, 2019
1 parent b78fb79 commit f23016b
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 44 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,8 +1,10 @@
*-ts.js

*.d.ts
*.gz
*.lock
*.log
*.map
*.out
*.tgz

Expand Down
8 changes: 8 additions & 0 deletions .nycrc.json
@@ -0,0 +1,8 @@
{
"all": true,
"cache": false,
"extension": [".ts"],
"exclude": ["**/*.d.ts", "examples/**"],
"include": ["**/*.ts"],
"sourceMap": true
}
15 changes: 8 additions & 7 deletions .travis.yml
Expand Up @@ -5,20 +5,21 @@ language: node_js
matrix:
include:
- node_js: "node"
env: NPM_RUN_SCRIPT=test NPM_AUDIT=true MOCHA_ARGS="-- --node-arg=--pending-deprecation --node-arg=--throw-deprecation" NYC="nyc --reporter json"
env: NPM_PACK=yes NPM_AUDIT=yes NYC="nyc --no-clean --reporter=lcov"
- node_js: "10"
- node_js: "8"
- node_js: "6"

install:
- set -e
- npm install
- if [ "$NPM_AUDIT" = true ]; then npm audit; fi
- if [ -n "$NPM_AUDIT" ]; then npm audit; fi

script:
- echo "--reporter dot --color" > test/mocha.opts
- npm run build
- $NYC npm run ${NPM_RUN_SCRIPT:-test:spec} -- ${MOCHA_ARGS}
- if [ -n "$NYC" ]; then nyc report --color && nyc report --reporter=text-lcov | coveralls; fi
- if [ -n "$NPM_PACK" ]; then npm pack; fi
- npm run test:spec
- if [ -n "$NYC" ]; then npx nyc report --color && npx nyc report --reporter=text-lcov | npx coveralls; fi
- git diff --stat --exit-code
- for f in $(git ls-files --others --exclude-standard); do git diff --no-index --stat --exit-code /dev/null $next; done
- npm run clean
- git add .
- git diff-index --quiet HEAD
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog

## v4.0.1 2019-06-04

- Minor tweaks in README.
- Added source map to the package.

## v4.0.0 2019-05-10

- Rewritten in Typescript.
Expand Down
55 changes: 25 additions & 30 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "promise-socket",
"version": "4.0.0",
"version": "4.0.1",
"description": "Return promise for socket stream",
"main": "lib/promise-socket.js",
"typings": "lib/promise-socket.d.ts",
Expand All @@ -23,55 +23,50 @@
"node": ">=6.0.0"
},
"dependencies": {
"promise-duplex": "^4.0.2",
"promise-duplex": "^4.0.3",
"tslib": "^1.9.3"
},
"devDependencies": {
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.6",
"@types/node": "^12.0.0",
"@types/mocha": "^5.2.7",
"@types/node": "^12.0.4",
"@types/readline-transform": "^0.9.1",
"chai": "^4.2.0",
"coveralls": "^3.0.3",
"cross-env": "^5.2.0",
"delay": "^4.2.0",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.2.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-node": "^9.0.1",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-promise": "^4.1.1",
"markdownlint-cli": "^0.15.0",
"markdownlint-cli": "^0.16.0",
"mocha": "^6.1.4",
"nyc": "^14.1.1",
"prettier": "^1.17.0",
"promise-readable": "^4.2.0",
"promise-writable": "^4.1.0",
"prettier": "^1.17.1",
"promise-readable": "^4.2.1",
"promise-writable": "^4.1.1",
"readline-transform": "^0.9.0",
"shx": "^0.3.2",
"source-map-support": "^0.5.12",
"ts-node": "^8.1.0",
"tslint": "^5.16.0",
"ts-node": "^8.2.0",
"tslint": "^5.17.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.4.5"
"typescript": "^3.5.1"
},
"scripts": {
"build": "npm run compile",
"compile": "tsc --pretty",
"clean": "shx rm -rf lib",
"compile": "tsc --pretty --project .",
"clean": "npm run clean:compile && npm run clean:coverage",
"clean:compile": "shx rm -rf lib",
"clean:coverage": "shx rm -rf coverage .nyc_output",
"lint": "npm run compile && tsc --pretty -p examples && tsc --pretty -p test && eslint . && tslint -t stylish -p . && tslint -t stylish -p examples && tslint -t stylish -p test && prettier --ignore-path .gitignore --list-different '**/*.{js,json,md,ts,yml}' && markdownlint \"*.md\"",
"postpublish": "git tag v$npm_package_version -a -m \"Release v$npm_package_version\" && git push --tags",
"prepack": "npm run build",
"pretest": "npm run build && tsc --pretty -p examples && tsc --pretty -p test && eslint . && tslint -t stylish -p . && tslint -t stylish -p examples && tslint -t stylish -p test && prettier --ignore-path .gitignore --list-different '**/*.js' '**/*.json' '**/*.md' '**/*.ts' '**/*.yml' && markdownlint \"*.md\"",
"prepack": "npm run compile",
"prepublishOnly": "npm run test",
"pretest": "npm run lint",
"test": "npm run test:spec",
"test:spec": "npm run ts-mocha -- \"test/*.ts\"",
"test:coverage": "nyc --reporter json npm run test:spec && nyc report",
"ts-mocha": "mocha --use_strict --throw-deprecation --require source-map-support/register --require ts-node/register --timeout 90000"
},
"nyc": {
"extension": [
".ts"
],
"exclude": [
".*.js",
"**/*.d.ts"
]
"test:coverage": "npm run clean:coverage && cross-env NYC=\"nyc --no-clean --reporter=lcov\" npm run test:spec && nyc report --reporter=text-summary --color",
"ts-mocha": "$NYC mocha --use_strict --throw-deprecation --require source-map-support/register --require ts-node/register --timeout 90000"
}
}
6 changes: 0 additions & 6 deletions test/lib/steps.ts
Expand Up @@ -18,9 +18,3 @@ export function Then(what: string, how: (done: Mocha.Done) => void): Mocha.Test
export function And(what: string, how: (done: Mocha.Done) => void): Mocha.Test {
return it("And " + what, how)
}
export function Before(callback: (this: Mocha.Context, done: Mocha.Done) => any): void {
before(callback)
}
export function After(callback: (this: Mocha.Context, done: Mocha.Done) => any): void {
after(callback)
}
3 changes: 2 additions & 1 deletion tsconfig.json
Expand Up @@ -10,8 +10,9 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "./lib",
"target": "es6",
"sourceMap": true,
"strict": true,
"target": "es6",
"typeRoots": ["node_modules/@types"]
},
"exclude": ["./examples/**/*", "./lib/**/*", "./test/**/*"]
Expand Down

0 comments on commit f23016b

Please sign in to comment.