Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jdanyow committed Aug 19, 2024
1 parent e4fbe56 commit ab11822
Show file tree
Hide file tree
Showing 12 changed files with 445 additions and 2,456 deletions.
2,805 changes: 401 additions & 2,404 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"*.{ts,js,json,yml,html,xml}": "prettier --write"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"husky": "^9.0.11",
"lint-staged": "15.2.2",
"prettier": "3.2.5"
"@changesets/cli": "^2.27.7",
"husky": "^9.1.4",
"lint-staged": "15.2.9",
"prettier": "3.3.3"
}
}
10 changes: 5 additions & 5 deletions packages/cosmos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"rfc4648": "^1.5.3"
},
"devDependencies": {
"@types/chai": "^4.3.13",
"@types/mocha": "^10.0.6",
"chai": "^5.1.0",
"mocha": "^10.3.0",
"typescript": "^5.4.2"
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.7",
"chai": "^5.1.1",
"mocha": "^10.7.3",
"typescript": "^5.5.4"
}
}
10 changes: 5 additions & 5 deletions packages/csv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"test": "cfworker test test/**/*.spec.ts"
},
"devDependencies": {
"@types/chai": "^4.3.13",
"@types/mocha": "^10.0.6",
"chai": "^5.1.0",
"mocha": "^10.3.0",
"typescript": "^5.4.2"
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.7",
"chai": "^5.1.1",
"mocha": "^10.7.3",
"typescript": "^5.5.4"
}
}
2 changes: 1 addition & 1 deletion packages/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"@cfworker/web": "^1.14.0"
},
"devDependencies": {
"typescript": "^5.4.2"
"typescript": "^5.5.4"
}
}
10 changes: 5 additions & 5 deletions packages/json-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"test": "cfworker test test/**/*.spec.ts --nocheck"
},
"devDependencies": {
"@types/chai": "^4.3.13",
"@types/mocha": "^10.0.6",
"chai": "^5.1.0",
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.7",
"chai": "^5.1.1",
"json-schema-test-suite": "git+https://github.com/json-schema-org/JSON-Schema-Test-Suite#76b529f",
"mocha": "^10.3.0",
"typescript": "^5.4.2"
"mocha": "^10.7.3",
"typescript": "^5.5.4"
}
}
10 changes: 5 additions & 5 deletions packages/jwt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"rfc4648": "^1.5.3"
},
"devDependencies": {
"@types/chai": "^4.3.13",
"@types/mocha": "^10.0.6",
"chai": "^5.1.0",
"mocha": "^10.3.0",
"typescript": "^5.4.2"
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.7",
"chai": "^5.1.1",
"mocha": "^10.7.3",
"typescript": "^5.5.4"
}
}
2 changes: 1 addition & 1 deletion packages/sentry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"test": "cfworker test test/**/*.spec.ts"
},
"devDependencies": {
"typescript": "^5.4.2"
"typescript": "^5.5.4"
}
}
4 changes: 2 additions & 2 deletions packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
},
"dependencies": {
"@cfworker/web": "^1.14.0",
"@cloudflare/workers-types": "^4.20240314.0"
"@cloudflare/workers-types": "^4.20240815.0"
},
"devDependencies": {
"typescript": "^5.4.2"
"typescript": "^5.5.4"
}
}
10 changes: 5 additions & 5 deletions packages/uuid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"test": "cfworker test test/**/*.spec.ts"
},
"devDependencies": {
"@types/chai": "^4.3.13",
"@types/mocha": "^10.0.6",
"chai": "^5.1.0",
"mocha": "^10.3.0",
"typescript": "^5.4.2"
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.7",
"chai": "^5.1.1",
"mocha": "^10.7.3",
"typescript": "^5.5.4"
}
}
12 changes: 6 additions & 6 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
"cookie": "^0.6.0",
"html-escaper": "^3.0.3",
"negotiator": "^0.6.3",
"path-to-regexp": "^6.2.1",
"path-to-regexp": "^7.1.0",
"secure-json-parse": "^2.7.0",
"statuses": "^2.0.1"
},
"devDependencies": {
"@types/chai": "^4.3.13",
"@types/mocha": "^10.0.6",
"chai": "^5.1.0",
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.7",
"chai": "^5.1.1",
"jsonpointer": "^5.0.1",
"mocha": "^10.3.0",
"typescript": "^5.4.2"
"mocha": "^10.7.3",
"typescript": "^5.5.4"
}
}
18 changes: 5 additions & 13 deletions packages/web/src/router.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import {
Key,
ParseOptions,
pathToRegexp,
TokensToRegexpOptions
} from 'path-to-regexp';
import { Key, pathToRegexp, PathToRegexpOptions } from 'path-to-regexp';
import { Context } from './context.js';
import { composeMiddleware, Middleware } from './middleware.js';

export type PathToRegExpOptions = TokensToRegexpOptions & ParseOptions;

export const Method = (method: string) => {
method = method.toUpperCase();
return ({ req }: Context) => req.method === method;
Expand All @@ -28,16 +21,15 @@ export const Header = (header: string, value: string) => {
export const Host = (host: string) => Header('host', host);
export const Referer = (host: string) => Header('referer', host);

export const Path = (pattern: string, options?: PathToRegExpOptions) => {
const keys: Key[] = [];
const regExp = pathToRegexp(pattern, keys, options);
export const Path = (pattern: string, options?: PathToRegexpOptions) => {
const regExp = pathToRegexp(pattern, options);

return ({ req: { url, params } }: Context) => {
const match = url.pathname.match(regExp);
if (!match) {
return false;
}
collectParameters(keys, match, params);
collectParameters(regExp.keys, match, params);
return true;
};
};
Expand All @@ -50,7 +42,7 @@ export interface Route {
}

export interface RouterOptions {
pathToRegExpOptions?: PathToRegExpOptions;
pathToRegExpOptions?: PathToRegexpOptions;
}

export const defaultRouterOptions: RouterOptions = {
Expand Down

0 comments on commit ab11822

Please sign in to comment.