Skip to content

Commit

Permalink
fix: remove qs dep
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Oct 26, 2023
1 parent 60f1410 commit f9b6531
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 373 deletions.
7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
"fastify": "4.18.0",
"immutable": "4.3.4",
"js-cookie": "3.0.5",
"qs": "6.11.2",
"typeorm": "0.3.17",
"uuid": "9.0.1",
"validator": "13.11.0"
},
Expand All @@ -67,7 +65,6 @@
"@types/jest": "29.5.6",
"@types/js-cookie": "3.0.5",
"@types/jsdom": "21.1.4",
"@types/qs": "6.9.9",
"@types/uuid": "9.0.6",
"@types/validator": "13.11.5",
"@typescript-eslint/eslint-plugin": "6.9.0",
Expand All @@ -83,9 +80,5 @@
"tsc-alias": "1.8.8",
"typescript": "5.2.2"
},
"resolutions": {
"@babel/core": "^7.22.5",
"minimist": "^1.2.6"
},
"packageManager": "[email protected]"
}
12 changes: 5 additions & 7 deletions src/utils/navigation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import qs from 'qs';

import { DEFAULT_PROTOCOL, PROTOCOL_REGEX } from '../config';
import { getUrlForRedirection } from './cookie';

Expand Down Expand Up @@ -99,11 +97,11 @@ export const buildItemLinkForBuilder: BuildItemLinkFunc = (
origin = `${args.protocol || DEFAULT_PROTOCOL}://${args.host}`;
}
}

return `${origin}/items/${itemId}${qs.stringify(
{ chat: chatOpen },
{ addQueryPrefix: true },
)}`;
const url = new URL(`/items/${itemId}`, origin);
if (chatOpen !== undefined) {
url.searchParams.set('chat', chatOpen.toString());
}
return url.toString();
};

/**
Expand Down
Loading

0 comments on commit f9b6531

Please sign in to comment.