Skip to content

Commit

Permalink
release zone-context@1.1.0 and add prettier husky auto refmt code whe…
Browse files Browse the repository at this point in the history
…n git commit
  • Loading branch information
hufeng committed Mar 27, 2019
1 parent dfbc699 commit 156a969
Show file tree
Hide file tree
Showing 4 changed files with 266 additions and 7 deletions.
9 changes: 8 additions & 1 deletion package.json
Expand Up @@ -20,7 +20,9 @@
"jest": "^21.2.1",
"ts-jest": "^21.2.2",
"typescript": "2.9.2",
"uuid": "3.2.1"
"uuid": "3.2.1",
"pretty-quick": "^1.10.0",
"husky": "^1.3.1"
},
"jest": {
"transform": {
Expand All @@ -45,5 +47,10 @@
"bracketSpacing": false,
"singleQuote": true,
"trailingComma": "all"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}
4 changes: 2 additions & 2 deletions packages/zone-context/package.json
@@ -1,6 +1,6 @@
{
"name": "zone-context",
"version": "1.0.0",
"version": "1.1.0",
"description": "zone node async-hook",
"main": "./lib/index.js",
"types": "./lib/typings/index.d.ts",
Expand All @@ -9,4 +9,4 @@
"Nodejs ThreadLocal"
],
"license": "Apache Licence 2.0"
}
}
2 changes: 1 addition & 1 deletion packages/zone-context/src/index.ts
Expand Up @@ -106,7 +106,7 @@ export class ZoneContext {

let ids = this.getRootAsyncIdLinks(asyncId);
let value = undefined;
for (let i = 0,iLen=ids.length ; i < iLen ; i++) {
for (let i = 0, iLen = ids.length; i < iLen; i++) {
let contextMap = this.rootMap.get(ids[i]);
if (contextMap[key]) {
value = contextMap[key];
Expand Down

0 comments on commit 156a969

Please sign in to comment.