Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
5 changes: 5 additions & 0 deletions .changeset/brown-timers-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'better-auth-convex': patch
---

init
99 changes: 99 additions & 0 deletions .changeset/changelog-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
const { config } = require('dotenv');
const {
getInfo,
getInfoFromPullRequest,
} = require('@changesets/get-github-info');

config();

module.exports = {
getDependencyReleaseLine: async () => {
return '';
},
getReleaseLine: async (changeset, type, options) => {
if (!options || !options.repo) {
throw new Error(
'Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]'
);
}

let prFromSummary;
let commitFromSummary;
let usersFromSummary = [];

const replacedChangelog = changeset.summary
.replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr) => {
let num = Number(pr);
if (!isNaN(num)) prFromSummary = num;
return '';
})
.replace(/^\s*commit:\s*([^\s]+)/im, (_, commit) => {
commitFromSummary = commit;
return '';
})
.replace(/^\s*(?:author|user):\s*@?([^\s]+)/gim, (_, user) => {
usersFromSummary.push(user);
return '';
})
.trim();

const [firstLine, ...futureLines] = replacedChangelog
.split('\n')
.map((l) => l.trimRight());

const links = await (async () => {
if (prFromSummary !== undefined) {
let { links } = await getInfoFromPullRequest({
repo: options.repo,
pull: prFromSummary,
});
if (commitFromSummary) {
links = {
...links,
commit: `[\`${commitFromSummary}\`](https://github.com/${options.repo}/commit/${commitFromSummary})`,
};
}
return links;
}
const commitToFetchFrom = commitFromSummary || changeset.commit;
if (commitToFetchFrom) {
let { links } = await getInfo({
repo: options.repo,
commit: commitToFetchFrom,
});
return links;
}
return {
commit: null,
pull: null,
user: null,
};
})();

const users = usersFromSummary.length
? usersFromSummary
.map(
(userFromSummary) =>
`[@${userFromSummary}](https://github.com/${userFromSummary})`
)
.join(', ')
: links.user;

const pull = links.pull === null ? '' : ` ${links.pull}`;
const commit = !!pull || links.commit === null ? '' : ` ${links.commit}`;

const prefix = [pull, commit, users === null ? '' : ` by ${users}`].join(
''
);

let lines = `${firstLine}\n${futureLines.map((l) => ` ${l}`).join('\n')}`;

if (firstLine[0] === '-') {
lines = `\n ${firstLine}\n${futureLines
.map((l) => ` ${l}`)
.join('\n')}`;
}

return `\n\n-${prefix ? `${prefix} –` : ''} ${lines}`;
},
};
9 changes: 9 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
"changelog": ["./changelog-config", { "repo": "udecode/better-auth-convex" }],
"commit": false,
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
40 changes: 40 additions & 0 deletions .github/workflows/ci-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build & Typecheck

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
cache-and-install:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: 🏗 Build
run: pnpm build

- name: 🔍 Typecheck
run: pnpm typecheck
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: ReleaseOrVersionPR

on:
push:
branches: [main]

jobs:
release:
# Basic security: the release job can only be executed from this repo and from the main branch (not a remote thing)
if: ${{ github.repository == 'udecode/better-auth-convex' && contains('refs/heads/main',github.ref)}}
name: Release and changelog
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# To run comparison we need more than the latest commit.
# @link https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
fetch-depth: 0

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

# @link https://github.com/changesets/action
- name: 🦋 Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# publish: yarn g:release
cwd: ${{ github.workspace }}
title: '[Release] Version packages'
publish: pnpm build && pnpm changeset publish
# Optional, might be used in conjunction with GITHUB_TOKEN to
# allow running the workflows on a Version package action.
# Be aware of security implications.
# setupGitUser: true
env:
# See https://github.com/changesets/action/issues/147
HOME: ${{ github.workspace }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
93 changes: 93 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
!.*

.git
**/tsconfig.tsbuildinfo
CLAUDE.local.md

# dependencies
src/generated
node_modules
/.pnp
.pnp.js
.contentlayer
.source

# testing
/coverage

# next.js
/.next/
/out/

# production
dist
/tmp
/out-tsc
**/build

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# misc
.DS_Store
*.pem

# local env files
.env*.local
convex/.env

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.vscode

# Sentry Auth Token
.sentryclirc

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# IDEs and editors
.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
.vscode/*

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.cache

.turbo

# AI Cache
.cache/
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__tests__
__test-utils__
__mocks__
Loading