Skip to content

Commit a516059

Browse files
authored
Merge pull request #6 from fells-code/dev
v1.0.4
2 parents 3cfb4c7 + c2d92df commit a516059

59 files changed

Lines changed: 10059 additions & 14778 deletions

Some content is hidden

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

.babelrc

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

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
7+
branches: ['**']
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Lint
27+
run: npm run lint
28+
29+
- name: Run Tests with Coverage
30+
run: npm test -- --coverage
31+
32+
- name: Upload coverage reports to Codecov
33+
uses: codecov/codecov-action@v5
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release-beta.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI & Beta Publish
2+
3+
on:
4+
push:
5+
branches: [dev]
6+
7+
jobs:
8+
build-and-publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
id-token: write # for npm provenance (optional)
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
registry-url: 'https://registry.npmjs.org'
22+
23+
- name: Clean install deps
24+
run: |
25+
rm -rf node_modules package-lock.json
26+
npm cache clean --force
27+
npm install --ignore-scripts=false --foreground-scripts --no-audit
28+
29+
- name: Lint
30+
run: npm run lint
31+
32+
- name: Run Tests
33+
run: npm test -- --runInBand
34+
35+
- name: Build
36+
env:
37+
npm_config_ignore_optional: 'false'
38+
run: npm run build
39+
40+
# Bump prerelease & publish
41+
- name: Version bump (beta)
42+
if: success()
43+
run: |
44+
git config user.name "github-actions[bot]"
45+
git config user.email "github-actions[bot]@users.noreply.github.com"
46+
npm version prerelease --preid=beta --no-git-tag-version
47+
echo "NEW_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
48+
49+
- name: Publish to npm (beta tag)
50+
if: success()
51+
env:
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
run: npm publish --tag beta
54+
55+
- name: Commit & push version bump
56+
if: success()
57+
run: |
58+
git add package.json package-lock.json
59+
git commit -m "ci: bump to $NEW_VERSION [beta]"
60+
git push origin dev

.github/workflows/release.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
14-
- name: Setup Node.js
15-
uses: actions/setup-node@v4
13+
- uses: actions/setup-node@v4
1614
with:
1715
node-version: 20
1816
registry-url: https://registry.npmjs.org/
19-
20-
- name: Install dependencies
21-
run: npm ci
22-
23-
- name: Run semantic release
17+
- run: npm ci
18+
- run: npm run build
19+
- name: Semantic Release (main)
2420
env:
2521
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2622
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27-
run: npx semantic-release --dry-run
23+
run: npx semantic-release

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
.vscode/
2+
.DS_Store
3+
.npmrc
4+
25
node_modules/
36
dist/
47
coverage/
5-
.DS_Store
8+
9+
!.vscode/settings.json
10+
!.vscode/extensions.json

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx commitlint --edit "$1"

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm test

.npmignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.vscode
22
coverage
3-
tests
3+
tests/
44
.babelrc
55
.gitignore
66
eslint.config.mjs
77
jest.config.jest
88
package-lock.json
99
rollup.config.js
1010
tsconfig.json
11-
node_modules
11+
node_modules

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"printWidth": 90,
6+
"tabWidth": 2,
7+
"arrowParens": "avoid"
8+
}

.releaserc.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"branches": ["main"],
2+
"branches": ["main", { "name": "dev", "prerelease": "beta" }],
33
"plugins": [
44
"@semantic-release/commit-analyzer",
55
"@semantic-release/release-notes-generator",
@@ -9,13 +9,13 @@
99
],
1010
"preset": "conventionalcommits",
1111
"releaseRules": [
12-
{ "type": "build", "release": "patch" },
12+
{ "type": "build", "release": false },
1313
{ "type": "chore", "release": false },
14-
{ "type": "docs", "release": "patch" },
14+
{ "type": "docs", "release": false },
1515
{ "type": "feat", "release": "minor" },
1616
{ "type": "fix", "release": "patch" },
17-
{ "type": "perf", "release": "patch" },
18-
{ "type": "refactor", "release": "patch" },
17+
{ "type": "perf", "release": false },
18+
{ "type": "refactor", "release": false },
1919
{ "type": "style", "release": false },
2020
{ "type": "test", "release": false }
2121
],

0 commit comments

Comments
 (0)