ci: update release script
This commit is contained in:
@@ -6,6 +6,8 @@ module.exports = {
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'no-console': 'off',
|
||||
'perfectionist/sort-object-types': 'off',
|
||||
'perfectionist/sort-objects': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "pnpm run build:payload",
|
||||
"build": "pnpm run build:core",
|
||||
"build:all": "turbo build",
|
||||
"build:core": "turbo build --filter \"!@payloadcms/plugin-*\"",
|
||||
"build:plugins": "turbo build --filter \"@payloadcms/plugin-*\"",
|
||||
"build:app": "next build",
|
||||
"build:create-payload-app": "turbo build --filter create-payload-app",
|
||||
"build:db-mongodb": "turbo build --filter db-mongodb",
|
||||
@@ -85,8 +87,7 @@
|
||||
"@types/shelljs": "0.8.12",
|
||||
"@types/testing-library__jest-dom": "5.14.8",
|
||||
"add-stream": "^1.0.0",
|
||||
"chalk": "^5.3.0",
|
||||
"chalk-template": "1.1.0",
|
||||
"chalk": "^4.1.2",
|
||||
"concat-stream": "^2.0.0",
|
||||
"conventional-changelog": "^5.1.0",
|
||||
"conventional-changelog-conventionalcommits": "^7.0.2",
|
||||
|
||||
203
pnpm-lock.yaml
generated
203
pnpm-lock.yaml
generated
@@ -108,11 +108,8 @@ importers:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
chalk:
|
||||
specifier: ^5.3.0
|
||||
version: 5.3.0
|
||||
chalk-template:
|
||||
specifier: 1.1.0
|
||||
version: 1.1.0
|
||||
specifier: ^4.1.2
|
||||
version: 4.1.2
|
||||
concat-stream:
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
@@ -142,7 +139,7 @@ importers:
|
||||
version: 8.6.0
|
||||
drizzle-orm:
|
||||
specifier: 0.29.4
|
||||
version: 0.29.4(@libsql/client@0.5.2)(@types/pg@8.10.2)(@types/react@18.2.15)(pg@8.11.3)(react@18.2.0)
|
||||
version: 0.29.4(@types/react@18.2.15)(react@18.2.0)
|
||||
execa:
|
||||
specifier: 5.1.1
|
||||
version: 5.1.1
|
||||
@@ -193,7 +190,7 @@ importers:
|
||||
version: 9.1.6
|
||||
next:
|
||||
specifier: 14.1.1-canary.26
|
||||
version: 14.1.1-canary.26(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1)
|
||||
version: 14.1.1-canary.26(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)
|
||||
node-mocks-http:
|
||||
specifier: ^1.14.1
|
||||
version: 1.14.1
|
||||
@@ -251,6 +248,9 @@ importers:
|
||||
ts-node:
|
||||
specifier: 10.9.2
|
||||
version: 10.9.2(@swc/core@1.4.2)(@types/node@20.5.7)(typescript@5.2.2)
|
||||
tsx:
|
||||
specifier: ^4.7.1
|
||||
version: 4.7.1
|
||||
turbo:
|
||||
specifier: ^1.12.4
|
||||
version: 1.12.4
|
||||
@@ -3161,7 +3161,6 @@ packages:
|
||||
cpu: [ppc64]
|
||||
os: [aix]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-arm64@0.18.20:
|
||||
@@ -3179,7 +3178,6 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-arm@0.18.20:
|
||||
@@ -3197,7 +3195,6 @@ packages:
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/android-x64@0.18.20:
|
||||
@@ -3215,7 +3212,6 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/darwin-arm64@0.18.20:
|
||||
@@ -3233,7 +3229,6 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/darwin-x64@0.18.20:
|
||||
@@ -3251,7 +3246,6 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/freebsd-arm64@0.18.20:
|
||||
@@ -3269,7 +3263,6 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/freebsd-x64@0.18.20:
|
||||
@@ -3287,7 +3280,6 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-arm64@0.18.20:
|
||||
@@ -3305,7 +3297,6 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-arm@0.18.20:
|
||||
@@ -3323,7 +3314,6 @@ packages:
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-ia32@0.18.20:
|
||||
@@ -3341,7 +3331,6 @@ packages:
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-loong64@0.18.20:
|
||||
@@ -3359,7 +3348,6 @@ packages:
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-mips64el@0.18.20:
|
||||
@@ -3377,7 +3365,6 @@ packages:
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-ppc64@0.18.20:
|
||||
@@ -3395,7 +3382,6 @@ packages:
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-riscv64@0.18.20:
|
||||
@@ -3413,7 +3399,6 @@ packages:
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-s390x@0.18.20:
|
||||
@@ -3431,7 +3416,6 @@ packages:
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-x64@0.18.20:
|
||||
@@ -3449,7 +3433,6 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/netbsd-x64@0.18.20:
|
||||
@@ -3467,7 +3450,6 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/openbsd-x64@0.18.20:
|
||||
@@ -3485,7 +3467,6 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/sunos-x64@0.18.20:
|
||||
@@ -3503,7 +3484,6 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-arm64@0.18.20:
|
||||
@@ -3521,7 +3501,6 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-ia32@0.18.20:
|
||||
@@ -3539,7 +3518,6 @@ packages:
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@esbuild/win32-x64@0.18.20:
|
||||
@@ -3557,7 +3535,6 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@eslint-community/eslint-utils@4.4.0(eslint@8.48.0):
|
||||
@@ -4464,17 +4441,20 @@ packages:
|
||||
- bufferutil
|
||||
- encoding
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/@libsql/core@0.5.2:
|
||||
resolution: {integrity: sha512-sBo55JJXRiggymOy91MvI+lJ15U8BdWBHytAeszpebhhbrkuTfd+5jDoB3sSZ0dMH0NIPAVQEEQnQldAO+SDXg==}
|
||||
dependencies:
|
||||
js-base64: 3.7.7
|
||||
dev: false
|
||||
|
||||
/@libsql/darwin-arm64@0.3.4:
|
||||
resolution: {integrity: sha512-scNlltUTZp74jqjzDVVBtKUy5nZD+0+Q3CR8RJwCKrf73I/0IAKfvwddx4gsinymFqMn8hyiTGIZukgHlBjftA==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@libsql/darwin-x64@0.3.4:
|
||||
@@ -4482,6 +4462,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@libsql/hrana-client@0.5.6:
|
||||
@@ -4495,6 +4476,7 @@ packages:
|
||||
- bufferutil
|
||||
- encoding
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/@libsql/isomorphic-fetch@0.1.12:
|
||||
resolution: {integrity: sha512-MRo4UcmjAGAa3ac56LoD5OE13m2p0lu0VEtZC2NZMcogM/jc5fU9YtMQ3qbPjFJ+u2BBjFZgMPkQaLS1dlMhpg==}
|
||||
@@ -4503,6 +4485,7 @@ packages:
|
||||
node-fetch: 2.7.0
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: false
|
||||
|
||||
/@libsql/isomorphic-ws@0.1.5:
|
||||
resolution: {integrity: sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg==}
|
||||
@@ -4512,12 +4495,14 @@ packages:
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/@libsql/linux-arm64-gnu@0.3.4:
|
||||
resolution: {integrity: sha512-IewL34c9WyxPtvLQqYb5WX3IEqFjprDkFjXmySkDrF9+3k2AfmCurnXjJwOrWHu2GlNLo84mwSVsCQ/jfm8lPw==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@libsql/linux-arm64-musl@0.3.4:
|
||||
@@ -4525,6 +4510,7 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@libsql/linux-x64-gnu@0.3.4:
|
||||
@@ -4532,6 +4518,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@libsql/linux-x64-musl@0.3.4:
|
||||
@@ -4539,6 +4526,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@libsql/win32-x64-msvc@0.3.4:
|
||||
@@ -4546,6 +4534,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@ljharb/through@2.3.12:
|
||||
@@ -4598,6 +4587,7 @@ packages:
|
||||
|
||||
/@neon-rs/load@0.0.4:
|
||||
resolution: {integrity: sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==}
|
||||
dev: false
|
||||
|
||||
/@next/bundle-analyzer@14.1.0:
|
||||
resolution: {integrity: sha512-RJWjnlMp/1WSW0ahAdawV22WgJiC6BVaFS5Xfhw6gP7NJEX3cAJjh4JqSHKGr8GnLNRaFCVTQdDPoX84E421BA==}
|
||||
@@ -6197,6 +6187,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/node': 16.18.85
|
||||
form-data: 4.0.0
|
||||
dev: false
|
||||
|
||||
/@types/node-fetch@2.6.4:
|
||||
resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==}
|
||||
@@ -6439,6 +6430,7 @@ packages:
|
||||
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
|
||||
dependencies:
|
||||
'@types/node': 16.18.85
|
||||
dev: false
|
||||
|
||||
/@types/yargs-parser@21.0.3:
|
||||
resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==}
|
||||
@@ -7553,6 +7545,7 @@ packages:
|
||||
/buffer-writer@2.0.0:
|
||||
resolution: {integrity: sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==}
|
||||
engines: {node: '>=4'}
|
||||
dev: false
|
||||
|
||||
/buffer@4.9.2:
|
||||
resolution: {integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==}
|
||||
@@ -7675,13 +7668,6 @@ packages:
|
||||
/caniuse-lite@1.0.30001591:
|
||||
resolution: {integrity: sha512-PCzRMei/vXjJyL5mJtzNiUCKP59dm8Apqc3PH8gJkMnMXZGox93RbE76jHsmLwmIo6/3nsYIpJtx0O7u5PqFuQ==}
|
||||
|
||||
/chalk-template@1.1.0:
|
||||
resolution: {integrity: sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg==}
|
||||
engines: {node: '>=14.16'}
|
||||
dependencies:
|
||||
chalk: 5.3.0
|
||||
dev: true
|
||||
|
||||
/chalk@2.4.2:
|
||||
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -9025,6 +9011,82 @@ packages:
|
||||
'@types/react': 18.2.15
|
||||
pg: 8.11.3
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/drizzle-orm@0.29.4(@types/react@18.2.15)(react@18.2.0):
|
||||
resolution: {integrity: sha512-ZnSM8TAxFhzH7p1s3+w3pRE/eKaOeNkH9SKitm717pubDVVcV2I0BCDBPGKV+pe02+wMfw37ntlTcCyo2rA3IA==}
|
||||
peerDependencies:
|
||||
'@aws-sdk/client-rds-data': '>=3'
|
||||
'@cloudflare/workers-types': '>=3'
|
||||
'@libsql/client': '*'
|
||||
'@neondatabase/serverless': '>=0.1'
|
||||
'@opentelemetry/api': ^1.4.1
|
||||
'@planetscale/database': '>=1'
|
||||
'@types/better-sqlite3': '*'
|
||||
'@types/pg': '*'
|
||||
'@types/react': '>=18'
|
||||
'@types/sql.js': '*'
|
||||
'@vercel/postgres': '*'
|
||||
better-sqlite3: '>=7'
|
||||
bun-types: '*'
|
||||
expo-sqlite: '>=13.2.0'
|
||||
knex: '*'
|
||||
kysely: '*'
|
||||
mysql2: '>=2'
|
||||
pg: '>=8'
|
||||
postgres: '>=3'
|
||||
react: ^18.2.0
|
||||
sql.js: '>=1'
|
||||
sqlite3: '>=5'
|
||||
peerDependenciesMeta:
|
||||
'@aws-sdk/client-rds-data':
|
||||
optional: true
|
||||
'@cloudflare/workers-types':
|
||||
optional: true
|
||||
'@libsql/client':
|
||||
optional: true
|
||||
'@neondatabase/serverless':
|
||||
optional: true
|
||||
'@opentelemetry/api':
|
||||
optional: true
|
||||
'@planetscale/database':
|
||||
optional: true
|
||||
'@types/better-sqlite3':
|
||||
optional: true
|
||||
'@types/pg':
|
||||
optional: true
|
||||
'@types/react':
|
||||
optional: true
|
||||
'@types/sql.js':
|
||||
optional: true
|
||||
'@vercel/postgres':
|
||||
optional: true
|
||||
better-sqlite3:
|
||||
optional: true
|
||||
bun-types:
|
||||
optional: true
|
||||
expo-sqlite:
|
||||
optional: true
|
||||
knex:
|
||||
optional: true
|
||||
kysely:
|
||||
optional: true
|
||||
mysql2:
|
||||
optional: true
|
||||
pg:
|
||||
optional: true
|
||||
postgres:
|
||||
optional: true
|
||||
react:
|
||||
optional: true
|
||||
sql.js:
|
||||
optional: true
|
||||
sqlite3:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/react': 18.2.15
|
||||
react: 18.2.0
|
||||
dev: true
|
||||
|
||||
/duplexer@0.1.2:
|
||||
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
|
||||
@@ -9352,7 +9414,6 @@ packages:
|
||||
'@esbuild/win32-arm64': 0.19.12
|
||||
'@esbuild/win32-ia32': 0.19.12
|
||||
'@esbuild/win32-x64': 0.19.12
|
||||
dev: false
|
||||
|
||||
/escalade@3.1.2:
|
||||
resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==}
|
||||
@@ -10450,7 +10511,6 @@ packages:
|
||||
resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==}
|
||||
dependencies:
|
||||
resolve-pkg-maps: 1.0.0
|
||||
dev: false
|
||||
|
||||
/get-uri@6.0.3:
|
||||
resolution: {integrity: sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==}
|
||||
@@ -12276,6 +12336,7 @@ packages:
|
||||
|
||||
/js-base64@3.7.7:
|
||||
resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}
|
||||
dev: false
|
||||
|
||||
/js-beautify@1.15.1:
|
||||
resolution: {integrity: sha512-ESjNzSlt/sWE8sciZH8kBF8BPlwXPwhR6pWKAw8bw4Bwj+iZcnKW6ONWUutJ7eObuBZQpiIb8S7OYspWrKt7rA==}
|
||||
@@ -12604,6 +12665,7 @@ packages:
|
||||
'@libsql/linux-x64-gnu': 0.3.4
|
||||
'@libsql/linux-x64-musl': 0.3.4
|
||||
'@libsql/win32-x64-msvc': 0.3.4
|
||||
dev: false
|
||||
|
||||
/lilconfig@2.1.0:
|
||||
resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==}
|
||||
@@ -13307,6 +13369,45 @@ packages:
|
||||
- babel-plugin-macros
|
||||
dev: false
|
||||
|
||||
/next@14.1.1-canary.26(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0):
|
||||
resolution: {integrity: sha512-vHj7hCL9qn8AhRXNEC1ujTO55w3IjckEE1tkmxwyqA3ypTH9PtxSnU6eFfC9C67Xf/Q2C5Btug7Yqvw7pxGkhg==}
|
||||
engines: {node: '>=18.17.0'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@opentelemetry/api': ^1.1.0
|
||||
react: ^18.2.0
|
||||
react-dom: ^18.2.0
|
||||
sass: ^1.3.0
|
||||
peerDependenciesMeta:
|
||||
'@opentelemetry/api':
|
||||
optional: true
|
||||
sass:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@next/env': 14.1.1-canary.26
|
||||
'@swc/helpers': 0.5.2
|
||||
busboy: 1.6.0
|
||||
caniuse-lite: 1.0.30001591
|
||||
graceful-fs: 4.2.11
|
||||
postcss: 8.4.31
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0(react@18.2.0)
|
||||
styled-jsx: 5.1.1(@babel/core@7.24.0)(react@18.2.0)
|
||||
optionalDependencies:
|
||||
'@next/swc-darwin-arm64': 14.1.1-canary.26
|
||||
'@next/swc-darwin-x64': 14.1.1-canary.26
|
||||
'@next/swc-linux-arm64-gnu': 14.1.1-canary.26
|
||||
'@next/swc-linux-arm64-musl': 14.1.1-canary.26
|
||||
'@next/swc-linux-x64-gnu': 14.1.1-canary.26
|
||||
'@next/swc-linux-x64-musl': 14.1.1-canary.26
|
||||
'@next/swc-win32-arm64-msvc': 14.1.1-canary.26
|
||||
'@next/swc-win32-ia32-msvc': 14.1.1-canary.26
|
||||
'@next/swc-win32-x64-msvc': 14.1.1-canary.26
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- babel-plugin-macros
|
||||
dev: true
|
||||
|
||||
/next@14.1.1-canary.26(@babel/core@7.24.0)(react-dom@18.2.0)(react@18.2.0)(sass@1.71.1):
|
||||
resolution: {integrity: sha512-vHj7hCL9qn8AhRXNEC1ujTO55w3IjckEE1tkmxwyqA3ypTH9PtxSnU6eFfC9C67Xf/Q2C5Btug7Yqvw7pxGkhg==}
|
||||
engines: {node: '>=18.17.0'}
|
||||
@@ -13345,6 +13446,7 @@ packages:
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- babel-plugin-macros
|
||||
dev: false
|
||||
|
||||
/node-domexception@1.0.0:
|
||||
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
|
||||
@@ -13788,6 +13890,7 @@ packages:
|
||||
|
||||
/packet-reader@1.0.0:
|
||||
resolution: {integrity: sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==}
|
||||
dev: false
|
||||
|
||||
/parent-module@1.0.1:
|
||||
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
|
||||
@@ -13939,10 +14042,12 @@ packages:
|
||||
/pg-cloudflare@1.1.1:
|
||||
resolution: {integrity: sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==}
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/pg-connection-string@2.6.2:
|
||||
resolution: {integrity: sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==}
|
||||
dev: false
|
||||
|
||||
/pg-int8@1.0.1:
|
||||
resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==}
|
||||
@@ -13958,6 +14063,7 @@ packages:
|
||||
pg: '>=8.0'
|
||||
dependencies:
|
||||
pg: 8.11.3
|
||||
dev: false
|
||||
|
||||
/pg-protocol@1.6.0:
|
||||
resolution: {integrity: sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==}
|
||||
@@ -13971,6 +14077,7 @@ packages:
|
||||
postgres-bytea: 1.0.0
|
||||
postgres-date: 1.0.7
|
||||
postgres-interval: 1.2.0
|
||||
dev: false
|
||||
|
||||
/pg-types@4.0.2:
|
||||
resolution: {integrity: sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==}
|
||||
@@ -14002,11 +14109,13 @@ packages:
|
||||
pgpass: 1.0.5
|
||||
optionalDependencies:
|
||||
pg-cloudflare: 1.1.1
|
||||
dev: false
|
||||
|
||||
/pgpass@1.0.5:
|
||||
resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==}
|
||||
dependencies:
|
||||
split2: 4.2.0
|
||||
dev: false
|
||||
|
||||
/picocolors@1.0.0:
|
||||
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
|
||||
@@ -14830,6 +14939,7 @@ packages:
|
||||
/postgres-array@2.0.0:
|
||||
resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==}
|
||||
engines: {node: '>=4'}
|
||||
dev: false
|
||||
|
||||
/postgres-array@3.0.2:
|
||||
resolution: {integrity: sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==}
|
||||
@@ -14838,6 +14948,7 @@ packages:
|
||||
/postgres-bytea@1.0.0:
|
||||
resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/postgres-bytea@3.0.0:
|
||||
resolution: {integrity: sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==}
|
||||
@@ -14848,6 +14959,7 @@ packages:
|
||||
/postgres-date@1.0.7:
|
||||
resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/postgres-date@2.1.0:
|
||||
resolution: {integrity: sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==}
|
||||
@@ -14858,6 +14970,7 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dependencies:
|
||||
xtend: 4.0.2
|
||||
dev: false
|
||||
|
||||
/postgres-interval@3.0.0:
|
||||
resolution: {integrity: sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==}
|
||||
@@ -15562,7 +15675,6 @@ packages:
|
||||
|
||||
/resolve-pkg-maps@1.0.0:
|
||||
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
|
||||
dev: false
|
||||
|
||||
/resolve.exports@2.0.2:
|
||||
resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==}
|
||||
@@ -16930,6 +17042,17 @@ packages:
|
||||
typescript: 5.2.2
|
||||
dev: false
|
||||
|
||||
/tsx@4.7.1:
|
||||
resolution: {integrity: sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
esbuild: 0.19.12
|
||||
get-tsconfig: 4.7.2
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
dev: true
|
||||
|
||||
/tunnel@0.0.6:
|
||||
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
|
||||
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
|
||||
|
||||
@@ -5,13 +5,24 @@ const packagesDir = path.resolve(__dirname, '../../packages')
|
||||
|
||||
export type PackageDetails = {
|
||||
name: string
|
||||
shortName: string
|
||||
packagePath: string
|
||||
shortName: string
|
||||
version: string
|
||||
}
|
||||
|
||||
const whitelist3_0 = [
|
||||
'payload',
|
||||
'translations',
|
||||
'ui',
|
||||
'next',
|
||||
'graphql',
|
||||
|
||||
'db-mongodb',
|
||||
'richtext-slate',
|
||||
]
|
||||
|
||||
export const getPackageDetails = async (): Promise<PackageDetails[]> => {
|
||||
const packageDirs = fse.readdirSync(packagesDir).filter((d) => d !== 'eslint-config-payload')
|
||||
const packageDirs = fse.readdirSync(packagesDir).filter((d) => whitelist3_0.includes(d))
|
||||
|
||||
const packageDetails = await Promise.all(
|
||||
packageDirs.map(async (dirName) => {
|
||||
@@ -21,8 +32,8 @@ export const getPackageDetails = async (): Promise<PackageDetails[]> => {
|
||||
|
||||
return {
|
||||
name: packageJson.name as string,
|
||||
shortName: dirName,
|
||||
packagePath: path.resolve(packagesDir, dirName),
|
||||
shortName: dirName,
|
||||
version: packageJson.version,
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { ExecSyncOptions } from 'child_process'
|
||||
|
||||
import chalk from 'chalk'
|
||||
import chalkTemplate from 'chalk-template'
|
||||
import { ExecSyncOptions, execSync } from 'child_process'
|
||||
import { execSync } from 'child_process'
|
||||
import execa from 'execa'
|
||||
import fse from 'fs-extra'
|
||||
import minimist from 'minimist'
|
||||
@@ -8,6 +9,7 @@ import path from 'path'
|
||||
import prompts from 'prompts'
|
||||
import semver from 'semver'
|
||||
import simpleGit from 'simple-git'
|
||||
|
||||
import { getPackageDetails } from './lib/getPackageDetails'
|
||||
import { updateChangelog } from './utils/updateChangelog'
|
||||
|
||||
@@ -18,17 +20,25 @@ const git = simpleGit(rootPath)
|
||||
const execOpts: ExecSyncOptions = { stdio: 'inherit' }
|
||||
const args = minimist(process.argv.slice(2))
|
||||
|
||||
const { tag = 'latest', bump = 'patch', 'dry-run': dryRun = true, changelog = false } = args
|
||||
const {
|
||||
bump = 'patch',
|
||||
changelog = false,
|
||||
'dry-run': dryRun,
|
||||
'git-tag': gitTag = false,
|
||||
tag = 'latest',
|
||||
} = args
|
||||
|
||||
const logPrefix = dryRun ? chalk.bold.magenta('[dry-run] >') : ''
|
||||
|
||||
const cmdRunner = (dryRun: boolean) => (cmd: string, execOpts: ExecSyncOptions) => {
|
||||
if (dryRun) {
|
||||
console.log(logPrefix, cmd)
|
||||
} else {
|
||||
execSync(cmd, execOpts)
|
||||
const cmdRunner =
|
||||
(dryRun: boolean, gitTag: boolean) => (cmd: string, execOpts: ExecSyncOptions) => {
|
||||
const isGitCommand = cmd.startsWith('git')
|
||||
if (dryRun || (isGitCommand && !gitTag)) {
|
||||
console.log(logPrefix, cmd)
|
||||
} else {
|
||||
execSync(cmd, execOpts)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const cmdRunnerAsync =
|
||||
(dryRun: boolean) => async (cmd: string, args: string[], options?: execa.Options) => {
|
||||
@@ -45,7 +55,9 @@ async function main() {
|
||||
console.log(chalk.bold.yellow(chalk.bold.magenta('\n 👀 Dry run mode enabled')))
|
||||
}
|
||||
|
||||
const runCmd = cmdRunner(dryRun)
|
||||
console.log({ args })
|
||||
|
||||
const runCmd = cmdRunner(dryRun, gitTag)
|
||||
const runCmdAsync = cmdRunnerAsync(dryRun)
|
||||
|
||||
if (!semver.RELEASE_TYPES.includes(bump)) {
|
||||
@@ -64,29 +76,29 @@ async function main() {
|
||||
|
||||
const lastTag = (await git.tags()).all.reverse().filter((t) => t.startsWith('v'))?.[0]
|
||||
|
||||
if (monorepoVersion !== lastTag.replace('v', '')) {
|
||||
throw new Error(
|
||||
`Version in package.json (${monorepoVersion}) does not match last tag (${lastTag})`,
|
||||
)
|
||||
// TODO: Re-enable this check once we start tagging releases again
|
||||
// if (monorepoVersion !== lastTag.replace('v', '')) {
|
||||
// throw new Error(
|
||||
// `Version in package.json (${monorepoVersion}) does not match last tag (${lastTag})`,
|
||||
// )
|
||||
// }
|
||||
|
||||
const nextReleaseVersion = semver.inc(monorepoVersion, bump, undefined, tag)
|
||||
|
||||
if (!nextReleaseVersion) {
|
||||
abort(`Invalid nextReleaseVersion: ${nextReleaseVersion}`)
|
||||
return // For TS type checking
|
||||
}
|
||||
const nextReleaseVersion = semver.inc(monorepoVersion, bump, undefined, tag) as string
|
||||
|
||||
const packageDetails = await getPackageDetails()
|
||||
|
||||
console.log(chalkTemplate`
|
||||
{bold Version: ${monorepoVersion} => {green ${nextReleaseVersion}}}
|
||||
|
||||
{bold.yellow Bump: ${bump}}
|
||||
{bold.yellow Tag: ${tag}}
|
||||
|
||||
{bold.green Changes (${packageDetails.length} packages):}
|
||||
|
||||
${packageDetails
|
||||
.map((p) => {
|
||||
return ` - ${p.name.padEnd(32)} ${p.version} => ${chalk.green(nextReleaseVersion)}`
|
||||
})
|
||||
.join('\n')}
|
||||
`)
|
||||
console.log(chalk.bold(`\n Version: ${monorepoVersion} => ${chalk.green(nextReleaseVersion)}\n`))
|
||||
console.log(chalk.bold.yellow(` Bump: ${bump}`))
|
||||
console.log(chalk.bold.yellow(` Tag: ${tag}\n`))
|
||||
console.log(chalk.bold.green(` Changes (${packageDetails.length} packages):\n`))
|
||||
console.log(
|
||||
`${packageDetails.map((p) => ` - ${p.name.padEnd(32)} ${p.version} => ${chalk.green(nextReleaseVersion)}`).join('\n')}\n`,
|
||||
)
|
||||
|
||||
const confirmPublish = await confirm('Are you sure your want to create these versions?')
|
||||
|
||||
@@ -96,7 +108,12 @@ ${packageDetails
|
||||
|
||||
// Prebuild all packages
|
||||
header(`\n🔨 Prebuilding all packages...`)
|
||||
const buildResult = await execa('pnpm', ['build:all'], {
|
||||
await execa('pnpm', ['install'], {
|
||||
cwd: rootPath,
|
||||
stdio: 'inherit',
|
||||
})
|
||||
|
||||
const buildResult = await execa('pnpm', ['build:core', '--output-logs=errors-only'], {
|
||||
cwd: rootPath,
|
||||
// stdio: ['ignore', 'ignore', 'pipe'],
|
||||
stdio: 'inherit',
|
||||
@@ -145,53 +162,44 @@ ${packageDetails
|
||||
runCmd(`git commit -m "chore(release): v${nextReleaseVersion} [skip ci]"`, execOpts)
|
||||
|
||||
// Tag
|
||||
header(`🏷️ Tagging release v${nextReleaseVersion}`)
|
||||
header(`🏷️ Tagging release v${nextReleaseVersion}`, { enable: gitTag })
|
||||
runCmd(`git tag -a v${nextReleaseVersion} -m "v${nextReleaseVersion}"`, execOpts)
|
||||
|
||||
const otp = dryRun ? undefined : await question('Enter your 2FA code')
|
||||
|
||||
// Publish
|
||||
const results: { name: string; success: boolean }[] = await Promise.all(
|
||||
packageDetails.map(async (pkg) => {
|
||||
try {
|
||||
console.log(logPrefix, chalk.bold(`🚀 ${pkg.name} publishing...`))
|
||||
const cmdArgs = [
|
||||
'publish',
|
||||
'-C',
|
||||
pkg.packagePath,
|
||||
'--no-git-checks',
|
||||
'--tag',
|
||||
tag,
|
||||
'--dry-run', // TODO: Use dryRun var
|
||||
]
|
||||
const cmdArgs = ['publish', '-C', pkg.packagePath, '--no-git-checks', '--tag', tag]
|
||||
if (dryRun) {
|
||||
cmdArgs.push('--dry-run')
|
||||
} else {
|
||||
cmdArgs.push('--otp', otp)
|
||||
}
|
||||
const { exitCode } = await execa('pnpm', cmdArgs, {
|
||||
cwd: rootPath,
|
||||
// stdio: ['ignore', 'ignore', 'pipe'],
|
||||
stdio: 'inherit',
|
||||
stdio: ['ignore', 'ignore', 'pipe'],
|
||||
// stdio: 'inherit',
|
||||
})
|
||||
|
||||
if (exitCode !== 0) {
|
||||
console.log(chalk.bold.red(`\n\np❌ ${pkg.name} ERROR: pnpm publish failed\n\n`))
|
||||
console.log(chalk.bold.red(`\n\n❌ ${pkg.name} ERROR: pnpm publish failed\n\n`))
|
||||
return { name: pkg.name, success: false }
|
||||
}
|
||||
|
||||
console.log(chalk.green(`✅ ${pkg.name} published`))
|
||||
console.log(`${logPrefix} ${chalk.green(`✅ ${pkg.name} published`)}`)
|
||||
return { name: pkg.name, success: true }
|
||||
} catch (error) {
|
||||
console.error(chalk.bold.red(`\n\np❌ ${pkg.name} ERROR: ${error.message}\n\n`))
|
||||
console.error(chalk.bold.red(`\n\n❌ ${pkg.name} ERROR: ${error.message}\n\n`))
|
||||
return { name: pkg.name, success: false }
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
||||
console.log(chalkTemplate`
|
||||
|
||||
{bold.green Results:}
|
||||
|
||||
${results
|
||||
.map(
|
||||
({ name, success }) => ` ${success ? chalk.bold.green('✅') : chalk.bold.red('❌')} ${name}`,
|
||||
)
|
||||
.join('\n')}
|
||||
`)
|
||||
console.log(chalk.bold.green(`\n\nResults:\n\n`))
|
||||
console.log(results.map(({ name, success }) => ` ${success ? '✅' : '❌'} ${name}`).join('\n'))
|
||||
|
||||
// TODO: Push commit and tag
|
||||
// const push = await confirm(`Push commits and tags?`)
|
||||
@@ -208,7 +216,7 @@ main().catch((error) => {
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
async function abort(message = 'Abort', exitCode = 1) {
|
||||
function abort(message = 'Abort', exitCode = 1) {
|
||||
console.error(chalk.bold.red(`\n${message}\n`))
|
||||
process.exit(exitCode)
|
||||
}
|
||||
@@ -217,9 +225,9 @@ async function confirm(message: string): Promise<boolean> {
|
||||
const { confirm } = await prompts(
|
||||
{
|
||||
name: 'confirm',
|
||||
type: 'confirm',
|
||||
initial: false,
|
||||
message,
|
||||
type: 'confirm',
|
||||
},
|
||||
{
|
||||
onCancel: () => {
|
||||
@@ -231,6 +239,26 @@ async function confirm(message: string): Promise<boolean> {
|
||||
return confirm
|
||||
}
|
||||
|
||||
async function header(message: string) {
|
||||
async function question(message: string): Promise<string> {
|
||||
const { value } = await prompts(
|
||||
{
|
||||
name: 'value',
|
||||
type: 'text',
|
||||
message,
|
||||
},
|
||||
{
|
||||
onCancel: () => {
|
||||
abort()
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
function header(message: string, opts?: { enable?: boolean }) {
|
||||
const { enable } = opts ?? {}
|
||||
if (!enable) return
|
||||
|
||||
console.log(chalk.bold.green(`${message}\n`))
|
||||
}
|
||||
|
||||
@@ -1,24 +1,29 @@
|
||||
import fse, { createWriteStream, createReadStream } from 'fs-extra'
|
||||
import { ExecSyncOptions, execSync } from 'child_process'
|
||||
import chalk from 'chalk'
|
||||
import path from 'path'
|
||||
import prompts from 'prompts'
|
||||
import minimist from 'minimist'
|
||||
import chalkTemplate from 'chalk-template'
|
||||
import { PackageDetails, getPackageDetails, showPackageDetails } from './lib/getPackageDetails'
|
||||
import semver from 'semver'
|
||||
import type { ExecSyncOptions } from 'child_process'
|
||||
|
||||
import addStream from 'add-stream'
|
||||
import tempfile from 'tempfile'
|
||||
import chalk from 'chalk'
|
||||
import chalkTemplate from 'chalk-template'
|
||||
import { execSync } from 'child_process'
|
||||
import concatSream from 'concat-stream'
|
||||
import getStream from 'get-stream'
|
||||
import conventionalChangelog, { Options as ChangelogOptions } from 'conventional-changelog'
|
||||
import conventionalChangelogCore, {
|
||||
Options,
|
||||
Context,
|
||||
GitRawCommitsOptions,
|
||||
Options,
|
||||
ParserOptions,
|
||||
WriterOptions,
|
||||
} from 'conventional-changelog-core'
|
||||
import conventionalChangelog, { Options as ChangelogOptions } from 'conventional-changelog'
|
||||
import fse, { createReadStream, createWriteStream } from 'fs-extra'
|
||||
import getStream from 'get-stream'
|
||||
import minimist from 'minimist'
|
||||
import path from 'path'
|
||||
import prompts from 'prompts'
|
||||
import semver from 'semver'
|
||||
import tempfile from 'tempfile'
|
||||
|
||||
import type { PackageDetails } from './lib/getPackageDetails'
|
||||
|
||||
import { getPackageDetails, showPackageDetails } from './lib/getPackageDetails'
|
||||
|
||||
const execOpts: ExecSyncOptions = { stdio: 'inherit' }
|
||||
const args = minimist(process.argv.slice(2))
|
||||
@@ -65,7 +70,7 @@ async function main() {
|
||||
abort()
|
||||
}
|
||||
|
||||
const nextReleaseVersion = semver.inc(pkg.version, bump) as string
|
||||
const nextReleaseVersion = semver.inc(pkg.version, bump)
|
||||
const changelogStream = conventionalChangelog(
|
||||
{
|
||||
preset: 'conventionalcommits',
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import type {
|
||||
GitRawCommitsOptions,
|
||||
ParserOptions,
|
||||
WriterOptions,
|
||||
} from 'conventional-changelog-core'
|
||||
|
||||
import { Octokit } from '@octokit/core'
|
||||
import addStream from 'add-stream'
|
||||
import conventionalChangelog from 'conventional-changelog'
|
||||
import { default as getConventionalPreset } from 'conventional-changelog-conventionalcommits'
|
||||
import { GitRawCommitsOptions, ParserOptions, WriterOptions } from 'conventional-changelog-core'
|
||||
import { once } from 'events'
|
||||
import fse, { createReadStream, createWriteStream } from 'fs-extra'
|
||||
import minimist from 'minimist'
|
||||
import semver, { ReleaseType } from 'semver'
|
||||
import tempfile from 'tempfile'
|
||||
|
||||
import { Octokit } from '@octokit/core'
|
||||
import simpleGit from 'simple-git'
|
||||
import { once } from 'events'
|
||||
import tempfile from 'tempfile'
|
||||
|
||||
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })
|
||||
const git = simpleGit()
|
||||
@@ -36,11 +39,10 @@ export const updateChangelog = async ({ newVersion, dryRun }: Args) => {
|
||||
|
||||
// Load conventional commits preset and modify it
|
||||
const conventionalPreset = (await getConventionalPreset()) as {
|
||||
conventionalChangelog: unknown
|
||||
gitRawCommitsOpts: GitRawCommitsOptions
|
||||
parserOpts: ParserOptions
|
||||
writerOpts: WriterOptions
|
||||
recommmendBumpOpts: unknown
|
||||
conventionalChangelog: unknown
|
||||
}
|
||||
|
||||
// Unbold scope
|
||||
@@ -106,7 +108,13 @@ export const updateChangelog = async ({ newVersion, dryRun }: Args) => {
|
||||
// If file is executed directly, run the function
|
||||
if (require.main === module) {
|
||||
const { newVersion } = minimist(process.argv.slice(2))
|
||||
updateChangelog({ newVersion, dryRun: true })
|
||||
updateChangelog({ dryRun: true, newVersion })
|
||||
.then(() => {
|
||||
console.log('Done')
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
|
||||
async function createContributorSection(lastTag: string): Promise<string> {
|
||||
@@ -120,7 +128,7 @@ async function createContributorSection(lastTag: string): Promise<string> {
|
||||
repo: 'payload',
|
||||
ref: c.hash,
|
||||
})
|
||||
.then(({ data }) => data.author?.login as string),
|
||||
.then(({ data }) => data.author?.login),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -10,11 +10,7 @@
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "preserve",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"noEmit": true,
|
||||
"outDir": "./dist",
|
||||
"resolveJsonModule": true,
|
||||
@@ -22,11 +18,7 @@
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": false,
|
||||
"types": [
|
||||
"jest",
|
||||
"node",
|
||||
"@types/jest"
|
||||
],
|
||||
"types": ["jest", "node", "@types/jest"],
|
||||
"incremental": true,
|
||||
"isolatedModules": true,
|
||||
"plugins": [
|
||||
@@ -35,59 +27,26 @@
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"payload": [
|
||||
"./packages/payload/src"
|
||||
],
|
||||
"payload/*": [
|
||||
"./packages/payload/src/exports/*"
|
||||
],
|
||||
"@payloadcms/db-mongodb": [
|
||||
"./packages/db-mongodb/src"
|
||||
],
|
||||
"@payloadcms/richtext-lexical": [
|
||||
"./packages/richtext-lexical/src"
|
||||
],
|
||||
"@payloadcms/ui": [
|
||||
"./packages/ui/src/exports/index.ts"
|
||||
],
|
||||
"@payloadcms/ui/*": [
|
||||
"./packages/ui/src/exports/*"
|
||||
],
|
||||
"@payloadcms/ui/scss": [
|
||||
"./packages/ui/src/scss/styles.scss"
|
||||
],
|
||||
"@payloadcms/ui/scss/app.scss": [
|
||||
"./packages/ui/src/scss/app.scss"
|
||||
],
|
||||
"@payloadcms/translations": [
|
||||
"./packages/translations/src/exports/index.ts"
|
||||
],
|
||||
"payload": ["./packages/payload/src"],
|
||||
"payload/*": ["./packages/payload/src/exports/*"],
|
||||
"@payloadcms/db-mongodb": ["./packages/db-mongodb/src"],
|
||||
"@payloadcms/richtext-lexical": ["./packages/richtext-lexical/src"],
|
||||
"@payloadcms/ui": ["./packages/ui/src/exports/index.ts"],
|
||||
"@payloadcms/ui/*": ["./packages/ui/src/exports/*"],
|
||||
"@payloadcms/ui/scss": ["./packages/ui/src/scss/styles.scss"],
|
||||
"@payloadcms/ui/scss/app.scss": ["./packages/ui/src/scss/app.scss"],
|
||||
"@payloadcms/translations": ["./packages/translations/src/exports/index.ts"],
|
||||
"@payloadcms/translations/client": [
|
||||
"./packages/translations/src/_generatedFiles_/client/index.ts"
|
||||
],
|
||||
"@payloadcms/translations/api": [
|
||||
"./packages/translations/src/_generatedFiles_/api/index.ts"
|
||||
],
|
||||
"@payloadcms/next/*": [
|
||||
"./packages/next/src/*"
|
||||
],
|
||||
"@payloadcms/next": [
|
||||
"./packages/next/src/exports/*"
|
||||
],
|
||||
"@payloadcms/graphql": [
|
||||
"./packages/graphql/src"
|
||||
],
|
||||
"@payload-config": [
|
||||
"./test/_community/config.ts"
|
||||
]
|
||||
"@payloadcms/translations/api": ["./packages/translations/src/_generatedFiles_/api/index.ts"],
|
||||
"@payloadcms/next/*": ["./packages/next/src/*"],
|
||||
"@payloadcms/next": ["./packages/next/src/exports/*"],
|
||||
"@payloadcms/graphql": ["./packages/graphql/src"],
|
||||
"@payload-config": ["./test/_community/config.ts"]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
"build",
|
||||
"temp",
|
||||
"node_modules"
|
||||
],
|
||||
"exclude": ["dist", "build", "temp", "node_modules"],
|
||||
"composite": true,
|
||||
"references": [
|
||||
{
|
||||
@@ -152,6 +111,7 @@
|
||||
"next-env.d.ts",
|
||||
".next/types/**/*.ts",
|
||||
"app/**/*.ts",
|
||||
"app/**/*.tsx"
|
||||
"app/**/*.tsx",
|
||||
"scripts/**/*.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user