aronrepo 1.0.1-beta.5 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CODE_OF_CONDUCT.md +124 -0
- package/.github/CONTRIBUTING.md +77 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +47 -0
- package/.github/ISSUE_TEMPLATE/docs_request.yml +24 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +19 -0
- package/.github/workflows/commit-check.yml +0 -2
- package/.github/workflows/lint.yml +0 -2
- package/.github/workflows/pull-request-title-check.yml +1 -1
- package/.github/workflows/release.yml +9 -9
- package/.github/workflows/test.yml +3 -2
- package/.github/workflows/type-check.yml +0 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +6 -2
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement. All complaints will be reviewed and investigated promptly and fairly.
|
|
62
|
+
|
|
63
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
64
|
+
|
|
65
|
+
## Enforcement Guidelines
|
|
66
|
+
|
|
67
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
68
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
69
|
+
|
|
70
|
+
### 1. Correction
|
|
71
|
+
|
|
72
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
73
|
+
unprofessional or unwelcome in the community.
|
|
74
|
+
|
|
75
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
76
|
+
clarity around the nature of the violation and an explanation of why the
|
|
77
|
+
behavior was inappropriate. A public apology may be requested.
|
|
78
|
+
|
|
79
|
+
### 2. Warning
|
|
80
|
+
|
|
81
|
+
**Community Impact**: A violation through a single incident or series
|
|
82
|
+
of actions.
|
|
83
|
+
|
|
84
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
85
|
+
interaction with the people involved, including unsolicited interaction with
|
|
86
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
87
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
88
|
+
like social media. Violating these terms may lead to a temporary or
|
|
89
|
+
permanent ban.
|
|
90
|
+
|
|
91
|
+
### 3. Temporary Ban
|
|
92
|
+
|
|
93
|
+
**Community Impact**: A serious violation of community standards, including
|
|
94
|
+
sustained inappropriate behavior.
|
|
95
|
+
|
|
96
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
97
|
+
communication with the community for a specified period of time. No public or
|
|
98
|
+
private interaction with the people involved, including unsolicited interaction
|
|
99
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
100
|
+
Violating these terms may lead to a permanent ban.
|
|
101
|
+
|
|
102
|
+
### 4. Permanent Ban
|
|
103
|
+
|
|
104
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
105
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
106
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
107
|
+
|
|
108
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
|
109
|
+
the community.
|
|
110
|
+
|
|
111
|
+
## Attribution
|
|
112
|
+
|
|
113
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
114
|
+
version 2.0, available at
|
|
115
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
116
|
+
|
|
117
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
118
|
+
enforcement ladder](https://github.com/mozilla/diversity).
|
|
119
|
+
|
|
120
|
+
[homepage]: https://www.contributor-covenant.org
|
|
121
|
+
|
|
122
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
123
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
|
124
|
+
https://www.contributor-covenant.org/translations.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
This guide follows the relevant specifications and presets of [Aronrepo](https://github.com/1aron/aronrepo):
|
|
3
|
+
|
|
4
|
+
- [Aron's Conventional Commits](https://github.com/1aron/aronrepo/tree/beta/packages/conventional-commits)
|
|
5
|
+
- [Aron's ESLint Config](https://github.com/1aron/aronrepo/tree/beta/packages/eslint-config)
|
|
6
|
+
- [Aron's Jest Preset](https://github.com/1aron/aronrepo/tree/beta/packages/jest)
|
|
7
|
+
- [Aron's Web Jest Preset](https://github.com/1aron/aronrepo/tree/beta/packages/web-jest)
|
|
8
|
+
|
|
9
|
+
## Developing
|
|
10
|
+
Split a new terminal and run `npm run dev` in the project root to watch all packages change and build:
|
|
11
|
+
```bash
|
|
12
|
+
npm run dev
|
|
13
|
+
```
|
|
14
|
+
Split a new terminal and switch to the target directory for testing to avoid running tests from other packages:
|
|
15
|
+
```bash
|
|
16
|
+
cd packages/target
|
|
17
|
+
```
|
|
18
|
+
```bash
|
|
19
|
+
npm run test -- --watch
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Testing
|
|
23
|
+
```bash
|
|
24
|
+
npm run test
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Contributing your test cases
|
|
28
|
+
Taking the [Master CSS project](https://github.com/master-co/css/tree/beta) as an example, you can freely create a file like [packages/css/tests/contributions/aron.test.ts](https://github.com/master-co/css/tree/dev/beta/packages/css/tests/contributions) for unit testing:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { testProp, testCSS } from '../src/utils/test-css'
|
|
32
|
+
|
|
33
|
+
it('should generated with `background-color:` instead of `background:`', () => {
|
|
34
|
+
testProp('bg:red', 'background-color:#d11a1e')
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it('should contain the `:hover` selector', () => {
|
|
38
|
+
testProp('fg:white:hover', '.f\\:white\\:hover:hover{color:#ffffff}')
|
|
39
|
+
})
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Commit your tests ( and create a Pull Request ):
|
|
43
|
+
```bash
|
|
44
|
+
Add @1aron tests
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Linting
|
|
48
|
+
```bash
|
|
49
|
+
npm run lint
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
To automatically fix any violations in your code:
|
|
53
|
+
```
|
|
54
|
+
npm run lint -- --fix
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Type Checking
|
|
58
|
+
```bash
|
|
59
|
+
npm run type-check
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Commit Checking
|
|
63
|
+
```bash
|
|
64
|
+
npm run commit-check
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Checking
|
|
68
|
+
You have to pass `npm run check` before submitting a pull request.
|
|
69
|
+
```bash
|
|
70
|
+
npm run check
|
|
71
|
+
```
|
|
72
|
+
The command includes all of the following checks:
|
|
73
|
+
|
|
74
|
+
## Building
|
|
75
|
+
```
|
|
76
|
+
npm run build
|
|
77
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: "🐞 Bug"
|
|
2
|
+
description: Report a bug
|
|
3
|
+
title: '🐞 '
|
|
4
|
+
labels: [bug]
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: Thanks for taking the time to make a bug report!
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Description
|
|
15
|
+
description: Please provide a detailed description to tell us what the bug is. Also tell us what is the expected behavior you think.
|
|
16
|
+
placeholder: When I am going to ... by using ..., the "..." error happens. ...
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: reproduction
|
|
22
|
+
attributes:
|
|
23
|
+
label: Reproduction
|
|
24
|
+
description: Please provide a step-by-step [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) of the bug. It helps us to efficiently track down the bug.
|
|
25
|
+
placeholder: |
|
|
26
|
+
1. ...
|
|
27
|
+
2. ...
|
|
28
|
+
3. ...
|
|
29
|
+
validations:
|
|
30
|
+
required: false
|
|
31
|
+
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: system
|
|
34
|
+
attributes:
|
|
35
|
+
label: System Informations
|
|
36
|
+
description: Please provide the system informations related to the bug. Browser, OS, Node.js, Package Manager ...
|
|
37
|
+
placeholder: |
|
|
38
|
+
Browser: Chrome 99.0.1234.56
|
|
39
|
+
OS: macOS 12.0.1 (amd64)
|
|
40
|
+
Node.js: 16.31.1
|
|
41
|
+
Package Manager: pnpm 6.32.3
|
|
42
|
+
validations:
|
|
43
|
+
required: true
|
|
44
|
+
|
|
45
|
+
- type: markdown
|
|
46
|
+
attributes:
|
|
47
|
+
value: Thank you for the bug report! We will try to investigate the bug as soon as possible.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: '📄 Documentation'
|
|
2
|
+
description: A request to update or improve documentation
|
|
3
|
+
title: '📄 '
|
|
4
|
+
labels: [documentation]
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- type: textarea
|
|
8
|
+
attributes:
|
|
9
|
+
label: What is the improvement or update you wish to see?
|
|
10
|
+
description: 'Example: I would like to see more examples of how to use the xxx. Or, the xxx docs are missing information.'
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
attributes:
|
|
15
|
+
label: Is there any context that might help us understand?
|
|
16
|
+
description: A clear description of any added context that might help us understand.
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: input
|
|
20
|
+
attributes:
|
|
21
|
+
label: Does the docs page already exist? Please link to it.
|
|
22
|
+
placeholder: https://
|
|
23
|
+
validations:
|
|
24
|
+
required: false
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: "✨ Feature"
|
|
2
|
+
description: Propose a new feature
|
|
3
|
+
title: '✨ '
|
|
4
|
+
labels: [enhancement]
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: Have a great idea for a new feature? Let us know!
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Description
|
|
15
|
+
description: |
|
|
16
|
+
Please tell us what you want to see in the next release and why you want to see it.
|
|
17
|
+
If you are going to make a pull request, please let us know your scheduling.
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
@@ -13,13 +13,6 @@ jobs:
|
|
|
13
13
|
matrix:
|
|
14
14
|
node-version: [18.12.1]
|
|
15
15
|
steps:
|
|
16
|
-
- name: Wait for required workflow to succeed
|
|
17
|
-
uses: lewagon/wait-on-check-action@v1.2.0
|
|
18
|
-
with:
|
|
19
|
-
ref: ${{ github.ref }}
|
|
20
|
-
check-regexp: test.*|check.*|commit-check.*|lint.*
|
|
21
|
-
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
-
wait-interval: 10
|
|
23
16
|
- uses: actions/checkout@v3
|
|
24
17
|
- uses: actions/setup-node@v3
|
|
25
18
|
with:
|
|
@@ -27,9 +20,16 @@ jobs:
|
|
|
27
20
|
registry-url: 'https://registry.npmjs.org'
|
|
28
21
|
cache: 'npm'
|
|
29
22
|
- run: npm ci
|
|
30
|
-
# The build is for this repo
|
|
31
23
|
- run: npm run build
|
|
32
|
-
|
|
24
|
+
|
|
25
|
+
- uses: lewagon/wait-on-check-action@v1.2.0
|
|
26
|
+
with:
|
|
27
|
+
ref: ${{ github.ref }}
|
|
28
|
+
check-regexp: test.*|check.*|commit-check.*|lint.*
|
|
29
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
wait-interval: 10
|
|
31
|
+
|
|
32
|
+
- run: npx --no -- semantic-release
|
|
33
33
|
env:
|
|
34
34
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
35
35
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -13,10 +13,12 @@ on:
|
|
|
13
13
|
jobs:
|
|
14
14
|
test:
|
|
15
15
|
timeout-minutes: 15
|
|
16
|
-
runs-on:
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
17
|
strategy:
|
|
18
18
|
matrix:
|
|
19
19
|
node-version: [18.12.1]
|
|
20
|
+
os: [ubuntu-latest, windows-latest]
|
|
21
|
+
|
|
20
22
|
steps:
|
|
21
23
|
- uses: actions/checkout@v3
|
|
22
24
|
- uses: actions/setup-node@v3
|
|
@@ -24,6 +26,5 @@ jobs:
|
|
|
24
26
|
node-version: ${{ matrix.node-version }}
|
|
25
27
|
cache: 'npm'
|
|
26
28
|
- run: npm ci
|
|
27
|
-
# The build is for this repo
|
|
28
29
|
- run: npm run build
|
|
29
30
|
- run: npm run test
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"aronrepo","license":"MIT","scripts":{"build":"esbuild src/bin/index.ts --bundle --outfile=dist/bin/index --format=cjs --minify --sourcemap --platform=node --external:esbuild --external:@master/literal --external:@techor/log --external:commitlint-config-aron --external:conventional-changelog-aron --external:eslint-config-aron --external:fs-extra --external:semantic-release-config-aron --external:commander --external:fast-glob
|
|
1
|
+
{"name":"aronrepo","license":"MIT","scripts":{"build":"esbuild src/bin/index.ts --bundle --outfile=dist/bin/index --format=cjs --minify --sourcemap --platform=node --external:esbuild --external:@master/literal --external:@techor/log --external:commitlint-config-aron --external:conventional-changelog-aron --external:eslint-config-aron --external:fs-extra --external:semantic-release-config-aron --external:commander --external:fast-glob","dev":"conc 'npm:build -- --watch'","type-check":"tsc --noEmit","test":"jest","lint":"eslint src","postinstall":"node scripts/postinstall.js"},"description":"A monorepo ecosystem integrating first-class packages and build systems 📦","author":{"name":"Aron","email":"aron@master.co","url":"http://aron.tw"},"homepage":"https://aron.tw","bugs":{"url":"https://github.com/1aron/aronrepo/issues"},"repository":{"type":"git","url":"https://github.com/1aron/aronrepo.git","directory":"packages/aronrepo"},"bin":{"aron":"./dist/bin/index"},"files":["dist","scripts",".github"],"peerDependencies":{"@types/node":"","esbuild":"","turbo":"","typescript":""},"dependencies":{"@techor/log":"","commitlint-config-aron":"^1.0.1","conventional-changelog-aron":"^1.0.1","eslint-config-aron":"^1.0.1","aron-jest":"^1.0.1","semantic-release-config-aron":"^1.0.1","@master/literal":"^1.0.11","commander":"^9.4.1","execa":"^6.1.0","fast-glob":"^3.2.12","fs-extra":"^10.1.0","normalize-path":"^3.0.0","p-all":"^4.0.0","pretty-bytes":"^6.0.0","shelljs":"^0.8.5","shx":"^0.3.4"},"devDependencies":{"dedent":"^0.7.0","pkg-types":"^1.0.1"},"version":"1.0.1"}
|
package/scripts/postinstall.js
CHANGED
|
@@ -8,8 +8,12 @@ const fs = require('fs')
|
|
|
8
8
|
const projectPath = path.resolve(process.cwd(), '../..')
|
|
9
9
|
|
|
10
10
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
shell.ls(path.join(process.cwd(), '.github')).forEach(dirName => {
|
|
12
|
+
shell.mkdir('-p', path.join(projectPath, '.github', dirName))
|
|
13
|
+
shell.ls(path.join(process.cwd(), '.github', dirName, '*.{md,yml}')).forEach(filePath => {
|
|
14
|
+
shell.ln('-sf', filePath, path.join(projectPath, '.github', dirName, path.basename(filePath)))
|
|
15
|
+
})
|
|
16
|
+
})
|
|
13
17
|
} catch (_) {
|
|
14
18
|
/* empty */
|
|
15
19
|
}
|