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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{ "repo": "TanStack/optimistic" }
],
"commit": false,
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"fixed": [],
"linked": [],
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/grumpy-crews-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tanstack/optimistic": minor
---

feat: Initial release
29 changes: 29 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: autofix.ci # needed to securely identify the workflow

on:
pull_request:
push:
branches: [main, alpha, beta]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
autofix:
name: autofix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Fix formatting
run: pnpm prettier --ignore-unknown . --check
- name: Apply fixes
uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
with:
commit-message: "ci: apply automated fixes"
46 changes: 46 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: PR

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Get base and head commits for `nx affected`
uses: nrwl/[email protected]
with:
main-branch-name: main
- name: Run Checks
run: pnpm run lint && pnpm run test && pnpm run build
preview:
name: Preview
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Build Packages
run: pnpm run build
- name: Publish Previews
run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
branches: [main, alpha, beta]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

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

jobs:
release:
name: Release
if: github.repository_owner == 'TanStack'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Run Tests
run: pnpm run lint && pnpm run test && pnpm run build
- name: Run Changesets (version or publish)
uses: changesets/[email protected]
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish
commit: "ci: Version Packages"
title: "ci: Version Packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
link-workspace-packages=true
prefer-workspace-packages=true
provenance=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.13.1
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/.next
**/.nx/cache
**/.svelte-kit
**/coverage
**/dist
**/docs
**/snap
pnpm-lock.yaml
5 changes: 0 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import js from "@eslint/js"
import tsParser from "@typescript-eslint/parser"
import tsPlugin from "@typescript-eslint/eslint-plugin"
import reactPlugin from "eslint-plugin-react"
import prettierPlugin from "eslint-plugin-prettier"
import prettierConfig from "eslint-config-prettier"
import globals from "globals"
import stylisticPlugin from "@stylistic/eslint-plugin"
import { tanstackConfig } from "@tanstack/config/eslint"

Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@tanstack/optimistic",
"version": "0.0.8",
"description": "Optimistic UI library for sync engines",
"packageManager": "[email protected]",
"type": "module",
"exports": {
"./react-electric": {
Expand All @@ -20,7 +21,10 @@
"prepack": "vite build",
"test": "vitest --run",
"lint": "eslint . --fix",
"prepare": "husky"
"prepare": "husky",
"changeset": "changeset",
"changeset:version": "changeset version && pnpm install --no-frozen-lockfile",
"changeset:publish": "changeset publish"
},
"lint-staged": {
"*.{ts,tsx}": [
Expand All @@ -32,8 +36,10 @@
"author": "Kyle Mathews <[email protected]>",
"license": "MIT",
"devDependencies": {
"@changesets/cli": "^2.28.1",
"@eslint/js": "^9.20.0",
"@stylistic/eslint-plugin": "^4.0.1",
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
"@tanstack/config": "^0.17.1",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
Expand Down
Loading
Loading