Skip to content

Commit

Permalink
chore!: esm only (#306)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This package has now migrated to ESM only

Co-authored-by: wolfy1339 <[email protected]>
  • Loading branch information
Uzlopak and wolfy1339 authored Aug 22, 2024
1 parent 7f31743 commit 755242f
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 66 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ jobs:
node-version:
- 18
- 20
- 21
- 22
os:
- ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Run `smee --help` for usage.
### Node Client

```js
const SmeeClient = require('smee-client')
import SmeeClient from 'smee-client'

const smee = new SmeeClient({
source: 'https://smee.io/abc123',
Expand Down
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import validator from "validator";
import EventSource from "eventsource";
import { EventSource } from "undici";
import url from "url";
import querystring from "querystring";

Expand Down Expand Up @@ -111,4 +111,4 @@ class Client {
}
}

export = Client;
export default Client;
89 changes: 32 additions & 57 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.0-development",
"description": "Client to proxy webhooks to localhost",
"main": "index.js",
"type": "module",
"bin": {
"smee": "./bin/smee.js"
},
Expand All @@ -24,13 +25,12 @@
"license": "ISC",
"dependencies": {
"commander": "^12.0.0",
"eventsource": "^2.0.2",
"undici": "6.19.8",
"validator": "^13.11.0"
},
"devDependencies": {
"@octokit/tsconfig": "^3.0.0",
"@types/eventsource": "^1.1.15",
"@types/node": "^20.0.0",
"@types/node": "^18.19.14",
"@types/validator": "^13.11.6",
"@vitest/coverage-v8": "^2.0.0",
"fastify": "^4.24.3",
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Client from "../index";
import Client from "../index.ts";
import { describe, test, expect } from "vitest";
import { fastify as Fastify } from "fastify";

Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "@octokit/tsconfig",

"compilerOptions": {
"module": "ES2020",
"verbatimModuleSyntax": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
Expand All @@ -13,7 +14,8 @@
"esModuleInterop": true,
"declaration": true,
"allowJs": true,
"lib": ["es2023", "dom"]
"lib": ["es2023", "dom"],
"moduleResolution": "Node"
},
"include": ["./*"],
"files": ["index.ts"]
Expand Down

0 comments on commit 755242f

Please sign in to comment.