Skip to content

Commit 942e16d

Browse files
committed
Initial commit
0 parents  commit 942e16d

130 files changed

Lines changed: 33459 additions & 0 deletions

File tree

Some content is hidden

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

.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/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": ["@level0x40/react-git-docs"]
11+
}

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[Makefile]
15+
indent_style = tab
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Bug report
2+
description: Something doesn't work the way it's documented to.
3+
labels: ["bug", "needs-triage"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to file a report. Before you do, please check the [existing issues](https://github.com/level0x40/react-git/issues?q=is%3Aissue) to see if it's already been reported.
9+
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: A clear description of the bug. Include the exact error message if there is one.
15+
placeholder: When I run `react-git build .` against a bare repo, it crashes with `EPERM: operation not permitted`.
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: reproduction
21+
attributes:
22+
label: Steps to reproduce
23+
description: |
24+
The shortest path from a clean checkout of a public repo to the bug. Link to a repo or paste the commands.
25+
placeholder: |
26+
1. `git clone https://github.com/example/repo`
27+
2. `cd repo`
28+
3. `npx @level0x40/react-git build . --template primer`
29+
4. The build aborts with the error above.
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: expected
35+
attributes:
36+
label: What did you expect to happen?
37+
placeholder: The build to complete and write a static site to ./dist.
38+
validations:
39+
required: true
40+
41+
- type: input
42+
id: version
43+
attributes:
44+
label: react-git version
45+
description: Output of `npx @level0x40/react-git --version` (or "main / commit-sha" for git installs).
46+
placeholder: 0.1.0
47+
validations:
48+
required: true
49+
50+
- type: input
51+
id: node-version
52+
attributes:
53+
label: Node.js version
54+
description: Output of `node --version`.
55+
placeholder: v22.5.0
56+
validations:
57+
required: true
58+
59+
- type: dropdown
60+
id: os
61+
attributes:
62+
label: Operating system
63+
options:
64+
- macOS
65+
- Linux
66+
- Windows
67+
- Other (please describe in "Anything else")
68+
validations:
69+
required: true
70+
71+
- type: textarea
72+
id: extra
73+
attributes:
74+
label: Anything else?
75+
description: Logs, screenshots, related issues — anything that helps narrow down the cause.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Documentation
4+
url: https://react-git.level0x40.com
5+
about: The published docs cover usage, templates, the data layer, and deployment.
6+
- name: Discussions
7+
url: https://github.com/level0x40/react-git/discussions
8+
about: For open-ended questions, ideas, or showcase posts. Bug reports and feature requests should still go through the issue forms.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Feature request
2+
description: Suggest a capability, flag, template, or API the project doesn't have yet.
3+
labels: ["enhancement", "needs-triage"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Before filing, please check [open and closed issues](https://github.com/level0x40/react-git/issues?q=is%3Aissue) for prior discussion. For open-ended ideas, [Discussions](https://github.com/level0x40/react-git/discussions) is often a better starting point.
9+
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: What problem are you trying to solve?
14+
description: |
15+
Describe the situation that led you here. Concrete is better than abstract — "I want to render a contribution graph for a private mirror at $WORK" is more useful than "more visualization options".
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: proposal
21+
attributes:
22+
label: What would you like to see?
23+
description: A specific proposal — a CLI flag, a template entry, an API addition, a config option. If you don't have one, that's fine; describe the outcome you want.
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: alternatives
29+
attributes:
30+
label: Alternatives you've considered
31+
description: Workarounds you've tried, related tools, or approaches you've ruled out and why.
32+
33+
- type: textarea
34+
id: extra
35+
attributes:
36+
label: Anything else?
37+
description: Mockups, links to similar features in other tools, prior art.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!--
2+
Thanks for opening a pull request. Before submitting:
3+
4+
- Have you read CONTRIBUTING.md?
5+
- Have you added a changeset (`pnpm changeset`) for any change to the
6+
published package? See CONTRIBUTING.md for when one is needed.
7+
- Does the description below explain *why* this change is needed?
8+
The diff already covers *what* — focus the prose on rationale,
9+
constraints, and trade-offs.
10+
-->
11+
12+
## What this changes
13+
14+
<!-- A short, prose explanation of the change and why it's needed. -->
15+
16+
## How it was verified
17+
18+
<!--
19+
- For CLI/build changes: which repo did you run it against, and what
20+
did you check in the output?
21+
- For runtime/template changes: which routes did you click through?
22+
- For data-layer changes: paste the snippet you used to exercise it.
23+
-->
24+
25+
## Related issues
26+
27+
<!-- Closes #..., refs #... — leave blank if N/A. -->
28+
29+
## Checklist
30+
31+
- [ ] Changeset added (or N/A — internal-only / docs-site-only change)
32+
- [ ] Documentation updated if user-facing surface changed
33+
- [ ] Verified locally per CONTRIBUTING.md

.github/workflows/ci.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
# Strip default permissions; jobs request what they need explicitly.
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
check:
19+
name: Lint + format
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@v4
27+
with:
28+
run_install: false
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version-file: ".nvmrc"
34+
cache: "pnpm"
35+
36+
# `--frozen-lockfile` will fail the build if pnpm-lock.yaml drifts
37+
# from the resolution of declared deps. That's the contract —
38+
# every PR must come with a lockfile that satisfies its
39+
# package.json changes; we don't accept silent dep updates from CI.
40+
- name: Install dependencies
41+
run: pnpm install --frozen-lockfile
42+
43+
# oxlint is the lint gate — fast, Rust-based, no per-rule config
44+
# by default. Catches dead imports, unused vars, suspect JSX,
45+
# missing keys, etc. without the eslint config-soup. Configure
46+
# via .oxlintrc.json if rule overrides are needed.
47+
- name: Lint
48+
run: pnpm lint
49+
50+
# oxfmt is the formatting gate. `--check` exits non-zero if any
51+
# file would be rewritten — that's what we want CI to enforce.
52+
# Run `pnpm format` locally to auto-fix.
53+
- name: Format check
54+
run: pnpm format:check
55+
56+
changeset-status:
57+
name: Changeset present
58+
runs-on: ubuntu-latest
59+
# Only on PRs — main branch pushes don't need this gate.
60+
if: github.event_name == 'pull_request'
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 0
66+
67+
- name: Install pnpm
68+
uses: pnpm/action-setup@v4
69+
with:
70+
run_install: false
71+
72+
- name: Setup Node.js
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version-file: ".nvmrc"
76+
cache: "pnpm"
77+
78+
- name: Install dependencies
79+
run: pnpm install --frozen-lockfile
80+
81+
# `changeset status --since` exits 0 if the PR has a changeset OR
82+
# if no changesets are needed (only ignored packages changed).
83+
# Exits non-zero otherwise. We let it fail loud — adds a CI gate
84+
# on "did you add a changeset?" without commenting on the PR.
85+
- name: Verify changeset
86+
run: pnpm changeset status --since=origin/${{ github.base_ref }}

.github/workflows/release.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write # create the "Version Packages" PR + commits + tags
10+
pull-requests: write # open + update the "Version Packages" PR
11+
id-token: write # npm provenance
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: false
16+
17+
jobs:
18+
release:
19+
name: Version + publish
20+
runs-on: ubuntu-latest
21+
# Don't run on forks — they'd hit "no NPM_TOKEN" anyway, but skipping
22+
# early keeps the Actions tab clean for fork PR runs.
23+
if: github.repository == 'level0x40/react-git'
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
# Full history so changesets can read tag history when
29+
# generating the changelog.
30+
fetch-depth: 0
31+
32+
- name: Install pnpm
33+
uses: pnpm/action-setup@v4
34+
with:
35+
run_install: false
36+
37+
- name: Setup Node.js
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version-file: ".nvmrc"
41+
cache: "pnpm"
42+
registry-url: "https://registry.npmjs.org"
43+
44+
- name: Install dependencies
45+
run: pnpm install --frozen-lockfile
46+
47+
# The dual-mode of changesets/action:
48+
#
49+
# 1. If there are unreleased changeset files in `.changeset/`, the
50+
# action runs `pnpm version` (which calls `changeset version`)
51+
# and opens / updates a "Version Packages" PR with the bumped
52+
# versions and CHANGELOG entries.
53+
#
54+
# 2. If those changeset files are GONE (because the previous
55+
# Version Packages PR was just merged), the action runs
56+
# `pnpm release` — which is `pnpm publish -r --provenance` —
57+
# and ships the bumped packages to npm with provenance
58+
# attestations. `id-token: write` (granted at the workflow
59+
# level above) is what authenticates the OIDC step npm needs
60+
# to sign the provenance statement.
61+
#
62+
# Two distinct outcomes, one trigger — same workflow handles both.
63+
- name: Create Release Pull Request or publish
64+
uses: changesets/action@v1
65+
with:
66+
version: pnpm version
67+
publish: pnpm release
68+
commit: "chore: version packages"
69+
title: "chore: version packages"
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
dist/
6+
.react-git/
7+
.react-server/
8+
.cloudflare/
9+
.wrangler/
10+
11+
# IDE / OS
12+
.DS_Store
13+
.vscode/
14+
.idea/
15+
*.swp
16+
*.swo
17+
18+
# Logs
19+
*.log
20+
npm-debug.log*
21+
yarn-debug.log*
22+
pnpm-debug.log*
23+
24+
# Misc
25+
.cache/
26+
.tmp/
27+
.env
28+
.env.local
29+
.env.*.local
30+
31+
# Coverage / test artifacts (none today, but reserved)
32+
coverage/
33+
.nyc_output/

0 commit comments

Comments
 (0)