Skip to content

Commit

Permalink
feat(*): add turbo watch mode (#1201)
Browse files Browse the repository at this point in the history
# Overview
close #1098

- add turbo watch mode
- turbo watch mode continuously monitors for real-time code changes and
automatically re-runs the task when modifications are detected.
   
docs: https://turbo.build/repo/docs/reference/watch

<!--
    A clear and concise description of what this pr is about.
 -->

## PR Checklist

- [x] I did below actions if need

1. I read the [Contributing
Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md)
2. I added documents and tests.

---------

Co-authored-by: Jonghyeon Ko <jonghyeon@toss.im>
  • Loading branch information
SEOKKAMONI and manudeli authored Aug 13, 2024
1 parent 45401c5 commit fcbb06f
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 76 deletions.
1 change: 0 additions & 1 deletion .husky/prepare-commit-msg

This file was deleted.

1 change: 0 additions & 1 deletion configs/tsup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"ci:publint": "publint --strict",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion knip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignoreWorkspaces": ["websites/**", "examples/**"],
"ignoreDependencies": ["coauthors", "@suspensive/utils"],
"ignoreDependencies": ["@suspensive/utils"],
"workspaces": {
".": {
"ignore": ["packlint.config.mjs"]
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"scripts": {
"blc:suspensive.org": "pnpm blc https://suspensive.org --ro",
"build": "turbo run build",
"build:watch": "turbo run build:watch --parallel",
"changeset": "changeset",
"changeset:publish": "pnpm prepack && changeset publish",
"changeset:version": "changeset version && pnpm i --lockfile-only",
Expand All @@ -30,10 +29,9 @@
"ci:publint": "turbo run ci:publint",
"ci:sherif": "sherif --ignore-package \"./examples/*\" --ignore-package \"./websites/*\" --ignore-package \"./docs/*\" --ignore-dependency \"@tanstack/react-query\" ",
"ci:test": "turbo run ci:test",
"ci:test:watch": "turbo run ci:test:watch --parallel",
"ci:type": "turbo run ci:type",
"clean": "turbo run clean",
"dev": "turbo run dev --concurrency 20",
"dev": "turbo watch ci:test",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"graph": "rimraf ./graph && mkdir graph && turbo run build --graph=graph/index.html",
"packlint": "packlint sort -R",
Expand All @@ -59,7 +57,6 @@
"@vitest/coverage-istanbul": "^2.0.5",
"@vitest/ui": "^2.0.5",
"broken-link-checker": "^0.7.8",
"coauthors": "latest",
"eslint": "^8.57.0",
"husky": "^9.1.4",
"jsdom": "^24.1.0",
Expand Down
5 changes: 2 additions & 3 deletions packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:test:watch": "vitest --ui --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"dependencies": {
"@suspensive/utils": "workspace:*"
Expand Down
5 changes: 2 additions & 3 deletions packages/jotai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:test:watch": "vitest --ui --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"dependencies": {
"@suspensive/utils": "workspace:*"
Expand Down
5 changes: 2 additions & 3 deletions packages/react-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:test:watch": "vitest --ui --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"dependencies": {
"@suspensive/utils": "workspace:*"
Expand Down
5 changes: 2 additions & 3 deletions packages/react-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:test:watch": "vitest --ui --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"dependencies": {
"@suspensive/utils": "workspace:*"
Expand Down
5 changes: 2 additions & 3 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "jest --coverage",
"ci:test:watch": "jest --watchAll --coverage",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "jest --watchAll --coverage"
},
"dependencies": {
"@suspensive/utils": "workspace:*"
Expand Down
5 changes: 2 additions & 3 deletions packages/react-query-4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:test:watch": "vitest --ui --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"dependencies": {
"@suspensive/utils": "workspace:*"
Expand Down
5 changes: 2 additions & 3 deletions packages/react-query-5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:test:watch": "vitest --ui --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"dependencies": {
"@suspensive/utils": "workspace:*"
Expand Down
5 changes: 2 additions & 3 deletions packages/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:test:watch": "vitest --ui --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"postinstall": "node -e \"import('./dist/scripts/postinstall.cjs').catch(e => console.error(e))\"",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"dependencies": {
"@commander-js/extra-typings": "^12.1.0",
Expand Down
5 changes: 2 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:test:watch": "vitest --ui --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"dependencies": {
"@suspensive/utils": "workspace:*"
Expand Down
5 changes: 2 additions & 3 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@
"ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:test": "vitest run --coverage --typecheck",
"ci:test:watch": "vitest --ui --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"dev": "tsup --watch",
"prepack": "pnpm build"
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"devDependencies": {
"@suspensive/eslint-config": "workspace:*",
Expand Down
24 changes: 1 addition & 23 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 12 additions & 16 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,32 @@
"ci:attw": {
"dependsOn": ["prepack"]
},
"ci:bench": {
"dependsOn": ["prepack"],
"outputs": ["benchmarks/**"]
},
"ci:eslint": {
"dependsOn": ["prepack"]
},
"ci:publint": {
"dependsOn": ["prepack"]
},
"ci:test": {
"dependsOn": ["prepack"],
"outputs": ["coverage/**"]
},
"ci:type": {
"dependsOn": ["prepack"]
},

"clean": {
"cache": false
},
"ci:test": {
"dependsOn": ["prepack"],
"outputs": ["coverage/**"]
},
"ci:test:watch": {
"dev": {
"dependsOn": ["prepack"],
"outputs": ["dist/**", "coverage/**"],
"cache": false,
"outputs": ["coverage/**"]
},
"ci:bench": {
"dependsOn": ["prepack"],
"outputs": ["benchmarks/**"]
"persistent": true
},
"prepack": {
"dependsOn": ["^prepack"],
Expand All @@ -41,12 +43,6 @@
"start": {
"dependsOn": ["build"],
"cache": false
},
"dev": {
"dependsOn": ["prepack"],
"outputs": ["dist/**"],
"cache": false,
"persistent": true
}
},
"globalEnv": ["NODE_ENV"]
Expand Down

0 comments on commit fcbb06f

Please sign in to comment.