@hyper-fetch/plugin-devtools 8.2.0 → 8.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,7 +30,9 @@
30
30
 
31
31
  ## 📖 About
32
32
 
33
- The devtools plugin connects your HyperFetch client to HyperFlow, streaming request lifecycle events, cache state changes, queue activity, and performance metrics in real time. It is the data pipeline that powers HyperFlow's debugging and monitoring capabilities.
33
+ The devtools plugin connects your HyperFetch client to HyperFlow, streaming request lifecycle events, cache state
34
+ changes, queue activity, and performance metrics in real time. It is the data pipeline that powers HyperFlow's debugging
35
+ and monitoring capabilities.
34
36
 
35
37
  ## 🎯 Key Capabilities
36
38
 
@@ -50,9 +52,7 @@ npm install @hyper-fetch/plugin-devtools
50
52
  import { createClient } from "@hyper-fetch/core";
51
53
  import { DevtoolsPlugin } from "@hyper-fetch/plugin-devtools";
52
54
 
53
- const client = createClient({ url: "https://api.example.com" }).addPlugin(
54
- DevtoolsPlugin({ appName: "My App" }),
55
- );
55
+ const client = createClient({ url: "https://api.example.com" }).addPlugin(DevtoolsPlugin({ appName: "My App" }));
56
56
  ```
57
57
 
58
58
  ## 📚 Documentation
@@ -83,9 +83,7 @@ if (process.env.NODE_ENV === "development") {
83
83
  ### Multiple clients
84
84
 
85
85
  ```ts
86
- const apiClient = createClient({ url: "https://api.example.com" }).addPlugin(
87
- DevtoolsPlugin({ appName: "API Client" }),
88
- );
86
+ const apiClient = createClient({ url: "https://api.example.com" }).addPlugin(DevtoolsPlugin({ appName: "API Client" }));
89
87
 
90
88
  const authClient = createClient({ url: "https://auth.example.com" }).addPlugin(
91
89
  DevtoolsPlugin({ appName: "Auth Client" }),
@@ -1,21 +1,11 @@
1
1
  {
2
+ "extends": "../tsconfig.json",
2
3
  "compilerOptions": {
3
- "target": "esnext",
4
- "module": "esnext",
5
- "moduleResolution": "bundler",
6
- "lib": ["dom", "dom.iterable", "ESNext"],
7
- "strict": true,
8
4
  "noEmit": true,
9
- "skipLibCheck": true,
10
- "esModuleInterop": true,
11
- "allowSyntheticDefaultImports": true,
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
5
  "noUnusedLocals": false,
15
6
  "noUnusedParameters": false,
16
- "types": ["vitest/globals", "@testing-library/jest-dom", "@types/node"],
17
- "baseUrl": "../src",
18
- "paths": {}
7
+ "types": ["vitest/globals", "@testing-library/jest-dom", "@types/node"]
19
8
  },
20
- "include": ["**/*.ts", "**/*.tsx", "../../../global.d.ts", "../../../vitest.d.ts"]
9
+ "include": ["**/*.ts", "**/*.tsx", "../../../global.d.ts", "../../../vitest.d.ts"],
10
+ "exclude": ["node_modules"]
21
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyper-fetch/plugin-devtools",
3
- "version": "8.2.0",
3
+ "version": "8.2.2",
4
4
  "description": "Socket devtool plugin for HyperFetch",
5
5
  "author": "Maciej Pyrc <maciekpyrc@gmail.com>, Kacper Skawina <kacper.skawina@gmail.com>",
6
6
  "homepage": "https://hyperfetch.bettertyped.com/",
@@ -11,13 +11,13 @@
11
11
  "source": "src/index.ts",
12
12
  "scripts": {
13
13
  "test": "vitest run",
14
- "start": "yarn build && npx run-when-changed --watch 'src/**/*.{ts,tsx}' --exec 'yarn build'",
14
+ "start": "pnpm build && npx run-when-changed --watch 'src/**/*.{ts,tsx}' --exec 'pnpm build'",
15
15
  "build": "vite build",
16
- "lint": "eslint . --fix",
17
- "format": "prettier --write .",
18
- "typecheck": "tsc --noEmit --emitDeclarationOnly false && tsc --noEmit -p __tests__/tsconfig.json",
19
- "tests": "yarn lint-staged",
20
- "release": "yarn semantic-release --extends ../../release.config.js -t 'plugin-devtools-hyper-fetch-v${version}'"
16
+ "lint": "oxlint .",
17
+ "format": "oxfmt --write .",
18
+ "typecheck": "tsgo --noEmit --emitDeclarationOnly false && tsgo --noEmit -p __tests__/tsconfig.json",
19
+ "tests": "pnpm lint-staged",
20
+ "release": "pnpm semantic-release --extends ../../release.config.js -t 'plugin-devtools-hyper-fetch-v${version}'"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "@hyper-fetch/core": "*",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public",
46
- "registry": "https://registry.npmjs.com/"
46
+ "registry": "https://registry.npmjs.org/"
47
47
  },
48
48
  "repository": {
49
49
  "type": "git",
package/tsconfig.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "extends": "../../tsconfig.json",
3
3
  "compilerOptions": {
4
- "baseUrl": "./src",
5
4
  "paths": {
6
- "@hyper-fetch/plugin-devtools": ["../src"]
5
+ "@hyper-fetch/plugin-devtools": ["./src"]
7
6
  }
8
7
  },
9
8
  "exclude": ["node_modules", "dist", "vite.config.ts", "__tests__"]
package/vite.config.ts CHANGED
@@ -1,45 +1,39 @@
1
1
  /// <reference types="vitest/config" />
2
+ import path from "path";
2
3
  import { defineConfig } from "vite";
3
4
  import dts from "vite-plugin-dts";
4
5
  import tsconfigPaths from "vite-tsconfig-paths";
5
- import path from "path";
6
- import { getDtsCompilerOptionsForPackage } from "../../scripts/vite-dts-internal-paths";
6
+
7
7
  import { getRollupExternalsFromPackageJson } from "../../scripts/vite-lib-externals-from-package";
8
8
 
9
9
  export default defineConfig({
10
10
  build: {
11
11
  lib: {
12
12
  entry: "src/index.ts",
13
- formats: ["es"],
14
13
  fileName: "index",
14
+ formats: ["es"],
15
15
  },
16
- sourcemap: true,
17
16
  minify: false,
18
17
  rollupOptions: {
19
18
  external: getRollupExternalsFromPackageJson(__dirname),
20
19
  },
20
+ sourcemap: true,
21
21
  },
22
- plugins: [
23
- dts({
24
- entryRoot: "src",
25
- compilerOptions: getDtsCompilerOptionsForPackage(__dirname),
26
- }),
27
- tsconfigPaths(),
28
- ],
22
+ plugins: [tsconfigPaths(), dts({ entryRoot: "src" })],
29
23
  test: {
30
- globals: true,
31
- environment: "node",
32
- setupFiles: ["./__tests__/vitest.setup.ts"],
33
- include: ["__tests__/**/*.spec.{ts,tsx}", "src/**/*.spec.{ts,tsx}"],
34
- coverage: {
35
- provider: "v8",
36
- include: ["src/**/*.{ts,tsx}"],
37
- exclude: ["**/*.spec.*", "**/types.*", "**/constants.*", "**/index.ts"],
38
- },
39
24
  alias: {
40
25
  "@hyper-fetch/core": path.resolve(__dirname, "../core/src/index.ts"),
41
26
  "@hyper-fetch/sockets": path.resolve(__dirname, "../sockets/src/index.ts"),
42
27
  "@hyper-fetch/testing": path.resolve(__dirname, "../testing/src/index.ts"),
43
28
  },
29
+ coverage: {
30
+ exclude: ["**/*.spec.*", "**/types.*", "**/constants.*", "**/index.ts"],
31
+ include: ["src/**/*.{ts,tsx}"],
32
+ provider: "v8",
33
+ },
34
+ environment: "node",
35
+ globals: true,
36
+ include: ["__tests__/**/*.spec.{ts,tsx}", "src/**/*.spec.{ts,tsx}"],
37
+ setupFiles: ["./__tests__/vitest.setup.ts"],
44
38
  },
45
39
  });
package/.eslintrc.cjs DELETED
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- extends: ["../../.eslintrc.js"],
3
- parserOptions: {
4
- tsconfigRootDir: __dirname,
5
- project: ["./tsconfig.json", "./__tests__/tsconfig.json"],
6
- },
7
- rules: {},
8
- ignorePatterns: ["dist/", "coverage/", "vite.config.ts", "/*.js"],
9
- };