@esmx/router-vue 3.0.0-rc.24 → 3.0.0-rc.25
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/router-link.mjs +1 -1
- package/dist/use.mjs +1 -1
- package/dist/use.test.mjs +4 -4
- package/dist/util.test.mjs +7 -2
- package/package.json +9 -9
package/dist/router-link.mjs
CHANGED
|
@@ -65,7 +65,7 @@ export const RouterLink = defineComponent({
|
|
|
65
65
|
var _a;
|
|
66
66
|
const data = link.value;
|
|
67
67
|
const eventHandlers = data.getEventHandlers(
|
|
68
|
-
isVue3 ? (name) =>
|
|
68
|
+
isVue3 ? (name) => "on".concat(name.charAt(0).toUpperCase()).concat(name.slice(1)) : void 0
|
|
69
69
|
);
|
|
70
70
|
const props2 = {};
|
|
71
71
|
if (isVue3) {
|
package/dist/use.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { createSymbolProperty } from "./util.mjs";
|
|
|
10
10
|
const ROUTER_CONTEXT_KEY = Symbol("router-context");
|
|
11
11
|
const ROUTER_INJECT_KEY = Symbol("router-inject");
|
|
12
12
|
const ERROR_MESSAGES = {
|
|
13
|
-
SETUP_ONLY: (fnName) =>
|
|
13
|
+
SETUP_ONLY: (fnName) => "[@esmx/router-vue] ".concat(fnName, "() can only be called during setup()"),
|
|
14
14
|
CONTEXT_NOT_FOUND: "[@esmx/router-vue] Router context not found. Please ensure useProvideRouter() is called in a parent component."
|
|
15
15
|
};
|
|
16
16
|
const routerContextProperty = createSymbolProperty(ROUTER_CONTEXT_KEY);
|
package/dist/use.test.mjs
CHANGED
|
@@ -75,7 +75,7 @@ describe("use.ts - Vue Router Integration", () => {
|
|
|
75
75
|
}
|
|
76
76
|
];
|
|
77
77
|
contextErrorTestCases.forEach(({ name, test }) => {
|
|
78
|
-
it(
|
|
78
|
+
it("should throw error when ".concat(name), () => {
|
|
79
79
|
expect(test()).toThrow(contextNotFoundError);
|
|
80
80
|
});
|
|
81
81
|
});
|
|
@@ -106,7 +106,7 @@ describe("use.ts - Vue Router Integration", () => {
|
|
|
106
106
|
}
|
|
107
107
|
];
|
|
108
108
|
compositionContextErrorTestCases.forEach(({ name, setupFn }) => {
|
|
109
|
-
it(
|
|
109
|
+
it("should throw error when ".concat(name), () => {
|
|
110
110
|
const TestComponent = defineComponent({
|
|
111
111
|
setup() {
|
|
112
112
|
setupFn();
|
|
@@ -147,7 +147,7 @@ describe("use.ts - Vue Router Integration", () => {
|
|
|
147
147
|
}
|
|
148
148
|
];
|
|
149
149
|
setupOnlyTestCases.forEach(({ name, fn, expectedError }) => {
|
|
150
|
-
it(
|
|
150
|
+
it("should throw error when ".concat(name), () => {
|
|
151
151
|
expect(fn).toThrow(expectedError);
|
|
152
152
|
});
|
|
153
153
|
});
|
|
@@ -385,7 +385,7 @@ describe("use.ts - Vue Router Integration", () => {
|
|
|
385
385
|
useProvideRouter(router);
|
|
386
386
|
const route = useRoute();
|
|
387
387
|
routeRef = route;
|
|
388
|
-
return () =>
|
|
388
|
+
return () => "<div>Current: ".concat(route.path, "</div>");
|
|
389
389
|
}
|
|
390
390
|
});
|
|
391
391
|
const app = createApp(TestComponent);
|
package/dist/util.test.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1
4
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
2
5
|
import { version } from "vue";
|
|
3
6
|
import {
|
|
@@ -202,7 +205,7 @@ describe("util.ts - Utility Functions", () => {
|
|
|
202
205
|
describe("should return null for falsy inputs", () => {
|
|
203
206
|
const falsyValues = [null, void 0, false, 0, "", Number.NaN];
|
|
204
207
|
falsyValues.forEach((value) => {
|
|
205
|
-
it(
|
|
208
|
+
it("should return null for ".concat(value), () => {
|
|
206
209
|
expect(resolveComponent(value)).toBeNull();
|
|
207
210
|
});
|
|
208
211
|
});
|
|
@@ -272,7 +275,9 @@ describe("util.ts - Utility Functions", () => {
|
|
|
272
275
|
});
|
|
273
276
|
it("should return class components directly", () => {
|
|
274
277
|
class ClassComponent {
|
|
275
|
-
|
|
278
|
+
constructor() {
|
|
279
|
+
__publicField(this, "name", "ClassComponent");
|
|
280
|
+
}
|
|
276
281
|
}
|
|
277
282
|
const result = resolveComponent(ClassComponent);
|
|
278
283
|
expect(result).toBe(ClassComponent);
|
package/package.json
CHANGED
|
@@ -50,21 +50,21 @@
|
|
|
50
50
|
"vue": "^3.5.0 || ^2.7.0"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@esmx/router": "3.0.0-rc.
|
|
53
|
+
"@esmx/router": "3.0.0-rc.25"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@biomejs/biome": "1.9.4",
|
|
57
|
-
"@esmx/lint": "3.0.0-rc.
|
|
58
|
-
"@types/node": "
|
|
59
|
-
"@vitest/coverage-v8": "3.
|
|
60
|
-
"stylelint": "16.
|
|
61
|
-
"typescript": "5.8.
|
|
57
|
+
"@esmx/lint": "3.0.0-rc.25",
|
|
58
|
+
"@types/node": "^24.0.10",
|
|
59
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
60
|
+
"stylelint": "16.21.0",
|
|
61
|
+
"typescript": "5.8.3",
|
|
62
62
|
"unbuild": "3.5.0",
|
|
63
|
-
"vitest": "3.
|
|
63
|
+
"vitest": "3.2.4",
|
|
64
64
|
"vue": "3.5.13",
|
|
65
65
|
"vue2": "npm:vue@2.7.16"
|
|
66
66
|
},
|
|
67
|
-
"version": "3.0.0-rc.
|
|
67
|
+
"version": "3.0.0-rc.25",
|
|
68
68
|
"type": "module",
|
|
69
69
|
"private": false,
|
|
70
70
|
"exports": {
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"template",
|
|
84
84
|
"public"
|
|
85
85
|
],
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "da6576d7505ad48cb78905b18e17940d43510250"
|
|
87
87
|
}
|