nuxt-custom-fetch 4.0.1 → 4.1.1

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/dist/module.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "configKey": "customFetch",
4
4
  "version": ">=3.17.0",
5
5
  "builder": {
6
- "@nuxt/module-builder": "1.0.1",
6
+ "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
8
8
  }
9
9
  }
package/dist/module.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { fileURLToPath } from 'node:url';
2
2
  import { defineNuxtModule, createResolver, addImports } from '@nuxt/kit';
3
3
 
4
- const module = defineNuxtModule({
4
+ const module$1 = defineNuxtModule({
5
5
  meta: {
6
6
  name: "nuxt-custom-fetch",
7
7
  configKey: "customFetch",
@@ -19,4 +19,4 @@ const module = defineNuxtModule({
19
19
  }
20
20
  });
21
21
 
22
- export { module as default };
22
+ export { module$1 as default };
@@ -3,6 +3,7 @@ import { clearNuxtData, computed, createError, getCurrentScope, onScopeDispose,
3
3
  import { hash, serialize } from "ohash";
4
4
  import { generateOptionSegments, Noop, pick } from "./utils.js";
5
5
  const _cachedController = /* @__PURE__ */ new Map();
6
+ const REPLACE_REG = /[-_]/g;
6
7
  export class CustomFetch {
7
8
  baseURL;
8
9
  immutableKey = false;
@@ -113,7 +114,7 @@ export class CustomFetch {
113
114
  if (!this.immutableKey && !immutableKey) {
114
115
  hashValue.push(...generateOptionSegmentsWithConfig);
115
116
  }
116
- const hashKey = hash(hashValue).replace(/[-_]/g, "").slice(0, 10);
117
+ const hashKey = hash(hashValue).replace(REPLACE_REG, "").slice(0, 10);
117
118
  const key = computed(() => toValue(config.key) || hashKey);
118
119
  watch(key, (key2, oldKey) => {
119
120
  if (oldKey) {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "nuxt-custom-fetch",
3
3
  "type": "module",
4
- "version": "4.0.1",
5
- "packageManager": "pnpm@8.15.3+sha1.64838798f519c18029c1e8a1310e16101fc2eda0",
4
+ "version": "4.1.1",
5
+ "packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -23,7 +23,7 @@
23
23
  "dev": "nuxi dev playground",
24
24
  "dev:build": "nuxi build playground",
25
25
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
26
- "echo:husky": "echo 'npx lint-staged' > .husky/pre-commit && echo 'npx --no-install commitlint --edit \"$1\"' > .husky/commit-msg",
26
+ "echo:husky": "echo 'npx nano-staged' > .husky/pre-commit && echo 'npx --no-install commitlint --edit \"$1\"' > .husky/commit-msg",
27
27
  "lint": "eslint .",
28
28
  "lint:fix": "eslint . --fix",
29
29
  "prepare": "husky",
@@ -37,34 +37,34 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
- "@vue/shared": "^3.5.17",
40
+ "@vue/shared": "^3.5.30",
41
41
  "ohash": "^2.0.11",
42
- "vue": "^3.5.17"
42
+ "vue": "^3.5.30"
43
43
  },
44
44
  "devDependencies": {
45
- "@antfu/eslint-config": "^4.17.0",
46
- "@commitlint/cli": "^19.8.1",
47
- "@commitlint/config-conventional": "^19.8.1",
48
- "@nuxt/kit": "4.0.0",
49
- "@nuxt/module-builder": "^1.0.1",
50
- "@nuxt/schema": "4.0.0",
51
- "@types/node": "^24.0.14",
45
+ "@antfu/eslint-config": "^7.7.0",
46
+ "@commitlint/cli": "^20.4.3",
47
+ "@commitlint/config-conventional": "^20.4.3",
48
+ "@nuxt/kit": "4.3.1",
49
+ "@nuxt/module-builder": "^1.0.2",
50
+ "@nuxt/schema": "4.3.1",
51
+ "@types/node": "^25.4.0",
52
52
  "changelogen": "^0.6.2",
53
53
  "commitizen": "^4.3.1",
54
54
  "cz-git": "^1.12.0",
55
- "eslint": "^9.31.0",
55
+ "eslint": "^10.0.3",
56
56
  "husky": "^9.1.7",
57
- "lint-staged": "^16.1.2",
58
- "nitro": "npm:nitropack@^2.12.0",
59
- "nuxt": "4.0.0",
60
- "typescript": "5.8.3"
57
+ "nano-staged": "^0.9.0",
58
+ "nitro": "npm:nitropack@^2.13.1",
59
+ "nuxt": "4.3.1",
60
+ "typescript": "5.9.3"
61
61
  },
62
62
  "husky": {
63
63
  "hooks": {
64
- "pre-commit": "lint-staged"
64
+ "pre-commit": "nano-staged"
65
65
  }
66
66
  },
67
- "lint-staged": {
67
+ "nano-staged": {
68
68
  "*": "eslint . --fix"
69
69
  }
70
70
  }