Skip to content

Commit 27180f3

Browse files
committed
add current status 03/2023
1 parent cffd34d commit 27180f3

File tree

1 file changed

+30
-22
lines changed

1 file changed

+30
-22
lines changed

FETCH_MIGRATION.md

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,42 @@ Code will be on the `master` branch.
4040
### Other repositories
4141

4242
- [x] Update [kubernetes-client/gen](https://github.com/kubernetes-client/gen)'s typescript-fetch files to let us pass in the `typescriptThreePlus` config option <sup>[1](https://github.com/OpenAPITools/openapi-generator/issues/9973) [2](https://github.com/OpenAPITools/openapi-generator/issues/3869#issuecomment-584152932)</sub>
43-
- [ ] Update [openapi-generator](https://github.com/OpenAPITools/openapi-generator)'s typescript-fetch flavor to mark parameters as optional if all parameters are optional <sup>[3](https://github.com/OpenAPITools/openapi-generator/issues/6440)</sup>
43+
- [x] Update [openapi-generator](https://github.com/OpenAPITools/openapi-generator)'s typescript-fetch flavor to mark parameters as optional if all parameters are optional <sup>[3](https://github.com/OpenAPITools/openapi-generator/issues/6440)</sup>
4444

4545
### Kubernetes-client repository
4646

47-
- [ ] Increment `OPENAPI_GENERATOR_COMMIT` to be [version 5.3.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.3.0) (with the optional parameters addition)
48-
- [ ] `npm install node-fetch` to install node-fetch
49-
- [ ] Switch generate-client script to use typescript-fetch
50-
- [ ] Import and inject node-fetch in `src/api.ts` with the following
51-
52-
```typescript
53-
import fetch from 'node-fetch';
54-
55-
// inject node-fetch
56-
if (!globalThis.fetch) {
57-
// @ts-ignore
58-
globalThis.fetch = fetch;
59-
globalThis.Headers = Headers;
60-
globalThis.Request = Request;
61-
globalThis.Response = Response;
62-
}
63-
```
64-
65-
- [ ] Generate api with `npm run generate`
66-
- [ ] Match src/gen/api.ts to new generated layout (it changes slightly)
47+
- [x] Increment `OPENAPI_GENERATOR_COMMIT` to be [version 5.3.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.3.0) (with the optional parameters addition)
48+
- [x] `npm install node-fetch` to install node-fetch
49+
- [x] Switch generate-client script to use typescript-fetch
50+
- [x] Generate api with `npm run generate`
51+
- [x] Match src/gen/api.ts to new generated layout (it changes slightly)
6752
- [ ] Fix errors in /src folder (due to new api)
53+
- [ ] migrate src/auth.ts, the dependent implementations (ex: azure_auth, gcp_auth etc) and tests to fetch api from request
54+
- [ ] migrate src/log.ts and its tests to fetch api from request
55+
- major remaining work is fixing up async signatures and return piping
56+
- [ ] migrate src/watch.ts and its tests to fetch api from request
57+
- remove decprecated requestImpl and RequestInterface
58+
- implement queryParams parameter in watch method by injecting them into the fetch call
59+
- update tests in src/watch_test.ts
6860
- [ ] Fix errors in test (due to new api)
6961
- [ ] Test all features
70-
- [ ] Fix examples (due to new api)
62+
- [ ] Fix examples and validate their param signatures (due to new api)
63+
64+
- [ ] cache-example
65+
- [ ] example
66+
- [ ] follow-logs
67+
- [ ] in-cluster-create-job-from-cronjob
68+
- [ ] in-cluster
69+
- [ ] ingress
70+
- [ ] namespace
71+
- [ ] patch-example
72+
- [ ] raw-example (note: uses request lib directly, will require full fetch migration not just client param swap)
73+
- [ ] scale-deployment
74+
- [ ] top_pods
75+
- [ ] top
76+
- [ ] yaml-example
77+
7178
- [ ] Update docs
79+
- [ ] Update README examples
7280
- [ ] Document breaking changes for users
7381
- [ ] Release initial version (1.0.0)

0 commit comments

Comments
 (0)