Skip to content

Commit

Permalink
Turborepo (#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdreyno authored Jun 2, 2024
1 parent e54538e commit 5659cc1
Show file tree
Hide file tree
Showing 113 changed files with 15,716 additions and 27,779 deletions.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
15 changes: 6 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["20", "18", "16"]
node: ["20", "18"]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run test:ci
cache: "npm"
- run: npm install
- run: npm run build
- name: Code Climate Coverage Action
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: 3c9c36dc44d794c8a3f398889936100a4df2b6913e5388ab824effed6cefcc31
with:
coverageCommand: npm run coverage
- run: npm run test:ci
- run: npm run test:npm
32 changes: 14 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
name: Release

on:
workflow_run:
workflows: ["CI"]
types:
- completed
push:
branches:
- main

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

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm run test:ci
- name: Test NPM
run: npm run test:npm
- name: Release
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release
39 changes: 35 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
node_modules
dist
.pnp
.pnp.js

# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Testing
coverage

# Turbo
.turbo

# Vercel
.vercel

# Build Outputs
.next/
out/
build
/*.log
dist


# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
.DS_Store
.cache
/coverage
*.pem
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/pre-commit

This file was deleted.

Empty file added .npmrc
Empty file.
20 changes: 0 additions & 20 deletions .releaserc

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Fizz

[![Test Coverage](https://api.codeclimate.com/v1/badges/bade509a61c126d7f488/test_coverage)](https://codeclimate.com/github/tdreyno/fizz/test_coverage)
[![npm latest version](https://img.shields.io/npm/v/@tdreyno/fizz/latest.svg)](https://www.npmjs.com/package/@tdreyno/fizz)
[![Minified Size](https://badgen.net/bundlephobia/minzip/@tdreyno/fizz)](https://bundlephobia.com/result?p=@tdreyno/fizz)

Expand Down Expand Up @@ -130,11 +129,11 @@ If you are using React, you can interact with a machine with hooks.

```typescript
import {
useMachine,
Enter,
ActionCreatorType,
createAction,
} from "@tdreyno/fizz"
import { useMachine } from "@tdreyno/fizz-react"

const finished = createAction<"Finished", string>("Finished")
type Finished = ActionCreatorType<typeof finished>
Expand Down Expand Up @@ -182,7 +181,7 @@ const Show = () => {
If you are using Svelte, you can create a machine provider and access the current state with a store.

```typescript
import { createMachine } from "@tdreyno/fizz/svelte"
import { createMachine } from "@tdreyno/fizz-svelte"

const machine = createMachine(states, actions, initialState)

Expand Down
3 changes: 0 additions & 3 deletions bin/test-npm-version

This file was deleted.

6 changes: 0 additions & 6 deletions commitlint.config.js

This file was deleted.

43 changes: 2 additions & 41 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,2 @@
// @ts-check

import eslint from "@eslint/js"
import tseslint from "typescript-eslint"
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"

export default tseslint.config(
{
ignores: [
"dist/*",
"test-npm-version/*",
"svelte.config.js",
"jest.config.js",
"eslint.config.js",
"commitlint.config.js",
],
},
eslint.configs.recommended,
eslintPluginPrettierRecommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
rules: {
"@typescript-eslint/consistent-indexed-object-style": 0,
"@typescript-eslint/consistent-type-definitions": 0,
"@typescript-eslint/array-type": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/require-await": 0,
semi: ["error", "never"],
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-explicit-any": 0,
},
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
)
import config from "@repo/eslint-config/config.js"
export default config
Loading

0 comments on commit 5659cc1

Please sign in to comment.