diff --git a/.github/workflows/general-ci.yml b/.github/workflows/general-ci.yml index 74cd1cf..d376819 100644 --- a/.github/workflows/general-ci.yml +++ b/.github/workflows/general-ci.yml @@ -1,9 +1,13 @@ name: General CI Workflow on: + push: + branches: + - "**" + pull_request: branches: - - master + - "**" jobs: test-and-build: diff --git a/.github/workflows/update-licenses.yml b/.github/workflows/update-licenses.yml new file mode 100644 index 0000000..78ff132 --- /dev/null +++ b/.github/workflows/update-licenses.yml @@ -0,0 +1,64 @@ +name: Update Licenses on Dependency Changes + +on: + pull_request: + branches: + - "**" + paths: + - "package.json" + - "pnpm-lock.yaml" + types: + - opened + - synchronize + - reopened + +permissions: + contents: write + pull-requests: write + actions: write + +jobs: + update-licenses: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref || 'master' }} + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + + - name: Set up pnpm + uses: pnpm/action-setup@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "lts/*" + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Generate licenses.json + run: | + pnpm add -g license-checker + license-checker --json > licenses.json + + - name: Display licenses.json content + run: cat licenses.json + + - name: Commit and push updated licenses + env: + GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add licenses.json + if ! git diff --cached --quiet; then + git commit -m "chore: Update licenses.json" + git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }} + git push origin HEAD:${{ github.event.pull_request.head.ref }} + else + echo "No changes to commit." + fi diff --git a/licenses.json b/licenses.json new file mode 100644 index 0000000..f8b3891 --- /dev/null +++ b/licenses.json @@ -0,0 +1,100 @@ +{ + "@swc-node/jest@1.8.12": { + "licenses": "MIT", + "repository": "https://github.com/swc-project/swc-node", + "publisher": "LongYinan", + "email": "github@lyn.one", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@swc-node/jest", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@swc-node/jest/LICENSE" + }, + "@swc-node/register@1.10.9": { + "licenses": "MIT", + "repository": "https://github.com/swc-project/swc-node", + "publisher": "LongYinan", + "email": "github@lyn.one", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@swc-node/register", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@swc-node/register/LICENSE" + }, + "@swc/cli@0.6.0": { + "licenses": "MIT", + "repository": "https://github.com/swc-project/pkgs", + "publisher": "강동윤", + "email": "kdy1997.dev@gmail.com", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@swc/cli", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@swc/cli/LICENSE" + }, + "@swc/core@1.10.12": { + "licenses": "Apache-2.0", + "repository": "https://github.com/swc-project/swc", + "publisher": "강동윤", + "email": "kdy1997.dev@gmail.com", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@swc/core" + }, + "@swc/helpers@0.5.15": { + "licenses": "Apache-2.0", + "repository": "https://github.com/swc-project/swc", + "publisher": "강동윤", + "email": "kdy1997.dev@gmail.com", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@swc/helpers", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@swc/helpers/LICENSE" + }, + "@types/jest@29.5.14": { + "licenses": "MIT", + "repository": "https://github.com/DefinitelyTyped/DefinitelyTyped", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@types/jest", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@types/jest/LICENSE" + }, + "@types/node@22.13.0": { + "licenses": "MIT", + "repository": "https://github.com/DefinitelyTyped/DefinitelyTyped", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@types/node", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/@types/node/LICENSE" + }, + "fastify-swc-typescript-server@1.0.0": { + "licenses": "MIT", + "publisher": "@mattfsourcecode", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/LICENSE" + }, + "fastify@5.2.1": { + "licenses": "MIT", + "repository": "https://github.com/fastify/fastify", + "publisher": "Matteo Collina", + "email": "hello@matteocollina.com", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/fastify", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/fastify/LICENSE" + }, + "jest@29.7.0": { + "licenses": "MIT", + "repository": "https://github.com/jestjs/jest", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/jest", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/jest/LICENSE" + }, + "nodemon@3.1.9": { + "licenses": "MIT", + "repository": "https://github.com/remy/nodemon", + "publisher": "Remy Sharp", + "url": "https://github.com/remy", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/nodemon", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/nodemon/LICENSE" + }, + "rimraf@6.0.1": { + "licenses": "ISC", + "repository": "https://github.com/isaacs/rimraf", + "publisher": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/rimraf", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/rimraf/LICENSE" + }, + "ts-node@10.9.2": { + "licenses": "MIT", + "repository": "https://github.com/TypeStrong/ts-node", + "publisher": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me", + "path": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/ts-node", + "licenseFile": "/home/runner/work/fastify-swc-typescript-server/fastify-swc-typescript-server/node_modules/ts-node/LICENSE" + } +} + diff --git a/package.json b/package.json index 5a5f4b4..beb4cda 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@swc/core": "^1.10.12", "@swc/helpers": "^0.5.15", "@types/jest": "^29.5.14", - "@types/node": "^22.12.0", + "@types/node": "^22.13.0", "jest": "^29.7.0", "nodemon": "^3.1.9", "rimraf": "^6.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 996b493..c494725 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,11 +31,11 @@ importers: specifier: ^29.5.14 version: 29.5.14 '@types/node': - specifier: ^22.12.0 - version: 22.12.0 + specifier: ^22.13.0 + version: 22.13.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)) + version: 29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)) nodemon: specifier: ^3.1.9 version: 3.1.9 @@ -44,7 +44,7 @@ importers: version: 6.0.1 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3) + version: 10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3) packages: @@ -780,8 +780,8 @@ packages: '@types/jest@29.5.14': resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} - '@types/node@22.12.0': - resolution: {integrity: sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==} + '@types/node@22.13.0': + resolution: {integrity: sha512-ClIbNe36lawluuvq3+YYhnIN2CELi+6q8NpnM7PYp4hBn/TatfboPgVSm2rwKRfnV2M+Ty9GWDFI64KEe+kysA==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -2447,27 +2447,27 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -2492,7 +2492,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -2510,7 +2510,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.12.0 + '@types/node': 22.13.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2532,7 +2532,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.12.0 + '@types/node': 22.13.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2602,7 +2602,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.12.0 + '@types/node': 22.13.0 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -2973,7 +2973,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.12.0 + '@types/node': 22.13.0 '@types/http-cache-semantics@4.0.4': {} @@ -2992,7 +2992,7 @@ snapshots: expect: 29.7.0 pretty-format: 29.7.0 - '@types/node@22.12.0': + '@types/node@22.13.0': dependencies: undici-types: 6.20.0 @@ -3312,13 +3312,13 @@ snapshots: cookie@1.0.2: {} - create-jest@29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)): + create-jest@29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -3700,7 +3700,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -3720,16 +3720,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)): + jest-cli@29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)) + create-jest: 29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)) + jest-config: 29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -3739,7 +3739,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)): + jest-config@29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)): dependencies: '@babel/core': 7.26.7 '@jest/test-sequencer': 29.7.0 @@ -3764,8 +3764,8 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.12.0 - ts-node: 10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3) + '@types/node': 22.13.0 + ts-node: 10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -3794,7 +3794,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -3804,7 +3804,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.12.0 + '@types/node': 22.13.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -3843,7 +3843,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -3878,7 +3878,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -3906,7 +3906,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 chalk: 4.1.2 cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.2 @@ -3952,7 +3952,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -3971,7 +3971,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.12.0 + '@types/node': 22.13.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -3980,17 +3980,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.12.0 + '@types/node': 22.13.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)): + jest@29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.12.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3)) + jest-cli: 29.7.0(@types/node@22.13.0)(ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -4465,14 +4465,14 @@ snapshots: touch@3.1.1: {} - ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.12.0)(typescript@5.7.3): + ts-node@10.9.2(@swc/core@1.10.12(@swc/helpers@0.5.15))(@types/node@22.13.0)(typescript@5.7.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.12.0 + '@types/node': 22.13.0 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3