Skip to content

Commit 54e81e8

Browse files
authored
Merge pull request #1 from udecode/init
2 parents 9d0931f + 0b04b51 commit 54e81e8

33 files changed

+9432
-1
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/brown-timers-vanish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'better-auth-convex': patch
3+
---
4+
5+
init

.changeset/changelog-config.js

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
const { config } = require('dotenv');
2+
const {
3+
getInfo,
4+
getInfoFromPullRequest,
5+
} = require('@changesets/get-github-info');
6+
7+
config();
8+
9+
module.exports = {
10+
getDependencyReleaseLine: async () => {
11+
return '';
12+
},
13+
getReleaseLine: async (changeset, type, options) => {
14+
if (!options || !options.repo) {
15+
throw new Error(
16+
'Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]'
17+
);
18+
}
19+
20+
let prFromSummary;
21+
let commitFromSummary;
22+
let usersFromSummary = [];
23+
24+
const replacedChangelog = changeset.summary
25+
.replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr) => {
26+
let num = Number(pr);
27+
if (!isNaN(num)) prFromSummary = num;
28+
return '';
29+
})
30+
.replace(/^\s*commit:\s*([^\s]+)/im, (_, commit) => {
31+
commitFromSummary = commit;
32+
return '';
33+
})
34+
.replace(/^\s*(?:author|user):\s*@?([^\s]+)/gim, (_, user) => {
35+
usersFromSummary.push(user);
36+
return '';
37+
})
38+
.trim();
39+
40+
const [firstLine, ...futureLines] = replacedChangelog
41+
.split('\n')
42+
.map((l) => l.trimRight());
43+
44+
const links = await (async () => {
45+
if (prFromSummary !== undefined) {
46+
let { links } = await getInfoFromPullRequest({
47+
repo: options.repo,
48+
pull: prFromSummary,
49+
});
50+
if (commitFromSummary) {
51+
links = {
52+
...links,
53+
commit: `[\`${commitFromSummary}\`](https://github.com/${options.repo}/commit/${commitFromSummary})`,
54+
};
55+
}
56+
return links;
57+
}
58+
const commitToFetchFrom = commitFromSummary || changeset.commit;
59+
if (commitToFetchFrom) {
60+
let { links } = await getInfo({
61+
repo: options.repo,
62+
commit: commitToFetchFrom,
63+
});
64+
return links;
65+
}
66+
return {
67+
commit: null,
68+
pull: null,
69+
user: null,
70+
};
71+
})();
72+
73+
const users = usersFromSummary.length
74+
? usersFromSummary
75+
.map(
76+
(userFromSummary) =>
77+
`[@${userFromSummary}](https://github.com/${userFromSummary})`
78+
)
79+
.join(', ')
80+
: links.user;
81+
82+
const pull = links.pull === null ? '' : ` ${links.pull}`;
83+
const commit = !!pull || links.commit === null ? '' : ` ${links.commit}`;
84+
85+
const prefix = [pull, commit, users === null ? '' : ` by ${users}`].join(
86+
''
87+
);
88+
89+
let lines = `${firstLine}\n${futureLines.map((l) => ` ${l}`).join('\n')}`;
90+
91+
if (firstLine[0] === '-') {
92+
lines = `\n ${firstLine}\n${futureLines
93+
.map((l) => ` ${l}`)
94+
.join('\n')}`;
95+
}
96+
97+
return `\n\n-${prefix ? `${prefix} –` : ''} ${lines}`;
98+
},
99+
};

.changeset/config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["./changelog-config", { "repo": "udecode/better-auth-convex" }],
4+
"commit": false,
5+
"access": "public",
6+
"baseBranch": "main",
7+
"updateInternalDependencies": "patch",
8+
"ignore": []
9+
}

.github/workflows/ci-packages.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build & Typecheck
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
13+
jobs:
14+
cache-and-install:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- uses: pnpm/action-setup@v4
22+
name: Install pnpm
23+
with:
24+
version: 10
25+
run_install: false
26+
27+
- name: Install Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 22
31+
cache: 'pnpm'
32+
33+
- name: Install dependencies
34+
run: pnpm install
35+
36+
- name: 🏗 Build
37+
run: pnpm build
38+
39+
- name: 🔍 Typecheck
40+
run: pnpm typecheck

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: ReleaseOrVersionPR
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
release:
9+
# Basic security: the release job can only be executed from this repo and from the main branch (not a remote thing)
10+
if: ${{ github.repository == 'udecode/better-auth-convex' && contains('refs/heads/main',github.ref)}}
11+
name: Release and changelog
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@v4
16+
with:
17+
# To run comparison we need more than the latest commit.
18+
# @link https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
19+
fetch-depth: 0
20+
21+
- uses: pnpm/action-setup@v4
22+
name: Install pnpm
23+
with:
24+
version: 10
25+
run_install: false
26+
27+
- name: Install Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 22
31+
cache: 'pnpm'
32+
33+
- name: Install dependencies
34+
run: pnpm install
35+
36+
# @link https://github.com/changesets/action
37+
- name: 🦋 Create Release Pull Request or Publish to npm
38+
id: changesets
39+
uses: changesets/action@v1
40+
with:
41+
# publish: yarn g:release
42+
cwd: ${{ github.workspace }}
43+
title: '[Release] Version packages'
44+
publish: pnpm build && pnpm changeset publish
45+
# Optional, might be used in conjunction with GITHUB_TOKEN to
46+
# allow running the workflows on a Version package action.
47+
# Be aware of security implications.
48+
# setupGitUser: true
49+
env:
50+
# See https://github.com/changesets/action/issues/147
51+
HOME: ${{ github.workspace }}
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
!.*
2+
3+
.git
4+
**/tsconfig.tsbuildinfo
5+
CLAUDE.local.md
6+
7+
# dependencies
8+
src/generated
9+
node_modules
10+
/.pnp
11+
.pnp.js
12+
.contentlayer
13+
.source
14+
15+
# testing
16+
/coverage
17+
18+
# next.js
19+
/.next/
20+
/out/
21+
22+
# production
23+
dist
24+
/tmp
25+
/out-tsc
26+
**/build
27+
28+
# Runtime data
29+
pids
30+
*.pid
31+
*.seed
32+
*.pid.lock
33+
34+
# misc
35+
.DS_Store
36+
*.pem
37+
38+
# local env files
39+
.env*.local
40+
convex/.env
41+
42+
# vercel
43+
.vercel
44+
45+
# typescript
46+
*.tsbuildinfo
47+
next-env.d.ts
48+
49+
.vscode
50+
51+
# Sentry Auth Token
52+
.sentryclirc
53+
54+
# Directory for instrumented libs generated by jscoverage/JSCover
55+
lib-cov
56+
57+
# Coverage directory used by tools like istanbul
58+
coverage
59+
60+
# nyc test coverage
61+
.nyc_output
62+
63+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
64+
.grunt
65+
66+
# Bower dependency directory (https://bower.io/)
67+
bower_components
68+
69+
# node-waf configuration
70+
.lock-wscript
71+
72+
# IDEs and editors
73+
.idea
74+
.project
75+
.classpath
76+
.c9/
77+
*.launch
78+
.settings/
79+
*.sublime-workspace
80+
.vscode/*
81+
82+
# Logs
83+
logs
84+
*.log
85+
npm-debug.log*
86+
yarn-debug.log*
87+
yarn-error.log*
88+
*.cache
89+
90+
.turbo
91+
92+
# AI Cache
93+
.cache/

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
__tests__
2+
__test-utils__
3+
__mocks__

0 commit comments

Comments
 (0)