Skip to content

Commit 20914cc

Browse files
authored
ci: remove prepack and prepublishonly scripts (#14832)
This PR removes the `prepack` and `prepublishonly` scripts, which have become unnecessary and counterproductive. PR #14820 introduced a new `pnpm build:debug` command. However, when running our pre-release publish workflow, each package is currently built twice: once via `pnpm build:debug` (as intended) and again via the hard-coded `prepublishonly` script. Because prepublishonly always runs a clean, non-debug build, it both nullifies the debug output and adds significant overhead by rebuilding everything. All of our release and pack-to-destination scripts already perform a full build ahead of time, so these additional prepublish hooks provide no benefit and actively interfere with the intended debug workflow. This PR removes the redundant scripts to ensure debug builds work as expected and to speed up the release process.
1 parent d97a822 commit 20914cc

File tree

48 files changed

+132
-101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+132
-101
lines changed

packages/admin-bar/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
"clean": "rimraf -g {dist,*.tsbuildinfo}",
3939
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
4040
"lint": "eslint .",
41-
"lint:fix": "eslint . --fix",
42-
"prepublishOnly": "pnpm clean && pnpm turbo build"
41+
"lint:fix": "eslint . --fix"
4342
},
4443
"devDependencies": {
4544
"@payloadcms/eslint-config": "workspace:*",

packages/create-payload-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"lint": "eslint .",
5656
"lint:fix": "eslint . --fix",
5757
"pack-template-files": "node --no-deprecation --import @swc-node/register/esm-register src/scripts/pack-template-files.ts",
58-
"prepublishOnly": "pnpm clean && pnpm build",
5958
"test": "jest",
6059
"typecheck": "tsc"
6160
},

packages/db-d1-sqlite/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@
6868
"build:types": "tsc --emitDeclarationOnly --outDir dist",
6969
"clean": "rimraf -g {dist,*.tsbuildinfo}",
7070
"lint": "eslint .",
71-
"lint:fix": "eslint . --fix",
72-
"prepack": "pnpm clean && pnpm turbo build",
73-
"prepublishOnly": "pnpm clean && pnpm turbo build"
71+
"lint:fix": "eslint . --fix"
7472
},
7573
"dependencies": {
7674
"@payloadcms/drizzle": "workspace:*",

packages/db-mongodb/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
"build:types": "tsc --emitDeclarationOnly --outDir dist",
5050
"clean": "rimraf -g {dist,*.tsbuildinfo}",
5151
"lint": "eslint .",
52-
"lint:fix": "eslint . --fix",
53-
"prepublishOnly": "pnpm clean && pnpm turbo build"
52+
"lint:fix": "eslint . --fix"
5453
},
5554
"dependencies": {
5655
"mongoose": "8.15.1",

packages/db-postgres/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@
7171
"clean": "rimraf -g {dist,*.tsbuildinfo}",
7272
"lint": "eslint .",
7373
"lint:fix": "eslint . --fix",
74-
"prepack": "pnpm clean && pnpm turbo build",
75-
"prepublishOnly": "pnpm clean && pnpm turbo build --filter=./",
7674
"renamePredefinedMigrations": "node --no-deprecation --import @swc-node/register/esm-register ./scripts/renamePredefinedMigrations.ts"
7775
},
7876
"dependencies": {

packages/db-sqlite/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@
6969
"build:types": "tsc --emitDeclarationOnly --outDir dist",
7070
"clean": "rimraf -g {dist,*.tsbuildinfo}",
7171
"lint": "eslint .",
72-
"lint:fix": "eslint . --fix",
73-
"prepack": "pnpm clean && pnpm turbo build",
74-
"prepublishOnly": "pnpm clean && pnpm turbo build"
72+
"lint:fix": "eslint . --fix"
7573
},
7674
"dependencies": {
7775
"@libsql/client": "0.14.0",

packages/db-vercel-postgres/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@
7171
"clean": "rimraf -g {dist,*.tsbuildinfo}",
7272
"lint": "eslint .",
7373
"lint:fix": "eslint . --fix",
74-
"prepack": "pnpm clean && pnpm turbo build",
75-
"prepublishOnly": "pnpm clean && pnpm turbo build",
7674
"renamePredefinedMigrations": "node --no-deprecation --import @swc-node/register/esm-register ./scripts/renamePredefinedMigrations.ts"
7775
},
7876
"dependencies": {

packages/drizzle/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@
5454
"build:types": "tsc --emitDeclarationOnly --outDir dist",
5555
"clean": "rimraf -g {dist,*.tsbuildinfo}",
5656
"lint": "eslint .",
57-
"lint:fix": "eslint . --fix",
58-
"prepack": "pnpm clean && pnpm turbo build",
59-
"prepublishOnly": "pnpm clean && pnpm turbo build"
57+
"lint:fix": "eslint . --fix"
6058
},
6159
"dependencies": {
6260
"console-table-printer": "2.12.1",

packages/email-nodemailer/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
"build:types": "tsc --emitDeclarationOnly --outDir dist",
4040
"clean": "rimraf -g {dist,*.tsbuildinfo}",
4141
"lint": "eslint .",
42-
"lint:fix": "eslint . --fix",
43-
"prepublishOnly": "pnpm clean && pnpm turbo build"
42+
"lint:fix": "eslint . --fix"
4443
},
4544
"dependencies": {
4645
"nodemailer": "7.0.9"

packages/email-resend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"clean": "rimraf -g {dist,*.tsbuildinfo}",
4040
"lint": "eslint .",
4141
"lint:fix": "eslint . --fix",
42-
"prepublishOnly": "pnpm clean && pnpm turbo build",
4342
"test": "jest"
4443
},
4544
"devDependencies": {

0 commit comments

Comments
 (0)