Skip to content

Commit

Permalink
chore(deps): bump @sanity/pkg-utils & simplify build scripts (#6319)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Apr 11, 2024
1 parent bc6be95 commit 2dd907a
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 182 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/typeCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,3 @@ jobs:
run: pnpm check:types --output-logs=full --log-order=grouped
env:
NODE_OPTIONS: --max_old_space_size=8192

- name: Check package.json with @sanity/pkg-utils
# Turbo will ensure `build` is run before each package, as pkg-utils requires
# as it will check if files declared in package.json `main`, `exports`, `types` and more exists
run: pnpm check:package --output-logs=full --log-order=grouped
env:
NODE_OPTIONS: --max_old_space_size=8192
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"check:lint": "turbo run lint -- --quiet",
"check:react-exhaustive-deps": "run-s check:lint -- --quiet --rule 'react-hooks/exhaustive-deps: [error, {additionalHooks: \"(useAsync|useMemoObservable|useObservableCallback)\"}]'",
"check:test": "run-s test -- --silent",
"check:package": "turbo run check:package --filter='./packages/*' --filter='./packages/@sanity/*'",
"check:types": "tsc && turbo run check:types --filter='./packages/*' --filter='./packages/@sanity/*'",
"chore:format:fix": "prettier --cache --write .",
"chore:lint:fix": "turbo run lint -- --quiet --fix",
Expand Down Expand Up @@ -101,7 +100,7 @@
"@sanity/client": "^6.15.11",
"@sanity/eslint-config-i18n": "1.0.0",
"@sanity/eslint-config-studio": "^4.0.0",
"@sanity/pkg-utils": "6.1.0",
"@sanity/pkg-utils": "6.4.1",
"@sanity/test": "0.0.1-alpha.1",
"@sanity/tsdoc": "1.0.22",
"@sanity/uuid": "^3.0.2",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/block-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/index.ts",
"types": "./lib/index.d.ts",
"files": [
"lib",
"src"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib",
"coverage": "NODE_ENV=test jest --coverage",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/index.ts",
"types": "./lib/index.d.ts",
"bin": {
"sanity": "./bin/sanity"
Expand All @@ -47,8 +46,7 @@
"templates"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib",
"lint": "eslint .",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/_exports/index.ts",
"types": "./lib/index.d.ts",
"files": [
"lib",
Expand All @@ -42,8 +41,7 @@
"babel.config.json"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib coverage",
"lint": "eslint .",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/index.ts",
"types": "./lib/index.d.ts",
"files": [
"lib",
"src"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib coverage",
"lint": "eslint .",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/_exports/index.ts",
"types": "./lib/index.d.ts",
"files": [
"lib",
"src",
"!**/__tests__/**"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib coverage",
"lint": "eslint .",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/mutator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/index.ts",
"types": "./lib/index.d.ts",
"files": [
"lib",
"src"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib",
"lint": "eslint .",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/portable-text-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/index.ts",
"types": "./lib/index.d.ts",
"files": [
"lib",
"src"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib",
"dev": "cd ./e2e-tests/ && ts-node serve",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/_exports/index.ts",
"types": "./lib/index.d.ts",
"typesVersions": {
"*": {
Expand All @@ -54,8 +53,7 @@
"src"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf _internal.js lib",
"lint": "eslint .",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/index.ts",
"types": "./lib/index.d.ts",
"files": [
"lib",
"src"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib",
"prepublishOnly": "turbo run build",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/_exports/index.ts",
"types": "./lib/index.d.ts",
"typesVersions": {
"*": {
Expand Down Expand Up @@ -114,8 +113,7 @@
"paths.js"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf client.js concurrency-limiter.js content.js createSafeJsonParser.js fs.js legacyDateFormat.js lib paths.js",
"prepublishOnly": "turbo run build",
Expand Down
4 changes: 1 addition & 3 deletions packages/@sanity/vision/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/index.ts",
"types": "./lib/index.d.ts",
"files": [
"lib",
"src"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib",
"prepublishOnly": "turbo run build",
Expand Down
4 changes: 1 addition & 3 deletions packages/groq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@
},
"main": "./lib/groq.js",
"module": "./lib/groq.esm.js",
"source": "./src/groq.ts",
"types": "./lib/groq.d.ts",
"files": [
"lib",
"src"
],
"scripts": {
"build": "run-s clean && pkg-utils build --strict",
"check:package": "pkg-utils --strict",
"build": "pkg-utils build --strict --check --clean",
"check:types": "tsc",
"clean": "rimraf lib",
"lint": "eslint .",
Expand Down
6 changes: 2 additions & 4 deletions packages/sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
},
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/_exports/index.ts",
"types": "./lib/index.d.ts",
"typesVersions": {
"*": {
Expand Down Expand Up @@ -125,8 +124,7 @@
"structure.js"
],
"scripts": {
"build": "run-s clean && pkg-utils build",
"check:package": "pkg-utils",
"build": "pkg-utils build --check --clean",
"check:types": "tsc",
"clean": "rimraf _internal.js _internalBrowser.js cli.js desk.js migrate.js presentation.js router.js structure.js lib",
"coverage": "jest --coverage",
Expand Down Expand Up @@ -257,7 +255,7 @@
"@repo/package.config": "workspace:*",
"@sanity/codegen": "3.37.2",
"@sanity/generate-help-url": "^3.0.0",
"@sanity/pkg-utils": "6.1.0",
"@sanity/pkg-utils": "6.4.1",
"@sanity/tsdoc": "1.0.22",
"@sanity/ui-workshop": "^1.2.11",
"@testing-library/jest-dom": "^6.2.0",
Expand Down
Loading

0 comments on commit 2dd907a

Please sign in to comment.