Skip to content

Commit f99934f

Browse files
authored
2.0.0 Release πŸš€
* Update Readme for v2 * πŸ€– Prettier whole project * Update eslint * Update makefile * Update travis config * Refactoring listeners * Update changelog
1 parent da0e949 commit f99934f

34 files changed

+2867
-1432
lines changed

β€Ž.eslintrc.jsonβ€Ž

Lines changed: 9 additions & 248 deletions
Original file line numberDiff line numberDiff line change
@@ -1,250 +1,11 @@
11
{
2-
"env": {
3-
"node": true,
4-
"browser": false,
5-
"commonjs": true,
6-
"es6": true
7-
},
8-
"extends": "eslint:recommended",
9-
"rules": {
10-
"accessor-pairs": "error",
11-
"array-bracket-spacing": [
12-
"error",
13-
"never"
14-
],
15-
"array-callback-return": "error",
16-
"arrow-body-style": "error",
17-
"arrow-parens": "error",
18-
"arrow-spacing": "error",
19-
"block-scoped-var": "error",
20-
"block-spacing": "error",
21-
"brace-style": [
22-
"error",
23-
"1tbs"
24-
],
25-
"callback-return": "error",
26-
"camelcase": "error",
27-
"comma-dangle": "error",
28-
"comma-spacing": [
29-
"error",
30-
{
31-
"after": true,
32-
"before": false
33-
}
34-
],
35-
"comma-style": [
36-
"error",
37-
"last"
38-
],
39-
"complexity": "error",
40-
"computed-property-spacing": [
41-
"error",
42-
"never"
43-
],
44-
"consistent-return": "off",
45-
"consistent-this": "off",
46-
"curly": "error",
47-
"default-case": "error",
48-
"dot-location": "error",
49-
"dot-notation": "error",
50-
"eol-last": "off",
51-
"eqeqeq": "error",
52-
"func-names": [
53-
"error",
54-
"never"
55-
],
56-
"func-style": [
57-
"error",
58-
"expression"
59-
],
60-
"generator-star-spacing": "error",
61-
"global-require": "error",
62-
"guard-for-in": "off",
63-
"handle-callback-err": "error",
64-
"id-blacklist": "error",
65-
"id-length": "off",
66-
"id-match": "error",
67-
"indent": "error",
68-
"init-declarations": "error",
69-
"jsx-quotes": "error",
70-
"key-spacing": "error",
71-
"keyword-spacing": [
72-
"error",
73-
{
74-
"after": true,
75-
"before": true
76-
}
77-
],
78-
"linebreak-style": [
79-
"error",
80-
"unix"
81-
],
82-
"lines-around-comment": "error",
83-
"max-depth": "error",
84-
"max-len": "off",
85-
"max-lines": ["error", {"skipComments": true}],
86-
"max-nested-callbacks": "error",
87-
"max-params": "off",
88-
"max-statements": "off",
89-
"max-statements-per-line": "error",
90-
"new-cap": "error",
91-
"new-parens": "error",
92-
"newline-after-var": "off",
93-
"newline-before-return": "error",
94-
"newline-per-chained-call": "error",
95-
"no-alert": "error",
96-
"no-array-constructor": "error",
97-
"no-bitwise": "error",
98-
"no-caller": "error",
99-
"no-catch-shadow": "error",
100-
"no-confusing-arrow": "error",
101-
"no-continue": "error",
102-
"no-div-regex": "error",
103-
"no-duplicate-imports": "error",
104-
"no-else-return": "error",
105-
"no-empty-function": "error",
106-
"no-eq-null": "error",
107-
"no-eval": "error",
108-
"no-extend-native": "error",
109-
"no-extra-bind": "error",
110-
"no-extra-label": "error",
111-
"no-extra-parens": "error",
112-
"no-floating-decimal": "error",
113-
"no-implicit-coercion": "error",
114-
"no-implicit-globals": "error",
115-
"no-implied-eval": "error",
116-
"no-inline-comments": "error",
117-
"no-inner-declarations": [
118-
"error",
119-
"functions"
120-
],
121-
"no-invalid-this": "error",
122-
"no-iterator": "error",
123-
"no-label-var": "error",
124-
"no-labels": "error",
125-
"no-lone-blocks": "error",
126-
"no-lonely-if": "error",
127-
"no-loop-func": "off",
128-
"no-magic-numbers": "off",
129-
"no-mixed-operators": "off",
130-
"no-mixed-requires": "error",
131-
"no-multi-spaces": "error",
132-
"no-multi-str": "error",
133-
"no-multiple-empty-lines": "error",
134-
"no-negated-condition": "error",
135-
"no-nested-ternary": "error",
136-
"no-new": "error",
137-
"no-new-func": "error",
138-
"no-new-object": "error",
139-
"no-new-require": "error",
140-
"no-new-wrappers": "error",
141-
"no-octal-escape": "error",
142-
"no-param-reassign": "error",
143-
"no-path-concat": "error",
144-
"no-plusplus": [
145-
"error",
146-
{
147-
"allowForLoopAfterthoughts": true
148-
}
149-
],
150-
"no-process-env": "error",
151-
"no-process-exit": "error",
152-
"no-proto": "error",
153-
"no-prototype-builtins": "error",
154-
"no-restricted-globals": "error",
155-
"no-restricted-imports": "error",
156-
"no-restricted-modules": "error",
157-
"no-restricted-syntax": "error",
158-
"no-return-assign": "error",
159-
"no-script-url": "error",
160-
"no-self-compare": "error",
161-
"no-sequences": "error",
162-
"no-shadow": "off",
163-
"no-shadow-restricted-names": "error",
164-
"no-spaced-func": "error",
165-
"no-sync": "error",
166-
"no-ternary": "error",
167-
"no-throw-literal": "error",
168-
"no-trailing-spaces": "error",
169-
"no-undef-init": "error",
170-
"no-undefined": "error",
171-
"no-underscore-dangle": "off",
172-
"no-unmodified-loop-condition": "error",
173-
"no-unneeded-ternary": "error",
174-
"no-unused-expressions": "error",
175-
"no-use-before-define": "off",
176-
"no-useless-call": "error",
177-
"no-useless-computed-key": "error",
178-
"no-useless-concat": "error",
179-
"no-useless-constructor": "error",
180-
"no-useless-escape": "error",
181-
"no-useless-rename": "error",
182-
"no-var": "off",
183-
"no-void": "error",
184-
"no-warning-comments": "error",
185-
"no-whitespace-before-property": "error",
186-
"no-with": "error",
187-
"object-curly-newline": "error",
188-
"object-curly-spacing": [
189-
"error",
190-
"never"
191-
],
192-
"object-property-newline": "error",
193-
"object-shorthand": "off",
194-
"one-var": "off",
195-
"one-var-declaration-per-line": "error",
196-
"operator-assignment": "error",
197-
"operator-linebreak": "error",
198-
"padded-blocks": "off",
199-
"prefer-arrow-callback": "off",
200-
"prefer-const": "off",
201-
"prefer-reflect": "off",
202-
"prefer-rest-params": "off",
203-
"prefer-spread": "off",
204-
"prefer-template": "off",
205-
"quote-props": "off",
206-
"quotes": [
207-
"error",
208-
"single"
209-
],
210-
"radix": "error",
211-
"require-jsdoc": "error",
212-
"rest-spread-spacing": "error",
213-
"semi": "off",
214-
"semi-spacing": [
215-
"error",
216-
{
217-
"after": true,
218-
"before": false
219-
}
220-
],
221-
"sort-imports": "error",
222-
"sort-vars": "error",
223-
"space-before-blocks": "error",
224-
"space-before-function-paren": "off",
225-
"space-in-parens": [
226-
"error",
227-
"never"
228-
],
229-
"space-infix-ops": "error",
230-
"space-unary-ops": "error",
231-
"spaced-comment": "error",
232-
"strict": "error",
233-
"template-curly-spacing": [
234-
"error",
235-
"never"
236-
],
237-
"unicode-bom": [
238-
"error",
239-
"never"
240-
],
241-
"valid-jsdoc": "error",
242-
"vars-on-top": "off",
243-
"wrap-regex": "error",
244-
"yield-star-spacing": "error",
245-
"yoda": [
246-
"error",
247-
"never"
248-
]
2+
"extends": ["plugin:prettier/recommended"],
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module",
7+
"ecmaFeatures": {
8+
"modules": true
2499
}
250-
}
10+
}
11+
}

β€Ž.gitignoreβ€Ž

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
.idea
22
.DS_Store
3+
dist
34
node_modules
4-
bower_components
5-
test.js
6-
config/local.json
75
npm-debug.log
8-
coverage
6+
coverage

β€Ž.prettierrcβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"printWidth": 80,
3+
"trailingComma": "es5",
4+
"bracketSpacing": false,
5+
"quoteProps": "as-needed",
6+
"singleQuote": true,
7+
"arrowParens": "always"
8+
}

β€Ž.travis.ymlβ€Ž

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
language: node_js
22
node_js:
3-
- "6.1"
4-
- "6.0"
5-
- "5.11"
6-
- "5.10"
7-
- "5.9"
8-
- "5.8"
9-
- "5.7"
10-
- "5.6"
11-
- "5.5"
12-
- "5.4"
13-
- "5.3"
14-
- "5.2"
15-
- "5.1"
16-
- "5.0"
17-
- "4.4"
18-
- "4.3"
19-
- "4.2"
20-
- "4.1"
21-
- "4.0"
3+
- '14'
4+
- '13'
5+
- '12'
226
script:
23-
- "make lint && make test-ci"
7+
- 'make test-ci'
248
after_script:
25-
- "npm install [email protected] && cat ./coverage/lcov.info | coveralls"
9+
- 'npm install [email protected] && cat ./coverage/lcov.info | coveralls'

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,61 @@
1+
## 2.0.0
2+
3+
Migration:
4+
5+
1. Logger create
6+
7+
```diff
8+
const zerg = require('zerg');
9+
10+
+ const logger = zerg.createLogger();
11+
- const log = zerg.module('myAppModule');
12+
+ const log = logger.module('myAppModule');
13+
14+
log.verbose('verbose message');
15+
```
16+
17+
2. Transport to console
18+
19+
By default [email protected] don't have any listeners(transports)
20+
21+
```diff
22+
const zerg = require('zerg');
23+
+ const {consoleBrowserColorful} = require('zerg/dist/transports');
24+
25+
+ const listener = zerg.createListener({
26+
+ handler: consoleBrowserColorful,
27+
+ });
28+
+ const logger = zerg.createLogger();
29+
+ logger.addListener(listener);
30+
- const log = zerg.module('myAppModule');
31+
+ const log = logger.module('myAppModule');
32+
33+
log.verbose('verbose message');
34+
```
35+
36+
Changes:
37+
38+
- Refactoring to TypeScript
39+
- Remove unused code
40+
- Refactoring listeners
41+
142
## 1.8.1 (March 4, 2017)
43+
244
- Updated README.md
345

446
## 1.8.0 (November 27, 2016)
47+
548
- Added ability to specify levels logging for console transport
649

750
## 1.7.0 (November 24, 2016)
51+
852
- Fixed bud with zerg.enable(['-moduleName']), it should disable only one module
953
- Prettified tests
1054

1155
## 1.6.0 (November 21, 2016)
56+
1257
- Refactored zerg.enable modules (boost)
1358

1459
## 1.5.0 (November 18, 2016)
15-
- Returned to ES5 for support old browsers
60+
61+
- Returned to ES5 for support old browsers

β€ŽMakefileβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
NPM_BIN=./node_modules/.bin
2-
LINT_SPEC= *.js ./src ./test ./benchmark ./example
3-
TEST_SPEC=-S --ui bdd --timeout 5000 --recursive test/ --colors --reporter spec
2+
LINT_SPEC='./src/**/*.ts'
3+
TEST_SPEC=-r ts-node/register -S --ui bdd --timeout 5000 --recursive test/**/*.spec.ts --colors --reporter spec
44

55
.PHONY: lint
66
lint:
7-
@$(NPM_BIN)/eslint --fix $(LINT_SPEC)
7+
@$(NPM_BIN)/eslint $(LINT_SPEC)
88

99
.PHONY: test
1010
test:
@@ -16,4 +16,4 @@ test-ci:
1616

1717
.PHONY: coverage
1818
coverage:
19-
@rm -rf ./coverage && $(NPM_BIN)/istanbul cover $(NPM_BIN)/_mocha -- $(TEST_SPEC)
19+
@rm -rf ./coverage && $(NPM_BIN)/istanbul cover $(NPM_BIN)/_mocha -- $(TEST_SPEC)

0 commit comments

Comments
Β (0)