@real-router/validation-plugin 0.7.1 → 0.7.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@real-router/validation-plugin",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "type": "commonjs",
5
5
  "description": "Route validation plugin with type guards and parameter validation",
6
6
  "main": "./dist/cjs/index.js",
@@ -44,11 +44,11 @@
44
44
  },
45
45
  "sideEffects": false,
46
46
  "dependencies": {
47
- "@real-router/core": "^0.52.0",
47
+ "@real-router/core": "^0.54.1",
48
48
  "@real-router/logger": "^0.3.0"
49
49
  },
50
50
  "peerDependencies": {
51
- "@real-router/core": "^0.52.0"
51
+ "@real-router/core": "^0.54.1"
52
52
  },
53
53
  "devDependencies": {
54
54
  "route-tree": "^0.3.4",
@@ -145,17 +145,17 @@ function buildValidatorObject(ctx: RouterInternals): RouterValidator {
145
145
  );
146
146
  },
147
147
  validateParentOption(parent, tree) {
148
- validateParentOptionRaw(parent as string);
148
+ validateParentOptionRaw(parent);
149
149
  let node = tree as { children: Map<string, unknown> };
150
150
 
151
- for (const segment of (parent as string).split(".")) {
151
+ for (const segment of parent.split(".")) {
152
152
  const child = node.children.get(segment) as
153
153
  | { children: Map<string, unknown> }
154
154
  | undefined;
155
155
 
156
156
  if (!child) {
157
157
  throw new ReferenceError(
158
- `[router.addRoute] Parent route "${parent as string}" does not exist`,
158
+ `[router.addRoute] Parent route "${parent}" does not exist`,
159
159
  );
160
160
  }
161
161
 
@@ -316,7 +316,7 @@ export function validationPlugin(): PluginFactory {
316
316
  validateDependenciesStructure(deps);
317
317
  validateLimitsConsistency(options, store, deps);
318
318
  ctx.validator.options.validateOptions(
319
- options as unknown,
319
+ options,
320
320
  "constructor (retrospective)",
321
321
  );
322
322