nuxt-custom-fetch 4.0.1 → 4.1.0
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 +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/ajax.js +2 -1
- package/package.json +19 -19
package/dist/module.json
CHANGED
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 };
|
package/dist/runtime/ajax.js
CHANGED
|
@@ -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(
|
|
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
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "4.1.0",
|
|
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
|
|
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.
|
|
40
|
+
"@vue/shared": "^3.5.30",
|
|
41
41
|
"ohash": "^2.0.11",
|
|
42
|
-
"vue": "^3.5.
|
|
42
|
+
"vue": "^3.5.30"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@antfu/eslint-config": "^
|
|
46
|
-
"@commitlint/cli": "^
|
|
47
|
-
"@commitlint/config-conventional": "^
|
|
48
|
-
"@nuxt/kit": "4.
|
|
49
|
-
"@nuxt/module-builder": "^1.0.
|
|
50
|
-
"@nuxt/schema": "4.
|
|
51
|
-
"@types/node": "^
|
|
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": "^
|
|
55
|
+
"eslint": "^10.0.3",
|
|
56
56
|
"husky": "^9.1.7",
|
|
57
|
-
"
|
|
58
|
-
"nitro": "npm:nitropack@^2.
|
|
59
|
-
"nuxt": "4.
|
|
60
|
-
"typescript": "5.
|
|
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": "
|
|
64
|
+
"pre-commit": "nano-staged"
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
"
|
|
67
|
+
"nano-staged": {
|
|
68
68
|
"*": "eslint . --fix"
|
|
69
69
|
}
|
|
70
70
|
}
|