Conversation
| const data = generateData(); | ||
| const restServer = JsonGraphqlServer({ data }); | ||
| const handler = restServer.getHandler(); | ||
| const handlerWithLogs = (url: string, opts: any) => |
There was a problem hiding this comment.
We don't need to keep it. If we don't pass quiet: true to worker.start, it will automatically displays us the right logs 👍
djhi
left a comment
There was a problem hiding this comment.
Good work, except you probably didn't test the graphql demo which is broken
examples/simple/package.json
Outdated
| }, | ||
| "msw": { | ||
| "workerDirectory": [ | ||
| "assets", |
There was a problem hiding this comment.
Why assets? mockServiceWorker.js is in public directory, not assets.
|
needs rebase |
fzaninotto
left a comment
There was a problem hiding this comment.
The e-commerce demo doesn't work (either with REST or GraphQL). I get this error in the SAP when running make run-demo:
error loading dynamically imported module: http://localhost:8000/src/dashboard/OrderChart.tsx
| }); | ||
| export const worker = setupWorker(http.all(/http:\/\/localhost:4000/, handler)); | ||
|
|
||
| export default () => worker; |
There was a problem hiding this comment.
Why do you need this export? I don't see it imported anywhere.
There was a problem hiding this comment.
It's imported from the projet root index: https://github.com/marmelab/react-admin/pull/10844/files#diff-90bd1ee22f91d95ef929650cdc5d138faa08887243bdbc5167f2671ed876196dR5
| languageName: node | ||
| linkType: hard | ||
|
|
||
| "cli-width@npm:^4.1.0": |
There was a problem hiding this comment.
This one is duplicated (albeit in a different major version). Can we avoid it?
There was a problem hiding this comment.
We shouldn't deduplicate different major versions
| languageName: node | ||
| linkType: hard | ||
|
|
||
| "cookie@npm:^0.7.2": |
There was a problem hiding this comment.
Same with an additional note: before 1.0.0, all versions can have breaking changes
yarn.lock
Outdated
| languageName: node | ||
| linkType: hard | ||
|
|
||
| "fakerest@npm:4.1.3, fakerest@npm:^4.1.3": |
yarn.lock
Outdated
| version: 4.3.2 | ||
| resolution: "linkifyjs@npm:4.3.2" | ||
| checksum: 1a85e6b368304a4417567fe5e38651681e3e82465590836942d1b4f3c834cc35532898eb1e2479f6337d9144b297d418eb708b6be8ed0b3dc3954a3588e07971 | ||
| version: 4.1.1 |
There was a problem hiding this comment.
please revert this one, linkify < 4.3.2 has a security vulnerability
yarn.lock
Outdated
| languageName: node | ||
| linkType: hard | ||
|
|
||
| "tough-cookie@npm:^4.1.4": |
examples/simple/package.json
Outdated
| "fakerest": "^4.1.3", | ||
| "jsonexport": "^3.2.0", | ||
| "lodash": "~4.17.5", | ||
| "ra-data-fakerest": "^5.10.0", |
There was a problem hiding this comment.
no longer needed. Also, missing ra-data-simple-rest.
I can't reproduce this. Can you try resetting your |
fzaninotto
left a comment
There was a problem hiding this comment.
The error was caused by Firefox being Firefox. Rebooting it fixed it.
Problem
fetch-mockbrings us back some vulnerabilities.Solution
Change it for MSW
To Do
Additional Checks
masterfor a bugfix or a documentation fix, ornextfor a feature