diff --git a/.npmrc b/.npmrc index d9e6c3f..8b41dc1 100644 --- a/.npmrc +++ b/.npmrc @@ -1,5 +1,6 @@ engine-strict=true link-workspace-packages=true +package-manager-strict=true provenance=true save-dev=true save-exact=true diff --git a/demos/hello-world-cli/package.json b/demos/hello-world-cli/package.json index c978957..7bc6314 100644 --- a/demos/hello-world-cli/package.json +++ b/demos/hello-world-cli/package.json @@ -20,7 +20,7 @@ "#spautz/node-library-template": "@spautz/node-library-template" }, "scripts": { - "____ STANDARD APP COMMANDS _________________________________________": "", + "____ STANDARD PACKAGE TASKS ________________________________________": "", "all": "turbo run pipeline-all", "all:ci": "turbo run pipeline-ci", "build": "pnpm run build:clean && pnpm run build:main", @@ -31,8 +31,8 @@ "test:clean": "rimraf ./coverage", "test": "pnpm run test:clean && vitest run --coverage", "test:ci": "pnpm run test:clean && vitest run --coverage --bail 1", - "test:watch": "pnpm run test:clean && vitest watch --coverage", "test:ui": "pnpm run test:clean && vitest --ui", + "test:watch": "pnpm run test:clean && vitest watch --coverage", "typecheck": "tsc -p ./tsconfig.json --noEmit", "____ BUILD TASKS ___________________________________________________": "", "build:clean": "rimraf ./dist", diff --git a/demos/hello-world-ui/package.json b/demos/hello-world-ui/package.json index 4bd1173..6b1e8b8 100644 --- a/demos/hello-world-ui/package.json +++ b/demos/hello-world-ui/package.json @@ -21,7 +21,7 @@ "#spautz/react-library-template": "@spautz/react-library-template" }, "scripts": { - "____ STANDARD APP COMMANDS _________________________________________": "", + "____ STANDARD PACKAGE TASKS ________________________________________": "", "all": "turbo run pipeline-all", "all:ci": "turbo run pipeline-ci", "build": "pnpm run build:clean && pnpm run build:main", @@ -33,8 +33,8 @@ "test:clean": "rimraf ./coverage", "test": "pnpm run test:clean && vitest run --coverage", "test:ci": "pnpm run test:clean && vitest run --coverage --bail 1", - "test:watch": "pnpm run test:clean && vitest watch --coverage", "test:ui": "pnpm run test:clean && vitest --ui", + "test:watch": "pnpm run test:clean && vitest watch --coverage", "typecheck": "tsc -p ./tsconfig.json --noEmit", "____ BUILD & DEPLOY TASKS __________________________________________": "", "build:clean": "rimraf ./dist", diff --git a/docs-website/package.json b/docs-website/package.json index 9365695..a75faf1 100644 --- a/docs-website/package.json +++ b/docs-website/package.json @@ -19,7 +19,7 @@ }, "source": "./src/pages/index.tsx", "scripts": { - "____ STANDARD APP COMMANDS _________________________________________": "", + "____ STANDARD PACKAGE TASKS ________________________________________": "", "all": "turbo run pipeline-all", "all:ci": "turbo run pipeline-ci", "build": "docusaurus build", diff --git a/package.json b/package.json index 84a54fc..bbc6c67 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,10 @@ "scripts": { "____ HOOKS _________________________________________________________": "", "preinstall": "npx only-allow pnpm", - "prepare": "husky && turbo run dependencies --filter=!@spautz/all-packages", + "prepare": "husky && turbo run dependencies", "husky:precommit": "lint-staged", "husky:prepush": "pnpm run format:verify && turbo run w:lint lint typecheck", - "____ REPO COMMANDS _________________________________________________": "", + "____ WORKSPACE OPERATIONS __________________________________________": "", "changelog": "changeset", "changelog:status": "changeset status --verbose", "changelog:status:ci": "changeset status --since=origin/main --verbose", @@ -36,33 +36,33 @@ "publish:yalc": "pnpm run -r publish:yalc", "release:docs": "pnpm run --filter=./docs-website deploy", "release:prep": "pnpm run changelog:status && changeset version", - "____ PACKAGE-ONLY COMMANDS _________________________________________": "", - "packages:all": "turbo run pipeline-all --filter=!//", - "packages:all:ci": "turbo run pipeline-ci --filter=!//", - "packages:build": "turbo run build --filter=!//", - "packages:lint": "turbo run lint --filter=!//", - "packages:lint:fix": "turbo run lint:fix --filter=!//", - "packages:test": "turbo run test --filter=!//", - "packages:test:watch": "turbo run test:watch --filter=!//", - "packages:typecheck": "turbo run typecheck --filter=!//", - "____ WORKSPACE-ONLY COMMANDS _______________________________________": "", + "____ WORKSPACE-PACKAGE TASKS _______________________________________": "", + "all": "pnpm run format && turbo run w:lint:fix w:test lint:fix build", + "all:ci": "pnpm run format:verify && turbo run w:lint w:test:ci", + "all:all": "pnpm run all pipeline-all", + "lint": "turbo run w:lint lint", + "lint:fix": "turbo run w:lint:fix lint:fix", "w:lint": "eslint . --max-warnings 0", "w:lint:fix": "eslint . --max-warnings 0 --fix", + "test": "turbo run w:test", + "test:ci": "turbo run w:test:ci", + "test:ui": "turbo run w:test:ui", + "test:watch": "turbo run w:test:watch", "w:test:clean": "rimraf ./coverage", "w:test": "pnpm run w:test:clean && vitest run --coverage", "w:test:ci": "pnpm run w:test:clean && vitest run --coverage --bail 1", - "w:test:watch": "pnpm run w:test:clean && vitest watch --coverage", "w:test:ui": "pnpm run w:test:clean && vitest --ui", - "w:typecheck": "tsc -p ./tsconfig.json --noEmit", - "____ PACKAGE + WORKSPACE COMMANDS __________________________________": "", - "all": "pnpm run format && turbo run w:lint:fix w:test lint:fix build", - "all:ci": "pnpm run format:verify && turbo run w:lint w:test:ci", - "all:all": "pnpm run all pipeline-all", - "lint": "turbo run w:lint", - "lint:fix": "turbo run w:lint:fix", - "test": "turbo run w:test", - "test:watch": "turbo run w:test:watch", - "test:ui": "turbo run w:test:ui" + "w:test:watch": "pnpm run w:test:clean && vitest watch --coverage", + "typecheck": "turbo run typecheck", + "____ STANDARD PACKAGE TASKS ________________________________________": "", + "packages:all": "turbo run pipeline-all", + "packages:all:ci": "turbo run pipeline-ci", + "packages:build": "turbo run build", + "packages:lint": "turbo run lint", + "packages:lint:fix": "turbo run lint:fix", + "packages:test": "turbo run test", + "packages:test:ci": "turbo run test:ci", + "packages:typecheck": "turbo run typecheck" }, "devDependencies": { "@arethetypeswrong/cli": "0.17.0", diff --git a/packages/all-packages/package.json b/packages/all-packages/package.json deleted file mode 100644 index 44c2431..0000000 --- a/packages/all-packages/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@spautz/all-packages", - "private": "true", - "description": "A fake package used to let workspace scripts depend on package scripts, with Turborepo", - "license": "MIT", - "dependencies": { - "@spautz/package-template--docs-website": "workspace:^", - "@spautz/package-template--hello-world-cli": "workspace:^", - "@spautz/package-template--hello-world-ui": "workspace:^", - "@spautz/node-library-template": "workspace:^", - "@spautz/react-library-template": "workspace:^" - } -} diff --git a/packages/node-library-template/package.json b/packages/node-library-template/package.json index cf2719b..5c1f6cc 100644 --- a/packages/node-library-template/package.json +++ b/packages/node-library-template/package.json @@ -52,7 +52,7 @@ "____ HOOKS _________________________________________________________": "", "prepack": "pnpm run clean && pnpm run build", "postpack": "pnpm run build:verifypack", - "____ STANDARD PACKAGE COMMANDS _____________________________________": "", + "____ STANDARD PACKAGE TASKS ________________________________________": "", "all": "turbo run pipeline-all", "all:ci": "turbo run pipeline-ci", "build": "pnpm run build:clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:verify && pnpm run build:legacytypes", @@ -64,8 +64,8 @@ "test:clean": "rimraf ./coverage", "test": "pnpm run test:clean && vitest run --coverage", "test:ci": "pnpm run test:clean && vitest run --coverage --bail 1", - "test:watch": "pnpm run test:clean && vitest watch --coverage", "test:ui": "pnpm run test:clean && vitest --ui", + "test:watch": "pnpm run test:clean && vitest watch --coverage", "typecheck": "tsc -p ./tsconfig.json --noEmit", "____ BUILD TASKS ___________________________________________________": "", "build:clean": "rimraf --glob ./dist ./legacy-types ./*.tgz", diff --git a/packages/react-library-template/package.json b/packages/react-library-template/package.json index 3573adc..5861f62 100644 --- a/packages/react-library-template/package.json +++ b/packages/react-library-template/package.json @@ -52,7 +52,7 @@ "____ HOOKS _________________________________________________________": "", "prepack": "pnpm run clean && pnpm run build", "postpack": "pnpm run build:verifypack", - "____ STANDARD PACKAGE COMMANDS _____________________________________": "", + "____ STANDARD PACKAGE TASKS ________________________________________": "", "all": "turbo run pipeline-all", "all:ci": "turbo run pipeline-ci", "build": "pnpm run build:clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:verify && pnpm run build:legacytypes", @@ -64,8 +64,8 @@ "test:clean": "rimraf ./coverage", "test": "pnpm run test:clean && vitest run --coverage", "test:ci": "pnpm run test:clean && vitest run --coverage --bail 1", - "test:watch": "pnpm run test:clean && vitest watch --coverage", "test:ui": "pnpm run test:clean && vitest --ui", + "test:watch": "pnpm run test:clean && vitest watch --coverage", "typecheck": "tsc -p ./tsconfig.json --noEmit", "____ BUILD STEPS ___________________________________________________": "", "build:clean": "rimraf --glob ./dist ./legacy-types ./*.tgz", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e7d4ee7..88d67eb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -190,24 +190,6 @@ importers: specifier: 2.0.3 version: 2.0.3 - packages/all-packages: - dependencies: - '@spautz/node-library-template': - specifier: workspace:^ - version: link:../node-library-template - '@spautz/package-template--docs-website': - specifier: workspace:^ - version: link:../../docs-website - '@spautz/package-template--hello-world-cli': - specifier: workspace:^ - version: link:../../demos/hello-world-cli - '@spautz/package-template--hello-world-ui': - specifier: workspace:^ - version: link:../../demos/hello-world-ui - '@spautz/react-library-template': - specifier: workspace:^ - version: link:../react-library-template - packages/node-library-template: {} packages/react-library-template: diff --git a/turbo.json b/turbo.json index 6e5c4d6..2802aa1 100644 --- a/turbo.json +++ b/turbo.json @@ -1,5 +1,7 @@ { "$schema": "https://turbo.build/schema.json", + // OPTIONAL: "ui": "tui", + "tasks": { // Batch scripts: run a set of checks for the package "pipeline-all": { @@ -8,31 +10,25 @@ "pipeline-ci": { "dependsOn": ["typecheck", "lint", "test:ci", "build"] }, - // Workspace tasks // When the packages have their own overlapping tasks, those task are run first, as dependencies, // so that future changes at the package level will invalidate at the workspace level "//#w:lint": {}, "//#w:lint:fix": {}, "//#w:test": { - "dependsOn": ["@spautz/all-packages#test"], "outputs": ["coverage/**"] }, "//#w:test:ci": { - "dependsOn": ["@spautz/all-packages#test:ci"], "outputs": ["coverage/**"] }, "//#w:test:watch": { - "dependsOn": ["@spautz/all-packages#dependencies"], "cache": false, "persistent": true }, "//#w:test:ui": { - "dependsOn": ["@spautz/all-packages#dependencies"], "cache": false, "persistent": true }, - // Core package tasks: // Dependencies require a concrete build "dependencies": { @@ -42,7 +38,6 @@ "topo": { "dependsOn": ["^topo"] }, - // Individual/standalone package tasks "build": { "dependsOn": ["^build"],