diff --git a/.changeset/config-v1.json b/.changeset/config-v1.json new file mode 100644 index 000000000..a9ed7a4f7 --- /dev/null +++ b/.changeset/config-v1.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "v1.x", + "updateInternalDependencies": "patch", + "ignore": ["landing-page", "tests"] +} \ No newline at end of file diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml index 50584d9bd..c555dda4b 100644 --- a/.github/workflows/cr.yml +++ b/.github/workflows/cr.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - v1.x merge_group: pull_request: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e67f470e0..1e59a68ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - v1.x concurrency: ${{ github.workflow }}-${{ github.ref }} @@ -27,13 +28,19 @@ jobs: - name: Install Dependencies run: pnpm i --frozen-lockfile + - name: Setup changeset config for v1.x branch + if: github.ref_name == 'v1.x' + run: | + cp .changeset/config-v1.json .changeset/config.json + - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 with: publish: pnpm run release - title: "chore: release" - commit: "chore: release" + title: "${{ github.ref_name == 'v1.x' && 'chore: release v1.x' || 'chore: release' }}" + commit: "${{ github.ref_name == 'v1.x' && 'chore: release v1.x' || 'chore: release' }}" + setupGitUser: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 09c70a85b..a0c6d0ad2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,9 +3,9 @@ name: 🧪 Tests on: workflow_dispatch: pull_request: - branches: [main] + branches: [main, v1.x] push: - branches: [main] + branches: [main, v1.x] jobs: tests: diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index a3d249f09..66147cc06 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - v1.x - dev - release-* tags-ignore: @@ -12,6 +13,7 @@ on: pull_request: branches: - main + - v1.x - dev - release-* diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..87cf9c9a6 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,29 @@ +# SolidStart Agent Guidelines + +## Build/Test Commands +- `pnpm build` - Build all packages +- `pnpm test` - Run all tests +- `pnpm test -- ` - Run specific test pattern +- `pnpm --filter tests unit` - Run unit tests with Vitest +- `pnpm --filter tests unit -- ` - Run single test file +- `pnpm --filter tests e2e:run` - Run Cypress E2E tests +- `pnpm --filter @solidjs/start typecheck` - Type check main package +- `pnpm -r typecheck` - Type check all packages +- `pnpm clean` - Clean all build artifacts + +## CI/CD & Release Process +- Uses changesets for versioning - create `.changeset/.md` files for releases +- All PRs must pass typecheck, unit tests, and E2E tests (Chromium + Firefox) +- Release workflow auto-publishes on main branch push with changesets +- Continuous releases use `pkg-pr-new` for preview packages on PRs + +## Code Style & Architecture +- **TypeScript**: Required, use ESNext target, strict typing, jsxImportSource: "solid-js" +- **File Structure**: `/src/{client,server,shared,router,middleware}` - separate by runtime environment +- **Exports**: Use `// @refresh skip` at top of non-reactive files, group related exports +- **Imports**: Named imports, relative paths for local files, organize by: solid-js, external, internal +- **Components**: Function declarations for components, arrow functions for utilities +- **Error Handling**: Use ErrorBoundary patterns, proper TypeScript error types, console.error for logging +- **Formatting**: Prettier with 2-space tabs, no trailing commas, double quotes, 100 char width +- **Testing**: Vitest for unit tests, Cypress for E2E, use `describe.skip()` for problematic tests +- **Server Functions**: Export server functions properly, use getServerFunctionMeta() for metadata \ No newline at end of file