diff --git a/changelog.config.js b/changelog.config.js new file mode 100644 index 000000000..d7dbff7b8 --- /dev/null +++ b/changelog.config.js @@ -0,0 +1,39 @@ +module.exports = { + // gitRawCommitsOpts: { + // from: 'v2.0.9', + // path: 'packages/payload', + // }, + // infile: 'CHANGELOG.md', + options: { + preset: { + name: 'conventionalcommits', + types: [ + { section: 'Features', type: 'feat' }, + { section: 'Features', type: 'feature' }, + { section: 'Bug Fixes', type: 'fix' }, + { section: 'Documentation', type: 'docs' }, + ], + }, + }, + // outfile: 'NEW.md', + writerOpts: { + commitGroupsSort: (a, b) => { + const groupOrder = ['Features', 'Bug Fixes', 'Documentation'] + return groupOrder.indexOf(a.title) - groupOrder.indexOf(b.title) + }, + + // Scoped commits at the end, alphabetical sort + commitsSort: (a, b) => { + if (a.scope || b.scope) { + if (!a.scope) return -1 + if (!b.scope) return 1 + return a.scope === b.scope + ? a.subject.localeCompare(b.subject) + : a.scope.localeCompare(b.scope) + } + + // Alphabetical sort + return a.subject.localeCompare(b.subject) + }, + }, +} diff --git a/package.json b/package.json index d81d0a050..92a77118d 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,10 @@ "@swc/register": "0.1.10", "@testing-library/jest-dom": "5.17.0", "@testing-library/react": "13.4.0", + "@types/concat-stream": "^2.0.1", + "@types/conventional-changelog": "^3.1.4", + "@types/conventional-changelog-core": "^4.2.5", + "@types/conventional-changelog-preset-loader": "^2.3.4", "@types/fs-extra": "^11.0.2", "@types/jest": "29.5.4", "@types/minimist": "1.2.2", @@ -50,8 +54,13 @@ "@types/semver": "^7.5.3", "@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", + "concat-stream": "^2.0.0", + "conventional-changelog": "^5.1.0", + "conventional-changelog-core": "^7.0.0", + "conventional-changelog-preset-loader": "^4.1.0", "copyfiles": "2.4.1", "cross-env": "7.0.3", "dotenv": "8.6.0", @@ -59,6 +68,7 @@ "form-data": "3.0.1", "fs-extra": "10.1.0", "get-port": "5.1.1", + "get-stream": "6.0.1", "glob": "8.1.0", "graphql-request": "6.1.0", "husky": "^8.0.3", @@ -74,12 +84,14 @@ "prettier": "^3.0.3", "prompts": "2.4.2", "qs": "6.11.2", + "read-stream": "^2.1.1", "rimraf": "3.0.2", "semver": "^7.5.4", "shelljs": "0.8.5", "simple-git": "^3.20.0", "slash": "3.0.0", "slate": "0.91.4", + "tempfile": "^3.0.0", "ts-node": "10.9.1", "tsx": "^3.13.0", "turbo": "^1.10.15", diff --git a/packages/live-preview/asdf.txt b/packages/live-preview/asdf.txt new file mode 100644 index 000000000..e69de29bb diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d995f09c2..1bd8f2e8b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,6 +39,18 @@ importers: '@testing-library/react': specifier: 13.4.0 version: 13.4.0(react-dom@18.2.0)(react@18.2.0) + '@types/concat-stream': + specifier: ^2.0.1 + version: 2.0.1 + '@types/conventional-changelog': + specifier: ^3.1.4 + version: 3.1.4 + '@types/conventional-changelog-core': + specifier: ^4.2.5 + version: 4.2.5 + '@types/conventional-changelog-preset-loader': + specifier: ^2.3.4 + version: 2.3.4 '@types/fs-extra': specifier: ^11.0.2 version: 11.0.2 @@ -69,12 +81,27 @@ importers: '@types/testing-library__jest-dom': specifier: 5.14.8 version: 5.14.8 + add-stream: + 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 + concat-stream: + specifier: ^2.0.0 + version: 2.0.0 + conventional-changelog: + specifier: ^5.1.0 + version: 5.1.0 + conventional-changelog-core: + specifier: ^7.0.0 + version: 7.0.0 + conventional-changelog-preset-loader: + specifier: ^4.1.0 + version: 4.1.0 copyfiles: specifier: 2.4.1 version: 2.4.1 @@ -96,6 +123,9 @@ importers: get-port: specifier: 5.1.1 version: 5.1.1 + get-stream: + specifier: 6.0.1 + version: 6.0.1 glob: specifier: 8.1.0 version: 8.1.0 @@ -141,6 +171,9 @@ importers: qs: specifier: 6.11.2 version: 6.11.2 + read-stream: + specifier: ^2.1.1 + version: 2.1.1 rimraf: specifier: 3.0.2 version: 3.0.2 @@ -159,6 +192,9 @@ importers: slate: specifier: 0.91.4 version: 0.91.4 + tempfile: + specifier: ^3.0.0 + version: 3.0.0 ts-node: specifier: 10.9.1 version: 10.9.1(@swc/core@1.3.76)(@types/node@20.5.7)(typescript@5.2.2) @@ -2191,6 +2227,7 @@ packages: /@aws-sdk/types@3.425.0: resolution: {integrity: sha512-6lqbmorwerN4v+J5dqbHPAsjynI0mkEF+blf+69QTaKKGaxBBVaXgqoqul9RXYcK5MMrrYRbQIMd0zYOoy90kA==} engines: {node: '>=14.0.0'} + requiresBuild: true dependencies: '@smithy/types': 2.3.5 tslib: 2.6.2 @@ -3405,6 +3442,11 @@ packages: engines: {node: '>=6.9.0'} dev: true + /@hutson/parse-repository-url@5.0.0: + resolution: {integrity: sha512-e5+YUKENATs1JgYHMzTr2MW/NDcXGfYFAuOQU8gJgF/kEh4EqKgfGrfLI67bMD4tbhZVlkigz/9YYwWcbOFthg==} + engines: {node: '>=10.13.0'} + dev: true + /@iarna/toml@2.2.5: resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} dev: true @@ -3428,7 +3470,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.6.2 + '@types/node': 16.18.58 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -3544,7 +3586,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.19 - '@types/node': 20.6.2 + '@types/node': 16.18.58 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -3625,7 +3667,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 20.6.2 + '@types/node': 16.18.58 '@types/yargs': 16.0.5 chalk: 4.1.2 dev: true @@ -4837,6 +4879,7 @@ packages: /@smithy/types@2.3.5: resolution: {integrity: sha512-ehyDt8M9hehyxrLQGoA1BGPou8Js1Ocoh5M0ngDhJMqbFmNK5N6Xhr9/ZExWkyIW8XcGkiMPq3ZUEE0ScrhbuQ==} engines: {node: '>=14.0.0'} + requiresBuild: true dependencies: tslib: 2.6.2 @@ -5432,7 +5475,7 @@ packages: /@types/busboy@1.5.1: resolution: {integrity: sha512-JAymE2skNionWnBUwby3MatzPUw4D/6/7FX1qxBXLzmRnFxmqU0luIof7om0I8R3B/rSr9FKUnFCqxZ/NeGbrw==} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 dev: true /@types/cacheable-request@6.0.3: @@ -5440,14 +5483,14 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.2 '@types/keyv': 3.1.4 - '@types/node': 20.6.2 + '@types/node': 16.18.58 '@types/responselike': 1.0.0 dev: true /@types/clean-css@4.2.7: resolution: {integrity: sha512-lcoZHjUAANLTACLGi+O/0pN+oKQAQ8zAMWJSxiBRNLxqZG/WE8hfXJUs1eYwJOvOnDJrvxU1kR77UiVJ3+9N0Q==} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 source-map: 0.6.1 dev: true @@ -5461,12 +5504,67 @@ packages: '@types/express': 4.17.17 dev: true + /@types/concat-stream@2.0.1: + resolution: {integrity: sha512-v5HP9ZsRbzFq5XRo2liUZPKzwbGK5SuGVMWZjE6iJOm/JNdESk3/rkfcPe0lcal0C32PTLVlYUYqGpMGNdDsDg==} + dependencies: + '@types/node': 16.18.58 + dev: true + /@types/connect@3.4.36: resolution: {integrity: sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==} dependencies: '@types/node': 20.6.2 dev: true + /@types/conventional-changelog-core@4.2.5: + resolution: {integrity: sha512-K3M39aAnBYUt61Z1te+p/bu+IIK4gq8AaMAtj2M5O7Py6qyxhc0FRFO42F71rTM6dSFSJOacuIm0KvwzwTLsRw==} + dependencies: + '@types/conventional-changelog-writer': 4.0.7 + '@types/conventional-commits-parser': 3.0.5 + '@types/conventional-recommended-bump': 9.0.2 + '@types/git-raw-commits': 2.0.2 + '@types/node': 16.18.58 + '@types/normalize-package-data': 2.4.1 + dev: true + + /@types/conventional-changelog-preset-loader@2.3.4: + resolution: {integrity: sha512-Ke8+QrYiAXPAuxaKJgps2oTHOBPcC7svj4cp9OpkdShgytD5Z+aC5sUdo340gsTe7HqvvyeHAHxmMuwEAq2GYQ==} + dependencies: + '@types/conventional-changelog-core': 4.2.5 + '@types/conventional-changelog-writer': 4.0.7 + '@types/conventional-commits-parser': 3.0.5 + dev: true + + /@types/conventional-changelog-writer@4.0.7: + resolution: {integrity: sha512-N6Z5wEBzKkf4HY3Z6JLSqB+OP42u4tcD0gcnP3yfJhCFIwd6SIqQGFcZqEnO2FUHX0f11EFIdO7Uue4aFu4Ylw==} + dependencies: + '@types/conventional-commits-parser': 3.0.5 + '@types/node': 16.18.58 + dev: true + + /@types/conventional-changelog@3.1.4: + resolution: {integrity: sha512-imWdLUAbDB+IJsA12u3wUrMkYGP3aLyf9l/697o6OFB20PKd5SMMvugPuAW44P6TDesm8M3m8Hh6+uhTeNqRPw==} + dependencies: + '@types/conventional-changelog-core': 4.2.5 + '@types/conventional-changelog-writer': 4.0.7 + '@types/conventional-commits-parser': 3.0.5 + '@types/node': 16.18.58 + dev: true + + /@types/conventional-commits-parser@3.0.5: + resolution: {integrity: sha512-vuj8zjxJPFOHj3HCNr3lPp67O1s/0rQMKYIkpYQQDpNE/ncXJjUTTTJdpCXqfg+Cbc9RAs71OXrFCeI4jbWWrw==} + dependencies: + '@types/node': 16.18.58 + dev: true + + /@types/conventional-recommended-bump@9.0.2: + resolution: {integrity: sha512-HdjEmk+neFWM3SM4ksssVHXWK/UmYnDWJPUd+pOXx5kyrhvaKOsAKFg4SQugLSi003mbq5y/6xHh7Z40aG8ARw==} + dependencies: + '@types/conventional-changelog-core': 4.2.5 + '@types/conventional-changelog-writer': 4.0.7 + '@types/conventional-commits-parser': 3.0.5 + dev: true + /@types/degit@2.8.4: resolution: {integrity: sha512-E9ZPeZwh81/gDPVH4XpvcS4ewH/Ub4XJeM5xYAUP0BexGORIyCRYzSivlGOuGbVc4MH3//+z3h4CbrnMZMeUdA==} dev: true @@ -5540,6 +5638,12 @@ packages: '@types/node': 16.18.58 dev: true + /@types/git-raw-commits@2.0.2: + resolution: {integrity: sha512-UTG4omPQz3qmePeOZ4Ofb+SvJPrdSBzdEPSlPURLoqnV9qeqxZj58T50+L330vFuxIE2bRf1R3yDcW15cOD71w==} + dependencies: + '@types/node': 16.18.58 + dev: true + /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: @@ -5549,7 +5653,7 @@ packages: /@types/graceful-fs@4.1.6: resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 /@types/hapi__joi@17.1.9: resolution: {integrity: sha512-oOMFT8vmCTFncsF1engrs04jatz8/Anwx3De9uxnOK4chgSEgWBvFtpSoJo8u3784JNO+ql5tzRR6phHoRnscQ==} @@ -5659,7 +5763,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 dev: true /@types/lodash.get@4.4.8: @@ -5723,7 +5827,7 @@ packages: /@types/needle@3.2.0: resolution: {integrity: sha512-6XzvzEyJ2ozFNfPajFmqH9JOt0Hp+9TawaYpJT59iIP/zR0U37cfWCRwosyIeEBBZBi021Osq4jGAD3AOju5fg==} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 dev: true /@types/node-fetch@2.6.4: @@ -5919,7 +6023,7 @@ packages: /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 dev: true /@types/scheduler@0.16.3: @@ -5936,7 +6040,7 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 20.6.2 + '@types/node': 16.18.58 dev: true /@types/serve-static@1.15.2: @@ -5944,7 +6048,7 @@ packages: dependencies: '@types/http-errors': 2.0.2 '@types/mime': 2.0.3 - '@types/node': 20.6.2 + '@types/node': 16.18.58 dev: true /@types/sharp@0.31.1: @@ -6035,7 +6139,7 @@ packages: /@types/webpack-sources@3.2.0: resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 '@types/source-list-map': 0.1.2 source-map: 0.7.4 dev: true @@ -6054,13 +6158,13 @@ packages: /@types/whatwg-url@8.2.2: resolution: {integrity: sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 '@types/webidl-conversions': 7.0.0 /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 dev: false /@types/yargs-parser@21.0.0: @@ -7793,16 +7897,33 @@ packages: compare-func: 2.0.0 dev: true + /conventional-changelog-angular@7.0.0: + resolution: {integrity: sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==} + engines: {node: '>=16'} + dependencies: + compare-func: 2.0.0 + dev: true + /conventional-changelog-atom@3.0.0: resolution: {integrity: sha512-pnN5bWpH+iTUWU3FaYdw5lJmfWeqSyrUkG+wyHBI9tC1dLNnHkbAOg1SzTQ7zBqiFrfo55h40VsGXWMdopwc5g==} engines: {node: '>=14'} dev: true + /conventional-changelog-atom@4.0.0: + resolution: {integrity: sha512-q2YtiN7rnT1TGwPTwjjBSIPIzDJCRE+XAUahWxnh+buKK99Kks4WLMHoexw38GXx9OUxAsrp44f9qXe5VEMYhw==} + engines: {node: '>=16'} + dev: true + /conventional-changelog-codemirror@3.0.0: resolution: {integrity: sha512-wzchZt9HEaAZrenZAUUHMCFcuYzGoZ1wG/kTRMICxsnW5AXohYMRxnyecP9ob42Gvn5TilhC0q66AtTPRSNMfw==} engines: {node: '>=14'} dev: true + /conventional-changelog-codemirror@4.0.0: + resolution: {integrity: sha512-hQSojc/5imn1GJK3A75m9hEZZhc3urojA5gMpnar4JHmgLnuM3CUIARPpEk86glEKr3c54Po3WV/vCaO/U8g3Q==} + engines: {node: '>=16'} + dev: true + /conventional-changelog-conventionalcommits@6.1.0: resolution: {integrity: sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw==} engines: {node: '>=14'} @@ -7810,6 +7931,13 @@ packages: compare-func: 2.0.0 dev: true + /conventional-changelog-conventionalcommits@7.0.2: + resolution: {integrity: sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==} + engines: {node: '>=16'} + dependencies: + compare-func: 2.0.0 + dev: true + /conventional-changelog-core@5.0.2: resolution: {integrity: sha512-RhQOcDweXNWvlRwUDCpaqXzbZemKPKncCWZG50Alth72WITVd6nhVk9MJ6w1k9PFNBcZ3YwkdkChE+8+ZwtUug==} engines: {node: '>=14'} @@ -7827,26 +7955,62 @@ packages: read-pkg-up: 3.0.0 dev: true + /conventional-changelog-core@7.0.0: + resolution: {integrity: sha512-UYgaB1F/COt7VFjlYKVE/9tTzfU3VUq47r6iWf6lM5T7TlOxr0thI63ojQueRLIpVbrtHK4Ffw+yQGduw2Bhdg==} + engines: {node: '>=16'} + dependencies: + '@hutson/parse-repository-url': 5.0.0 + add-stream: 1.0.0 + conventional-changelog-writer: 7.0.1 + conventional-commits-parser: 5.0.0 + git-raw-commits: 4.0.0 + git-semver-tags: 7.0.1 + hosted-git-info: 7.0.1 + normalize-package-data: 6.0.0 + read-pkg: 8.1.0 + read-pkg-up: 10.1.0 + dev: true + /conventional-changelog-ember@3.0.0: resolution: {integrity: sha512-7PYthCoSxIS98vWhVcSphMYM322OxptpKAuHYdVspryI0ooLDehRXWeRWgN+zWSBXKl/pwdgAg8IpLNSM1/61A==} engines: {node: '>=14'} dev: true + /conventional-changelog-ember@4.0.0: + resolution: {integrity: sha512-D0IMhwcJUg1Y8FSry6XAplEJcljkHVlvAZddhhsdbL1rbsqRsMfGx/PIkPYq0ru5aDgn+OxhQ5N5yR7P9mfsvA==} + engines: {node: '>=16'} + dev: true + /conventional-changelog-eslint@4.0.0: resolution: {integrity: sha512-nEZ9byP89hIU0dMx37JXQkE1IpMmqKtsaR24X7aM3L6Yy/uAtbb+ogqthuNYJkeO1HyvK7JsX84z8649hvp43Q==} engines: {node: '>=14'} dev: true + /conventional-changelog-eslint@5.0.0: + resolution: {integrity: sha512-6JtLWqAQIeJLn/OzUlYmzd9fKeNSWmQVim9kql+v4GrZwLx807kAJl3IJVc3jTYfVKWLxhC3BGUxYiuVEcVjgA==} + engines: {node: '>=16'} + dev: true + /conventional-changelog-express@3.0.0: resolution: {integrity: sha512-HqxihpUMfIuxvlPvC6HltA4ZktQEUan/v3XQ77+/zbu8No/fqK3rxSZaYeHYant7zRxQNIIli7S+qLS9tX9zQA==} engines: {node: '>=14'} dev: true + /conventional-changelog-express@4.0.0: + resolution: {integrity: sha512-yWyy5c7raP9v7aTvPAWzqrztACNO9+FEI1FSYh7UP7YT1AkWgv5UspUeB5v3Ibv4/o60zj2o9GF2tqKQ99lIsw==} + engines: {node: '>=16'} + dev: true + /conventional-changelog-jquery@4.0.0: resolution: {integrity: sha512-TTIN5CyzRMf8PUwyy4IOLmLV2DFmPtasKN+x7EQKzwSX8086XYwo+NeaeA3VUT8bvKaIy5z/JoWUvi7huUOgaw==} engines: {node: '>=14'} dev: true + /conventional-changelog-jquery@5.0.0: + resolution: {integrity: sha512-slLjlXLRNa/icMI3+uGLQbtrgEny3RgITeCxevJB+p05ExiTgHACP5p3XiMKzjBn80n+Rzr83XMYfRInEtCPPw==} + engines: {node: '>=16'} + dev: true + /conventional-changelog-jshint@3.0.0: resolution: {integrity: sha512-bQof4byF4q+n+dwFRkJ/jGf9dCNUv4/kCDcjeCizBvfF81TeimPZBB6fT4HYbXgxxfxWXNl/i+J6T0nI4by6DA==} engines: {node: '>=14'} @@ -7854,11 +8018,23 @@ packages: compare-func: 2.0.0 dev: true + /conventional-changelog-jshint@4.0.0: + resolution: {integrity: sha512-LyXq1bbl0yG0Ai1SbLxIk8ZxUOe3AjnlwE6sVRQmMgetBk+4gY9EO3d00zlEt8Y8gwsITytDnPORl8al7InTjg==} + engines: {node: '>=16'} + dependencies: + compare-func: 2.0.0 + dev: true + /conventional-changelog-preset-loader@3.0.0: resolution: {integrity: sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA==} engines: {node: '>=14'} dev: true + /conventional-changelog-preset-loader@4.1.0: + resolution: {integrity: sha512-HozQjJicZTuRhCRTq4rZbefaiCzRM2pr6u2NL3XhrmQm4RMnDXfESU6JKu/pnKwx5xtdkYfNCsbhN5exhiKGJA==} + engines: {node: '>=16'} + dev: true + /conventional-changelog-writer@6.0.1: resolution: {integrity: sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ==} engines: {node: '>=14'} @@ -7873,6 +8049,19 @@ packages: split: 1.0.1 dev: true + /conventional-changelog-writer@7.0.1: + resolution: {integrity: sha512-Uo+R9neH3r/foIvQ0MKcsXkX642hdm9odUp7TqgFS7BsalTcjzRlIfWZrZR1gbxOozKucaKt5KAbjW8J8xRSmA==} + engines: {node: '>=16'} + hasBin: true + dependencies: + conventional-commits-filter: 4.0.0 + handlebars: 4.7.8 + json-stringify-safe: 5.0.1 + meow: 12.1.1 + semver: 7.5.4 + split2: 4.2.0 + dev: true + /conventional-changelog@4.0.0: resolution: {integrity: sha512-JbZjwE1PzxQCvm+HUTIr+pbSekS8qdOZzMakdFyPtdkEWwFvwEJYONzjgMm0txCb2yBcIcfKDmg8xtCKTdecNQ==} engines: {node: '>=14'} @@ -7890,6 +8079,23 @@ packages: conventional-changelog-preset-loader: 3.0.0 dev: true + /conventional-changelog@5.1.0: + resolution: {integrity: sha512-aWyE/P39wGYRPllcCEZDxTVEmhyLzTc9XA6z6rVfkuCD2UBnhV/sgSOKbQrEG5z9mEZJjnopjgQooTKxEg8mAg==} + engines: {node: '>=16'} + dependencies: + conventional-changelog-angular: 7.0.0 + conventional-changelog-atom: 4.0.0 + conventional-changelog-codemirror: 4.0.0 + conventional-changelog-conventionalcommits: 7.0.2 + conventional-changelog-core: 7.0.0 + conventional-changelog-ember: 4.0.0 + conventional-changelog-eslint: 5.0.0 + conventional-changelog-express: 4.0.0 + conventional-changelog-jquery: 5.0.0 + conventional-changelog-jshint: 4.0.0 + conventional-changelog-preset-loader: 4.1.0 + dev: true + /conventional-commits-filter@3.0.0: resolution: {integrity: sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==} engines: {node: '>=14'} @@ -7898,6 +8104,11 @@ packages: modify-values: 1.0.1 dev: true + /conventional-commits-filter@4.0.0: + resolution: {integrity: sha512-rnpnibcSOdFcdclpFwWa+pPlZJhXE7l+XK04zxhbWrhgpR96h33QLz8hITTXbcYICxVr3HZFtbtUAQ+4LdBo9A==} + engines: {node: '>=16'} + dev: true + /conventional-commits-parser@4.0.0: resolution: {integrity: sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==} engines: {node: '>=14'} @@ -7909,6 +8120,17 @@ packages: split2: 3.2.2 dev: true + /conventional-commits-parser@5.0.0: + resolution: {integrity: sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==} + engines: {node: '>=16'} + hasBin: true + dependencies: + JSONStream: 1.3.5 + is-text-path: 2.0.0 + meow: 12.1.1 + split2: 4.2.0 + dev: true + /conventional-recommended-bump@7.0.1: resolution: {integrity: sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA==} engines: {node: '>=14'} @@ -8287,6 +8509,11 @@ packages: engines: {node: '>=8'} dev: true + /dargs@8.1.0: + resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==} + engines: {node: '>=12'} + dev: true + /data-uri-to-buffer@4.0.1: resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} engines: {node: '>= 12'} @@ -9942,6 +10169,14 @@ packages: locate-path: 6.0.0 path-exists: 4.0.0 + /find-up@6.3.0: + resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + dev: true + /find-versions@5.1.0: resolution: {integrity: sha512-+iwzCJ7C5v5KgcBuueqVoNiHVoQpwiUK5XFLjf0affFTep+Wcw93tPvmb8tqujDNmzhBDPddnWV/qgWSXgq+Hg==} engines: {node: '>=12'} @@ -10209,6 +10444,16 @@ packages: split2: 3.2.2 dev: true + /git-raw-commits@4.0.0: + resolution: {integrity: sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==} + engines: {node: '>=16'} + hasBin: true + dependencies: + dargs: 8.1.0 + meow: 12.1.1 + split2: 4.2.0 + dev: true + /git-remote-origin-url@2.0.0: resolution: {integrity: sha512-eU+GGrZgccNJcsDH5LkXR3PB9M958hxc7sbA8DFJjrv9j4L2P/eZfKhM+QD6wyzpiv+b1BpK0XrYCxkovtjSLw==} engines: {node: '>=4'} @@ -10226,6 +10471,15 @@ packages: semver: 7.5.4 dev: true + /git-semver-tags@7.0.1: + resolution: {integrity: sha512-NY0ZHjJzyyNXHTDZmj+GG7PyuAKtMsyWSwh07CR2hOZFa+/yoTsXci/nF2obzL8UDhakFNkD9gNdt/Ed+cxh2Q==} + engines: {node: '>=16'} + hasBin: true + dependencies: + meow: 12.1.1 + semver: 7.5.4 + dev: true + /git-up@7.0.0: resolution: {integrity: sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==} dependencies: @@ -10606,6 +10860,13 @@ packages: lru-cache: 6.0.0 dev: true + /hosted-git-info@7.0.1: + resolution: {integrity: sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==} + engines: {node: ^16.14.0 || >=18.0.0} + dependencies: + lru-cache: 10.0.1 + dev: true + /html-encoding-sniffer@3.0.0: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} @@ -11180,6 +11441,13 @@ packages: text-extensions: 1.9.0 dev: true + /is-text-path@2.0.0: + resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} + engines: {node: '>=8'} + dependencies: + text-extensions: 2.4.0 + dev: true + /is-typed-array@1.1.12: resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} @@ -11373,7 +11641,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.6.2 + '@types/node': 16.18.58 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -11634,7 +11902,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.6.2 + '@types/node': 16.18.58 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -11653,7 +11921,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.6 - '@types/node': 20.6.2 + '@types/node': 16.18.58 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -11760,7 +12028,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.6.2 + '@types/node': 16.18.58 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -11790,7 +12058,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.6.2 + '@types/node': 16.18.58 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -11863,7 +12131,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.6.2 + '@types/node': 16.18.58 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -11874,7 +12142,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.6.2 + '@types/node': 16.18.58 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -12047,6 +12315,11 @@ packages: /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + /json-parse-even-better-errors@3.0.0: + resolution: {integrity: sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + /json-schema-to-typescript@11.0.3: resolution: {integrity: sha512-EaEE9Y4VZ8b9jW5zce5a9L3+p4C9AqgIRHbNVDJahfMnoKzcd4sDb98BLxLdQhJEuRAXyKLg4H66NKm80W8ilg==} engines: {node: '>=12.0.0'} @@ -12237,6 +12510,11 @@ packages: /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + /lines-and-columns@2.0.3: + resolution: {integrity: sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /lint-staged@14.0.1: resolution: {integrity: sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw==} engines: {node: ^16.14.0 || >=18.0.0} @@ -12323,6 +12601,13 @@ packages: dependencies: p-locate: 5.0.0 + /locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + p-locate: 6.0.0 + dev: true + /lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} dev: true @@ -12450,6 +12735,11 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true + /lru-cache@10.0.1: + resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} + engines: {node: 14 || >=16.14} + dev: true + /lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} dependencies: @@ -12568,6 +12858,11 @@ packages: requiresBuild: true optional: true + /meow@12.1.1: + resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} + engines: {node: '>=16.10'} + dev: true + /meow@8.1.2: resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} engines: {node: '>=10'} @@ -13103,6 +13398,16 @@ packages: validate-npm-package-license: 3.0.4 dev: true + /normalize-package-data@6.0.0: + resolution: {integrity: sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg==} + engines: {node: ^16.14.0 || >=18.0.0} + dependencies: + hosted-git-info: 7.0.1 + is-core-module: 2.13.0 + semver: 7.5.4 + validate-npm-package-license: 3.0.4 + dev: true + /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -13379,6 +13684,13 @@ packages: dependencies: yocto-queue: 0.1.0 + /p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + yocto-queue: 1.0.0 + dev: true + /p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} @@ -13404,6 +13716,13 @@ packages: dependencies: p-limit: 3.1.0 + /p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + p-limit: 4.0.0 + dev: true + /p-try@1.0.0: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} engines: {node: '>=4'} @@ -13481,6 +13800,17 @@ packages: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 + /parse-json@7.1.0: + resolution: {integrity: sha512-ihtdrgbqdONYD156Ap6qTcaGcGdkdAxodO1wLqQ/j7HP1u2sFYppINiq4jyC8F+Nm+4fVufylCV00QmkTHkSUg==} + engines: {node: '>=16'} + dependencies: + '@babel/code-frame': 7.22.13 + error-ex: 1.3.2 + json-parse-even-better-errors: 3.0.0 + lines-and-columns: 2.0.3 + type-fest: 3.13.0 + dev: true + /parse-passwd@1.0.0: resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} engines: {node: '>=0.10.0'} @@ -13568,6 +13898,11 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + /path-exists@5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} @@ -13867,7 +14202,7 @@ packages: uuid: 8.3.2 webpack: 5.88.2(@swc/core@1.3.78)(webpack-cli@4.10.0) webpack-bundle-analyzer: 4.9.1 - webpack-cli: 4.10.0(webpack-bundle-analyzer@4.9.1)(webpack@5.88.2) + webpack-cli: 4.10.0(webpack@5.88.2) webpack-dev-middleware: 6.0.1(webpack@5.88.2) webpack-hot-middleware: 2.25.4 transitivePeerDependencies: @@ -14911,6 +15246,11 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} + /process@0.5.2: + resolution: {integrity: sha512-oNpcutj+nYX2FjdEW7PGltWhXulAnFlM0My/k48L90hARCOJtvBbQXc/6itV2jDvU5xAAtonP+r6wmQgCcbAUA==} + engines: {node: '>= 0.6.0'} + dev: true + /promise.allsettled@1.0.6: resolution: {integrity: sha512-22wJUOD3zswWFqgwjNHa1965LvqTX87WPu/lreY2KSd7SVcERfuZ4GfUaOnJNnvtoIv2yXT/W00YIGMetXtFXg==} engines: {node: '>= 0.4'} @@ -15349,6 +15689,15 @@ packages: dependencies: loose-envify: 1.4.0 + /read-pkg-up@10.1.0: + resolution: {integrity: sha512-aNtBq4jR8NawpKJQldrQcSW9y/d+KWH4v24HWkHljOZ7H0av+YTGANBzRh9A5pw7v/bLVsLVPpOhJ7gHNVy8lA==} + engines: {node: '>=16'} + dependencies: + find-up: 6.3.0 + read-pkg: 8.1.0 + type-fest: 4.4.0 + dev: true + /read-pkg-up@3.0.0: resolution: {integrity: sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==} engines: {node: '>=4'} @@ -15385,6 +15734,23 @@ packages: type-fest: 0.6.0 dev: true + /read-pkg@8.1.0: + resolution: {integrity: sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==} + engines: {node: '>=16'} + dependencies: + '@types/normalize-package-data': 2.4.1 + normalize-package-data: 6.0.0 + parse-json: 7.1.0 + type-fest: 4.4.0 + dev: true + + /read-stream@2.1.1: + resolution: {integrity: sha512-UcZnoo+AEM+ipqwOQ4JLxkIDYyWvOT3hvcal/fSL3VFFUKeHoHgC89gltJtekAejj+ji7dTe0TVb5mpj8/kt0g==} + dependencies: + process: 0.5.2 + readable-stream: github.com/Raynos/readable-stream/b1a911ce6e4f4c5a7e2948cd23c2f9ee1ea0696f + dev: true + /readable-stream@1.0.34: resolution: {integrity: sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==} dependencies: @@ -16628,6 +16994,19 @@ packages: streamx: 2.15.1 dev: false + /temp-dir@2.0.0: + resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==} + engines: {node: '>=8'} + dev: true + + /tempfile@3.0.0: + resolution: {integrity: sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw==} + engines: {node: '>=8'} + dependencies: + temp-dir: 2.0.0 + uuid: 3.4.0 + dev: true + /terminal-link@2.1.1: resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} engines: {node: '>=8'} @@ -16708,6 +17087,11 @@ packages: engines: {node: '>=0.10'} dev: true + /text-extensions@2.4.0: + resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==} + engines: {node: '>=8'} + dev: true + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -17111,7 +17495,11 @@ packages: /type-fest@3.13.0: resolution: {integrity: sha512-Gur3yQGM9qiLNs0KPP7LPgeRbio2QTt4xXouobMCarR0/wyW3F+F/+OWwshg3NG0Adon7uQfSZBpB46NfhoF1A==} engines: {node: '>=14.16'} - dev: false + + /type-fest@4.4.0: + resolution: {integrity: sha512-HT3RRs7sTfY22KuPQJkD/XjbTbxgP2Je5HPt6H6JEGvcjHd5Lqru75EbrP3tb4FYjNJ+DjLp+MNQTFQU0mhXNw==} + engines: {node: '>=16'} + dev: true /type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} @@ -17357,6 +17745,12 @@ packages: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} + /uuid@3.4.0: + resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} + deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. + hasBin: true + dev: true + /uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true @@ -17983,6 +18377,17 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + /yocto-queue@1.0.0: + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} + dev: true + /zod@3.22.2: resolution: {integrity: sha512-wvWkphh5WQsJbVk1tbx1l1Ly4yg+XecD+Mq280uBGt9wa5BKSWf4Mhp6GmrkPixhMxmabYY7RbzlwVP32pbGCg==} dev: false + + github.com/Raynos/readable-stream/b1a911ce6e4f4c5a7e2948cd23c2f9ee1ea0696f: + resolution: {tarball: https://codeload.github.com/Raynos/readable-stream/tar.gz/b1a911ce6e4f4c5a7e2948cd23c2f9ee1ea0696f} + name: readable-stream + version: 0.3.1 + dev: true diff --git a/release.config.js b/release.config.js new file mode 100644 index 000000000..e69de29bb diff --git a/scripts/lib/getPackageDetails.ts b/scripts/lib/getPackageDetails.ts index cfd4bd497..d5dce7177 100644 --- a/scripts/lib/getPackageDetails.ts +++ b/scripts/lib/getPackageDetails.ts @@ -13,13 +13,22 @@ export type PackageDetails = { newCommits: number shortName: string packagePath: string + prevGitTag: string + prevGitTagHash: string publishedVersion: string publishDate: string version: string } -export const getPackageDetails = async (): Promise => { - const packageDirs = fse.readdirSync(packagesDir).filter((d) => d !== 'eslint-config-payload') +export const getPackageDetails = async (pkg?: string): Promise => { + let packageDirs: string[] = [] + if (pkg) { + packageDirs = fse.readdirSync(packagesDir).filter((d) => d === pkg) + } else { + packageDirs = fse.readdirSync(packagesDir).filter((d) => d !== 'eslint-config-payload') + } + console.log(packageDirs) + const packageDetails = await Promise.all( packageDirs.map(async (dirName) => { const packageJson = await fse.readJson(`${packagesDir}/${dirName}/package.json`) @@ -49,6 +58,8 @@ export const getPackageDetails = async (): Promise => { newCommits: newCommits.total, shortName: dirName, packagePath: `packages/${dirName}`, + prevGitTag, + prevGitTagHash, publishedVersion, publishDate, version: packageJson.version, diff --git a/scripts/release.ts b/scripts/release.ts index c1e054d49..79a94bd78 100755 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -1,4 +1,5 @@ import fse from 'fs-extra' +import path from 'path' import { ExecSyncOptions, execSync } from 'child_process' import chalk from 'chalk' import prompts from 'prompts' @@ -6,12 +7,16 @@ import minimist from 'minimist' import chalkTemplate from 'chalk-template' import { PackageDetails, getPackageDetails, showPackageDetails } from './lib/getPackageDetails' import semver from 'semver' +import { updateChangelog } from './utils/updateChangelog' +import simpleGit from 'simple-git' + +const git = simpleGit(path.resolve(__dirname, '..')) const execOpts: ExecSyncOptions = { stdio: 'inherit' } const args = minimist(process.argv.slice(2)) async function main() { - const { tag = 'latest', bump = 'patch' } = args + const { tag = 'latest', bump = 'patch', pkg } = args if (!semver.RELEASE_TYPES.includes(bump)) { abort(`Invalid bump type: ${bump}.\n\nMust be one of: ${semver.RELEASE_TYPES.join(', ')}`) @@ -21,33 +26,38 @@ async function main() { abort(`Prerelease bumps must have tag: beta or canary`) } - const packageDetails = await getPackageDetails() + const packageDetails = await getPackageDetails(pkg) showPackageDetails(packageDetails) - const { packagesToRelease } = (await prompts({ - type: 'multiselect', - name: 'packagesToRelease', - message: 'Select packages to release', - instructions: 'Space to select. Enter to submit.', - choices: packageDetails.map((p) => { - const title = p?.newCommits ? chalk.bold.green(p?.shortName) : p?.shortName - return { - title, - value: p.shortName, - } - }), - })) as { packagesToRelease: string[] } + let packagesToRelease: string[] = [] + if (packageDetails.length > 1 && !pkg) { + ;({ packagesToRelease } = (await prompts({ + type: 'multiselect', + name: 'packagesToRelease', + message: 'Select packages to release', + instructions: 'Space to select. Enter to submit.', + choices: packageDetails.map((p) => { + const title = p?.newCommits ? chalk.bold.green(p?.shortName) : p?.shortName + return { + title, + value: p.shortName, + } + }), + })) as { packagesToRelease: string[] }) - if (!packagesToRelease) { - abort() - } + if (!packagesToRelease) { + abort() + } - if (packagesToRelease.length === 0) { - abort('Please specify a package to publish') - } + if (packagesToRelease.length === 0) { + abort('Please specify a package to publish') + } - if (packagesToRelease.find((p) => p === 'payload' && packagesToRelease.length > 1)) { - abort('Cannot publish payload with other packages. Release Payload first.') + if (packagesToRelease.find((p) => p === 'payload' && packagesToRelease.length > 1)) { + abort('Cannot publish payload with other packages. Release Payload first.') + } + } else { + packagesToRelease = [packageDetails[0].shortName] } const packageMap = packageDetails.reduce( @@ -94,9 +104,19 @@ ${packagesToRelease const packageObj = await fse.readJson(`${packagePath}/package.json`) const newVersion = packageObj.version + if (pkg === 'payload') { + const shouldUpdateChangelog = await confirm(`🧑‍💻 Update Changelog?`) + if (shouldUpdateChangelog) { + updateChangelog({ pkg: packageMap[pkg], bump }) + } + } + const tagName = `${shortName}/${newVersion}` const shouldCommit = await confirm(`🧑‍💻 Commit Release?`) if (shouldCommit) { + if (pkg === 'payload') { + execSync(`git add CHANGELOG.md`, execOpts) + } execSync(`git add ${packagePath}/package.json`, execOpts) execSync(`git commit -m "chore(release): ${tagName} [skip ci]" `, execOpts) } diff --git a/scripts/update-changelog.ts b/scripts/update-changelog.ts new file mode 100755 index 000000000..16a7098b6 --- /dev/null +++ b/scripts/update-changelog.ts @@ -0,0 +1,133 @@ +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 addStream from 'add-stream' +import tempfile from 'tempfile' +import concatSream from 'concat-stream' +import getStream from 'get-stream' +import conventionalChangelogCore, { + Options, + Context, + GitRawCommitsOptions, + ParserOptions, + WriterOptions, +} from 'conventional-changelog-core' +import conventionalChangelog, { Options as ChangelogOptions } from 'conventional-changelog' + +const execOpts: ExecSyncOptions = { stdio: 'inherit' } +const args = minimist(process.argv.slice(2)) + +async function main() { + const { tag = 'latest', bump = 'patch' } = args + const packageName = args._[0] + + const packageDetails = await getPackageDetails() + showPackageDetails(packageDetails) + + let pkg: PackageDetails | undefined + if (packageName) { + pkg = packageDetails.find((p) => p.shortName === packageName) + if (!pkg) { + abort(`Package not found: ${packageName}`) + } + } else { + ;({ pkg } = (await prompts({ + type: 'select', + name: 'pkg', + message: 'Select package to update changelog', + choices: packageDetails.map((p) => { + const title = p?.newCommits ? chalk.bold.green(p?.shortName) : p?.shortName + return { + title, + value: p, + } + }), + })) as { pkg: PackageDetails }) + } + + console.log({ pkg }) + if (!pkg) { + abort() + process.exit(1) + } + + // Prefix to find prev tag + const tagPrefix = pkg.shortName === 'payload' ? 'v' : pkg.prevGitTag.split('/')[0] + '/' + + const generateChangelog = await confirm('Generate changelog?') + if (!generateChangelog) { + abort() + } + + const nextReleaseVersion = semver.inc(pkg.version, bump) as string + const changelogStream = conventionalChangelog( + { + preset: 'conventionalcommits', + append: true, // Does this work? + // currentTag: pkg.prevGitTag, // The prefix is added automatically apparently? + tagPrefix, + pkg: { + path: `${pkg.packagePath}/package.json`, + }, + }, + { + version: nextReleaseVersion, // next release + }, + { + path: 'packages', + // path: pkg.packagePath, + // from: pkg.prevGitTag, + // to: 'HEAD' + }, + ).on('error', (err) => { + console.error(err.stack) + console.error(err.toString()) + process.exit(1) + }) + + const changelogFile = 'CHANGELOG.md' + const readStream = fse.createReadStream(changelogFile) + + const tmp = tempfile() + + changelogStream + .pipe(addStream(readStream)) + .pipe(createWriteStream(tmp)) + .on('finish', () => { + createReadStream(tmp).pipe(createWriteStream(changelogFile)) + }) +} + +main().catch((error) => { + console.error(error) + process.exit(1) +}) + +async function abort(message = 'Abort', exitCode = 1) { + console.error(chalk.bold.red(`\n${message}\n`)) + process.exit(exitCode) +} + +async function confirm(message: string): Promise { + const { confirm } = await prompts( + { + name: 'confirm', + initial: false, + message, + type: 'confirm', + }, + { + onCancel: () => { + abort() + }, + }, + ) + + return confirm +} diff --git a/scripts/utils/updateChangelog.ts b/scripts/utils/updateChangelog.ts new file mode 100755 index 000000000..3820043aa --- /dev/null +++ b/scripts/utils/updateChangelog.ts @@ -0,0 +1,54 @@ +import addStream from 'add-stream' +import { ExecSyncOptions } from 'child_process' +import conventionalChangelog from 'conventional-changelog' +import fse, { createReadStream, createWriteStream } from 'fs-extra' +import minimist from 'minimist' +import semver, { ReleaseType } from 'semver' +import tempfile from 'tempfile' +import { PackageDetails } from '../lib/getPackageDetails' + +type Args = { + pkg: PackageDetails + bump: ReleaseType +} + +export const updateChangelog = ({ pkg, bump }: Args) => { + // Prefix to find prev tag + const tagPrefix = pkg.shortName === 'payload' ? 'v' : pkg.prevGitTag.split('/')[0] + '/' + + const nextReleaseVersion = semver.inc(pkg.version, bump) as string + const changelogStream = conventionalChangelog( + { + preset: 'conventionalcommits', + tagPrefix, + pkg: { + path: `${pkg.packagePath}/package.json`, + }, + }, + { + version: nextReleaseVersion, // next release + }, + { + path: 'packages', + // path: pkg.packagePath, + // from: pkg.prevGitTag, + // to: 'HEAD' + }, + ).on('error', (err) => { + console.error(err.stack) + console.error(err.toString()) + process.exit(1) + }) + + const changelogFile = 'CHANGELOG.md' + const readStream = fse.createReadStream(changelogFile) + + const tmp = tempfile() + + changelogStream + .pipe(addStream(readStream)) + .pipe(createWriteStream(tmp)) + .on('finish', () => { + createReadStream(tmp).pipe(createWriteStream(changelogFile)) + }) +}