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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/cr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- 1.x
merge_group:
pull_request:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
branches:
- main
- 1.x

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

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: 🧪 Tests
on:
workflow_dispatch:
pull_request:
branches: [main]
branches: [main, 1.x]
push:
branches: [main]
branches: [main, 1.x]

jobs:
tests:
Expand Down Expand Up @@ -43,19 +43,19 @@ jobs:
- name: E2E Chromium
uses: cypress-io/github-action@v6
with:
project: ./packages/tests
project: ./apps/tests
install: false
start: pnpm --filter tests start --host 127.0.0.1 --port 3000
wait-on: 'http://127.0.0.1:3000'
wait-on: "http://127.0.0.1:3000"
wait-on-timeout: 120
browser: chromium

- name: E2E Firefox
uses: cypress-io/github-action@v6
with:
project: ./packages/tests
project: ./apps/tests
install: false
start: pnpm --filter tests start --host 127.0.0.1 --port 3000
wait-on: 'http://127.0.0.1:3000'
wait-on: "http://127.0.0.1:3000"
wait-on-timeout: 120
browser: firefox


2 changes: 2 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- 1.x
- dev
- release-*
tags-ignore:
Expand All @@ -12,6 +13,7 @@ on:
pull_request:
branches:
- main
- 1.x
- dev
- release-*

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.13.1
22.19.0
159 changes: 41 additions & 118 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,144 +1,67 @@
# Contributing

Thank you for your interest in contributing to **SolidStart**! We welcome contributions including bug fixes, feature enhancements, documentation improvements, and more.
Thank you for your interest in contributing to **SolidStart**.
We welcome contributions including bug fixes, feature enhancements, documentation improvements, and more.

## Prerequisites
## Creating a Template

- **Node.js**: Use the version specified in `.nvmrc`, to manage multiple versions across your system, we recommend a version manager such as [fnm](https://github.com/Schniz/fnm), or another of your preference.
- **pnpm**: Install globally via `npm install -g pnpm`. Or let **Corepack** handle it in the setup step below.
- **Git**: Ensure Git is installed for cloning and managing the repository
We do not maintain official templates and integration in this monorepo.
Instead, please head over to [solidjs/templates](https://github.com/solidjs/templates) to submit your contribution.

## Setup
## Documentation

1. Clone the repository
We always want help and creative ways of explaining how to take the best out of SolidStart.
Alas, this is not the right place to do it, please head over to [SolidDocs](https://github.com/solidjs/solid-docs) and offer contribution to the official documentation!

```bash
git clone https://github.com/solidjs/solid-start.git
cd solid-start
```
## Feature Request

2. Enable the correct pnpm version specified in package.json
> [!IMPORTANT]
> Do not create a PR without first discussion in an issue

```bash
corepack enable
```
If there's a new feature you'd like to request you can:

3. Install dependencies
1. Create an issue and make your pitch. Be sure to explain the value proposition in a way that will benefit most users.

```bash
pnpm install
```
2. If it's a more general concept, feel free to open a [Discussion](https://github.com/solidjs/solid-start/discussions) in the **Idea** category.

4. Build all packages and the landing page
```bash
pnpm run build:all
```
A new **primitive** follows the same criteria as issues, please create an issue for it to be discussed before hand.

If you encounter issues (e.g. missing `node_modules`), clean the workspace
Primitives that depend on multiple external dependencies and 3rd party integrations are generally not a good fit to live inside this monorepo, we still welcome you to create it and share with the ecosystem.
Reach out in a [Discussion](https://github.com/solidjs/solid-start/discussions) in the **showcase** session and we'll amplify as much as we can!

```bash
pnpm run clean:all
```
## Found a Bug

Then reinstall dependencies and rebuild.
If you believe you found a bug, we appreciate you creating an issue.
Issues without a reproduction or PR link will be **automatically closed**.

## Monorepo Structure
To speed up triaging, we recommend 2 strategies:

SolidStart is a pnpm-based monorepo with nested workspaces. Key directories include
### Minimal Reproduction

- **`packages/start`**: The core `@solidjs/start` package.
- **`packages/landing-page`**: The official landing page.
- **`examples/`**: Example projects for testing (a nested workspace; see details below).
- **`packages/tests`**: Unit and end-to-end (E2E) tests using Vitest and Cypress.
Create a **minimal** reproduction either in a remote IDE or in an open-source repository and add a link to your issue.

Use pnpm filters (e.g. `pnpm --filter @solidjs/start ...`) to target specific packages.
The `examples/` directory is a separate workspace with its own `pnpm-workspace.yaml` and `pnpm-lock.yaml`.
We recommend using the `create-solid` package with the **basic** setting.

## Developing and Testing Changes
| Package Manager | Command |
| --------------- | ------------------------------------------ |
| pnpm | `pnpm create solid -s -t basic` |
| npm | `npm create solid -s -t basic` |
| yarn | `yarn create solid -s -t basic` |
| bun | `bun create solid -s -t basic` |
| deno | `deno run -A npm:create-solid -s -t basic` |

1. Make your changes in the relevant package (e.g. `packages/start`)
### Failing Test PR

2. Rebuild affected packages
You can also fork this repository and go to `apps/tests`.
There we have an app with all default configurations and many routes.
Create a new route, a Cypress assertion to it and open a PR with the failing test-case.

```bash
pnpm run packages:build
```
Once the PR is there, **create an issue** and link the PR (mention the PR as you'd mention a person in the issue description and vice-versa).

For a full rebuild: `pnpm run build:all`
> [!IMPORTANT]
> Mark the **allow edit by the maintainers** so we can more easily investigate the failing test and propose a fix. Otherwise we may need to close your PR and cherry-pick your commit.

3. Test your changes
---

- For examples
```bash
cd examples
pnpm install
pnpm --filter example-hackernews run dev # Runs the HackerNews example
```
- For the landing page (from the root directory)
```bash
pnpm run lp:dev
```

4. Clean builds if needed
```bash
pnpm run packages:clean # Cleans packages' node_modules and dist folders
pnpm run lp:clean # Cleans the landing page
pnpm run clean:root # Cleans root-level caches
```

## Running Tests

Tests are located in `packages/tests`, using Vitest for unit tests and Cypress for E2E tests.

1. Install the Cypress binary (required only once)

```bash
pnpm --filter tests exec cypress install
```

2. For unit tests that check build artifacts, build the test app first

```bash
pnpm --filter tests run build
```

3. Run unit tests

```bash
pnpm --filter tests run unit
```

- CI mode (run once): `pnpm --filter tests run unit:ci`
- UI mode: `pnpm --filter tests run unit:ui`

4. Run E2E tests

```bash
pnpm --filter tests run e2e:run
```

- Interactive mode: `pnpm --filter tests run e2e:open`
- With dev server: `pnpm --filter tests run e2e`

5. Clean test artifacts
```bash
pnpm run clean:test
```

## Using SolidStart in Your Own Monorepo

When integrating `@solidjs/start` into your own monorepo (e.g. using Yarn workspaces), configure dependency hoisting to ensure proper resolution. This helps runtime components (e.g. `client/index.tsx`) resolve correctly in generated files like `index.html`.

### Yarn v2+

In the project root's `package.json`

```jsonc
{
"installConfig": {
"hoistingLimits": "dependencies"
}
}
```

For pnpm monorepos, define workspaces in `pnpm-workspace.yaml`. If you encounter resolution issues (e.g. missing modules like `h3` from Vinxi), add `shamefully-hoist=true` to your `.npmrc` file. Test for duplicates and adjust configurations as necessary.
If you have read all the way here, you're already a champ! 🏆
Thank you.
Loading
Loading