{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":172116319,"defaultBranch":"master","name":"miragejs","ownerLogin":"miragejs","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2019-02-22T18:34:35.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/47899903?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1698665249.0","currentOid":""},"activityList":{"items":[{"before":"bbae08ec30c00f5807e824f7d7c5c2b41e53c204","after":"34266bf7ebd200bbb1fade0ce7a7a9760cc93a88","ref":"refs/heads/master","pushedAt":"2023-11-07T18:06:11.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"},"commit":{"message":"add tests for async middleware (#1096)\n\n# Add a few tests\r\n\r\nWell, my intent was to see what it would take to add async support to the recent middleware API, so I started adding tests... and the tests already pass with **no code changes necessary.**\r\n\r\nThere's a bit of gymnastics around the `MaybePromise` responses, but I think that's to be expected at this stage in the code.","shortMessageHtmlLink":"add tests for async middleware (#1096)"}},{"before":"a7ca2357e35ebca10d692dd91d95b7208bd8bc56","after":"bbae08ec30c00f5807e824f7d7c5c2b41e53c204","ref":"refs/heads/master","pushedAt":"2023-10-30T11:26:08.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"},"commit":{"message":"0.1.48","shortMessageHtmlLink":"0.1.48"}},{"before":"7400344e6377a093f368ad175a03de3b49621992","after":"a7ca2357e35ebca10d692dd91d95b7208bd8bc56","ref":"refs/heads/master","pushedAt":"2023-10-30T11:22:02.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"},"commit":{"message":"add Middleware support via `server.middleware = [/*...*/]` (#1089)\n\nRelating to [Add Middleware support to Mirage #41 ](https://github.com/miragejs/discuss/issues/41).\r\n\r\n# Middleware\r\n\r\nThis PR adds middleware to miragejs via a new `server.midleware = [...]`\r\n\r\nExample middleware which randomly returns a 500 response:\r\n```js\r\n function random500() {\r\n return (schema, req, next) => {\r\n return (Math.random() > 0.7)\r\n ? new Response(500, {}, 'no')\r\n : next();\r\n }\r\n }\r\n```\r\n \r\nRoutes which use the middleware defined above: \r\n_(Edited to match latest update)_\r\n```js\r\n routes() {\r\n this.middleware = [\r\n random500(),\r\n addABunchOfResponseHeaders(),\r\n // more middleware can be added here...\r\n ]\r\n\r\n // Subsequent routes will have that middleware\r\n this.get('/users', (schema, req) => {\r\n return new Response(204, {}, null);\r\n });\r\n\r\n this.middleware = [\r\n // differentMiddleware\r\n ]\r\n \r\n this.get('/frogs', (schema, req) => {\r\n return new Response(204, {}, null);\r\n });\r\n }\r\n```\r\n# Not included\r\n\r\n1. There's a bit of funkyness when middleware wants to modify the response from a route handler because the route handler might return a `Response` object or it might return something else altogether. I imagine this could be addressed separately.\r\n\r\n2. `async` middleware - again, could be added after (if this is the approach this repo heads in).","shortMessageHtmlLink":"add Middleware support via server.middleware = [/*...*/] (#1089)"}},{"before":"27cdfb57377e866ad73cd01bc70589a81a6f7c23","after":"7400344e6377a093f368ad175a03de3b49621992","ref":"refs/heads/master","pushedAt":"2023-10-30T11:18:50.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"},"commit":{"message":"Don't require testConfig for timing to respect environment. (#1080)\n\n* Don't require testConfig for timing to respect environment.\r\n\r\n* Add failing test to demonstrate problem\r\n\r\n* Update loadConfig to handle undefined config so timing can get set for the test env\r\n\r\n* add another test to illustrate problem with server.config\r\n\r\n* allow timing to be overriden by server.config","shortMessageHtmlLink":"Don't require testConfig for timing to respect environment. (#1080)"}},{"before":"4a4d9f688eaabb6974f6b92a373d60155444a908","after":"27cdfb57377e866ad73cd01bc70589a81a6f7c23","ref":"refs/heads/master","pushedAt":"2023-10-12T11:47:17.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"},"commit":{"message":"Simplify lodash dependencies (#1091)","shortMessageHtmlLink":"Simplify lodash dependencies (#1091)"}},{"before":"4a4d9f688eaabb6974f6b92a373d60155444a908","after":null,"ref":"refs/heads/prettier","pushedAt":"2023-09-13T14:14:12.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"}},{"before":null,"after":"4a4d9f688eaabb6974f6b92a373d60155444a908","ref":"refs/heads/prettier","pushedAt":"2023-09-13T14:13:44.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"},"commit":{"message":"Update type of `Request.queryParams` (#1027)\n\nThis uses the type from https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L432 / https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L454\r\n\r\nI think that https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L161 might contain the correct type for `params` a la #1026 but that seems to need better verification","shortMessageHtmlLink":"Update type of Request.queryParams (#1027)"}},{"before":"4a4d9f688eaabb6974f6b92a373d60155444a908","after":null,"ref":"refs/heads/prettier","pushedAt":"2023-08-11T15:01:23.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"}},{"before":null,"after":"4a4d9f688eaabb6974f6b92a373d60155444a908","ref":"refs/heads/prettier","pushedAt":"2023-08-11T15:00:41.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"},"commit":{"message":"Update type of `Request.queryParams` (#1027)\n\nThis uses the type from https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L432 / https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L454\r\n\r\nI think that https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L161 might contain the correct type for `params` a la #1026 but that seems to need better verification","shortMessageHtmlLink":"Update type of Request.queryParams (#1027)"}},{"before":"1fa9e058784c93ec271e5608f37edaa04d98cd9a","after":"4a4d9f688eaabb6974f6b92a373d60155444a908","ref":"refs/heads/master","pushedAt":"2023-05-16T17:32:41.997Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"IanVS","name":"Ian VanSchooten","path":"/IanVS","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4616705?s=80&v=4"},"commit":{"message":"Update type of `Request.queryParams` (#1027)\n\nThis uses the type from https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L432 / https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L454\r\n\r\nI think that https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L161 might contain the correct type for `params` a la #1026 but that seems to need better verification","shortMessageHtmlLink":"Update type of Request.queryParams (#1027)"}},{"before":"d26b777ee9bcd6ba6f4e89c9df6c509e54476c2b","after":"1fa9e058784c93ec271e5608f37edaa04d98cd9a","ref":"refs/heads/master","pushedAt":"2023-05-16T17:02:29.810Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"cah-brian-gantzler","name":"Brian Gantzler","path":"/cah-brian-gantzler","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1529286?s=80&v=4"},"commit":{"message":"Allow for keyForId and valueForId on the serializer (#1086)","shortMessageHtmlLink":"Allow for keyForId and valueForId on the serializer (#1086)"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADqaMTrAA","startCursor":null,"endCursor":null}},"title":"Activity ยท miragejs/miragejs"}