counterfact 0.34.1 → 0.34.2

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.
@@ -90,7 +90,8 @@ export class ModuleTree {
90
90
  if (segment === undefined) {
91
91
  throw new Error("segment cannot be undefined but TypeScript doesn't know that");
92
92
  }
93
- if (remainingSegments.length === 0) {
93
+ if (remainingSegments.length === 0 ||
94
+ (remainingSegments.length === 1 && remainingSegments[0] === "")) {
94
95
  return this.buildMatch(directory, segment, pathVariables, matchedPath);
95
96
  }
96
97
  const exactMatch = directory.directories[segment.toLowerCase()];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "counterfact",
3
- "version": "0.34.1",
3
+ "version": "0.34.2",
4
4
  "description": "a library for building a fake REST API for testing",
5
5
  "type": "module",
6
6
  "main": "./src/server/counterfact.js",
@@ -47,7 +47,7 @@
47
47
  "@stryker-mutator/core": "8.0.0",
48
48
  "@stryker-mutator/jest-runner": "8.0.0",
49
49
  "@stryker-mutator/typescript-checker": "8.0.0",
50
- "@swc/core": "1.3.101",
50
+ "@swc/core": "1.3.102",
51
51
  "@swc/jest": "0.2.29",
52
52
  "@testing-library/dom": "9.3.3",
53
53
  "@types/jest": "29.5.11",
@@ -64,7 +64,7 @@
64
64
  "eslint-plugin-etc": "2.0.3",
65
65
  "eslint-plugin-file-progress": "1.3.0",
66
66
  "eslint-plugin-import": "2.29.1",
67
- "eslint-plugin-jest": "27.6.0",
67
+ "eslint-plugin-jest": "27.6.1",
68
68
  "eslint-plugin-jest-dom": "5.1.0",
69
69
  "eslint-plugin-no-explicit-type-exports": "0.12.1",
70
70
  "eslint-plugin-unused-imports": "3.0.0",
@@ -91,12 +91,12 @@
91
91
  "json-schema-faker": "0.5.4",
92
92
  "json-schema-ref-parser": "9.0.9",
93
93
  "jsonwebtoken": "9.0.2",
94
- "koa": "2.14.2",
94
+ "koa": "2.15.0",
95
95
  "koa-bodyparser": "4.4.1",
96
96
  "koa-proxy": "1.0.0-alpha.3",
97
97
  "koa2-swagger-ui": "5.10.0",
98
98
  "node-fetch": "3.3.2",
99
- "open": "10.0.1",
99
+ "open": "10.0.2",
100
100
  "prettier": "3.1.1",
101
101
  "typescript": "5.3.3"
102
102
  }