From f970e0d1e436fc44a2a976e45242da5c340f23e4 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Sun, 25 Feb 2024 16:04:19 -0500 Subject: [PATCH 1/8] feat: package is now ESM BREAKING CHANGE: package is now ESM --- package-lock.json | 473 +++++++++++++---------------------- package.json | 23 +- scripts/build.mjs | 24 +- test/log.test.ts | 1 + test/node-middleware.test.ts | 3 +- test/octokit.test.ts | 1 + test/tsconfig.test.json | 1 - 7 files changed, 208 insertions(+), 318 deletions(-) diff --git a/package-lock.json b/package-lock.json index 384ecd449..f9cfd82f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,16 +9,16 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { - "@octokit/auth-app": "^6.0.0", - "@octokit/auth-unauthenticated": "^5.0.0", - "@octokit/core": "^5.0.0", - "@octokit/oauth-app": "^6.0.0", + "@octokit/auth-app": "^7.0.0-beta.3", + "@octokit/auth-unauthenticated": "^6.0.0", + "@octokit/core": "^6.0.0", + "@octokit/oauth-app": "^7.0.0", "@octokit/plugin-paginate-rest": "^9.0.0", - "@octokit/types": "^12.0.0", - "@octokit/webhooks": "^12.0.4" + "@octokit/types": "^12.6.0", + "@octokit/webhooks": "^13.0.0" }, "devDependencies": { - "@octokit/tsconfig": "^2.0.0", + "@octokit/tsconfig": "^3.0.0", "@types/jest": "^29.0.0", "@types/node": "^20.0.0", "esbuild": "^0.20.0", @@ -1767,85 +1767,81 @@ } }, "node_modules/@octokit/auth-app": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-6.0.3.tgz", - "integrity": "sha512-9N7IlBAKEJR3tJgPSubCxIDYGXSdc+2xbkjYpk9nCyqREnH8qEMoMhiEB1WgoA9yTFp91El92XNXAi+AjuKnfw==", - "dependencies": { - "@octokit/auth-oauth-app": "^7.0.0", - "@octokit/auth-oauth-user": "^4.0.0", - "@octokit/request": "^8.0.2", - "@octokit/request-error": "^5.0.0", + "version": "7.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.0.0-beta.3.tgz", + "integrity": "sha512-7TuqE/LhiJQd9rPv23SM3CdPsKHA/g0l0nTtR6/LJDIGN6/mCMyLSV1C/g8IuM2x9/5i2QZluil6xz9C7wZiIg==", + "dependencies": { + "@octokit/auth-oauth-app": "^8.0.1", + "@octokit/auth-oauth-user": "^5.0.1", + "@octokit/request": "^9.0.0", + "@octokit/request-error": "^6.0.1", "@octokit/types": "^12.0.0", - "deprecation": "^2.3.1", "lru-cache": "^10.0.0", - "universal-github-app-jwt": "^1.1.2", - "universal-user-agent": "^6.0.0" + "universal-github-app-jwt": "^2.0.6", + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/auth-oauth-app": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-7.0.1.tgz", - "integrity": "sha512-RE0KK0DCjCHXHlQBoubwlLijXEKfhMhKm9gO56xYvFmP1QTMb+vvwRPmQLLx0V+5AvV9N9I3lr1WyTzwL3rMDg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.0.1.tgz", + "integrity": "sha512-8Pwz4j8aBNdOwzVz95LH5CYOux7tg0BHcyrhbGbbDrrOmotvw0DnzNMbAtS2aKwGFrqnnjj2JQI2JXSLlfzGig==", "dependencies": { - "@octokit/auth-oauth-device": "^6.0.0", - "@octokit/auth-oauth-user": "^4.0.0", - "@octokit/request": "^8.0.2", + "@octokit/auth-oauth-device": "^7.0.0", + "@octokit/auth-oauth-user": "^5.0.1", + "@octokit/request": "^9.0.0", "@octokit/types": "^12.0.0", - "@types/btoa-lite": "^1.0.0", - "btoa-lite": "^1.0.0", - "universal-user-agent": "^6.0.0" + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/auth-oauth-device": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-6.0.1.tgz", - "integrity": "sha512-yxU0rkL65QkjbqQedgVx3gmW7YM5fF+r5uaSj9tM/cQGVqloXcqP2xK90eTyYvl29arFVCW8Vz4H/t47mL0ELw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.0.0.tgz", + "integrity": "sha512-wYgLRHJpVH5nwhI7K5sM8h4JCjlSU7kRhvkhFlnMRFpqrCYr5wTYzmKpzzm7xblc84e783AIF4i4239O4SWKOQ==", "dependencies": { - "@octokit/oauth-methods": "^4.0.0", - "@octokit/request": "^8.0.0", + "@octokit/oauth-methods": "^5.0.0", + "@octokit/request": "^9.0.0", "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/auth-oauth-user": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-4.0.1.tgz", - "integrity": "sha512-N94wWW09d0hleCnrO5wt5MxekatqEJ4zf+1vSe8MKMrhZ7gAXKFOKrDEZW2INltvBWJCyDUELgGRv8gfErH1Iw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.0.1.tgz", + "integrity": "sha512-LTbGC7PqhTDNyFwX2SJc1Qg6m8Jb5OtN0zcqC7zRQqRhBjQrFoUMYtvx0uBqNJHWQ8AIvfAU5xfTGzGRSjPA4A==", "dependencies": { - "@octokit/auth-oauth-device": "^6.0.0", - "@octokit/oauth-methods": "^4.0.0", - "@octokit/request": "^8.0.2", + "@octokit/auth-oauth-device": "^7.0.0", + "@octokit/oauth-methods": "^5.0.0", + "@octokit/request": "^9.0.0", "@octokit/types": "^12.0.0", - "btoa-lite": "^1.0.0", - "universal-user-agent": "^6.0.0" + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/auth-token": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", - "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.0.0.tgz", + "integrity": "sha512-JpQdKWTuu79A6YDaOfl9/HFvdhEwlRSTE/MFLGl8eU+XK6jIuqhxEftJNDpQjem1J7GLcs+4sapP1JXNPTDP/A==", "engines": { "node": ">= 18" } }, "node_modules/@octokit/auth-unauthenticated": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-5.0.1.tgz", - "integrity": "sha512-oxeWzmBFxWd+XolxKTc4zr+h3mt+yofn4r7OfoIkR/Cj/o70eEGmPsFbueyJE2iBAGpjgTnEOKM3pnuEGVmiqg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-6.0.0.tgz", + "integrity": "sha512-yQqyBmQiTdZaFpDS13UPfSkmvKstjW6cTv3/biod/ukkmNFP8muPjrCp6wn8XDNKA535J+xyk+QfrWaZ5FjmGw==", "dependencies": { - "@octokit/request-error": "^5.0.0", + "@octokit/request-error": "^6.0.1", "@octokit/types": "^12.0.0" }, "engines": { @@ -1853,92 +1849,96 @@ } }, "node_modules/@octokit/core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.1.0.tgz", - "integrity": "sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==", - "dependencies": { - "@octokit/auth-token": "^4.0.0", - "@octokit/graphql": "^7.0.0", - "@octokit/request": "^8.0.2", - "@octokit/request-error": "^5.0.0", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.0.0.tgz", + "integrity": "sha512-0JifUnQKGoX83rMhy5bk2QNAPcO5hjD082YZ+wjqUa509RaZIn3F5SeqbKJoc2Zh+ld7rEQmlIeJzhVamSW2Xw==", + "dependencies": { + "@octokit/auth-token": "^5.0.0", + "@octokit/graphql": "^8.0.0", + "@octokit/request": "^9.0.0", + "@octokit/request-error": "^6.0.1", "@octokit/types": "^12.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" + "before-after-hook": "^3.0.2", + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/endpoint": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz", - "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.0.0.tgz", + "integrity": "sha512-emBcNDxBdC1y3+knJonS5zhUB/CG6TihubxM2U1/pG/Z1y3a4oV0Gzz3lmkCvWWQI6h3tqBAX9MgCBFp+M68Jw==", "dependencies": { "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" + "universal-user-agent": "^7.0.2" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/graphql": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", - "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.0.0.tgz", + "integrity": "sha512-9B2HwWSb12ldwrp6pC8BFTsSCeidW7do0lMgWNH65IXRVteN503JJSWPH1VEM+qP8+/Ka1pw3MTs+3Q6Bjqukw==", "dependencies": { - "@octokit/request": "^8.0.1", + "@octokit/request": "^9.0.0", "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/oauth-app": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-6.1.0.tgz", - "integrity": "sha512-nIn/8eUJ/BKUVzxUXd5vpzl1rwaVxMyYbQkNZjHrF7Vk/yu98/YDF/N2KeWO7uZ0g3b5EyiFXFkZI8rJ+DH1/g==", - "dependencies": { - "@octokit/auth-oauth-app": "^7.0.0", - "@octokit/auth-oauth-user": "^4.0.0", - "@octokit/auth-unauthenticated": "^5.0.0", - "@octokit/core": "^5.0.0", - "@octokit/oauth-authorization-url": "^6.0.2", - "@octokit/oauth-methods": "^4.0.0", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-7.0.0.tgz", + "integrity": "sha512-L0f+RindCNie8RA+6CJ2hDgrbOyacdcZ4hn1+5Wet0lZTFnY4KfEHAqxkL8aM/0JdsNnSj08fYfUWvIFro2+zg==", + "dependencies": { + "@octokit/auth-oauth-app": "^8.0.0", + "@octokit/auth-oauth-user": "^5.0.1", + "@octokit/auth-unauthenticated": "^6.0.0-beta.1", + "@octokit/core": "^6.0.0", + "@octokit/oauth-authorization-url": "^7.0.0", + "@octokit/oauth-methods": "^5.0.0", "@types/aws-lambda": "^8.10.83", - "universal-user-agent": "^6.0.0" + "universal-user-agent": "^7.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/oauth-authorization-url": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-6.0.2.tgz", - "integrity": "sha512-CdoJukjXXxqLNK4y/VOiVzQVjibqoj/xHgInekviUJV73y/BSIcwvJ/4aNHPBPKcPWFnd4/lO9uqRV65jXhcLA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-7.0.0.tgz", + "integrity": "sha512-/x3GvKiAD0ntPvVlbuObuF+sP36CKDvXzwwyQG4VIf6TjqXFXFQ/BsmbZF+mD+rTSImmRPwH+Vr6HndyR+5qIQ==", "engines": { "node": ">= 18" } }, "node_modules/@octokit/oauth-methods": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-4.0.1.tgz", - "integrity": "sha512-1NdTGCoBHyD6J0n2WGXg9+yDLZrRNZ0moTEex/LSPr49m530WNKcCfXDghofYptr3st3eTii+EHoG5k/o+vbtw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-5.0.0.tgz", + "integrity": "sha512-atKKkzwR0ke0z0mFFTMHg8PEmoFDWa5sxdzX5b6wy8poMfAKny2dh5/KtsEbIqAWh8gfYVqNRwwUDMiw6cZ7pg==", "dependencies": { - "@octokit/oauth-authorization-url": "^6.0.2", - "@octokit/request": "^8.0.2", - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0", - "btoa-lite": "^1.0.0" + "@octokit/oauth-authorization-url": "^7.0.0", + "@octokit/request": "^9.0.0", + "@octokit/request-error": "^6.0.0", + "@octokit/types": "^12.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/openapi-types": { - "version": "19.1.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.1.0.tgz", - "integrity": "sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw==" + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" + }, + "node_modules/@octokit/openapi-webhooks-types": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-webhooks-types/-/openapi-webhooks-types-6.0.1.tgz", + "integrity": "sha512-vDO4ylcm4g0ANTJBZoEODs06vjsw2JlIhvWdC+wTJmHPijzyPJLguIYmgFf9ExQtxnH6Sn1horNHgNV47nT81w==" }, "node_modules/@octokit/plugin-paginate-rest": { "version": "9.1.5", @@ -1955,73 +1955,66 @@ } }, "node_modules/@octokit/request": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz", - "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.0.0.tgz", + "integrity": "sha512-hShsrZ40W8dz3TkyD5ifHNcrYfYpYF7Sh2x+ZKafA+eO0zNeKDTsbF1E0xrUf0mVYGeKL+NLMO5SnfAP22l05Q==", "dependencies": { - "@octokit/endpoint": "^9.0.0", - "@octokit/request-error": "^5.0.0", + "@octokit/endpoint": "^10.0.0", + "@octokit/request-error": "^6.0.1", "@octokit/types": "^12.0.0", - "universal-user-agent": "^6.0.0" + "universal-user-agent": "^7.0.2" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/request-error": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", - "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.0.1.tgz", + "integrity": "sha512-EPeILOAEGqwmEG6g7dYlbvqkjJ5nWNcZvQpgeLEn1MieIcJ0xK0CJtvVcIMXqzIM8DOWzvI6zL5FQAwjTvk/Tg==", "dependencies": { - "@octokit/types": "^12.0.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" + "@octokit/types": "^12.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/tsconfig": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-2.0.0.tgz", - "integrity": "sha512-tWnrai3quGt8+gRN2edzo9fmraWekeryXPeXDomMw2oFSpu/lH3VSWGn/q4V+rwjTRMeeXk/ci623/01Zet4VQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-3.0.0.tgz", + "integrity": "sha512-tQLwgXYfBq9iUbOq26kWCzsJL6DY7qjOLzqcg5tCFQ4ob48H47iX98NudHW7S5OQ/fpSKYJhb3eQehyBNzYjfA==", "dev": true }, "node_modules/@octokit/types": { - "version": "12.5.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.5.0.tgz", - "integrity": "sha512-YJEKcb0KkJlIUNU/zjnZwHEP8AoVh/OoIcP/1IyR4UHxExz7fzpe/a8IG4wBtQi7QDEqiomVLX88S6FpxxAJtg==", + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", "dependencies": { - "@octokit/openapi-types": "^19.1.0" + "@octokit/openapi-types": "^20.0.0" } }, "node_modules/@octokit/webhooks": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-12.1.2.tgz", - "integrity": "sha512-+nGS3ReCByF6m+nbNB59x7Aa3CNjCCGuBLFzfkiJP1O3uVKKuJbkP4uO4t46YqH26nlugmOhqjT7nx5D0VPtdA==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-13.0.1.tgz", + "integrity": "sha512-sso9JrJgkr8aNLicqmo02UXMM9zL9Ny/ayu7CAdV59oHMlnpE1qQtIBfT/pV7yVwCu8TTi7NS7GXUSh6P4oTIA==", "dependencies": { - "@octokit/request-error": "^5.0.0", - "@octokit/webhooks-methods": "^4.1.0", - "@octokit/webhooks-types": "7.3.2", - "aggregate-error": "^3.1.0" + "@octokit/openapi-webhooks-types": "6.0.1", + "@octokit/request-error": "^6.0.1", + "@octokit/webhooks-methods": "^5.0.0", + "aggregate-error": "^5.0.0" }, "engines": { "node": ">= 18" } }, "node_modules/@octokit/webhooks-methods": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-4.1.0.tgz", - "integrity": "sha512-zoQyKw8h9STNPqtm28UGOYFE7O6D4Il8VJwhAtMHFt2C4L0VQT1qGKLeefUOqHNs1mNRYSadVv7x0z8U2yyeWQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-5.0.0.tgz", + "integrity": "sha512-bMypz/oiU4DqaujqZH7IOwMyrHfr2MBZbXqrttyR/kawne7t8CIv1k+xALazo6VCuE7DJZbgBG1RFdk5OH8lnw==", "engines": { "node": ">= 18" } }, - "node_modules/@octokit/webhooks-types": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-7.3.2.tgz", - "integrity": "sha512-JWOoOgtWTFnTSAamPXXyjTY5/apttvNxF+vPBnwdSu5cj5snrd7FO0fyw4+wTXy8fHduq626JjhO+TwCyyA6vA==" - }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -2102,11 +2095,6 @@ "@babel/types": "^7.20.7" } }, - "node_modules/@types/btoa-lite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/btoa-lite/-/btoa-lite-1.0.2.tgz", - "integrity": "sha512-ZYbcE2x7yrvNFJiU7xJGrpF/ihpkM7zKgw8bha3LNJSesvTtUNxbpzaT7WXBIryf6jovisrxTBvymxMeLLj1Mg==" - }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -2150,18 +2138,11 @@ "pretty-format": "^29.0.0" } }, - "node_modules/@types/jsonwebtoken": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.5.tgz", - "integrity": "sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/node": { "version": "20.11.19", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", + "dev": true, "dependencies": { "undici-types": "~5.26.4" } @@ -2201,15 +2182,18 @@ } }, "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-5.0.0.tgz", + "integrity": "sha512-gOsf2YwSlleG6IjRYG2A7k0HmBMEo6qVNk9Bp/EaLgAJT5ngH6PXbqa4ItvnEwCm/velL5jAnQgsHsWnjhGmvw==", "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "clean-stack": "^5.2.0", + "indent-string": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/ansi-escapes": { @@ -2463,9 +2447,9 @@ "dev": true }, "node_modules/before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz", + "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==" }, "node_modules/body-parser": { "version": "1.20.1", @@ -2565,16 +2549,6 @@ "node-int64": "^0.4.0" } }, - "node_modules/btoa-lite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", - "integrity": "sha512-gvW7InbIyF8AicrqWoptdW08pUxuhq8BEgowNajy9RhiE86fmGAGl+bLKo6oB8QP0CkqHLowfN0oJdKC/J6LbA==" - }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2692,11 +2666,28 @@ "dev": true }, "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-5.2.0.tgz", + "integrity": "sha512-TyUIUJgdFnCISzG5zu3291TAsE77ddchd0bepon1VVQrKLGKFED4iXFEDQ24mIPdPBbyE16PK3F8MYE1CmcBEQ==", + "dependencies": { + "escape-string-regexp": "5.0.0" + }, "engines": { - "node": ">=6" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clean-stack/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cliui": { @@ -3057,11 +3048,6 @@ "node": ">= 0.8" } }, - "node_modules/deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" - }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -3096,14 +3082,6 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3779,11 +3757,14 @@ } }, "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/inflight": { @@ -5751,81 +5732,6 @@ "node": ">=6" } }, - "node_modules/jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", - "dependencies": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=12", - "npm": ">=6" - } - }, - "node_modules/jsonwebtoken/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jsonwebtoken/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/jsonwebtoken/node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jsonwebtoken/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -5862,53 +5768,18 @@ "node": ">=8" } }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" - }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", "dev": true }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" - }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", "dev": true }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" - }, "node_modules/lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -6180,6 +6051,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "dependencies": { "wrappy": "1" } @@ -6584,6 +6456,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -7289,21 +7162,18 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "node_modules/universal-github-app-jwt": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-1.1.2.tgz", - "integrity": "sha512-t1iB2FmLFE+yyJY9+3wMx0ejB+MQpEVkH0gQv7dR6FZyltyq+ZZO0uDpbopxhrZ3SLEO4dCEkIujOMldEQ2iOA==", - "dependencies": { - "@types/jsonwebtoken": "^9.0.0", - "jsonwebtoken": "^9.0.2" - } + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-2.0.6.tgz", + "integrity": "sha512-GKY7PBMszxAmDy0CiT2o7f2wqQJYewcsW6QxqjqVqfc08GKXQcCCHPzURXGLgD+DsTW2DVXUmZKuOr8F4XSHRg==" }, "node_modules/universal-user-agent": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", - "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==" + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", + "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==" }, "node_modules/unpipe": { "version": "1.0.0", @@ -7541,7 +7411,8 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/write-file-atomic": { "version": "4.0.2", diff --git a/package.json b/package.json index 79b654fac..5c0e4c7aa 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "publishConfig": { "access": "public" }, + "type": "module", "version": "0.0.0-development", "description": "GitHub Apps toolset for Node.js", "main": "index.js", @@ -11,23 +12,23 @@ "lint": "prettier --check {src,test}/* *.md package.json", "lint:fix": "prettier --write {src,test}/* *.md package.json", "pretest": "npm run -s lint", - "test": "jest --coverage", + "test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --coverage", "test:typescript": "npx tsc --allowImportingTsExtensions --noEmit --declaration --noUnusedLocals --esModuleInterop --strict --target es2020 --moduleResolution node16 --module node16 test/typescript-validate.ts" }, "repository": "github:octokit/app.js", "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-app": "^6.0.0", - "@octokit/auth-unauthenticated": "^5.0.0", - "@octokit/core": "^5.0.0", - "@octokit/oauth-app": "^6.0.0", + "@octokit/auth-app": "^7.0.0-beta.3", + "@octokit/auth-unauthenticated": "^6.0.0", + "@octokit/core": "^6.0.0", + "@octokit/oauth-app": "^7.0.0", "@octokit/plugin-paginate-rest": "^9.0.0", - "@octokit/types": "^12.0.0", - "@octokit/webhooks": "^12.0.4" + "@octokit/types": "^12.6.0", + "@octokit/webhooks": "^13.0.0" }, "devDependencies": { - "@octokit/tsconfig": "^2.0.0", + "@octokit/tsconfig": "^3.0.0", "@types/jest": "^29.0.0", "@types/node": "^20.0.0", "esbuild": "^0.20.0", @@ -45,11 +46,15 @@ "node": ">= 18" }, "jest": { + "extensionsToTreatAsEsm": [ + ".ts" + ], "transform": { "^.+\\.(ts|tsx)$": [ "ts-jest", { - "tsconfig": "test/tsconfig.test.json" + "tsconfig": "test/tsconfig.test.json", + "useESM": true } ] }, diff --git a/scripts/build.mjs b/scripts/build.mjs index ae38ce8ab..964bc6707 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -46,8 +46,8 @@ async function main() { outdir: "pkg/dist-node", bundle: true, platform: "node", - target: "node14", - format: "cjs", + target: "node18", + format: "esm", ...sharedOptions, }), // Build an ESM browser bundle @@ -78,10 +78,22 @@ async function main() { { ...pkg, files: ["dist-*/**", "bin/**"], - main: "dist-node/index.js", - module: "dist-web/index.js", - types: "dist-types/index.d.ts", - source: "dist-src/index.js", + exports: { + ".": { + node: { + types: "./dist-types/index.d.ts", + import: "./dist-node/index.js", + }, + browser: { + types: "./dist-types/web.d.ts", + import: "./dist-web/index.js", + }, + default: { + types: "./dist-types/index.d.ts", + import: "./dist-node/index.js", + }, + }, + }, sideEffects: false, }, null, diff --git a/test/log.test.ts b/test/log.test.ts index c2a776c11..8669b2f07 100644 --- a/test/log.test.ts +++ b/test/log.test.ts @@ -30,6 +30,7 @@ const CLIENT_ID = "0123"; const CLIENT_SECRET = "0123secret"; const WEBHOOK_SECRET = "secret"; +import { jest } from "@jest/globals"; import { App } from "../src/index.ts"; describe("app.log", () => { diff --git a/test/node-middleware.test.ts b/test/node-middleware.test.ts index 243e45d03..65ed01f1a 100644 --- a/test/node-middleware.test.ts +++ b/test/node-middleware.test.ts @@ -1,7 +1,8 @@ import { createServer } from "node:http"; // import without types -const express = require("express"); +// @ts-ignore +const express = (await import("express")).default as any; import { App, createNodeMiddleware } from "../src/index.ts"; diff --git a/test/octokit.test.ts b/test/octokit.test.ts index 3ac16c3c7..7975517fa 100644 --- a/test/octokit.test.ts +++ b/test/octokit.test.ts @@ -38,6 +38,7 @@ const BEARER = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOi0zMCwiZXhwIjo1NzAsImlzcyI6MX0.q3foRa78U3WegM5PrWLEh5N0bH1SD62OqW66ZYzArp95JBNiCbo8KAlGtiRENCIfBZT9ibDUWy82cI4g3F09mdTq3bD1xLavIfmTksIQCz5EymTWR5v6gL14LSmQdWY9lSqkgUG0XCFljWUglEP39H4yeHbFgdjvAYg3ifDS12z9oQz2ACdSpvxPiTuCC804HkPVw8Qoy0OSXvCkFU70l7VXCVUxnuhHnk8-oCGcKUspmeP6UdDnXk-Aus-eGwDfJbU2WritxxaXw6B4a3flTPojkYLSkPBr6Pi0H2-mBsW_Nvs0aLPVLKobQd4gqTkosX3967DoAG8luUMhrnxe8Q"; import { App } from "../src/index.ts"; +import { jest } from "@jest/globals"; describe("app.octokit", () => { let app: InstanceType; diff --git a/test/tsconfig.test.json b/test/tsconfig.test.json index 5e8dc2487..cf1f2005d 100644 --- a/test/tsconfig.test.json +++ b/test/tsconfig.test.json @@ -3,7 +3,6 @@ "compilerOptions": { "emitDeclarationOnly": false, "noEmit": true, - "verbatimModuleSyntax": false, "allowImportingTsExtensions": true }, "include": ["src/**/*"] From 8ce821de2b14ac05c014ef772fc6674a05209b32 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Sun, 25 Feb 2024 16:45:42 -0500 Subject: [PATCH 2/8] fix: bump deps --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index f9cfd82f0..89c2ae28b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@octokit/auth-unauthenticated": "^6.0.0", "@octokit/core": "^6.0.0", "@octokit/oauth-app": "^7.0.0", - "@octokit/plugin-paginate-rest": "^9.0.0", + "@octokit/plugin-paginate-rest": "^10.0.0-beta.1", "@octokit/types": "^12.6.0", "@octokit/webhooks": "^13.0.0" }, @@ -1941,17 +1941,17 @@ "integrity": "sha512-vDO4ylcm4g0ANTJBZoEODs06vjsw2JlIhvWdC+wTJmHPijzyPJLguIYmgFf9ExQtxnH6Sn1horNHgNV47nT81w==" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz", - "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==", + "version": "10.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-10.0.0-beta.1.tgz", + "integrity": "sha512-NkbSR6xPgZ86MOEF7NYliFgKI+jwOkwsBCu+jcehHAHh9FSh+BLw4sx965z6a5H2o4YXoVZT2YDq4CkQDNd+Dg==", "dependencies": { - "@octokit/types": "^12.4.0" + "@octokit/types": "^12.6.0" }, "engines": { "node": ">= 18" }, "peerDependencies": { - "@octokit/core": ">=5" + "@octokit/core": ">=6" } }, "node_modules/@octokit/request": { diff --git a/package.json b/package.json index 5c0e4c7aa..17f29876b 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@octokit/auth-unauthenticated": "^6.0.0", "@octokit/core": "^6.0.0", "@octokit/oauth-app": "^7.0.0", - "@octokit/plugin-paginate-rest": "^9.0.0", + "@octokit/plugin-paginate-rest": "^10.0.0-beta.1", "@octokit/types": "^12.6.0", "@octokit/webhooks": "^13.0.0" }, From a2f35e983b278f1585e4d228617ff1c4a092380d Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Mon, 26 Feb 2024 20:35:22 -0500 Subject: [PATCH 3/8] fix: bump deps --- package-lock.json | 16 ++++++++-------- package.json | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 89c2ae28b..31281fb84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,11 +9,11 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { - "@octokit/auth-app": "^7.0.0-beta.3", + "@octokit/auth-app": "^7.0.0-beta.4", "@octokit/auth-unauthenticated": "^6.0.0", "@octokit/core": "^6.0.0", "@octokit/oauth-app": "^7.0.0", - "@octokit/plugin-paginate-rest": "^10.0.0-beta.1", + "@octokit/plugin-paginate-rest": "^10.0.0-beta.2", "@octokit/types": "^12.6.0", "@octokit/webhooks": "^13.0.0" }, @@ -1767,9 +1767,9 @@ } }, "node_modules/@octokit/auth-app": { - "version": "7.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.0.0-beta.3.tgz", - "integrity": "sha512-7TuqE/LhiJQd9rPv23SM3CdPsKHA/g0l0nTtR6/LJDIGN6/mCMyLSV1C/g8IuM2x9/5i2QZluil6xz9C7wZiIg==", + "version": "7.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.0.0-beta.4.tgz", + "integrity": "sha512-ma6fUCrL6CX4fFIQOZ4Req+EcA7fA5clw0SBSUkbbJ5XFU4gb8AP7XKbSFRQMWTM1g/luQG/QSxqeF8ZXzltrQ==", "dependencies": { "@octokit/auth-oauth-app": "^8.0.1", "@octokit/auth-oauth-user": "^5.0.1", @@ -1941,9 +1941,9 @@ "integrity": "sha512-vDO4ylcm4g0ANTJBZoEODs06vjsw2JlIhvWdC+wTJmHPijzyPJLguIYmgFf9ExQtxnH6Sn1horNHgNV47nT81w==" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "10.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-10.0.0-beta.1.tgz", - "integrity": "sha512-NkbSR6xPgZ86MOEF7NYliFgKI+jwOkwsBCu+jcehHAHh9FSh+BLw4sx965z6a5H2o4YXoVZT2YDq4CkQDNd+Dg==", + "version": "10.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-10.0.0-beta.2.tgz", + "integrity": "sha512-OLx6pZ921aSsY1gE563gMDMalviJzmBYgNVPG1E2fXzFsQE4dmZywl+ocOLhaGNaUq//JrdnVnHRRXlfz5kw+g==", "dependencies": { "@octokit/types": "^12.6.0" }, diff --git a/package.json b/package.json index 17f29876b..d31bc1f8a 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,11 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-app": "^7.0.0-beta.3", + "@octokit/auth-app": "^7.0.0-beta.4", "@octokit/auth-unauthenticated": "^6.0.0", "@octokit/core": "^6.0.0", "@octokit/oauth-app": "^7.0.0", - "@octokit/plugin-paginate-rest": "^10.0.0-beta.1", + "@octokit/plugin-paginate-rest": "^10.0.0-beta.2", "@octokit/types": "^12.6.0", "@octokit/webhooks": "^13.0.0" }, From 09e0241069cdbefa805efd0ab229bf36e722935a Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Mon, 26 Feb 2024 20:35:39 -0500 Subject: [PATCH 4/8] fix(pkg): add `main` entry point Some tools don't play well with only having the `exports` field present. See octokit/core.js#662 --- scripts/build.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build.mjs b/scripts/build.mjs index 964bc6707..0bd3cf82a 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -78,6 +78,8 @@ async function main() { { ...pkg, files: ["dist-*/**", "bin/**"], + main: "./dist-node/index.js", + types: "./dist-types/index.d.ts", exports: { ".": { node: { From 65cc6e9df2a804250ad65eda16b47f9b0bfce398 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Tue, 16 Apr 2024 15:21:33 -0400 Subject: [PATCH 5/8] fix: bump Octokit deps --- package-lock.json | 148 +++++++++++++++++++++++++++++++--------------- package.json | 8 +-- 2 files changed, 104 insertions(+), 52 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31281fb84..2e048479c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,12 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { - "@octokit/auth-app": "^7.0.0-beta.4", + "@octokit/auth-app": "^7.0.0-beta.8", "@octokit/auth-unauthenticated": "^6.0.0", - "@octokit/core": "^6.0.0", + "@octokit/core": "^6.1.2", "@octokit/oauth-app": "^7.0.0", - "@octokit/plugin-paginate-rest": "^10.0.0-beta.2", - "@octokit/types": "^12.6.0", + "@octokit/plugin-paginate-rest": "^11.0.0", + "@octokit/types": "^13.0.0", "@octokit/webhooks": "^13.0.0" }, "devDependencies": { @@ -1767,15 +1767,15 @@ } }, "node_modules/@octokit/auth-app": { - "version": "7.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.0.0-beta.4.tgz", - "integrity": "sha512-ma6fUCrL6CX4fFIQOZ4Req+EcA7fA5clw0SBSUkbbJ5XFU4gb8AP7XKbSFRQMWTM1g/luQG/QSxqeF8ZXzltrQ==", - "dependencies": { - "@octokit/auth-oauth-app": "^8.0.1", - "@octokit/auth-oauth-user": "^5.0.1", - "@octokit/request": "^9.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^12.0.0", + "version": "7.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.0.0-beta.8.tgz", + "integrity": "sha512-Mic3k7fpkH5172fzD7OH3jGn7TsAkiNfhlhfE4g03Gz6FeWxpxm5lbCBKUUQ6scEdDZxCyNLmBwEBXJLUYd7PA==", + "dependencies": { + "@octokit/auth-oauth-app": "^8.1.0", + "@octokit/auth-oauth-user": "^5.1.0", + "@octokit/request": "^9.1.1", + "@octokit/request-error": "^6.1.1", + "@octokit/types": "^13.4.1", "lru-cache": "^10.0.0", "universal-github-app-jwt": "^2.0.6", "universal-user-agent": "^7.0.0" @@ -1785,14 +1785,14 @@ } }, "node_modules/@octokit/auth-oauth-app": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.0.1.tgz", - "integrity": "sha512-8Pwz4j8aBNdOwzVz95LH5CYOux7tg0BHcyrhbGbbDrrOmotvw0DnzNMbAtS2aKwGFrqnnjj2JQI2JXSLlfzGig==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.1.0.tgz", + "integrity": "sha512-Y+xoI1QYlStM5wnSiOPUxEqQ/PGxNdUACceppDe74fG1+/4gb8GaSCFFckmmDVUQjeaRn4up+ewEVD1ytapXDQ==", "dependencies": { "@octokit/auth-oauth-device": "^7.0.0", "@octokit/auth-oauth-user": "^5.0.1", "@octokit/request": "^9.0.0", - "@octokit/types": "^12.0.0", + "@octokit/types": "^13.0.0", "universal-user-agent": "^7.0.0" }, "engines": { @@ -1800,13 +1800,13 @@ } }, "node_modules/@octokit/auth-oauth-device": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.0.0.tgz", - "integrity": "sha512-wYgLRHJpVH5nwhI7K5sM8h4JCjlSU7kRhvkhFlnMRFpqrCYr5wTYzmKpzzm7xblc84e783AIF4i4239O4SWKOQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.1.0.tgz", + "integrity": "sha512-vhXVk8JGAFWMIlukwLEUfRPyWx1qQPWN1MlNzYtzoaXx9s8mxOa1+KhCkKkpl0RTlSk8pGqYwk8CGrr4s4yjoA==", "dependencies": { "@octokit/oauth-methods": "^5.0.0", "@octokit/request": "^9.0.0", - "@octokit/types": "^12.0.0", + "@octokit/types": "^13.0.0", "universal-user-agent": "^7.0.0" }, "engines": { @@ -1814,14 +1814,14 @@ } }, "node_modules/@octokit/auth-oauth-user": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.0.1.tgz", - "integrity": "sha512-LTbGC7PqhTDNyFwX2SJc1Qg6m8Jb5OtN0zcqC7zRQqRhBjQrFoUMYtvx0uBqNJHWQ8AIvfAU5xfTGzGRSjPA4A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.1.0.tgz", + "integrity": "sha512-mnHuLeKu849/o24ysvR8uptYoyNrw7UG/tu1RHYISOEMTSGis6077elF7uwbPfs1JutrwcD0PhDyBKNr3Auf4Q==", "dependencies": { - "@octokit/auth-oauth-device": "^7.0.0", + "@octokit/auth-oauth-device": "^7.0.1", "@octokit/oauth-methods": "^5.0.0", - "@octokit/request": "^9.0.0", - "@octokit/types": "^12.0.0", + "@octokit/request": "^9.0.1", + "@octokit/types": "^13.0.0", "universal-user-agent": "^7.0.0" }, "engines": { @@ -1848,16 +1848,29 @@ "node": ">= 18" } }, + "node_modules/@octokit/auth-unauthenticated/node_modules/@octokit/openapi-types": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" + }, + "node_modules/@octokit/auth-unauthenticated/node_modules/@octokit/types": { + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", + "dependencies": { + "@octokit/openapi-types": "^20.0.0" + } + }, "node_modules/@octokit/core": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.0.0.tgz", - "integrity": "sha512-0JifUnQKGoX83rMhy5bk2QNAPcO5hjD082YZ+wjqUa509RaZIn3F5SeqbKJoc2Zh+ld7rEQmlIeJzhVamSW2Xw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz", + "integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==", "dependencies": { "@octokit/auth-token": "^5.0.0", "@octokit/graphql": "^8.0.0", "@octokit/request": "^9.0.0", "@octokit/request-error": "^6.0.1", - "@octokit/types": "^12.0.0", + "@octokit/types": "^13.0.0", "before-after-hook": "^3.0.2", "universal-user-agent": "^7.0.0" }, @@ -1877,6 +1890,19 @@ "node": ">= 18" } }, + "node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" + }, + "node_modules/@octokit/endpoint/node_modules/@octokit/types": { + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", + "dependencies": { + "@octokit/openapi-types": "^20.0.0" + } + }, "node_modules/@octokit/graphql": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.0.0.tgz", @@ -1890,6 +1916,19 @@ "node": ">= 18" } }, + "node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" + }, + "node_modules/@octokit/graphql/node_modules/@octokit/types": { + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", + "dependencies": { + "@octokit/openapi-types": "^20.0.0" + } + }, "node_modules/@octokit/oauth-app": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-7.0.0.tgz", @@ -1930,22 +1969,35 @@ "node": ">= 18" } }, - "node_modules/@octokit/openapi-types": { + "node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types": { "version": "20.0.0", "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" }, + "node_modules/@octokit/oauth-methods/node_modules/@octokit/types": { + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", + "dependencies": { + "@octokit/openapi-types": "^20.0.0" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.1.0.tgz", + "integrity": "sha512-pGUdSP+eEPfZiQHNkZI0U01HLipxncisdJQB4G//OAmfeO8sqTQ9KRa0KF03TUPCziNsoXUrTg4B2Q1EX++T0Q==" + }, "node_modules/@octokit/openapi-webhooks-types": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@octokit/openapi-webhooks-types/-/openapi-webhooks-types-6.0.1.tgz", "integrity": "sha512-vDO4ylcm4g0ANTJBZoEODs06vjsw2JlIhvWdC+wTJmHPijzyPJLguIYmgFf9ExQtxnH6Sn1horNHgNV47nT81w==" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "10.0.0-beta.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-10.0.0-beta.2.tgz", - "integrity": "sha512-OLx6pZ921aSsY1gE563gMDMalviJzmBYgNVPG1E2fXzFsQE4dmZywl+ocOLhaGNaUq//JrdnVnHRRXlfz5kw+g==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.1.1.tgz", + "integrity": "sha512-joUIZu9TupD4pRXLmWShD1Ur/oxYf/bJjYcnaopmGTReNrmWwcW7DUGSrWOjoTeihnlDig+a79m8koiafc4XQw==", "dependencies": { - "@octokit/types": "^12.6.0" + "@octokit/types": "^13.4.0" }, "engines": { "node": ">= 18" @@ -1955,13 +2007,13 @@ } }, "node_modules/@octokit/request": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.0.0.tgz", - "integrity": "sha512-hShsrZ40W8dz3TkyD5ifHNcrYfYpYF7Sh2x+ZKafA+eO0zNeKDTsbF1E0xrUf0mVYGeKL+NLMO5SnfAP22l05Q==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.1.tgz", + "integrity": "sha512-pyAguc0p+f+GbQho0uNetNQMmLG1e80WjkIaqqgUkihqUp0boRU6nKItXO4VWnr+nbZiLGEyy4TeKRwqaLvYgw==", "dependencies": { "@octokit/endpoint": "^10.0.0", "@octokit/request-error": "^6.0.1", - "@octokit/types": "^12.0.0", + "@octokit/types": "^13.1.0", "universal-user-agent": "^7.0.2" }, "engines": { @@ -1969,11 +2021,11 @@ } }, "node_modules/@octokit/request-error": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.0.1.tgz", - "integrity": "sha512-EPeILOAEGqwmEG6g7dYlbvqkjJ5nWNcZvQpgeLEn1MieIcJ0xK0CJtvVcIMXqzIM8DOWzvI6zL5FQAwjTvk/Tg==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.1.tgz", + "integrity": "sha512-1mw1gqT3fR/WFvnoVpY/zUM2o/XkMs/2AszUUG9I69xn0JFLv6PGkPhNk5lbfvROs79wiS0bqiJNxfCZcRJJdg==", "dependencies": { - "@octokit/types": "^12.0.0" + "@octokit/types": "^13.0.0" }, "engines": { "node": ">= 18" @@ -1986,11 +2038,11 @@ "dev": true }, "node_modules/@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", + "version": "13.4.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.4.1.tgz", + "integrity": "sha512-Y73oOAzRBAUzR/iRAbGULzpNkX8vaxKCqEtg6K74Ff3w9f5apFnWtE/2nade7dMWWW3bS5Kkd6DJS4HF04xreg==", "dependencies": { - "@octokit/openapi-types": "^20.0.0" + "@octokit/openapi-types": "^22.1.0" } }, "node_modules/@octokit/webhooks": { diff --git a/package.json b/package.json index d31bc1f8a..890239b5c 100644 --- a/package.json +++ b/package.json @@ -19,12 +19,12 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-app": "^7.0.0-beta.4", + "@octokit/auth-app": "^7.0.0-beta.8", "@octokit/auth-unauthenticated": "^6.0.0", - "@octokit/core": "^6.0.0", + "@octokit/core": "^6.1.2", "@octokit/oauth-app": "^7.0.0", - "@octokit/plugin-paginate-rest": "^10.0.0-beta.2", - "@octokit/types": "^12.6.0", + "@octokit/plugin-paginate-rest": "^11.0.0", + "@octokit/types": "^13.0.0", "@octokit/webhooks": "^13.0.0" }, "devDependencies": { From 40ea32aff2f57b2c52aaaa12c058599fc7b81c04 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Tue, 16 Apr 2024 15:21:41 -0400 Subject: [PATCH 6/8] docs: add note on needed config changes for TypeScript --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 899312399..b96af35cd 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,12 @@ const { App, createNodeMiddleware } = require("@octokit/app"); +> [!IMPORTANT] +> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. +> +> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
+> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) + ```js const app = new App({ appId: 123, From 70a3fcaa7a027c5343e753208ed9bc8aab3bed2c Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Tue, 30 Apr 2024 13:15:16 -0400 Subject: [PATCH 7/8] fix(deps): bump `@octokit/auth-app` --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ee8898cfa..0195160e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { - "@octokit/auth-app": "^7.0.0-beta.8", + "@octokit/auth-app": "^7.0.0", "@octokit/auth-unauthenticated": "^6.0.0", "@octokit/core": "^6.1.2", "@octokit/oauth-app": "^7.0.0", @@ -1415,9 +1415,9 @@ } }, "node_modules/@octokit/auth-app": { - "version": "7.0.0-beta.8", - "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.0.0-beta.8.tgz", - "integrity": "sha512-Mic3k7fpkH5172fzD7OH3jGn7TsAkiNfhlhfE4g03Gz6FeWxpxm5lbCBKUUQ6scEdDZxCyNLmBwEBXJLUYd7PA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.0.0.tgz", + "integrity": "sha512-2MKylF29sWO72KNI1aUMDJ/ZMOwWjePGz1VnS1B9xdY+SOGvGRUAnufH6SDWGZuwQ7WyvwkCYc0eG2IekglWwQ==", "dependencies": { "@octokit/auth-oauth-app": "^8.1.0", "@octokit/auth-oauth-user": "^5.1.0", diff --git a/package.json b/package.json index fd3f6e185..18d9293c5 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "author": "Gregor Martynus (https://github.com/gr2m)", "license": "MIT", "dependencies": { - "@octokit/auth-app": "^7.0.0-beta.8", + "@octokit/auth-app": "^7.0.0", "@octokit/auth-unauthenticated": "^6.0.0", "@octokit/core": "^6.1.2", "@octokit/oauth-app": "^7.0.0", From bc1c3a2c23624b84373a2459476320ef8b4b3fcc Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Tue, 30 Apr 2024 13:15:33 -0400 Subject: [PATCH 8/8] build: package lock update --- package-lock.json | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0195160e0..b05ca1647 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2113,13 +2113,13 @@ "integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A==" }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dev": true, "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -2127,7 +2127,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -2521,9 +2521,9 @@ "dev": true }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "dev": true, "engines": { "node": ">= 0.6" @@ -2951,17 +2951,17 @@ } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dev": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -3297,9 +3297,9 @@ } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, "engines": { "node": ">= 0.4" @@ -6017,9 +6017,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "dependencies": { "bytes": "3.1.2", @@ -6255,17 +6255,17 @@ } }, "node_modules/set-function-length": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", - "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, "dependencies": { - "define-data-property": "^1.1.2", + "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6299,12 +6299,12 @@ } }, "node_modules/side-channel": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", - "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.7", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.4", "object-inspect": "^1.13.1"