From e3245a8cc5394167c4ef2d6f3b4493c0ef4ddf2f Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Sun, 11 Feb 2024 22:14:14 +0800 Subject: [PATCH] ci(*): rename scripts (#715) # Overview ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/suspensive/react/blob/main/CONTRIBUTING.md) 2. I added documents and tests. --- .github/workflows/ci.yml | 12 ++++++------ configs/eslint-config-js/package.json | 2 +- configs/eslint-config-ts/package.json | 2 +- configs/eslint-config/package.json | 2 +- configs/test-utils/package.json | 10 +++++----- configs/tsup/package.json | 10 +++++----- docs/suspensive.org/package.json | 3 ++- examples/next-streaming-react-query/package.json | 3 ++- package.json | 16 ++++++++-------- packages/react-await/package.json | 10 +++++----- packages/react-image/package.json | 10 +++++----- packages/react-query/package.json | 10 +++++----- packages/react/package.json | 10 +++++----- turbo.json | 12 ++++++------ websites/visualization/package.json | 6 +++--- 15 files changed, 60 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d965933e..6ca75f7a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,15 +22,15 @@ jobs: matrix: command: [ - 'lint', - 'lint:attw', - 'lint:monorepo', - 'lint:pub', + 'ci:attw', + 'ci:eslint', + 'ci:lighthouse', + 'ci:publint', + 'ci:sherif', + 'ci:type', 'test', 'test:production', - 'type:check', 'build', - 'ci:lighthouse', ] steps: - uses: actions/checkout@v4 diff --git a/configs/eslint-config-js/package.json b/configs/eslint-config-js/package.json index 03e3dd65b..3257173d6 100644 --- a/configs/eslint-config-js/package.json +++ b/configs/eslint-config-js/package.json @@ -7,7 +7,7 @@ "no-import.js" ], "scripts": { - "lint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"" + "ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"" }, "dependencies": { "@cspell/eslint-plugin": "^8.3.2", diff --git a/configs/eslint-config-ts/package.json b/configs/eslint-config-ts/package.json index 34e1bbc07..9cdf9c072 100644 --- a/configs/eslint-config-ts/package.json +++ b/configs/eslint-config-ts/package.json @@ -7,7 +7,7 @@ "./no-import.js" ], "scripts": { - "lint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"" + "ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"" }, "dependencies": { "@suspensive/eslint-config-js": "workspace:*", diff --git a/configs/eslint-config/package.json b/configs/eslint-config/package.json index 649623220..ab631d58b 100644 --- a/configs/eslint-config/package.json +++ b/configs/eslint-config/package.json @@ -8,7 +8,7 @@ "react-ts-no-import.js" ], "scripts": { - "lint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"" + "ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"" }, "dependencies": { "@suspensive/eslint-config-js": "workspace:*", diff --git a/configs/test-utils/package.json b/configs/test-utils/package.json index 542e346b0..ef64ee46c 100644 --- a/configs/test-utils/package.json +++ b/configs/test-utils/package.json @@ -23,12 +23,12 @@ "scripts": { "build": "tsup", "build:watch": "tsup --watch", + "ci:attw": "attw --pack", + "ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", + "ci:publint": "publint --strict", + "ci:type": "tsc --noEmit", "clean": "rimraf ./dist && rimraf ./coverage", - "lint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", - "lint:attw": "attw --pack", - "lint:pub": "publint --strict", - "prepack": "pnpm build", - "type:check": "tsc --noEmit" + "prepack": "pnpm build" }, "devDependencies": { "@suspensive/eslint-config": "workspace:*", diff --git a/configs/tsup/package.json b/configs/tsup/package.json index 6bf367e1a..f8fd81735 100644 --- a/configs/tsup/package.json +++ b/configs/tsup/package.json @@ -23,12 +23,12 @@ "scripts": { "build": "tsup", "build:watch": "tsup --watch", + "ci:attw": "attw --pack", + "ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", + "ci:publint": "publint --strict", + "ci:type": "tsc --noEmit", "clean": "rimraf ./dist && rimraf ./coverage", - "lint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", - "lint:attw": "attw --pack", - "lint:pub": "publint --strict", - "prepack": "pnpm build", - "type:check": "tsc --noEmit" + "prepack": "pnpm build" }, "devDependencies": { "@suspensive/eslint-config-ts": "workspace:*", diff --git a/docs/suspensive.org/package.json b/docs/suspensive.org/package.json index 4e93e9de1..e7bc8e9ac 100644 --- a/docs/suspensive.org/package.json +++ b/docs/suspensive.org/package.json @@ -21,8 +21,9 @@ "type": "commonjs", "scripts": { "build": "next build", + "ci:eslint": "next lint", + "ci:type": "tsc --noEmit", "dev": "next dev -p 4001", - "lint": "next lint", "start": "next start -p 4001" }, "dependencies": { diff --git a/examples/next-streaming-react-query/package.json b/examples/next-streaming-react-query/package.json index 58819b619..2a7ad7417 100644 --- a/examples/next-streaming-react-query/package.json +++ b/examples/next-streaming-react-query/package.json @@ -4,8 +4,9 @@ "private": true, "scripts": { "build": "next build", + "ci:eslint": "next lint", + "ci:type": "tsc --noEmit", "dev": "next dev -p 4100", - "lint": "next lint", "start": "next start -p 4100" }, "dependencies": { diff --git a/package.json b/package.json index f9561a0de..621ebf472 100644 --- a/package.json +++ b/package.json @@ -21,19 +21,20 @@ "changeset": "changeset", "changeset:publish": "pnpm prepack && changeset publish", "changeset:version": "changeset version && pnpm i --lockfile-only", - "ci:all": "pnpm lint && pnpm lint:attw && pnpm lint:monorepo && pnpm lint:pub && pnpm test && pnpm test:production && pnpm type:check && pnpm build", + "ci:all": "pnpm ci:attw && pnpm ci:eslint && pnpm ci:lighthouse && pnpm ci:publint && pnpm ci:sherif && pnpm ci:type && pnpm test && pnpm test:production && pnpm build", + "ci:attw": "turbo run ci:attw", + "ci:eslint": "turbo run ci:eslint", "ci:lighthouse": "lhci autorun", + "ci:publint": "turbo run ci:publint", + "ci:sherif": "sherif --ignore-package \"./examples/*\" --ignore-package \"./websites/*\" --ignore-package \"./docs/*\"", + "ci:type": "turbo run ci:type", "clean": "pnpm --filter \"./packages/**\" run clean", "dev": "turbo run dev", "dev:docs": "turbo run dev --filter=@suspensive/docs-v*", "dev:visualization": "turbo run dev --filter=@suspensive/visualization", "format": "prettier --write \"**/*.{ts,tsx,md}\"", "graph": "rimraf ./graph && mkdir graph && turbo run build --graph=graph/index.html", - "lint": "turbo run lint", - "lint:attw": "turbo run lint:attw", - "lint:monorepo": "sherif --ignore-package \"./examples/*\" --ignore-package \"./websites/*\" --ignore-package \"./docs/*\"", - "lint:pack": "packlint sort -R", - "lint:pub": "turbo run lint:pub", + "packlint": "packlint sort -R", "preinstall": "corepack enable", "prepack": "turbo run prepack", "prepare": "husky install", @@ -41,8 +42,7 @@ "test": "turbo run test", "test:production": "turbo run test:production", "test:production:watch": "turbo run test:production:watch --parallel", - "test:watch": "turbo run test:watch --parallel", - "type:check": "turbo run type:check" + "test:watch": "turbo run test:watch --parallel" }, "devDependencies": { "@arethetypeswrong/cli": "^0.13.8", diff --git a/packages/react-await/package.json b/packages/react-await/package.json index c743aa613..94bc1b960 100644 --- a/packages/react-await/package.json +++ b/packages/react-await/package.json @@ -47,14 +47,14 @@ "scripts": { "build": "tsup", "build:watch": "tsup --watch", + "ci:attw": "attw --pack", + "ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", + "ci:publint": "publint --strict", + "ci:type": "tsc --noEmit", "clean": "rimraf ./dist && rimraf ./coverage", - "lint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", - "lint:attw": "attw --pack", - "lint:pub": "publint --strict", "prepack": "pnpm build", "test": "vitest run --coverage --typecheck", - "test:watch": "vitest --ui --coverage --typecheck", - "type:check": "tsc --noEmit" + "test:watch": "vitest --ui --coverage --typecheck" }, "dependencies": { "use-sync-external-store": "^1.2.0" diff --git a/packages/react-image/package.json b/packages/react-image/package.json index fcc359cd9..ca1d89a12 100644 --- a/packages/react-image/package.json +++ b/packages/react-image/package.json @@ -47,14 +47,14 @@ "scripts": { "build": "tsup", "build:watch": "tsup --watch", + "ci:attw": "attw --pack", + "ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", + "ci:publint": "publint --strict", + "ci:type": "tsc --noEmit", "clean": "rimraf ./dist && rimraf ./coverage", - "lint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", - "lint:attw": "attw --pack", - "lint:pub": "publint --strict", "prepack": "pnpm build", "test": "vitest run --coverage --typecheck", - "test:watch": "vitest --ui --coverage --typecheck", - "type:check": "tsc --noEmit" + "test:watch": "vitest --ui --coverage --typecheck" }, "dependencies": { "use-sync-external-store": "^1.2.0" diff --git a/packages/react-query/package.json b/packages/react-query/package.json index cf367ab76..d1b6dfca9 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -48,14 +48,14 @@ "scripts": { "build": "tsup", "build:watch": "tsup --watch", + "ci:attw": "attw --pack", + "ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", + "ci:publint": "publint --strict", + "ci:type": "tsc --noEmit", "clean": "rimraf ./dist && rimraf ./coverage", - "lint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", - "lint:attw": "attw --pack", - "lint:pub": "publint --strict", "prepack": "pnpm build", "test": "vitest run --coverage --typecheck", - "test:watch": "vitest --ui --coverage --typecheck", - "type:check": "tsc --noEmit" + "test:watch": "vitest --ui --coverage --typecheck" }, "devDependencies": { "@suspensive/eslint-config": "workspace:*", diff --git a/packages/react/package.json b/packages/react/package.json index 77a242932..a426778e6 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -47,16 +47,16 @@ "scripts": { "build": "tsup", "build:watch": "tsup --watch", + "ci:attw": "attw --pack", + "ci:eslint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", + "ci:publint": "publint --strict", + "ci:type": "tsc --noEmit", "clean": "rimraf ./dist && rimraf ./coverage", - "lint": "eslint \"**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}\"", - "lint:attw": "attw --pack", - "lint:pub": "publint --strict", "prepack": "pnpm build", "test": "vitest run --coverage --typecheck", "test:production": "vitest run --config ./vitest-production.config.ts", "test:production:watch": "vitest --config ./vitest-production.config.ts --ui", - "test:watch": "vitest --ui --coverage --typecheck", - "type:check": "tsc --noEmit" + "test:watch": "vitest --ui --coverage --typecheck" }, "dependencies": { "use-sync-external-store": "^1.2.0" diff --git a/turbo.json b/turbo.json index 310a981ab..d2e8d3196 100644 --- a/turbo.json +++ b/turbo.json @@ -10,13 +10,16 @@ "cache": false, "outputs": ["dist/**"] }, - "lint": { + "ci:attw": { "dependsOn": ["prepack"] }, - "lint:attw": { + "ci:eslint": { "dependsOn": ["prepack"] }, - "lint:pub": { + "ci:publint": { + "dependsOn": ["prepack"] + }, + "ci:type": { "dependsOn": ["prepack"] }, "test": { @@ -48,9 +51,6 @@ "dev": { "dependsOn": ["prepack"], "cache": false - }, - "type:check": { - "dependsOn": ["prepack"] } }, "globalEnv": ["NODE_ENV"] diff --git a/websites/visualization/package.json b/websites/visualization/package.json index 6a4c6b8a5..38044014a 100644 --- a/websites/visualization/package.json +++ b/websites/visualization/package.json @@ -14,10 +14,10 @@ }, "scripts": { "build": "next build", + "ci:eslint": "next lint", + "ci:type": "tsc --noEmit", "dev": "next dev -p 4000", - "lint": "next lint", - "start": "next start -p 4000", - "type:check": "tsc --noEmit" + "start": "next start -p 4000" }, "dependencies": { "@suspensive/react": "workspace:*",