create-node-lib 2.5.1 → 2.7.0
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/CODEOWNERS +1 -0
- package/.github/workflows/main.yml +16 -16
- package/__tests__/generator.test.js +6 -6
- package/package.json +33 -30
- package/saofile.js +15 -19
- package/template/.github/.markdownlint.yml +9 -0
- package/template/.github/CODEOWNERS +1 -0
- package/template/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +9 -5
- package/template/.github/ISSUE_TEMPLATE/1-bug-report.yml +31 -0
- package/template/.github/ISSUE_TEMPLATE/2-feature-request.yml +23 -0
- package/template/.github/dependabot.yml +38 -0
- package/template/.github/labeler.yml +20 -0
- package/template/.github/workflows/ci.yml +49 -0
- package/template/.github/workflows/labeler.yml +12 -0
- package/template/.github/workflows/links-checker-schedule.yml +28 -0
- package/template/.github/workflows/lock-threads.yml +34 -0
- package/template/.github/workflows/markdown-lint.yml +26 -0
- package/template/.github/workflows/release.yml +38 -0
- package/template/.husky/commit-msg +1 -1
- package/template/README.md +8 -17
- package/template/RELEASE.md +42 -0
- package/template/SECURITY.md +14 -5
- package/template/__tests__/app.test.ts +17 -0
- package/template/eslint.config.js +32 -0
- package/template/package.json +52 -176
- package/template/src/bin/cli.ts +12 -0
- package/template/src/main.ts +3 -0
- package/template/tsconfig.json +37 -0
- package/template/tsup.config.ts +29 -0
- package/template/.github/ISSUE_TEMPLATE/1-bug-report.md +0 -44
- package/template/.github/ISSUE_TEMPLATE/2-feature-request.md +0 -19
- package/template/.github/workflows/main.yml +0 -53
- package/template/__tests__/app.test.js +0 -5
- package/template/bin/cli.js +0 -4
- package/template/gitignore +0 -110
- package/template/src/main.js +0 -5
- /package/template/{CODE_OF_CONDUCT.md → .github/CODE_OF_CONDUCT.md} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @lirantal
|
|
@@ -7,12 +7,12 @@ jobs:
|
|
|
7
7
|
# name: Lint
|
|
8
8
|
# runs-on: 'ubuntu-latest'
|
|
9
9
|
# steps:
|
|
10
|
-
# - uses: actions/checkout@
|
|
11
|
-
# - uses: actions/setup-node@
|
|
10
|
+
# - uses: actions/checkout@v3
|
|
11
|
+
# - uses: actions/setup-node@v3
|
|
12
12
|
# with:
|
|
13
|
-
# node-version: '
|
|
13
|
+
# node-version: '18'
|
|
14
14
|
# - name: install dependencies
|
|
15
|
-
# run: npm ci
|
|
15
|
+
# run: npm ci --audit false
|
|
16
16
|
# - name: lint code
|
|
17
17
|
# run: npm run lint
|
|
18
18
|
|
|
@@ -20,22 +20,22 @@ jobs:
|
|
|
20
20
|
strategy:
|
|
21
21
|
matrix:
|
|
22
22
|
platform: [ubuntu-latest]
|
|
23
|
-
node: ['
|
|
23
|
+
node: ['16', '18']
|
|
24
24
|
name: Tests - Node ${{ matrix.node }} (${{ matrix.platform }})
|
|
25
25
|
runs-on: ${{ matrix.platform }}
|
|
26
26
|
steps:
|
|
27
|
-
- uses: actions/checkout@
|
|
28
|
-
- uses: actions/setup-node@
|
|
27
|
+
- uses: actions/checkout@v3
|
|
28
|
+
- uses: actions/setup-node@v3
|
|
29
29
|
with:
|
|
30
30
|
node-version: ${{ matrix.node }}
|
|
31
31
|
- name: install dependencies
|
|
32
|
-
run: npm ci --ignore-engines
|
|
32
|
+
run: npm ci --ignore-engines --audit false
|
|
33
33
|
- name: run tests
|
|
34
34
|
run: npm run test
|
|
35
|
-
- name: code coverage report
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
# - name: code coverage report
|
|
36
|
+
# run: npx codecov
|
|
37
|
+
# env:
|
|
38
|
+
# CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
|
|
39
39
|
|
|
40
40
|
release:
|
|
41
41
|
name: do semantic release
|
|
@@ -43,12 +43,12 @@ jobs:
|
|
|
43
43
|
needs: build
|
|
44
44
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
45
45
|
steps:
|
|
46
|
-
- uses: actions/checkout@
|
|
47
|
-
- uses: actions/setup-node@
|
|
46
|
+
- uses: actions/checkout@v3
|
|
47
|
+
- uses: actions/setup-node@v3
|
|
48
48
|
with:
|
|
49
|
-
node-version: '
|
|
49
|
+
node-version: '18'
|
|
50
50
|
- name: install dependencies
|
|
51
|
-
run: npm ci --ignore-engines --only=production
|
|
51
|
+
run: npm ci --ignore-engines --only=production --audit false
|
|
52
52
|
- name: release
|
|
53
53
|
run: npx semantic-release
|
|
54
54
|
env:
|
|
@@ -8,10 +8,12 @@ describe('all the template files are accountable for', () => {
|
|
|
8
8
|
jest.setTimeout(15000)
|
|
9
9
|
const stream = await sao.mock({ generator: template })
|
|
10
10
|
expect(stream.fileList).toContain('.github/ISSUE_TEMPLATE.md')
|
|
11
|
-
expect(stream.fileList).toContain('.github/ISSUE_TEMPLATE/1-bug-report.
|
|
12
|
-
expect(stream.fileList).toContain('.github/ISSUE_TEMPLATE/2-feature-request.
|
|
11
|
+
expect(stream.fileList).toContain('.github/ISSUE_TEMPLATE/1-bug-report.yml')
|
|
12
|
+
expect(stream.fileList).toContain('.github/ISSUE_TEMPLATE/2-feature-request.yml')
|
|
13
13
|
expect(stream.fileList).toContain('.github/ISSUE_TEMPLATE/3-help.md')
|
|
14
14
|
expect(stream.fileList).toContain('.github/PULL_REQUEST_TEMPLATE.md')
|
|
15
|
+
expect(stream.fileList).toContain('.github/CODE_OF_CONDUCT.md')
|
|
16
|
+
expect(stream.fileList).toContain('.github/CONTRIBUTING.md')
|
|
15
17
|
})
|
|
16
18
|
|
|
17
19
|
test('generator contains project files', async () => {
|
|
@@ -26,12 +28,10 @@ describe('all the template files are accountable for', () => {
|
|
|
26
28
|
expect(stream.fileList).toContain('.gitignore')
|
|
27
29
|
expect(stream.fileList).toContain('.prettierignore')
|
|
28
30
|
expect(stream.fileList).toContain('.prettierrc.json')
|
|
29
|
-
expect(stream.fileList).toContain('.github/workflows/
|
|
30
|
-
expect(stream.fileList).toContain('CODE_OF_CONDUCT.md')
|
|
31
|
-
expect(stream.fileList).toContain('CONTRIBUTING.md')
|
|
31
|
+
expect(stream.fileList).toContain('.github/workflows/ci.yml')
|
|
32
32
|
expect(stream.fileList).toContain('LICENSE')
|
|
33
33
|
expect(stream.fileList).toContain('README.md')
|
|
34
|
-
expect(stream.fileList).toContain('__tests__/app.test.
|
|
34
|
+
expect(stream.fileList).toContain('__tests__/app.test.ts')
|
|
35
35
|
expect(stream.fileList).toContain('package.json')
|
|
36
36
|
})
|
|
37
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-node-lib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Scaffolding out a Node.js library module",
|
|
5
5
|
"bin": "./bin/cli.js",
|
|
6
6
|
"engines": {
|
|
@@ -43,36 +43,36 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"sao": "^1.7.1",
|
|
46
|
-
"validate-npm-package-name": "^
|
|
46
|
+
"validate-npm-package-name": "^5.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@commitlint/cli": "^
|
|
50
|
-
"@commitlint/config-conventional": "^
|
|
51
|
-
"@semantic-release/changelog": "^
|
|
52
|
-
"@semantic-release/commit-analyzer": "^
|
|
53
|
-
"@semantic-release/git": "^
|
|
54
|
-
"@semantic-release/github": "^
|
|
55
|
-
"@semantic-release/npm": "^
|
|
56
|
-
"@semantic-release/release-notes-generator": "^
|
|
49
|
+
"@commitlint/cli": "^17.4.2",
|
|
50
|
+
"@commitlint/config-conventional": "^17.4.2",
|
|
51
|
+
"@semantic-release/changelog": "^6.0.2",
|
|
52
|
+
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
53
|
+
"@semantic-release/git": "^10.0.1",
|
|
54
|
+
"@semantic-release/github": "^8.0.7",
|
|
55
|
+
"@semantic-release/npm": "^9.0.2",
|
|
56
|
+
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
57
57
|
"babel-eslint": "^10.0.1",
|
|
58
58
|
"babel-plugin-syntax-async-functions": "^6.13.0",
|
|
59
59
|
"babel-plugin-transform-regenerator": "^6.26.0",
|
|
60
|
-
"babel-preset-env": "^1.
|
|
60
|
+
"babel-preset-env": "^1.7.0",
|
|
61
61
|
"decompress": "^4.2.1",
|
|
62
|
-
"eslint": "^
|
|
63
|
-
"eslint-config-standard": "^
|
|
64
|
-
"eslint-plugin-import": "^2.
|
|
65
|
-
"eslint-plugin-jest": "^
|
|
66
|
-
"eslint-plugin-node": "^
|
|
67
|
-
"eslint-plugin-promise": "^
|
|
68
|
-
"eslint-plugin-security": "^1.
|
|
69
|
-
"eslint-plugin-standard": "^4.
|
|
70
|
-
"husky": "^
|
|
71
|
-
"jest": "^
|
|
72
|
-
"lint-staged": "^
|
|
73
|
-
"lockfile-lint": "^
|
|
74
|
-
"open-cli": "^
|
|
75
|
-
"prettier": "^
|
|
62
|
+
"eslint": "^8.33.0",
|
|
63
|
+
"eslint-config-standard": "^17.0.0",
|
|
64
|
+
"eslint-plugin-import": "^2.27.5",
|
|
65
|
+
"eslint-plugin-jest": "^27.2.1",
|
|
66
|
+
"eslint-plugin-node": "^11.1.0",
|
|
67
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
68
|
+
"eslint-plugin-security": "^1.7.1",
|
|
69
|
+
"eslint-plugin-standard": "^4.1.0",
|
|
70
|
+
"husky": "^8.0.3",
|
|
71
|
+
"jest": "^29.4.1",
|
|
72
|
+
"lint-staged": "^13.1.0",
|
|
73
|
+
"lockfile-lint": "^4.10.0",
|
|
74
|
+
"open-cli": "^7.1.0",
|
|
75
|
+
"prettier": "^2.8.3"
|
|
76
76
|
},
|
|
77
77
|
"jest": {
|
|
78
78
|
"testEnvironment": "node",
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"collectCoverage": true,
|
|
82
82
|
"coverageThreshold": {
|
|
83
83
|
"global": {
|
|
84
|
-
"branches":
|
|
85
|
-
"functions":
|
|
86
|
-
"lines":
|
|
87
|
-
"statements":
|
|
84
|
+
"branches": 50,
|
|
85
|
+
"functions": 50,
|
|
86
|
+
"lines": 50,
|
|
87
|
+
"statements": 50
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"testPathIgnorePatterns": [
|
|
@@ -214,5 +214,8 @@
|
|
|
214
214
|
}
|
|
215
215
|
],
|
|
216
216
|
"@semantic-release/github"
|
|
217
|
-
]
|
|
217
|
+
],
|
|
218
|
+
"peerDependencies": {
|
|
219
|
+
"node-notifier": "^10.0.1"
|
|
220
|
+
}
|
|
218
221
|
}
|
package/saofile.js
CHANGED
|
@@ -6,7 +6,10 @@ const SUPPORTED_NPM_CLIENTS = ['npm', 'yarn']
|
|
|
6
6
|
module.exports = {
|
|
7
7
|
description: 'Scaffolding out a node library.',
|
|
8
8
|
templateData: {
|
|
9
|
-
year: new Date().getFullYear()
|
|
9
|
+
year: new Date().getFullYear(),
|
|
10
|
+
npmClientInstall: ({ npmClient }) => {
|
|
11
|
+
return npmClient === 'npm' ? 'install' : 'add'
|
|
12
|
+
}
|
|
10
13
|
},
|
|
11
14
|
prompts() {
|
|
12
15
|
return [
|
|
@@ -30,12 +33,12 @@ module.exports = {
|
|
|
30
33
|
{
|
|
31
34
|
name: 'description',
|
|
32
35
|
message: 'How would you describe the new project',
|
|
33
|
-
default:
|
|
36
|
+
default: ''
|
|
34
37
|
},
|
|
35
38
|
{
|
|
36
39
|
name: 'keywords',
|
|
37
40
|
message: 'Comma-separated list of package keywords for npm',
|
|
38
|
-
default:
|
|
41
|
+
default: ''
|
|
39
42
|
},
|
|
40
43
|
{
|
|
41
44
|
name: 'author',
|
|
@@ -90,22 +93,15 @@ module.exports = {
|
|
|
90
93
|
] = `lockfile-lint --path ${lockfile} --validate-https --allowed-hosts npm yarn`
|
|
91
94
|
return data
|
|
92
95
|
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
type: 'modify',
|
|
96
|
-
files: 'package.json',
|
|
97
|
-
handler(data, filepath) {
|
|
98
|
-
data.files = ['src']
|
|
99
|
-
return data
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
type: 'move',
|
|
104
|
-
patterns: {
|
|
105
|
-
gitignore: '.gitignore'
|
|
106
|
-
// '_package.json': 'package.json'
|
|
107
|
-
}
|
|
108
96
|
}
|
|
97
|
+
// we already have the .gitignore file as part of the template/ directory
|
|
98
|
+
// {
|
|
99
|
+
// type: 'move',
|
|
100
|
+
// patterns: {
|
|
101
|
+
// gitignore: '.gitignore'
|
|
102
|
+
// // '_package.json': 'package.json'
|
|
103
|
+
// }
|
|
104
|
+
// }
|
|
109
105
|
]
|
|
110
106
|
},
|
|
111
107
|
async completed() {
|
|
@@ -113,6 +109,6 @@ module.exports = {
|
|
|
113
109
|
await this.npmInstall({ npmClient: this.answers.npmClient })
|
|
114
110
|
this.showProjectTips()
|
|
115
111
|
|
|
116
|
-
this.logger.tip(
|
|
112
|
+
this.logger.tip('You\'re all setup. hack away!')
|
|
117
113
|
}
|
|
118
114
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @<%= username %>
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
|
|
4
4
|
|
|
5
|
-
The following is a set of guidelines for contributing to
|
|
6
|
-
These are mostly guidelines, not rules. Use your best judgment, and feel free
|
|
5
|
+
The following is a set of guidelines for contributing to this project.
|
|
6
|
+
These are mostly guidelines, not rules. Use your best judgment, and feel free
|
|
7
|
+
to propose changes to this document in a pull request.
|
|
7
8
|
|
|
8
9
|
## Code of Conduct
|
|
9
10
|
|
|
10
|
-
This project and everyone participating in it is governed by a
|
|
11
|
+
This project and everyone participating in it is governed by a
|
|
12
|
+
[Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to
|
|
13
|
+
uphold this code.
|
|
11
14
|
|
|
12
|
-
## How to contribute to
|
|
15
|
+
## How to contribute to this project
|
|
13
16
|
|
|
14
17
|
<!-- TODO -->
|
|
15
18
|
|
|
@@ -25,4 +28,5 @@ npm run test
|
|
|
25
28
|
|
|
26
29
|
### Commit Guidelines
|
|
27
30
|
|
|
28
|
-
The project uses the commitizen tool for standardizing changelog style commit
|
|
31
|
+
The project uses the commitizen tool for standardizing changelog style commit
|
|
32
|
+
and a git pre-commit hook to enforce them.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
body:
|
|
2
|
+
- attributes:
|
|
3
|
+
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
|
|
4
|
+
label: Bug Report Checklist
|
|
5
|
+
options:
|
|
6
|
+
- label: I have pulled the latest `main` branch of the repository.
|
|
7
|
+
required: true
|
|
8
|
+
- label: I have [searched for related issues](https://github.com/<%= username %>/<%= projectName %>/issues?q=is%3Aissue) and found none that matched my issue.
|
|
9
|
+
required: true
|
|
10
|
+
type: checkboxes
|
|
11
|
+
- attributes:
|
|
12
|
+
description: What did you expect to happen?
|
|
13
|
+
label: Expected
|
|
14
|
+
type: textarea
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
- attributes:
|
|
18
|
+
description: What happened instead?
|
|
19
|
+
label: Actual
|
|
20
|
+
type: textarea
|
|
21
|
+
validations:
|
|
22
|
+
required: true
|
|
23
|
+
- attributes:
|
|
24
|
+
description: Any additional info you'd like to provide.
|
|
25
|
+
label: Additional Info
|
|
26
|
+
type: textarea
|
|
27
|
+
description: Report a bug trying to run the code
|
|
28
|
+
labels:
|
|
29
|
+
- "type: bug"
|
|
30
|
+
name: 🐛 Bug
|
|
31
|
+
title: "🐛 Bug: <short description of the bug>"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
body:
|
|
2
|
+
- attributes:
|
|
3
|
+
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
|
|
4
|
+
label: Bug Report Checklist
|
|
5
|
+
options:
|
|
6
|
+
- label: I have pulled the latest `main` branch of the repository.
|
|
7
|
+
required: true
|
|
8
|
+
type: checkboxes
|
|
9
|
+
- attributes:
|
|
10
|
+
description: What did you expect to be able to do? Please describe the problem you are trying to solve.
|
|
11
|
+
label: Overview
|
|
12
|
+
type: textarea
|
|
13
|
+
validations:
|
|
14
|
+
required: true
|
|
15
|
+
- attributes:
|
|
16
|
+
description: Any additional info you'd like to provide.
|
|
17
|
+
label: Additional Info
|
|
18
|
+
type: textarea
|
|
19
|
+
description: Request that a new feature be added or an existing feature improved
|
|
20
|
+
labels:
|
|
21
|
+
- "type: feature"
|
|
22
|
+
name: 🚀 Feature
|
|
23
|
+
title: "🚀 Feature: <short description of the feature>"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
directory: ".github/workflows"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "monthly"
|
|
7
|
+
commit-message:
|
|
8
|
+
# Prefix all commit messages with "chore: "
|
|
9
|
+
prefix: "chore"
|
|
10
|
+
open-pull-requests-limit: 10
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: "npm"
|
|
13
|
+
directory: "/"
|
|
14
|
+
commit-message:
|
|
15
|
+
# Prefix all commit messages with "chore: "
|
|
16
|
+
prefix: "chore"
|
|
17
|
+
schedule:
|
|
18
|
+
interval: "weekly"
|
|
19
|
+
open-pull-requests-limit: 10
|
|
20
|
+
groups:
|
|
21
|
+
# Production dependencies without breaking changes
|
|
22
|
+
dependencies:
|
|
23
|
+
dependency-type: "production"
|
|
24
|
+
update-types:
|
|
25
|
+
- "minor"
|
|
26
|
+
- "patch"
|
|
27
|
+
# Production dependencies with breaking changes
|
|
28
|
+
dependencies-major:
|
|
29
|
+
dependency-type: "production"
|
|
30
|
+
update-types:
|
|
31
|
+
- "major"
|
|
32
|
+
# Development dependencies
|
|
33
|
+
dev-dependencies:
|
|
34
|
+
dependency-type: "development"
|
|
35
|
+
# example for ignoring dependencies:
|
|
36
|
+
# ignore:
|
|
37
|
+
# - dependency-name: tap
|
|
38
|
+
# update-types: ["version-update:semver-major"]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
documentation:
|
|
2
|
+
- changed-files:
|
|
3
|
+
- any-glob-to-any-file:
|
|
4
|
+
- "docs/*"
|
|
5
|
+
- "**/*.md"
|
|
6
|
+
- "guides/*"
|
|
7
|
+
|
|
8
|
+
build:
|
|
9
|
+
- changed-files:
|
|
10
|
+
- any-glob-to-any-file: ".github/workflows/*"
|
|
11
|
+
|
|
12
|
+
typescript:
|
|
13
|
+
- changed-files:
|
|
14
|
+
- any-glob-to-any-file: "**/*[.|-]d.ts"
|
|
15
|
+
|
|
16
|
+
cli:
|
|
17
|
+
- any: ["bin/**/*", "cli/**/*"]
|
|
18
|
+
|
|
19
|
+
test:
|
|
20
|
+
- any: ["test/**/*", "__tests__/**/*"]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
strategy:
|
|
8
|
+
matrix:
|
|
9
|
+
node: ["18.x", "20.x", "22.0.0"]
|
|
10
|
+
platform: [ubuntu-latest]
|
|
11
|
+
name: Node v${{matrix.node}} ((${{matrix.platform}}))
|
|
12
|
+
runs-on: ${{matrix.platform}}
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: ${{matrix.node}}
|
|
18
|
+
- name: install dependencies
|
|
19
|
+
run: npm ci
|
|
20
|
+
- name: lint code
|
|
21
|
+
run: npm run lint
|
|
22
|
+
- name: build project
|
|
23
|
+
run: npm run build
|
|
24
|
+
- name: run tests
|
|
25
|
+
run: npm run test
|
|
26
|
+
- name: coverage
|
|
27
|
+
uses: codecov/codecov-action@v4
|
|
28
|
+
if: github.actor != 'dependabot[bot]'
|
|
29
|
+
with:
|
|
30
|
+
fail_ci_if_error: true
|
|
31
|
+
verbose: false
|
|
32
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
33
|
+
env:
|
|
34
|
+
CI: true
|
|
35
|
+
|
|
36
|
+
release-preview:
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
needs: test
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
- uses: actions/setup-node@v4
|
|
42
|
+
with:
|
|
43
|
+
node-version: "22.0.0"
|
|
44
|
+
- name: install dependencies
|
|
45
|
+
run: npm ci
|
|
46
|
+
- name: build project
|
|
47
|
+
run: npm run build
|
|
48
|
+
- name: release preview with pkr-pr-new
|
|
49
|
+
run: npx pkg-pr-new publish
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Links Checker (On Schedule)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
repository_dispatch:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "00 18 * * *"
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
linkChecker:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Check out repo
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
persist-credentials: false
|
|
17
|
+
|
|
18
|
+
- name: Link Checker
|
|
19
|
+
id: lychee
|
|
20
|
+
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # v1.10.0
|
|
21
|
+
|
|
22
|
+
- name: Create Issue From File
|
|
23
|
+
if: env.lychee_exit_code != 0
|
|
24
|
+
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94 # v5.0.0
|
|
25
|
+
with:
|
|
26
|
+
title: Link Checker Report
|
|
27
|
+
content-filepath: ./lychee/out.md
|
|
28
|
+
labels: report, automated issue
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stale
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "9 9 * * *"
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
issues: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
stale:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
|
|
18
|
+
with:
|
|
19
|
+
close-issue-message: |
|
|
20
|
+
This issue has not seen any activity since it was marked stale.
|
|
21
|
+
Closing.
|
|
22
|
+
close-pr-message: |
|
|
23
|
+
This pull request has not seen any activity since it was marked stale.
|
|
24
|
+
Closing.
|
|
25
|
+
exempt-issue-labels: good-first-issue,need-help,no-stale,pinned,security
|
|
26
|
+
exempt-pr-labels: "autorelease: pending,good-first-issue,need-help,no-stale,pinned,security"
|
|
27
|
+
stale-issue-label: stale
|
|
28
|
+
stale-issue-message: |
|
|
29
|
+
This issue is stale because it has been open 60 days with no activity.
|
|
30
|
+
Remove stale label or comment or this will be closed in 7 days
|
|
31
|
+
stale-pr-label: stale
|
|
32
|
+
stale-pr-message: |
|
|
33
|
+
This PR is stale because it has been open 60 days with no activity.
|
|
34
|
+
Remove stale label or comment or this will be closed in 7 days.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Markdown Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
markdown_lint:
|
|
11
|
+
name: Lint Markdown files
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Markdown Lint
|
|
17
|
+
uses: ruzickap/action-my-markdown-linter@26b4129bf0352527e60b5bd739357af63df1b7bf
|
|
18
|
+
with:
|
|
19
|
+
debug: true
|
|
20
|
+
config_file: .github/.markdownlint.yml
|
|
21
|
+
exclude: |
|
|
22
|
+
.changeset/
|
|
23
|
+
.github/
|
|
24
|
+
CODE_OF_CONDUCT.md
|
|
25
|
+
LICENSE
|
|
26
|
+
CHANGELOG.md
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write # to create release (changesets/action)
|
|
14
|
+
issues: write # to post issue comments (changesets/action)
|
|
15
|
+
pull-requests: write # to create pull request (changesets/action)
|
|
16
|
+
id-token: write # to create release (changesets/action)
|
|
17
|
+
packages: write # to publish to npm (changesets/action)
|
|
18
|
+
timeout-minutes: 20
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: 20.x
|
|
25
|
+
- name: install dependencies
|
|
26
|
+
run: npm ci
|
|
27
|
+
- name: build project
|
|
28
|
+
run: npm run build
|
|
29
|
+
- name: Create Release Pull Request or Publish to npm
|
|
30
|
+
uses: changesets/action@v1
|
|
31
|
+
with:
|
|
32
|
+
publish: npm run release
|
|
33
|
+
version: npm run version
|
|
34
|
+
commit: "chore: new release"
|
|
35
|
+
title: "chore: new release candidate"
|
|
36
|
+
env:
|
|
37
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/template/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- markdownlint-disable -->
|
|
2
2
|
|
|
3
3
|
<p align="center"><h1 align="center">
|
|
4
4
|
<%= projectName %>
|
|
@@ -18,31 +18,22 @@
|
|
|
18
18
|
<a href="./SECURITY.md"><img src="https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg" alt="Responsible Disclosure Policy" /></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<%= description %>
|
|
24
|
-
|
|
25
|
-
# Install
|
|
21
|
+
## Install
|
|
26
22
|
|
|
27
23
|
```bash
|
|
28
24
|
<%= npmClient %> <%= npmClientInstall %> <%= projectName %>
|
|
29
25
|
```
|
|
26
|
+
## Usage: CLI
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
```js
|
|
28
|
+
```bash
|
|
34
29
|
// @TODO
|
|
35
30
|
const {} = require('<%= projectName %>')
|
|
36
31
|
```
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<!-- TODO -->
|
|
41
|
-
|
|
42
|
-
# Contributing
|
|
33
|
+
## Contributing
|
|
43
34
|
|
|
44
|
-
Please consult [CONTRIBUTING](
|
|
35
|
+
Please consult [CONTRIBUTING](./.github/CONTRIBUTING.md) for guidelines on contributing to this project.
|
|
45
36
|
|
|
46
|
-
|
|
37
|
+
## Author
|
|
47
38
|
|
|
48
|
-
**<%= projectName %>** © [<%= author %>](https://github.com/<%= username %>), Released under the [Apache-2.0](./LICENSE) License.
|
|
39
|
+
**<%= projectName %>** © [<%= author %>](https://github.com/<%= username %>), Released under the [Apache-2.0](./LICENSE) License.
|