hono 3.12.9 → 3.12.10

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.
@@ -100,7 +100,6 @@ class Node {
100
100
  search(method, path) {
101
101
  const handlerSets = [];
102
102
  this.params = {};
103
- const params = {};
104
103
  const curNode = this;
105
104
  let curNodes = [curNode];
106
105
  const parts = (0, import_url.splitPath)(path);
@@ -124,6 +123,7 @@ class Node {
124
123
  }
125
124
  for (let k = 0, len3 = node.patterns.length; k < len3; k++) {
126
125
  const pattern = node.patterns[k];
126
+ const params = { ...node.params };
127
127
  if (pattern === "*") {
128
128
  const astNode = node.children["*"];
129
129
  if (astNode) {
@@ -149,10 +149,10 @@ class Node {
149
149
  if (isLast === true) {
150
150
  handlerSets.push(...this.gHSets(child, method, params, node.params));
151
151
  if (child.children["*"]) {
152
- handlerSets.push(...this.gHSets(child.children["*"], method, node.params, params));
152
+ handlerSets.push(...this.gHSets(child.children["*"], method, params, node.params));
153
153
  }
154
154
  } else {
155
- child.params = { ...params };
155
+ child.params = params;
156
156
  tempNodes.push(child);
157
157
  }
158
158
  }
@@ -164,7 +164,7 @@ class Node {
164
164
  const results = handlerSets.sort((a, b) => {
165
165
  return a.score - b.score;
166
166
  });
167
- return [results.map(({ handler, params: params2 }) => [handler, params2])];
167
+ return [results.map(({ handler, params }) => [handler, params])];
168
168
  }
169
169
  }
170
170
  // Annotate the CommonJS export names for ESM import in node:
@@ -78,7 +78,6 @@ var Node = class {
78
78
  search(method, path) {
79
79
  const handlerSets = [];
80
80
  this.params = {};
81
- const params = {};
82
81
  const curNode = this;
83
82
  let curNodes = [curNode];
84
83
  const parts = splitPath(path);
@@ -102,6 +101,7 @@ var Node = class {
102
101
  }
103
102
  for (let k = 0, len3 = node.patterns.length; k < len3; k++) {
104
103
  const pattern = node.patterns[k];
104
+ const params = { ...node.params };
105
105
  if (pattern === "*") {
106
106
  const astNode = node.children["*"];
107
107
  if (astNode) {
@@ -127,10 +127,10 @@ var Node = class {
127
127
  if (isLast === true) {
128
128
  handlerSets.push(...this.gHSets(child, method, params, node.params));
129
129
  if (child.children["*"]) {
130
- handlerSets.push(...this.gHSets(child.children["*"], method, node.params, params));
130
+ handlerSets.push(...this.gHSets(child.children["*"], method, params, node.params));
131
131
  }
132
132
  } else {
133
- child.params = { ...params };
133
+ child.params = params;
134
134
  tempNodes.push(child);
135
135
  }
136
136
  }
@@ -142,7 +142,7 @@ var Node = class {
142
142
  const results = handlerSets.sort((a, b) => {
143
143
  return a.score - b.score;
144
144
  });
145
- return [results.map(({ handler, params: params2 }) => [handler, params2])];
145
+ return [results.map(({ handler, params }) => [handler, params])];
146
146
  }
147
147
  };
148
148
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "3.12.9",
3
+ "version": "3.12.10",
4
4
  "description": "Ultrafast web framework for the Edges",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",