Skip to content

Commit

Permalink
feat: v13 (#967)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: use GitHub's OpenAPI spec
BREAKING CHANGE: Output ESM instead of CJS
  • Loading branch information
wolfy1339 committed Feb 24, 2024
1 parent 1e59916 commit bd224a1
Show file tree
Hide file tree
Showing 25 changed files with 1,182 additions and 276 deletions.
151 changes: 80 additions & 71 deletions README.md

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ const config: Config.InitialOptions = {
lines: 100,
},
},
extensionsToTreatAsEsm: ['.ts'],
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "test/tsconfig.json",
useESM: true,
},
],
},
Expand All @@ -27,5 +29,4 @@ const config: Config.InitialOptions = {
testRegex: /test\/.*\/.*.test.ts/u.source,
};

// We have to use a CommonJS export here due to `verbatimModuleSyntax`
module.exports = config;
export default config;
130 changes: 67 additions & 63 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@octokit/webhooks",
"version": "0.0.0-development",
"type": "module",
"description": "GitHub webhook events toolset for Node.js",
"keywords": [],
"repository": "github:octokit/webhooks.js",
Expand All @@ -9,11 +10,11 @@
"scripts": {
"build": "node scripts/build.mjs && tsc -p tsconfig.json",
"coverage": "jest --coverage && open coverage/lcov-report/index.html",
"generate-types": "ts-node --transpile-only scripts/generate-types.ts",
"generate-types": "node --loader=ts-node/esm scripts/generate-types.ts",
"lint": "prettier --check 'src/**/*.{ts,json}' 'scripts/**/*' 'test/**/*.ts' README.md package.json",
"lint:fix": "prettier --write 'src/**/*.{ts,json}' 'scripts/**/*' 'test/**/*.ts' README.md package.json",
"pretest": "npm run -s lint",
"test": "jest --coverage",
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --coverage",
"validate:ts": "tsc --noEmit --noImplicitAny --target es2020 --esModuleInterop --moduleResolution node16 --module node16 --allowImportingTsExtensions test/typescript-validate.ts"
},
"prettier": {},
Expand All @@ -40,19 +41,17 @@
]
},
"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": "5.3.2",
"@octokit/request-error": "^6.0.1",
"@octokit/webhooks-methods": "^5.0.0",
"aggregate-error": "^5.0.0"
},
"devDependencies": {
"@jest/types": "^29.0.0",
"@octokit/tsconfig": "^2.0.0",
"@octokit/webhooks-schemas": "7.3.2",
"@octokit/openapi-webhooks": "5.3.2",
"@octokit/tsconfig": "^3.0.0",
"@types/jest": "^29.0.0",
"@types/json-schema": "^7.0.7",
"@types/node": "^20.0.0",
"@types/prettier": "^2.0.0",
"axios": "^1.0.0",
"esbuild": "^0.20.0",
"express": "^4.17.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function main() {
bundle: true,
platform: "node",
target: "node18",
format: "cjs",
format: "esm",
...sharedOptions,
}),
// Build an ESM browser bundle
Expand Down
Loading

0 comments on commit bd224a1

Please sign in to comment.