Skip to content

Commit 0a24227

Browse files
authored
Merge pull request #1 from nuteee/release-please-and-pre-commit
2 parents 17b4aeb + c264b3b commit 0a24227

File tree

10 files changed

+403
-63
lines changed

10 files changed

+403
-63
lines changed

.github/hooks/commit-msg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
# File generated by pre-commit: https://pre-commit.com
3+
# ID: 138fd403232d2ddd5efb44317e38bf03
4+
5+
# start templated
6+
INSTALL_PYTHON=/usr/local/opt/pre-commit/libexec/bin/python3
7+
ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=commit-msg)
8+
# end templated
9+
10+
HERE="$(cd "$(dirname "$0")" && pwd)"
11+
ARGS+=(--hook-dir "$HERE" -- "$@")
12+
13+
if [ -x "$INSTALL_PYTHON" ]; then
14+
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
15+
elif command -v pre-commit > /dev/null; then
16+
exec pre-commit "${ARGS[@]}"
17+
else
18+
echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2
19+
exit 1
20+
fi

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
types: [ assigned, opened, synchronize, reopened, labeled ]
7+
8+
name: ci
9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
12+
jobs:
13+
14+
test:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node: [ 22 ]
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node }}
24+
- run: npm install -g npm@8
25+
- run: node --version
26+
- run: yarn
27+
- run: yarn test:unit

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/release-please.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: release-please
6+
permissions: { }
7+
jobs:
8+
release-please:
9+
permissions:
10+
contents: write # to create release commit (google-github-actions/release-please-action)
11+
pull-requests: write # to create release PR (google-github-actions/release-please-action)
12+
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: google-github-actions/release-please-action@v4
16+
id: release
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
release-type: node
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v3
22+
if: ${{ steps.release.outputs.release_created }}
23+
with:
24+
node-version: 22
25+
registry-url: https://registry.npmjs.org/
26+
- run: yarn
27+
if: ${{ steps.release.outputs.release_created }}
28+
- run: yarn publish
29+
if: ${{ steps.release.outputs.release_created }}
30+
env:
31+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.gitignore

Lines changed: 270 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,271 @@
11
tests/**/*
2-
node_modules
3-
dist/
4-
.DS_Store
2+
.DS_Store
3+
4+
# Created by https://www.toptal.com/developers/gitignore/api/node,yarn,intellij+all,visualstudiocode
5+
# Edit at https://www.toptal.com/developers/gitignore?templates=node,yarn,intellij+all,visualstudiocode
6+
7+
### Intellij+all ###
8+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
9+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
10+
11+
# User-specific stuff
12+
.idea/**/workspace.xml
13+
.idea/**/tasks.xml
14+
.idea/**/usage.statistics.xml
15+
.idea/**/dictionaries
16+
.idea/**/shelf
17+
18+
# AWS User-specific
19+
.idea/**/aws.xml
20+
21+
# Generated files
22+
.idea/**/contentModel.xml
23+
24+
# Sensitive or high-churn files
25+
.idea/**/dataSources/
26+
.idea/**/dataSources.ids
27+
.idea/**/dataSources.local.xml
28+
.idea/**/sqlDataSources.xml
29+
.idea/**/dynamic.xml
30+
.idea/**/uiDesigner.xml
31+
.idea/**/dbnavigator.xml
32+
33+
# Gradle
34+
.idea/**/gradle.xml
35+
.idea/**/libraries
36+
37+
# Gradle and Maven with auto-import
38+
# When using Gradle or Maven with auto-import, you should exclude module files,
39+
# since they will be recreated, and may cause churn. Uncomment if using
40+
# auto-import.
41+
# .idea/artifacts
42+
# .idea/compiler.xml
43+
# .idea/jarRepositories.xml
44+
# .idea/modules.xml
45+
# .idea/*.iml
46+
# .idea/modules
47+
# *.iml
48+
# *.ipr
49+
50+
# CMake
51+
cmake-build-*/
52+
53+
# Mongo Explorer plugin
54+
.idea/**/mongoSettings.xml
55+
56+
# File-based project format
57+
*.iws
58+
59+
# IntelliJ
60+
out/
61+
62+
# mpeltonen/sbt-idea plugin
63+
.idea_modules/
64+
65+
# JIRA plugin
66+
atlassian-ide-plugin.xml
67+
68+
# Cursive Clojure plugin
69+
.idea/replstate.xml
70+
71+
# SonarLint plugin
72+
.idea/sonarlint/
73+
74+
# Crashlytics plugin (for Android Studio and IntelliJ)
75+
com_crashlytics_export_strings.xml
76+
crashlytics.properties
77+
crashlytics-build.properties
78+
fabric.properties
79+
80+
# Editor-based Rest Client
81+
.idea/httpRequests
82+
83+
# Android studio 3.1+ serialized cache file
84+
.idea/caches/build_file_checksums.ser
85+
86+
### Intellij+all Patch ###
87+
# Ignore everything but code style settings and run configurations
88+
# that are supposed to be shared within teams.
89+
90+
.idea/*
91+
92+
!.idea/codeStyles
93+
!.idea/runConfigurations
94+
95+
### Node ###
96+
# Logs
97+
logs
98+
*.log
99+
npm-debug.log*
100+
yarn-debug.log*
101+
yarn-error.log*
102+
lerna-debug.log*
103+
.pnpm-debug.log*
104+
105+
# Diagnostic reports (https://nodejs.org/api/report.html)
106+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
107+
108+
# Runtime data
109+
pids
110+
*.pid
111+
*.seed
112+
*.pid.lock
113+
114+
# Directory for instrumented libs generated by jscoverage/JSCover
115+
lib-cov
116+
117+
# Coverage directory used by tools like istanbul
118+
coverage
119+
*.lcov
120+
121+
# nyc test coverage
122+
.nyc_output
123+
124+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
125+
.grunt
126+
127+
# Bower dependency directory (https://bower.io/)
128+
bower_components
129+
130+
# node-waf configuration
131+
.lock-wscript
132+
133+
# Compiled binary addons (https://nodejs.org/api/addons.html)
134+
build/Release
135+
136+
# Dependency directories
137+
node_modules/
138+
jspm_packages/
139+
140+
# Snowpack dependency directory (https://snowpack.dev/)
141+
web_modules/
142+
143+
# TypeScript cache
144+
*.tsbuildinfo
145+
146+
# Optional npm cache directory
147+
.npm
148+
149+
# Optional eslint cache
150+
.eslintcache
151+
152+
# Optional stylelint cache
153+
.stylelintcache
154+
155+
# Microbundle cache
156+
.rpt2_cache/
157+
.rts2_cache_cjs/
158+
.rts2_cache_es/
159+
.rts2_cache_umd/
160+
161+
# Optional REPL history
162+
.node_repl_history
163+
164+
# Output of 'npm pack'
165+
*.tgz
166+
167+
# Yarn Integrity file
168+
.yarn-integrity
169+
170+
# dotenv environment variable files
171+
.env
172+
.env.development.local
173+
.env.test.local
174+
.env.production.local
175+
.env.local
176+
177+
# parcel-bundler cache (https://parceljs.org/)
178+
.cache
179+
.parcel-cache
180+
181+
# Next.js build output
182+
.next
183+
out
184+
185+
# Nuxt.js build / generate output
186+
.nuxt
187+
dist
188+
189+
# Gatsby files
190+
.cache/
191+
# Comment in the public line in if your project uses Gatsby and not Next.js
192+
# https://nextjs.org/blog/next-9-1#public-directory-support
193+
# public
194+
195+
# vuepress build output
196+
.vuepress/dist
197+
198+
# vuepress v2.x temp and cache directory
199+
.temp
200+
201+
# Docusaurus cache and generated files
202+
.docusaurus
203+
204+
# Serverless directories
205+
.serverless/
206+
207+
# FuseBox cache
208+
.fusebox/
209+
210+
# DynamoDB Local files
211+
.dynamodb/
212+
213+
# TernJS port file
214+
.tern-port
215+
216+
# Stores VSCode versions used for testing VSCode extensions
217+
.vscode-test
218+
219+
# yarn v2
220+
.yarn/cache
221+
.yarn/unplugged
222+
.yarn/build-state.yml
223+
.yarn/install-state.gz
224+
.pnp.*
225+
226+
### Node Patch ###
227+
# Serverless Webpack directories
228+
.webpack/
229+
230+
# Optional stylelint cache
231+
232+
# SvelteKit build / generate output
233+
.svelte-kit
234+
235+
### VisualStudioCode ###
236+
.vscode/*
237+
!.vscode/settings.json
238+
!.vscode/tasks.json
239+
!.vscode/launch.json
240+
!.vscode/extensions.json
241+
!.vscode/*.code-snippets
242+
243+
# Local History for Visual Studio Code
244+
.history/
245+
246+
# Built Visual Studio Code Extensions
247+
*.vsix
248+
249+
### VisualStudioCode Patch ###
250+
# Ignore all local history of files
251+
.history
252+
.ionide
253+
254+
### yarn ###
255+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
256+
257+
.yarn/*
258+
!.yarn/releases
259+
!.yarn/patches
260+
!.yarn/plugins
261+
!.yarn/sdks
262+
!.yarn/versions
263+
264+
# if you are NOT using Zero-installs, then:
265+
# comment the following lines
266+
!.yarn/cache
267+
268+
# and uncomment the following lines
269+
# .pnp.*
270+
271+
# End of https://www.toptal.com/developers/gitignore/api/node,yarn,intellij+all,visualstudiocode

0 commit comments

Comments
 (0)