Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat, typescript): refactor Fetcher and add unit tests #3977

Merged
merged 32 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
49ba75a
fetcher refactor and add tests
williamluer Jul 2, 2024
afabdf3
move to sync jest timer advance
williamluer Jul 2, 2024
77f7269
update babels and add babel deps
williamluer Jul 9, 2024
625c147
use async timer and upgrade jest types
williamluer Jul 9, 2024
743c766
add jsdom dep
williamluer Jul 9, 2024
0bf28ba
jest fetch mock and conditional runtime
williamluer Jul 9, 2024
427feea
node passes, 1 failure on jsdom
williamluer Jul 9, 2024
c98b53f
all tests pass
williamluer Jul 9, 2024
be3d683
revert zurg
williamluer Jul 9, 2024
3951ac5
separate out important functions to own files
williamluer Jul 9, 2024
326c3b0
fix test and cleanup
williamluer Jul 9, 2024
bd69a07
add yarn.lock and pnp.cjs
williamluer Jul 9, 2024
534eed2
prettier
williamluer Jul 9, 2024
3d5ace1
update types/jest
williamluer Jul 9, 2024
b2818ae
add lock
williamluer Jul 9, 2024
54373ce
make initial request
williamluer Jul 9, 2024
3229cc5
depcheck ignore
williamluer Jul 9, 2024
b71927d
revert prettier formatting
williamluer Jul 9, 2024
9f3679e
yarn caches
williamluer Jul 9, 2024
f875887
trigger rebuild
williamluer Jul 9, 2024
56c83c2
trigger rebuild again
williamluer Jul 9, 2024
d9a85e4
revert
williamluer Jul 9, 2024
3b6e9c3
update packages
williamluer Jul 9, 2024
24c2c92
depcheck ignore
williamluer Jul 9, 2024
c1fd2dd
deps and linting
williamluer Jul 9, 2024
ac5b095
add readable to getrquestbody
williamluer Jul 9, 2024
07df3a5
add seeds
williamluer Jul 9, 2024
7f46507
add seed
williamluer Jul 9, 2024
c8c3939
fix eslint
dsinghvi Jul 11, 2024
6bd4d68
fix yarn install
dsinghvi Jul 11, 2024
10742a7
lint monorepo
dsinghvi Jul 11, 2024
7445327
add seeds
williamluer Jul 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,184 changes: 609 additions & 575 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion generators/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/csharp/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
Expand Down
2 changes: 1 addition & 1 deletion generators/csharp/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
Expand Down
2 changes: 1 addition & 1 deletion generators/csharp/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
Expand Down
2 changes: 1 addition & 1 deletion generators/openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"url-join": "^5.0.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/js-yaml": "^4.0.8",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
Expand Down
2 changes: 1 addition & 1 deletion generators/postman/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
Expand Down
2 changes: 1 addition & 1 deletion generators/ruby/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"tmp-promise": "^3.0.3"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/ruby/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"url-join": "^5.0.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
Expand Down
2 changes: 1 addition & 1 deletion generators/ruby/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
Expand Down
2 changes: 1 addition & 1 deletion generators/ruby/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.14",
"depcheck": "^1.4.6",
Expand Down
2 changes: 1 addition & 1 deletion generators/template/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript/express/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@fern-typescript/contexts": "workspace:*",
"@fern-typescript/express-generator": "workspace:*",
"@ts-morph/common": "^0.23.0",
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
"@types/tmp": "^0.2.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@fern-typescript/contexts": "workspace:*"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript/express/generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript/model/type-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript/model/union-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript/sdk/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@fern-typescript/contexts": "workspace:*",
"@fern-typescript/sdk-generator": "workspace:*",
"@ts-morph/common": "^0.23.0",
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
"@types/tmp": "^0.2.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"ts-poet": "^6.7.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript/sdk/generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"devDependencies": {
"@babel/preset-env": "^7.24.3",
"@babel/preset-typescript": "^7.24.1",
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/jest-specific-snapshot": "^0.5.9",
"@types/js-yaml": "^4.0.8",
"@types/lodash-es": "^4.17.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@fern-typescript/contexts": "workspace:*"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript/utils/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"devDependencies": {
"@types/decompress": "^4.2.7",
"@types/esutils": "^2.0.0",
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/js-yaml": "^4.0.8",
"@types/lodash-es": "^4.17.12",
"@types/node": "^18.7.18",
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript/utils/contexts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"ts-morph": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"devDependencies": {
"@babel/preset-env": "^7.24.3",
"@babel/preset-typescript": "^7.24.1",
"@types/jest": "^29.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
Expand Down
Loading
Loading