diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 60fff66..05232fc 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -18,6 +18,7 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - run: yarn - run: yarn build + - run: yarn tsc - uses: JS-DevTools/npm-publish@v1 with: token: ${{ secrets.NPM_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b0a9da..4d8e2c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.2.0 - JSDoc type coverage, docs site + +- chore: cover codebase with JSDoc types +- chore: add typecheck CI step +- feat: support ESM/CommonJS `jambox.config.js` in config files +- feat: build & publish TS types + ## 0.1.2 - Fix config api route - fix: wait on `reset` event during config api calls diff --git a/ext/Api.js b/ext/Api.js index 851b458..36d164b 100644 --- a/ext/Api.js +++ b/ext/Api.js @@ -2,15 +2,11 @@ import Observable from 'zen-observable'; import { debounce } from './nodash.js'; -/** - * @typedef {import('./types').Subscribtion} Subscribtion - */ - const WEBSOCKET_RETRY_TIMER = 3000; export default class API { /** - * @type {?Subscribtion} + * @type {?ZenObservable.Subscription} * */ #sub; /** diff --git a/ext/panel.js b/ext/panel.js index c4a6bf7..71976c3 100644 --- a/ext/panel.js +++ b/ext/panel.js @@ -1,5 +1,5 @@ import App from './App.svelte'; -import API from './Api'; +import API from './Api.js'; const boot = async () => { const api = await API.create(); diff --git a/ext/types.d.ts b/ext/types.d.ts deleted file mode 100644 index 7be14c5..0000000 --- a/ext/types.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type { Subscribtion } from 'zen-observable'; diff --git a/package.json b/package.json index 0db00df..ceb3b0b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jambox", - "version": "0.1.2", + "version": "0.2.0", "description": "Tool for recording and playing back HTTP requests.", "bin": { "jam": "./jam.mjs", @@ -11,6 +11,7 @@ "engines": { "node": ">= 16.20.2" }, + "types": "./dist/index.d.ts", "author": "Arthur Buldauskas ", "license": "MIT", "repository": { diff --git a/webpack.config.js b/webpack.config.js index d94442b..1795729 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -60,17 +60,14 @@ export default { module: { rules: [ { - test: /\.js$/, + test: /\.(js)$/, resolve: { fullySpecified: false, }, }, { - test: /.(js)$/, + test: /\.(js)$/, loader: 'babel-loader', - resolve: { - fullySpecified: false, - }, }, { test: /\.(svelte)$/,