Skip to content

Commit 0b60a26

Browse files
committed
chore: templat setup
1 parent d40ab0e commit 0b60a26

File tree

12 files changed

+292
-865
lines changed

12 files changed

+292
-865
lines changed

β€Ž.changeset/cuddly-seals-carry.mdβ€Ž

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

β€Ž.github/workflows/adamantite.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838

3939
- name: Setup Bun
4040
uses: oven-sh/setup-bun@v2
41+
with:
42+
bun-version: 1.3.6
4143

4244
- name: Cache dependencies
4345
uses: actions/cache@v4

β€Ž.github/workflows/build.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030

3131
- name: Setup Bun
3232
uses: oven-sh/setup-bun@v2
33+
with:
34+
bun-version: 1.3.6
3335

3436
- name: Cache dependencies
3537
uses: actions/cache@v4

β€Ž.github/workflows/release.ymlβ€Ž

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
permissions:
1111
contents: write
1212
pull-requests: write
13+
id-token: write # Required for OIDC
1314

1415
concurrency: ${{ github.workflow }}-${{ github.ref }}
1516

@@ -20,14 +21,25 @@ jobs:
2021
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2122
steps:
2223
- name: Checkout code
23-
uses: actions/checkout@v5
24+
uses: actions/checkout@v6
2425
with:
2526
fetch-depth: 0
2627

28+
# Setup Node.js to enable trusted publishing with OIDC authentication.
29+
# The registry-url configures npm to use GitHub Actions OIDC tokens for
30+
# authentication, eliminating the need for NPM_TOKEN secrets. When
31+
# changeset publish runs npm publish, it will automatically use OIDC
32+
# and generate provenance attestations.
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v6
35+
with:
36+
node-version: "24"
37+
registry-url: "https://registry.npmjs.org"
38+
2739
- name: Setup Bun
2840
uses: oven-sh/setup-bun@v2
2941
with:
30-
bun-version: 1.3.1
42+
bun-version: 1.3.6
3143

3244
- name: Install dependencies
3345
run: bun install --frozen-lockfile
@@ -36,7 +48,7 @@ jobs:
3648
run: bun run build
3749

3850
- name: Configure npm authentication
39-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
51+
run: echo '//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}' >> .npmrc
4052

4153
- name: Create Release Pull Request or Publish to npm
4254
id: changesets
@@ -47,4 +59,3 @@ jobs:
4759
title: "chore: release"
4860
env:
4961
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

β€Ž.github/workflows/test.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030

3131
- name: Setup Bun
3232
uses: oven-sh/setup-bun@v2
33+
with:
34+
bun-version: 1.3.6
3335

3436
- name: Cache dependencies
3537
uses: actions/cache@v4

β€Ž.npmrcβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
registry=https://registry.npmjs.org/
2-
access=public
2+
access=public

β€Ž.zed/settings.jsonβ€Ž

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"lsp": {
3+
"oxlint": {
4+
"initialization_options": {
5+
"settings": {
6+
"configPath": null,
7+
"fixKind": "safe_fix",
8+
"run": "onType",
9+
"typeAware": true,
10+
"unusedDisableDirectives": "deny"
11+
}
12+
}
13+
},
14+
"oxfmt": {
15+
"initialization_options": {
16+
"settings": {
17+
"configPath": null,
18+
"fmt.experimental": true,
19+
"run": "onSave",
20+
"typeAware": false,
21+
"unusedDisableDirectives": false
22+
}
23+
}
24+
}
25+
},
26+
"languages": {
27+
"JavaScript": {
28+
"format_on_save": "on",
29+
"formatter": [
30+
{ "language_server": { "name": "oxfmt" } },
31+
{ "code_action": "source.fixAll.oxc" }
32+
]
33+
},
34+
"TypeScript": {
35+
"format_on_save": "on",
36+
"formatter": [{ "language_server": { "name": "oxfmt" } }]
37+
},
38+
"TSX": {
39+
"format_on_save": "on",
40+
"formatter": [{ "language_server": { "name": "oxfmt" } }]
41+
},
42+
"JSONC": {
43+
"format_on_save": "on",
44+
"formatter": [{ "language_server": { "name": "oxfmt" } }]
45+
},
46+
"JSON": {
47+
"format_on_save": "on",
48+
"formatter": [{ "language_server": { "name": "oxfmt" } }]
49+
},
50+
"CSS": {
51+
"format_on_save": "on",
52+
"formatter": [{ "language_server": { "name": "oxfmt" } }]
53+
},
54+
"HTML": {
55+
"format_on_save": "on",
56+
"formatter": [{ "language_server": { "name": "oxfmt" } }]
57+
},
58+
"Markdown": {
59+
"format_on_save": "on",
60+
"formatter": [{ "language_server": { "name": "oxfmt" } }]
61+
},
62+
"MDX": {
63+
"format_on_save": "on",
64+
"formatter": [{ "language_server": { "name": "oxfmt" } }]
65+
},
66+
"YAML": {
67+
"format_on_save": "on",
68+
"formatter": [{ "language_server": { "name": "oxfmt" } }]
69+
}
70+
}
71+
}

β€ŽCHANGELOG.mdβ€Ž

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

β€ŽREADME.mdβ€Ž

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
<div align="center">
2-
<h1 align="center">πŸ₯ <code>pastry</code></h1>
2+
<h1 align="center">πŸ” <code>hardtry</code></h1>
33

44
<p align="center">
5-
<strong>A simple template to build libraries with Bun</strong>
5+
<strong>A better try-catch</strong>
66
</p>
77
</div>
88

9-
## What's included
10-
11-
- **[Bun](https://bun.sh)** - For running the project, scripts and tests.
12-
- **[Bunup](https://github.com/bunup/bunup)** - Build tool for built on Bun's native bundler with great DX.
13-
- **[Adamantite](https://github.com/adelrodriguez/adamantite)** - Code quality tool for linting, formatting and type checking.
14-
- **[Changesets](https://github.com/changesets/changesets)** - Versioning and changelog management.
15-
- **GitHub Actions** - CI workflow for linting, type checking, and testing; automated release workflow.
16-
- **Init script** - Interactive setup via `bun run init`.
17-
18-
## Documentation
19-
20-
- [Migrate a project](https://github.com/adelrodriguez/pastry/blob/main/docs/migrate-project.md)
9+
Made with [πŸ₯ `pastry`](https://github.com/adelrodriguez/pastry)

0 commit comments

Comments
Β (0)