Skip to content
Draft
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
15 changes: 15 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": {
"version": false,
"tag": false
}
}
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main

permissions:
contents: read
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
branches:
- main

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

permissions:
contents: write
id-token: write
pull-requests: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 22.x

- uses: pnpm/action-setup@v4

- name: Install Dependencies
run: pnpm install

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
},
Expand Down
1 change: 1 addition & 0 deletions contrib/htmx-base-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "htmx-base-ts",
"description": "The htmx-base-ts starter template for @fastify/htmx",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions contrib/htmx-base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "htmx-base",
"description": "The htmx-base starter template for @fastify/htmx",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions contrib/htmx-kitchensink/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "htmx-kitchensink",
"description": "The htmx-kitchensink starter template for @fastify/htmx",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
2 changes: 2 additions & 0 deletions contrib/solid-hydration/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "solid-hydration",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
2 changes: 2 additions & 0 deletions contrib/solid-vanilla/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "solid-vanilla",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
2 changes: 2 additions & 0 deletions contrib/svelte-hydration/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "svelte-hydration",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
2 changes: 2 additions & 0 deletions contrib/svelte-vanilla/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "svelte-vanilla",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
26 changes: 15 additions & 11 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Contributing

Currently [I'm](https://hire.jonasgalvez.com.br) the sole maintainer of this project.

New contributors would be extremely welcome.

The project needs at least an additional releaser.
## How to publish a new version

This repository uses [changesets](https://github.com/changesets/changesets) to automate its versioning and release process. When contributing to this repo, your pull request should contain a "changeset" that can be generated by running `pnpm changeset` from your branch locally.

The changeset CLI will ask you to enter the corresponding semver bump type and a description of your changes: feel free to enter a brief description via the command line and continue editing the generated Markdown file found inside of the `.changeset` directory in your editor of choice. When editing your changeset's Markdown file, you can leverage any of the features of GitHub flavored markdown! The description you provide in your changeset will be used to generate an entry in CHANGELOG.md and the release notes in a future release, so the more complete and descriptive the better.

GitHub issues need more active triaging.
In summary, before you submit a pull request, perform the following steps:

Both **`@fastify/vue`** and **`@fastify/react`** are lacking a comprehensive test suite and more starter templates covering other potential configurations.
1. Run `pnpm changeset`
2. Answer the questions in the interactive prompt.
3. Commit the changes.

## Style
## Formatting & Linting

This project uses [oxlint](https://oxc.rs/docs/guide/usage/linter.html) to lint. Unfortunately, the oxc formatter is not yet available nor are there any VSCode extensions ready for use yet.

Please make sure to adhere to the following style conventions:

Expand All @@ -19,12 +25,10 @@ Please make sure to adhere to the following style conventions:
- **Two-space indendation **
- **Singlequoted strings**

We use [`oxc`](https://oxc.rs/) which is extremely fast but doesn't perform this type of formatting.
If you use VSCode, the included `.vscode/settings.json` should be able to perform the formatting necessary for now as we wait for the oxc formatter to and its corresponding VSCode extension to be released.

## Development
## Development & Testing

**`@fastify/vite`**, **`@fastify/vue`** and **`@fastify/react`** live in the [same monorepo](https://github.com/fastify/fastify-vite) and are set up to work as a [**pnpm workspace**](https://pnpm.io/workspaces).

The `examples/` also serve as test suites, make sure to run `source ./test-all.sh` from that folder after making changes to `@fastify/vite`.

Last Updated: **November 23, 2023**
The `examples/` also serve as test suites. Running `pnpm test` from the root folder after making changes to `@fastify/vite` will run the tests for all examples.
2 changes: 2 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "docs",
"private": true,
"type": "module",
"devDependencies": {
"@orama/plugin-vitepress": "3.1.4",
Expand Down
1 change: 1 addition & 0 deletions examples/react-hydration/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-react-hydration",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/react-next-mini/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-react-next-mini",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/react-streaming/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-react-streaming",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/react-vanilla-spa-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-react-vanilla-ts-src",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx src/server.ts --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/react-vanilla-spa/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-react-vanilla-spa",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/react-vanilla-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-react-vanilla-ts-src",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx src/server.ts --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/react-vanilla/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-react-vanilla",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/vue-hydration/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-vue-hydration",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/vue-next-mini/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-vue-next",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/vue-streaming/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-vue-streaming",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/vue-vanilla-spa/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-vue-vanilla-spa",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/vue-vanilla-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-vue-vanilla-ts",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx src/server.ts --dev",
Expand Down
1 change: 1 addition & 0 deletions examples/vue-vanilla/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-vue-vanilla",
"private": true,
"type": "module",
"scripts": {
"dev": "node server.js --dev",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"private": "true",
"devDependencies": {
"@changesets/cli": "^2.29.2",
"execa": "^9.5.2",
"oxlint": "^0.9.10",
"vite": "^6.2.5",
Expand Down
2 changes: 2 additions & 0 deletions packages/fastify-vite/fixtures/cjs/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "cjs-test-fixture",
"private": true,
"scripts": {
"build:client": "vite build --outDir dist/client --ssrManifest",
"build:server": "vite build --outDir dist/server --ssr ./index.js",
Expand Down
2 changes: 2 additions & 0 deletions packages/fastify-vite/fixtures/esm/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "esm-test-fixture",
"private": true,
"type": "module",
"scripts": {
"build": "vite build --app"
Expand Down
Loading