Skip to content

Commit e484fe4

Browse files
authored
feat: rewritten in TypeScript, new API (#296)
BREAKING CHANGE: rewritten in TypeScript, new API
1 parent 5650ea9 commit e484fe4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+9066
-5584
lines changed

.clean-publish

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"withoutPublush": true,
3+
"tempDir": "package",
4+
"fields": ["tsd"]
5+
}

.commitlintrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"body-max-line-length": [0]
5+
}
6+
}

.czrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"path": "@commitlint/cz-commitlint"
3+
}

.editorconfig

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
root = true
22

33
[*]
4-
indent_style = tab
4+
indent_style = space
5+
indent_size = 2
56
charset = utf-8
67
trim_trailing_whitespace = true
78
insert_final_newline = true
8-
9-
[package.json]
10-
indent_style = space
11-
indent_size = 2
12-
13-
[*.md]
14-
indent_style = space
15-
indent_size = 4
16-
trim_trailing_whitespace = false
9+
end_of_line = lf

.eslintrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"@trigen/eslint-config",
5+
"@trigen/eslint-config/esm",
6+
"@trigen/eslint-config/typescript",
7+
"@trigen/eslint-config/typescript-requiring-type-checking",
8+
"@trigen/eslint-config/jest"
9+
],
10+
"env": {
11+
"node": true
12+
},
13+
"parserOptions": {
14+
"tsconfigRootDir": "./",
15+
"project": ["./tsconfig.json", "./test/tsconfig.json"]
16+
},
17+
"rules": {
18+
"no-console": "off"
19+
}
20+
}

.eslintrc.js

-6
This file was deleted.

.github/ISSUE_TEMPLATE/bug-report.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "🐛 Bug Report"
2+
description: "If something isn't working as expected."
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thanks for taking the time to file a bug report! Please fill out this form as completely as possible.
9+
10+
- type: checkboxes
11+
id: input1
12+
attributes:
13+
label: Would you like to work on a fix?
14+
options:
15+
- label: Check this if you would like to implement a PR, we are more than happy to help you go through the process.
16+
17+
- type: textarea
18+
attributes:
19+
label: Current and expected behavior
20+
description: A clear and concise description of what the library is doing and what you would expect.
21+
validations:
22+
required: true
23+
24+
- type: input
25+
attributes:
26+
label: Reproduction
27+
description: |
28+
Please provide issue reproduction.
29+
You can give a link to a repository with the reproduction or make a [sandbox](https://codesandbox.io/) and reproduce the issue there.
30+
validations:
31+
required: true
32+
33+
- type: input
34+
attributes:
35+
label: argue-cli version
36+
description: Which version of `argue-cli` are you using?
37+
placeholder: v0.0.0
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
attributes:
43+
label: Possible solution
44+
description: If you have suggestions on a fix for the bug.

.github/ISSUE_TEMPLATE/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "🚀 Feature Request"
2+
description: "I have a specific suggestion!"
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: Thanks for taking the time to suggest a new feature! Please fill out this form as completely as possible.
8+
9+
- type: checkboxes
10+
id: input1
11+
attributes:
12+
label: Would you like to work on this feature?
13+
options:
14+
- label: Check this if you would like to implement a PR, we are more than happy to help you go through the process.
15+
16+
- type: textarea
17+
attributes:
18+
label: What problem are you trying to solve?
19+
description: |
20+
A concise description of what the problem is.
21+
placeholder: |
22+
I have an issue when [...]
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
attributes:
28+
label: Describe the solution you'd like
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
attributes:
34+
label: Describe alternatives you've considered
35+
36+
- type: textarea
37+
attributes:
38+
label: Documentation, Adoption, Migration Strategy
39+
description: |
40+
If you can, explain how users will be able to use this and how it might be documented. Maybe a mock-up?

.github/ISSUE_TEMPLATE/question.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: "❓ Question"
2+
description: "Have a Question?"
3+
labels: ["question"]
4+
body:
5+
- type: textarea
6+
attributes:
7+
label: Describe your question
8+
validations:
9+
required: true

.github/renovate.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":preserveSemverRanges"
5+
]
6+
}

.github/workflows/checks.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Checks
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
jobs:
7+
size:
8+
runs-on: ubuntu-latest
9+
name: Checking size
10+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
11+
env:
12+
CI_JOB_NUMBER: 1
13+
steps:
14+
- name: Checkout the repository
15+
uses: actions/checkout@v2
16+
- name: Install pnpm
17+
uses: pnpm/[email protected]
18+
with:
19+
version: 6
20+
- name: Install Node.js
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: 14
24+
cache: 'pnpm'
25+
- name: Install dependencies
26+
run: pnpm install
27+
- name: Check size
28+
uses: andresz1/size-limit-action@v1
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
skip_step: install
32+
typings:
33+
runs-on: ubuntu-latest
34+
name: Checking typings
35+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
36+
steps:
37+
- name: Checkout the repository
38+
uses: actions/checkout@v2
39+
- name: Install pnpm
40+
uses: pnpm/[email protected]
41+
with:
42+
version: 6
43+
- name: Install Node.js
44+
uses: actions/setup-node@v2
45+
with:
46+
node-version: 14
47+
cache: 'pnpm'
48+
- name: Install dependencies
49+
run: pnpm install
50+
- name: Prebuild
51+
run: pnpm build
52+
- name: Check typings
53+
if: success()
54+
run: pnpm test:types

.github/workflows/ci.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
on:
3+
push:
4+
pull_request:
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
name: Running tests
9+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
10+
steps:
11+
- name: Checkout the repository
12+
uses: actions/checkout@v2
13+
- name: Install pnpm
14+
uses: pnpm/[email protected]
15+
with:
16+
version: 6
17+
- name: Install Node.js
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: 14
21+
cache: 'pnpm'
22+
- name: Install dependencies
23+
run: pnpm install
24+
- name: Run tests
25+
run: pnpm test
26+
- name: Collect coverage
27+
uses: coverallsapp/github-action@master
28+
if: success()
29+
with:
30+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/commit.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Commit
2+
on:
3+
push:
4+
jobs:
5+
conventional-commit:
6+
runs-on: ubuntu-latest
7+
name: Checking commit name
8+
steps:
9+
- name: Checkout the repository
10+
uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- name: Run commitlint
14+
uses: wagoid/commitlint-github-action@v4

.gitignore

+9-24
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,26 @@ logs
33
*.log
44
npm-debug.log*
55

6-
# Runtime data
7-
pids
8-
*.pid
9-
*.seed
10-
11-
# Directory for instrumented libs generated by jscoverage/JSCover
12-
lib-cov
13-
146
# Coverage directory used by tools like istanbul
157
coverage
16-
.nyc_output
17-
18-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
19-
.grunt
20-
21-
# node-waf configuration
22-
.lock-wscript
23-
24-
# Compiled binary addons (http://nodejs.org/api/addons.html)
25-
build/Release
268

279
# Dependency directory
2810
node_modules
2911

3012
# Optional npm cache directory
3113
.npm
3214

33-
# Optional REPL history
34-
.node_repl_history
35-
36-
# OS X stuff
15+
# OS stuff
16+
._*
3717
.DS_Store
3818

3919
# Some caches
40-
.eslintcache
20+
.*cache
4121

4222
# Compiled dist
43-
lib
23+
dist
24+
package
25+
build
26+
27+
# Env files
28+
.env

.nano-staged.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{js,ts,tsx}": "eslint --fix"
3+
}

.simple-git-hooks.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"commit-msg": "pnpm commitlint --edit \"$1\"",
3+
"pre-commit": "pnpm nano-staged",
4+
"pre-push": "pnpm test"
5+
}

.size-limit

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"path": "dist/index.cjs",
4+
"limit": "765 B"
5+
},
6+
{
7+
"path": "dist/index.js",
8+
"limit": "610 B"
9+
}
10+
]

.travis.yml

-8
This file was deleted.

LICENSE

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 TrigenSoftware
3+
Copyright (c) 2016 - present, TrigenSoftware
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
copies of the Software, and to permit persons to whom the Software is
1010
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in
13-
all copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)