Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug #559

Closed
wants to merge 255 commits into from
Closed

Debug #559

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
255 commits
Select commit Hold shift + click to select a range
d13c335
Merge pull request #364 from CHWYH/wyh_dev
timcui Dec 3, 2019
364c6aa
docs: replace CI badge to Github Actions building status
xuqingkuang Dec 18, 2019
17bcfd7
refactor: prepare for 2.0, basic lint and others
mapleeit Nov 5, 2019
6acaf83
chore: update package.json
mapleeit Nov 5, 2019
ce1e199
chore: use jest instead of mocha stuff
mapleeit Nov 14, 2019
5d7c046
feat: 添加console.hack
realyuyanan Nov 14, 2019
38269c2
feat: add console.hack.test.ts; add tsconfig.json
realyuyanan Nov 15, 2019
b51c8ec
chore: remove npmrc and travis
mapleeit Nov 15, 2019
eccfc98
feat: add dns.hack, dns.hack.test
realyuyanan Nov 15, 2019
f76ba54
style: add lint
mapleeit Nov 15, 2019
49a7470
ci: remove coverage for now
mapleeit Nov 15, 2019
69b706b
style: fix eslint
mapleeit Nov 18, 2019
25d0e7a
docs(readme): add goal and modules
mapleeit Nov 19, 2019
ff5f898
test: fix test
mapleeit Nov 19, 2019
3f84e6a
chore: remove useless files for now
mapleeit Nov 19, 2019
8b7b9c9
style(console.hack): fix lint
mapleeit Nov 19, 2019
29e7dff
test(console.hack): add more console.hack test
mapleeit Nov 19, 2019
27d339c
docs(readme): update readme
mapleeit Nov 21, 2019
1ebb599
chore(package.json): engines >= node 12
mapleeit Nov 20, 2019
8d88a91
test(console.hack): add more console.hack test
mapleeit Nov 25, 2019
b1dd30f
feat(create-server.hack): add create-server.hack
mapleeit Nov 26, 2019
9f9d0b2
docs(readme): add more modules todo
mapleeit Nov 26, 2019
b75c825
test(create-server.hack): remove open async handlers
mapleeit Nov 27, 2019
8148ba2
docs(readme): add github action badge
mapleeit Nov 27, 2019
43e921c
feat: add logger
realyuyanan Nov 26, 2019
6a9545b
feat(logger): add logger.test
realyuyanan Nov 27, 2019
5bed508
fix: fix console.hack
realyuyanan Nov 27, 2019
03b33e4
style: add description for MIT License in code file
realyuyanan Nov 28, 2019
b779e88
refactor: rename isWindows.ts to isLinux.ts
realyuyanan Nov 28, 2019
a70791a
refactor: modify lock files
mapleeit Nov 29, 2019
1ad173b
style: enable airbnb eslint
mapleeit Nov 29, 2019
f8fb3ec
docs(readme): update progress and add jest badge
mapleeit Nov 29, 2019
92fe91b
style: update copyright comments style
mapleeit Nov 29, 2019
4cec738
style: fix style
mapleeit Nov 29, 2019
8ebb7e0
refactor: rename some vars
mapleeit Nov 29, 2019
32c7de0
chore: add rules of eslint
mapleeit Nov 29, 2019
7e47561
chore: bump target of tsconfig to es2018
mapleeit Nov 29, 2019
324a542
refactor: optimize
mapleeit Nov 29, 2019
d2b9078
refactor: remove window and beforeLogClean
mapleeit Nov 29, 2019
bf56519
feat(dns.hack): add dnsRestore
mapleeit Nov 29, 2019
f813e67
refactor: remove window
mapleeit Nov 29, 2019
868f04b
feat(context): fetch context from process.domain
mapleeit Nov 29, 2019
495e13e
docs(readme): update progress
mapleeit Dec 2, 2019
a693911
test: update jest config, ignore dist folder
mapleeit Dec 2, 2019
18c6f59
chore: update outDir in tsconfig.json
mapleeit Dec 2, 2019
fd4db5e
fix: fix type.d.ts
mapleeit Dec 2, 2019
486cea3
chore: update main in package.json
mapleeit Dec 2, 2019
d5eb3b5
fix(context): return null or context instance
mapleeit Dec 2, 2019
4353674
fix(logger): fix call stack info
mapleeit Dec 2, 2019
8a19b88
fix(console.hack): use origin console when no context
mapleeit Dec 2, 2019
af3a9d6
feat(entry): add cli and index entry
mapleeit Dec 2, 2019
b2b6a17
chore: modify yarn.lock
mapleeit Dec 2, 2019
2e99707
test(console.hack): fix test
mapleeit Dec 3, 2019
09ef43d
refactor(logger): optimize
mapleeit Dec 3, 2019
5a71eaf
style: fix eslint
mapleeit Dec 3, 2019
944fa2f
ci: update actions config
mapleeit Dec 3, 2019
a38369f
feat: add capture
realyuyanan Dec 10, 2019
fc9dc8e
style: fix lint error
realyuyanan Dec 12, 2019
7da075d
docs(readme): update progress link
mapleeit Dec 3, 2019
53e69c9
refactor(dns.hack): add some coments
mapleeit Dec 4, 2019
cc634d9
feat(callinfo): retrieve relative path for callinfo
mapleeit Dec 4, 2019
c94254e
refactor(logger): optimize isInspect
mapleeit Dec 5, 2019
69b3c78
refactor(capture): a better code structure
mapleeit Dec 19, 2019
3b12a59
chore(eslint): disable import/prefer-default-export
mapleeit Dec 19, 2019
6f541c6
refactor(capture): seperate capture functions into different files
mapleeit Dec 19, 2019
9c47a48
test(caputre): add request capture test
mapleeit Dec 19, 2019
9601dfb
fix(capture): remove Unit8Array type for request._send
mapleeit Dec 20, 2019
084ba6a
test(caputre): request capture 100%
mapleeit Dec 20, 2019
01a1f9b
refactor(capture): optimize response capture
mapleeit Dec 20, 2019
0c2ca64
test(capture): add response capture test cases
mapleeit Dec 20, 2019
b2761b3
test: response capture test coverage 100%
mapleeit Dec 20, 2019
b5fb019
refactor(logger): move function position
mapleeit Dec 23, 2019
a2c4e8c
feat: log capture requests
mapleeit Dec 24, 2019
b87b5df
chore: add archiver
mapleeit Dec 24, 2019
ce37955
fix(capture): fix responseHeader end missing \r\n
mapleeit Dec 24, 2019
443baa1
fix(capture): optimize requestLog timestamps structure
mapleeit Dec 24, 2019
39ee781
fix(logger): fix double stdout when inspect
mapleeit Dec 24, 2019
413c135
feat(capture): add saz download functions
mapleeit Dec 24, 2019
9cc7036
chore: remove some comments
mapleeit Dec 24, 2019
2b9dbf0
chore: optimize logger color
mapleeit Dec 24, 2019
dbf6b22
docs(readme): optimize
mapleeit Dec 24, 2019
b2578dd
chore: git ignore yarn-error.log
mapleeit Dec 26, 2019
3864e0f
chore: disable some rules
mapleeit Dec 26, 2019
4ef1b74
refactor(capture): rename capture incoming and outgoing
mapleeit Dec 26, 2019
1ebefe8
test(dns-hack): replace event name
mapleeit Dec 26, 2019
9748be0
feat(capture): add current request capturing
mapleeit Dec 26, 2019
77d273e
feat: support config and plugins
mapleeit Dec 26, 2019
7b1ad39
fix(capture): record when response on end, not on close
mapleeit Dec 26, 2019
1e47303
fix(create-server-hack): fix response event payload
mapleeit Dec 26, 2019
b037855
test(create-server.hack): disable it until jest 25
mapleeit Dec 26, 2019
0a65569
test(capture): rename files
mapleeit Dec 26, 2019
323b30b
refactor(context): rename some fileds
mapleeit Dec 27, 2019
c6d9097
refactor: optimize
mapleeit Dec 27, 2019
cc626b9
docs(readme): add plugins
mapleeit Dec 27, 2019
5a76313
refactor: remove bin folder
mapleeit Dec 27, 2019
5513a9f
chore: version 2.0.0-alpha
mapleeit Dec 27, 2019
412aabd
2.0.0-alpha.0
mapleeit Dec 27, 2019
83d6566
Add quick start and some examples (#381)
mapleeit Jan 9, 2020
4511849
chore: add sourceMap when npm run dev
mapleeit Jan 10, 2020
9416481
fix: resolve plugins path based on entry path
mapleeit Jan 10, 2020
47f95f4
fix: wouldn't throw error when no context
mapleeit Jan 10, 2020
e8f1cd4
docs(readme): fix readme
mapleeit Feb 11, 2020
1ebe5f4
fix(examples): rename koa example
mapleeit Feb 11, 2020
a2dd667
feat(examples): add express example
mapleeit Feb 11, 2020
49a31f5
fix: optimize log display
mapleeit Feb 11, 2020
881fc1c
fix(create-server): domain.run after events, close #384
mapleeit Feb 11, 2020
e81a217
2.0.0-alpha.2
mapleeit Feb 11, 2020
edabbd2
2.0.0-alpha.3
mapleeit Feb 12, 2020
c437826
fix(create-server): should init context first, #384
mapleeit Feb 12, 2020
810c7e7
2.0.0-alpha.4
mapleeit Feb 12, 2020
3b37810
test(util): add test-unit for util
realyuyanan Feb 13, 2020
8bca1e9
test(logger): improve logger test
realyuyanan Feb 13, 2020
3270cb3
test(logger): delete test lines
realyuyanan Feb 13, 2020
352d35a
fix: add default tsw.config
Zack921 Feb 19, 2020
4568a4e
fix(isinspect): allow inspecting in default port
Zack921 Feb 25, 2020
7dee6da
add the feature of proxy and reconstruct the file of config (#393)
Zack921 Mar 10, 2020
fafa812
docs(readme): fix typo
mapleeit Mar 10, 2020
a6ba434
refactor(plugins): use plugin.init to init plugin
mapleeit Mar 10, 2020
a0e528a
fix(cli): 将默认的配置文件从 json 改为 js
mapleeit Mar 11, 2020
0d47c6c
feat(index): process.exit(-1) when plugins are unsuccessfully loaded
mapleeit Mar 11, 2020
1f3144b
fix(capture): should be able to send request when no context
mapleeit Mar 11, 2020
d67f283
chore: remove express example for now
mapleeit Mar 11, 2020
45d230b
docs(readme): update plugins docs
mapleeit Mar 11, 2020
bae5095
chore: remove native http example for now
mapleeit Mar 11, 2020
41e3cc1
fix(create-server): dont proxy when ip is not valid
mapleeit Mar 11, 2020
65eaf12
refactor(example): update koa tswconfig
mapleeit Mar 11, 2020
7d5bec4
docs(readme): fix how to use open platform plugin
mapleeit Mar 11, 2020
f82db7d
chore: update version
mapleeit Mar 11, 2020
e6bd0b4
chore(deps): bump acorn from 6.3.0 to 6.4.1
dependabot[bot] Mar 17, 2020
013ef82
fix(capture): fix when capture a transfer-encoding request
mapleeit Mar 17, 2020
0919312
2.0.0-alpha.7
mapleeit Mar 17, 2020
3a58392
2.0.0-alpha.8
mapleeit Mar 17, 2020
67a64c8
feat: support logging with winston
realyuyanan Mar 16, 2020
ec41571
test(winston): fix test error
realyuyanan Mar 17, 2020
4294bd7
docs: fix typo
mapleeit Mar 17, 2020
a500b22
fix(context): proxyIp default can not be a empty string
mapleeit Mar 19, 2020
c04f0c0
2.0.0-alpha.9
mapleeit Mar 19, 2020
d7fb0a1
fix(create-server-hack): add domain clear, avoid memory leak
mapleeit Mar 24, 2020
0f747aa
chore: format some files and remove useless file
mapleeit Mar 24, 2020
d4925b5
chore: update github actions publish flow
mapleeit Mar 24, 2020
f4f860d
chore: update release config
mapleeit Mar 24, 2020
e47d63b
2.0.0-alpha.10
mapleeit Mar 24, 2020
3ecbe09
fix: update release config
mapleeit Mar 24, 2020
a2b8b22
fix: update release config
mapleeit Mar 24, 2020
5170009
chore: add *.log to gitignore
mapleeit Mar 26, 2020
006858b
chore: update koa example
mapleeit Mar 26, 2020
e52b762
docs(readme): update how to use ts-node (#396)
Zack921 Mar 27, 2020
133a524
docs(readme): update highlights
mapleeit Mar 27, 2020
47d0b92
chore(examples): update examples koa
mapleeit Mar 31, 2020
18aa67a
fix: fix memory leak caused by parser on socket (#397)
gaoyuan123 Apr 16, 2020
52f86fc
docs(readme): add pm2 content and optimize
mapleeit Apr 17, 2020
f9f33db
docs(readme): fix format
mapleeit Apr 17, 2020
2995ef5
chore: upgrade deps for koa examples
mapleeit Apr 17, 2020
9e06d56
fix(create-server-hack): use net.isIP to detect IP format
mapleeit Apr 20, 2020
56b095a
feat(console): hack in process.stdout and process.stderr
Apr 19, 2020
60b9aea
feat: add benchmark
Zack921 Apr 22, 2020
c34c625
test: modify structure of benchmark (#401)
Zack921 Apr 23, 2020
d27009c
chore: update deps, fix security issue
mapleeit Jun 22, 2020
5888db8
chore: update jest and typescript
mapleeit Jun 22, 2020
6259735
chore(deps): bump lodash from 4.17.15 to 4.17.19 in /examples/koa
dependabot[bot] Jul 19, 2020
255fec7
chore(deps): bump lodash from 4.17.15 to 4.17.19
dependabot[bot] Jul 19, 2020
a023bfb
docs: fix typo
mapleeit Jul 27, 2020
9cd7834
fix(context): 修复单进程接受请求数没有增长的问题
mapleeit Aug 28, 2020
b5dee6b
chore: update yarn.lock to fix security problems
mapleeit Aug 28, 2020
8a99569
chore(deps): bump bl from 3.0.0 to 3.0.1 in /examples/koa
dependabot[bot] Sep 2, 2020
4a56c9f
docs: update use-open-platform outdated url
mapleeit Oct 9, 2020
3554714
chore: update deps in examples
mapleeit Oct 9, 2020
7e5ffea
chore: update deps
mapleeit Nov 24, 2020
0901a69
test: add test for create-server and patches for jest
mapleeit Nov 24, 2020
2baed8b
chore: remove dom from tsconfig.lib
mapleeit Nov 24, 2020
736620e
test: add collectCoverageFrom for jest config
mapleeit Nov 24, 2020
0b33fac
chore: add codecov to github actions
mapleeit Nov 24, 2020
cb2c7e2
docs(readme): add badge for codecov
mapleeit Nov 24, 2020
0272903
ci: add codecov on master push
mapleeit Nov 24, 2020
454f9d4
ci: add test on master push
mapleeit Nov 24, 2020
519a860
refactor: rearrange test folder
mapleeit Nov 24, 2020
3acbf96
test(cli): add test for cli
mapleeit Nov 25, 2020
e0a0429
fix(create-server-hack): use currentContext()
mapleeit Dec 2, 2020
f04a595
chore: use proxied in examples
mapleeit Dec 2, 2020
f6f5e37
fix: move 2 packages to devdeps
mapleeit Dec 2, 2020
c968308
fix: move 2 packages to deps
mapleeit Dec 2, 2020
f7e8ea3
chore: add jest-util to dependencies for now
mapleeit Dec 2, 2020
e8ea29a
fix: dev patch should add .dev
mapleeit Dec 2, 2020
cee82a3
fix: remove patches pre publish
mapleeit Dec 2, 2020
dc99126
chore: rename patch name, remove .dev suffix
mapleeit Dec 4, 2020
09c626b
test: add test for index.ts
mapleeit Dec 4, 2020
4c6cbd0
refactor: remove useless code, saz.ts
mapleeit Dec 4, 2020
dda81f4
test(create-server.hack): add more test for create-server.hack
mapleeit Dec 4, 2020
1f534c0
test: add test for capture/index.ts
mapleeit Dec 4, 2020
49d5b3e
docs(readme): remove link to 2.0 project, since its almost done
mapleeit Dec 4, 2020
edd2b54
chore(deps): bump ini from 1.3.5 to 1.3.8
dependabot[bot] Dec 12, 2020
3f62fcd
chore(deps): bump node-notifier from 8.0.0 to 8.0.1
dependabot[bot] Dec 22, 2020
1ef24fe
chore(deps): bump axios from 0.19.2 to 0.21.1 in /examples/koa
dependabot[bot] Jan 5, 2021
ddb1a94
docs(readme): Modify the payload display
kajweb Feb 20, 2021
58ac017
fix(callinfo): suppress error when CallSite.getFileName() get undefined
Mar 3, 2021
46c4e53
fix: console.hack origin parameter passed in error
Miantang Mar 4, 2021
5470ce5
feat: remove hack restore.
Mar 5, 2021
e761841
chore(deps): bump y18n from 4.0.0 to 4.0.1 in /benchmark
dependabot[bot] Mar 31, 2021
f2d86a2
chore(deps): bump y18n from 4.0.0 to 4.0.1
dependabot[bot] Mar 31, 2021
760dbbc
chore(deps): bump y18n from 4.0.0 to 4.0.1 in /examples/koa
dependabot[bot] Mar 31, 2021
4737e78
chore(deps): bump lodash from 4.17.20 to 4.17.21
dependabot[bot] May 7, 2021
4f34b9c
chore(deps): bump lodash from 4.17.20 to 4.17.21 in /examples/koa
dependabot[bot] May 7, 2021
b9566ba
chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9
dependabot[bot] May 9, 2021
2392e22
chore(benchmark): ignore result from benchmark
Zack921 May 28, 2021
89b6e70
chore(benchmark): add startup script for benchmark
Zack921 May 28, 2021
f019e72
Merge pull request #435 from Zack921/master
Zack921 May 28, 2021
c2a3cde
docs(readme): update quick start
Zack921 May 28, 2021
a9f0b7b
Merge pull request #436 from Zack921/master
Zack921 May 28, 2021
67a0ee0
chore(benchmark): update tswconfig.js for benchmark
Zack921 May 28, 2021
3544c9a
chore(benchmark): update tswconfigNoReport.js for benchmark
Zack921 May 28, 2021
2221342
Merge pull request #437 from Zack921/master
Zack921 May 29, 2021
2b21b4f
chore(deps): bump ws from 7.4.0 to 7.4.6
dependabot[bot] May 29, 2021
941876e
docs(benchmark): add the doc to run benchmark
Zack921 May 29, 2021
b57afcb
Merge pull request #439 from Zack921/master
Zack921 May 29, 2021
0b7253b
Merge pull request #438 from Tencent/dependabot/npm_and_yarn/ws-7.4.6
Zack921 May 29, 2021
5c4d88b
chore(example): update tswconfig.js for koa demo
Zack921 May 29, 2021
2e439d2
Merge pull request #440 from Zack921/master
Zack921 May 29, 2021
1a51933
test(error-plugin): fix eslint warning
Zack921 May 30, 2021
cebfa8f
Merge pull request #441 from Zack921/master
Zack921 May 30, 2021
4641807
test(normal-plugin): fix eslint warning
Zack921 May 30, 2021
4d72d2c
Merge pull request #442 from Zack921/master
Zack921 May 30, 2021
bbbc183
docs(examples): add readme for koa demo
Zack921 May 30, 2021
f3438b5
Merge pull request #444 from Zack921/master
Zack921 May 30, 2021
01b6ac1
docs(readme): update doc for tswconfig.js
Zack921 May 30, 2021
bb71394
Merge pull request #445 from Zack921/master
Zack921 May 30, 2021
494444b
docs(readme): update table format for tswconfig.js
Zack921 May 31, 2021
fed684a
Merge pull request #446 from Zack921/master
Zack921 May 31, 2021
af11558
docs(readme): add link for plugin in tswconfig.js
Zack921 May 31, 2021
c5d1bc5
Merge pull request #447 from Zack921/master
Zack921 May 31, 2021
5b7b230
test(isinspect): completed test cases
Zack921 May 31, 2021
0d64d8a
Merge pull request #448 from Zack921/master
Zack921 May 31, 2021
64e1cb5
feat: add cleanLog in tswconfig.js to hide default logs
Zack921 Jun 1, 2021
df5d5e6
fix: fixed by unit test
Zack921 Jun 1, 2021
8e4d573
refactor: refactor implementation of cleanLog
Zack921 Jun 1, 2021
037b090
Merge pull request #449 from Zack921/master
Zack921 Jun 2, 2021
6d1135f
docs(readme): update doc for cleanLog
Zack921 Jun 2, 2021
4cb4676
Merge pull request #453 from Zack921/master
Zack921 Jun 2, 2021
255b313
chore(example-koa): update dependencies of tsw and open-platform-plugin
Zack921 Jun 2, 2021
8efcb9f
Merge pull request #454 from Zack921/master
Zack921 Jun 2, 2021
f9a4653
chore: ignore node_modules in eslint
Zack921 Jun 3, 2021
fb5a5ac
Merge pull request #455 from Zack921/master
Zack921 Jun 3, 2021
e3e75b0
docs(readme): update readme
Zack921 Jun 3, 2021
b8d0e3c
docs(readme): update readme
Zack921 Jun 3, 2021
71dfcf2
Merge pull request #456 from Zack921/master
Zack921 Jun 3, 2021
40ae656
docs(readme): update readme
Zack921 Jun 4, 2021
a58a00b
docs(readme): update readme
Zack921 Jun 4, 2021
724b897
Merge pull request #457 from Zack921/master
Zack921 Jun 4, 2021
af66b5a
test(logger): add test unit for CleanLog
Zack921 Jun 6, 2021
7ea6d6f
test(logger): add test unit for CleanLog
Zack921 Jun 6, 2021
d4c1de2
Merge pull request #458 from Zack921/master
Zack921 Jun 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
6 changes: 2 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
bin/wwwroot
bin/deps
node_modules

examples
node_modules
81 changes: 81 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"extends": [
"airbnb-base",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"eslint-plugin-import",
"eslint-plugin-eslint-comments",
"eslint-plugin-jsdoc"
],
"env": {
"node": true,
"jest": true
},
"rules": {
"no-console": "off",

// 有大量对未暴露出来的属性做 hack
// 需要使用 (res as any)._send = () => {} 的方式
"no-underscore-dangle": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-param-reassign": "off",

"max-len": ["error", { "code": 80, "ignoreComments": true }],

// 不要求对 import 进行排序
"import/order": "off",

"import/no-mutable-exports": "off",

"import/prefer-default-export": "off",

// 不要求 import 的模块一定要存在, 因为有自定义的 resolve 和 alias
"import/no-unresolved": "off",

// 使用双引号
"quotes": ["error", "double"],

// 禁止多余的逗号
"comma-dangle": ["error", "never"],

// 强制要求类成员之间要保留空行, 但允许单行类成员声明之间没有空行
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],

// 强制要求多行代码块只有要保留空行
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "class", "next": "*" },
{ "blankLine": "always", "prev": "function", "next": "*" },
{ "blankLine": "always", "prev": "iife", "next": "*" },
{ "blankLine": "always", "prev": "multiline-block-like", "next": "*" },
{ "blankLine": "always", "prev": "multiline-expression", "next": "*" }
],

// 不允许使用 @deprecated 的变量或函数
"import/no-deprecated": "error",

// jsdoc @param 的名字和顺序必须和定义的一致
"jsdoc/check-param-names": "error",

// jsdoc 中 @ 开头的 tag 名称必须符合规范
"jsdoc/check-tag-names": "error",

// 不允许出现未使用的 eslint-disable
"eslint-comments/no-unused-disable": "error",

// 允许空箭头函数
"@typescript-eslint/no-empty-function": [
"error",
{ "allow": ["arrowFunctions"] }
],

// 允许 import 文件时缺失后缀
"import/extensions": "off"
}
}
169 changes: 0 additions & 169 deletions .eslintrc.json

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/lint-and-test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
pull_request:
branches:
- master
- dev
- release
- 2.0

jobs:
lint-code:
Expand All @@ -15,18 +16,18 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: '10.x'
node-version: '12.x'
- name: Install Dependencies
run: npm install
run: yarn
- name: Commit Linter
uses: wagoid/[email protected]
with:
configFile: '.commitlintrc.yml'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run ESLinter
run: npm run lint
run: yarn lint
- name: Run Tests
run: npm test
- name: Run Code Coverage
run: npm run coverage
run: yarn test
- name: codecov
uses: codecov/codecov-action@v1
21 changes: 17 additions & 4 deletions .github/workflows/publish-to-npm-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,35 @@ name: Publish to npm

on:
push:
branches: master
branches: ["master"]

jobs:
publish-to-npm-alpha:
publish-to-npm:
runs-on: ubuntu-latest
steps:
- name: Pull code
uses: actions/checkout@v1
- name: Set up node.js
uses: actions/setup-node@master
with:
node-version: '10.x'
node-version: '12.x'
- name: Install dependencies
run: npm install
run: yarn
- name: build
run: yarn build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
test:
runs-on: ubuntu-latest
steps:
- name: Pull code
uses: actions/checkout@v1
- name: Install Dependencies
run: yarn
- name: Run Tests
run: yarn test
- name: codecov
uses: codecov/codecov-action@v1
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/node_modules
.vscode
node_modules
.idea
.vscode
.DS_Store
dist
.nyc_output
/conf
/coverage
/log
coverage
*.log
benchmark/metricsResult
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

17 changes: 10 additions & 7 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"branch": "master",
"tagFormat": "v${version}",
"dryRun": false,
"debug": true,
"plugins": [
"@semantic-release/npm"
]
"branch": ["master"],
"tagFormat": "v${version}",
"dryRun": false,
"debug": true,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github"
]
}
Loading
Loading