diff --git a/.npmrc b/.npmrc index fac274c900..c83a08985c 100644 --- a/.npmrc +++ b/.npmrc @@ -1,4 +1,5 @@ link-workspace-packages=false public-hoist-pattern[]=*prisma* prefer-workspace-packages=true -update-notifier=false \ No newline at end of file +update-notifier=false +side-effects-cache=false \ No newline at end of file diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 0000000000..2e8212d33c --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,6 @@ +pre-commit: + only: + - ref: main + jobs: + - name: 🚫 Prevent main branch commits + run: exit 1 diff --git a/package.json b/package.json index 82f51afb20..9c9e85925f 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "@types/node": "20.14.14", "autoprefixer": "^10.4.12", "eslint-plugin-turbo": "^2.0.4", + "lefthook": "^1.11.3", "pkg-types": "1.1.3", "prettier": "^3.0.0", "tsx": "^3.7.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 52ab355a58..6b37c0b3e7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,6 +50,9 @@ importers: eslint-plugin-turbo: specifier: ^2.0.4 version: 2.0.5(eslint@8.45.0) + lefthook: + specifier: ^1.11.3 + version: 1.11.3 pkg-types: specifier: 1.1.3 version: 1.1.3 @@ -24809,6 +24812,103 @@ packages: resolution: {integrity: sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==} dev: false + /lefthook-darwin-arm64@1.11.3: + resolution: {integrity: sha512-IYzAOf8Qwqk7q+LoRyy7kSk9vzpUZ5wb/vLzEAH/F86Vay9AUaWe1f2pzeLwFg18qEc1QNklT69h9p/uLQMojA==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /lefthook-darwin-x64@1.11.3: + resolution: {integrity: sha512-z/Wp7UMjE1Vyl+x9sjN3NvN6qKdwgHl+cDf98MKKDg/WyPE5XnzqLm9rLLJgImjyClfH7ptTfZxEyhTG3M3XvQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /lefthook-freebsd-arm64@1.11.3: + resolution: {integrity: sha512-QevwQ7lrv5wBCkk7LLTzT5KR3Bk/5nttSxT1UH2o0EsgirS/c2K5xSgQmV6m3CiZYuCe2Pja4BSIwN3zt17SMw==} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /lefthook-freebsd-x64@1.11.3: + resolution: {integrity: sha512-PYbcyNgdJJ4J2pEO9Ss4oYo5yq4vmQGTKm3RTYbRx4viSWR65hvKCP0C4LnIqspMvmR05SJi2bqe7UBP2t60EA==} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /lefthook-linux-arm64@1.11.3: + resolution: {integrity: sha512-0pBMBAoafOAEg345eOPozsmRjWR0zCr6k+m5ZxwRBZbZx1bQFDqBakQ3TpFCphhcykmgFyaa1KeZJZUOrEsezA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /lefthook-linux-x64@1.11.3: + resolution: {integrity: sha512-eiezheZ/bisBCMB2Ur0mctug/RDFyu39B5wzoE8y4z0W1yw6jHGrWMJ4Y8+5qKZ7fmdZg+7YPuMHZ2eFxOnhQA==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /lefthook-openbsd-arm64@1.11.3: + resolution: {integrity: sha512-DRLTzXdtCj/TizpLcGSqXcnrqvgxeXgn/6nqzclIGqNdKCsNXDzpI0D3sP13Vwwmyoqv2etoTak2IHqZiXZDqg==} + cpu: [arm64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /lefthook-openbsd-x64@1.11.3: + resolution: {integrity: sha512-l7om+ZjWpYrVZyDuElwnucZhEqa7YfwlRaKBenkBxEh2zMje8O6Zodeuma1KmyDbSFvnvEjARo/Ejiot4gLXEw==} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /lefthook-windows-arm64@1.11.3: + resolution: {integrity: sha512-X0iTrql2gfPAkU2dzRwuHWgW5RcqCPbzJtKQ41X6Y/F7iQacRknmuYUGyC81funSvzGAsvlusMVLUvaFjIKnbA==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /lefthook-windows-x64@1.11.3: + resolution: {integrity: sha512-F+ORMn6YJXoS0EXU5LtN1FgV4QX9rC9LucZEkRmK6sKmS7hcb9IHpyb7siRGytArYzJvXVjPbxPBNSBdN4egZQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /lefthook@1.11.3: + resolution: {integrity: sha512-HJp37y62j3j8qzAOODWuUJl4ysLwsDvCTBV6odr3jIRHR/a5e+tI14VQGIBcpK9ysqC3pGWyW5Rp9Jv1YDubyw==} + hasBin: true + requiresBuild: true + optionalDependencies: + lefthook-darwin-arm64: 1.11.3 + lefthook-darwin-x64: 1.11.3 + lefthook-freebsd-arm64: 1.11.3 + lefthook-freebsd-x64: 1.11.3 + lefthook-linux-arm64: 1.11.3 + lefthook-linux-x64: 1.11.3 + lefthook-openbsd-arm64: 1.11.3 + lefthook-openbsd-x64: 1.11.3 + lefthook-windows-arm64: 1.11.3 + lefthook-windows-x64: 1.11.3 + dev: true + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} diff --git a/scripts/publish-prerelease.sh b/scripts/publish-prerelease.sh index ed22ed95b2..26c7d191a1 100755 --- a/scripts/publish-prerelease.sh +++ b/scripts/publish-prerelease.sh @@ -48,6 +48,9 @@ else exit 1 fi +echo "Running: pnpm run clean --filter \"@trigger.dev/*\" --filter \"trigger.dev\"" +pnpm run clean --filter "@trigger.dev/*" --filter "trigger.dev" + echo "Running: pnpm run build --filter \"@trigger.dev/*\" --filter \"trigger.dev\"" pnpm run build --filter "@trigger.dev/*" --filter "trigger.dev"