Skip to content

Commit d44f7cd

Browse files
committed
Initial commit
0 parents  commit d44f7cd

File tree

11 files changed

+306
-0
lines changed

11 files changed

+306
-0
lines changed

.github/.stale.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 15
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- "discussion"
8+
- "feature request"
9+
- "bug"
10+
- "help wanted"
11+
- "plugin suggestion"
12+
- "good first issue"
13+
# Label to use when marking an issue as stale
14+
staleLabel: stale
15+
# Comment to post when marking an issue as stale. Set to `false` to disable
16+
markComment: >
17+
This issue has been automatically marked as stale because it has not had
18+
recent activity. It will be closed if no further activity occurs. Thank you
19+
for your contributions.
20+
# Comment to post when closing a stale issue. Set to `false` to disable
21+
closeComment: false

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
open-pull-requests-limit: 10
8+
9+
- package-ecosystem: "npm"
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"
13+
open-pull-requests-limit: 10

.github/tests_checker.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
comment: |
2+
Hello! Thank you for contributing!
3+
It appears that you have changed the code, but the tests that verify your change are missing. Could you please add them?
4+
fileExtensions:
5+
- '.ts'
6+
- '.js'
7+
8+
testDir: 'test'

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'docs/**'
7+
- '*.md'
8+
pull_request:
9+
paths-ignore:
10+
- 'docs/**'
11+
- '*.md'
12+
13+
jobs:
14+
test:
15+
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: package-manager-ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
pnpm:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
# Maintenance and active LTS
18+
node-version: [14, 16]
19+
os: [ubuntu-18.04]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
with:
24+
persist-credentials: false
25+
26+
- name: Use Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Install with pnpm
32+
run: |
33+
curl -L https://unpkg.com/@pnpm/self-installer | node
34+
pnpm install
35+
36+
- name: Run tests
37+
run: |
38+
pnpm run test
39+
40+
yarn:
41+
runs-on: ${{ matrix.os }}
42+
43+
strategy:
44+
matrix:
45+
# Maintenance and active LTS
46+
node-version: [14, 16]
47+
os: [ubuntu-18.04]
48+
49+
steps:
50+
- uses: actions/checkout@v3
51+
with:
52+
persist-credentials: false
53+
54+
- name: Use Node.js
55+
uses: actions/setup-node@v3
56+
with:
57+
node-version: ${{ matrix.node-version }}
58+
59+
- name: Install with yarn
60+
run: |
61+
curl -o- -L https://yarnpkg.com/install.sh | bash
62+
yarn install --ignore-engines
63+
64+
- name: Run tests
65+
run: |
66+
yarn run test
67+

.gitignore

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*
131+
132+
# Vim swap files
133+
*.swp
134+
135+
# macOS files
136+
.DS_Store
137+
138+
# lock files
139+
package-lock.json
140+
pnpm-lock.yaml
141+
yarn.lock
142+
143+
# editor files
144+
.vscode
145+
.idea

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# skeleton
2+
3+
Template repository to create standardized Fastify plugins.
4+
5+
# Getting started
6+
7+
- Click on `Use this template` above to create a new repository based on this repository.
8+
9+
# What's included?
10+
11+
1. Github CI Actions for installing, testing your package.
12+
2. Github CI Actions to validate different package managers.
13+
3. Dependabot V2 config to automate dependency updates.
14+
4. Template for the GitHub App [Stale](https://github.com/apps/stale) to mark issues as stale.
15+
5. Template for the GitHub App [tests-checker](https://github.com/apps/tests-checker) to check if a PR contains tests.
16+
17+
# Repository structure
18+
19+
```
20+
├── .github
21+
│ ├── workflows
22+
│ │ ├── ci.yml
23+
│ │ └── package-manager-ci.yml
24+
│ ├── .stale.yml
25+
│ ├── dependabot.yml
26+
│ └── tests_checker.yml
27+
28+
├── docs (Documentation)
29+
30+
├── examples (Code examples)
31+
32+
├── test (Application tests)
33+
34+
├── types (Typescript types)
35+
36+
└── README.md
37+
```

docs/.gitkeep

Whitespace-only changes.

examples/.gitkeep

Whitespace-only changes.

test/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)