Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(main): release 1.0.0 #1

Open
wants to merge 11 commits into
base: development
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log"],
"useGitignore": true,
"language": "en",
"words": ["dataurl", "devpool", "outdir", "servedir"],
"words": ["dataurl", "devpool", "outdir", "servedir", "supabase", "ethersproject", "sonarjs"],
"dictionaries": ["typescript", "node", "software-terms"],
"import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"],
"ignoreRegExpList": ["[0-9a-fA-F]{6}"]
Expand Down
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
MY_SECRET="MY_SECRET"
SUPABASE_URL=""
SUPABASE_ANON_KEY=""
GITHUB_TOKEN=""
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
## Related Issue

<!-- Link to the issue or task (e.g., "Resolves #123" or "Resolves https://github.com/ubiquity/ts-template/issues/1") -->

## Summary

<!-- Briefly summarize the changes in this PR -->

## Proof of Fix

<!-- Attach a test URL, screenshot or video demonstrating the fix -->

## Testing Steps

<!-- Steps to test this pull request locally (include any setup or environment changes) -->

## Post-merge Steps

<!-- Any steps required after merging (e.g., run migrations, clear cache) -->
31 changes: 0 additions & 31 deletions .github/workflows/build.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/calculate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Calculate XP

on:
workflow_dispatch:
inputs:
username:
description: 'GitHub Username'
required: true
type: string
org:
description: 'GitHub Organization'
required: true
type: string
repo:
description: 'GitHub Repository'
required: true
type: string

jobs:
calculate-xp:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run CLI
run: bun src/cli.ts --user=${{ github.event.inputs.username }} --org=${{ github.event.inputs.org }} --repo=${{ github.event.inputs.repo }}
2 changes: 1 addition & 1 deletion .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up bun
uses: oven-sh/setup-bun@v2

Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/cypress-testing.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/deploy.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/jest-testing.yml

This file was deleted.

17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

## 1.0.0 (2025-03-08)


### Features

* actions ([7d57d9b](https://github.com/ubiquity/xp/commit/7d57d9bf8fd4b9b974c184c739658ed4e78c7f28))
* better log ([0b85b06](https://github.com/ubiquity/xp/commit/0b85b0607f94896ef4d1eab86f69ba239541d932))
* better readme ([58fac0c](https://github.com/ubiquity/xp/commit/58fac0c7835f7138ddef3e091b117c6d4e1737cc))
* clean ([2ffa781](https://github.com/ubiquity/xp/commit/2ffa781f195393533cf70bf6f65d94ad4881cc69))
* cli v1 ([ca4c177](https://github.com/ubiquity/xp/commit/ca4c177fa6a79af87a0d64411cbf8bad6268c7a2))
* cspell ([ea01916](https://github.com/ubiquity/xp/commit/ea01916eef9f1c33fc082570290555beb66abb1f))
* disable rule ([c038766](https://github.com/ubiquity/xp/commit/c0387661d8d996a0175062c5abe6c56b7e0bba21))
* env example ([08555c8](https://github.com/ubiquity/xp/commit/08555c8440c3fb5e58a67fa69d4b12d3f8dfc4b1))
* fix regexp ([a9ef2ea](https://github.com/ubiquity/xp/commit/a9ef2eaa723341a81b0f2953ca002ac89f5e4d45))
* link cli ([a71370d](https://github.com/ubiquity/xp/commit/a71370d33f00fc4fef8121ad7c00ca73b37833d3))
112 changes: 4 additions & 108 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,4 @@
# `@ubiquity/ts-template`

This template repository includes support for the following:

- TypeScript
- Environment Variables
- Conventional Commits
- Automatic deployment to Cloudflare Pages

## Testing

### Cypress

To test with Cypress Studio UI, run

```shell
bun run cy:open
```

Otherwise, to simply run the tests through the console, run

```shell
bun run cy:run
```

### Jest

To start Jest tests, run

```shell
bun run test
```

## Sync any repository to latest `ts-template`

A bash function that can do this for you:

```bash
#!/bin/bash
# shellcheck shell=bash

get-ts-template() {
local branch_name
branch_name=$(git rev-parse --abbrev-ref HEAD)

# Check if we're in detached HEAD state
if [ "$branch_name" = "HEAD" ]; then
echo "Error: You are in a detached HEAD state. Please checkout a branch first."
return 1
fi

# Create new branch for template merge
local merge_branch="chore/merge-${branch_name}-template"

# Check if template remote already exists
if git remote | grep -q "^template$"; then
echo "Template remote already exists, removing it first..."
git remote remove template
fi

echo "Adding template remote..."
git remote add template https://github.com/ubiquity/ts-template

echo "Fetching from template..."
if ! git fetch template development; then
echo "Error: Failed to fetch from template"
git remote remove template
return 1
fi

echo "Setting up merge branch: ${merge_branch}"
# If branch exists, delete it
if git show-ref --verify --quiet "refs/heads/${merge_branch}"; then
echo "Branch ${merge_branch} already exists, deleting it..."
git checkout "$branch_name"
git branch -D "${merge_branch}"
fi

# Create and checkout new branch
if ! git checkout -b "${merge_branch}"; then
echo "Error: Failed to create merge branch"
git remote remove template
return 1
fi

echo "Merging template changes with strategy: theirs"
if ! git merge -X theirs template/development --no-commit --allow-unrelated-histories; then
echo "Error: Merge failed"
git merge --abort
git checkout "$branch_name"
git branch -D "${merge_branch}"
git remote remove template
return 1
fi

echo "Staging all changes for review..."
git add .

echo "Success! All template changes have been merged and staged."
echo "You can now review the changes in VSCode."
echo "To apply the changes: git commit -m 'chore: merge template updates'"
echo "To undo: git reset --hard HEAD"
echo "To abort completely: git checkout $branch_name && git branch -D $merge_branch"

# Cleanup
git remote remove template
}
```
0. bun install
1. bun link
2. setup `.env`
3. xp-cli calculate --user=username --org=organization_name --repo=repository_name
28 changes: 0 additions & 28 deletions build/esbuild-build.ts

This file was deleted.

20 changes: 0 additions & 20 deletions build/esbuild-server.ts

This file was deleted.

4 changes: 0 additions & 4 deletions build/index.ts

This file was deleted.

Loading