Skip to content

Commit

Permalink
docs: tidying up
Browse files Browse the repository at this point in the history
refactor:  lil change to fetch util
  • Loading branch information
Ryan-Zayne committed Jul 13, 2024
1 parent 54b43c1 commit 19ac795
Show file tree
Hide file tree
Showing 12 changed files with 506 additions and 1,446 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-trees-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zayne-labs/callapi": patch
---

lil change to merge util
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prepare": "husky",
"test:check-types": "tsc --pretty -p tsconfig.json",
"test:format": "prettier --write --cache .",
"test:lint": "eslint src/**/*.ts --max-warnings 10 --report-unused-disable-directives",
"test:lint": "eslint src/**/*.ts website/**/*.{js,ts,tsx,mjs} --max-warnings 10 --report-unused-disable-directives",
"test:size": "size-limit",
"build": "tsup",
"build:dev": "tsup --watch",
Expand Down Expand Up @@ -52,22 +52,22 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@changesets/cli": "^2.27.5",
"@eslint/js": "^9.5.0",
"@changesets/cli": "^2.27.7",
"@eslint/js": "^9.7.0",
"@size-limit/preset-small-lib": "^11.1.4",
"@zayne-labs/tsconfig": "^0.0.7",
"eslint": "^9.5.0",
"eslint-plugin-import-x": "^0.5.1",
"eslint-plugin-jsdoc": "^48.2.12",
"eslint": "^9.7.0",
"eslint-plugin-import-x": "^3.0.1",
"eslint-plugin-jsdoc": "^48.7.0",
"eslint-plugin-sonarjs": "^1.0.3",
"eslint-plugin-unicorn": "^54.0.0",
"globals": "^15.6.0",
"globals": "^15.8.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"prettier": "^3.3.2",
"size-limit": "^11.1.4",
"tsup": "^8.1.0",
"typescript": "5.5.3",
"typescript-eslint": "^7.13.1"
"typescript-eslint": "^7.16.0"
}
}
1,625 changes: 341 additions & 1,284 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ export const mergeUrlWithParams = (url: string, params: ExtraOptions["query"]):

const paramsString = toQueryString(params);

if (url.includes("?") && !url.endsWith("?")) {
return `${url}&${paramsString}`;
}

if (url.endsWith("?")) {
return `${url}${paramsString}`;
}


if (url.includes("?")) {
return `${url}&${paramsString}`;
}


return `${url}?${paramsString}`;
};

Expand Down
2 changes: 1 addition & 1 deletion website/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.next
node_modules
node_modules
3 changes: 0 additions & 3 deletions website/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint-disable import-x/no-named-as-default */
/* eslint-disable import-x/no-named-as-default-member */
/* eslint-disable import-x/default */
import nextra from "nextra";

// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment
Expand Down
3 changes: 2 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
"dependencies": {
"@netlify/plugin-nextjs": "^5.5.1",
"@vercel/analytics": "^1.3.1",
"next": "^14.2.4",
"next": "^14.2.5",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "20.14.10",
"@zayne-labs/tsconfig": "^0.0.7",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.39",
"tailwindcss": "^3.4.4",
Expand Down
Loading

0 comments on commit 19ac795

Please sign in to comment.