Skip to content

Commit

Permalink
Merge pull request #147 from NodeSecure/CodeQL-fix
Browse files Browse the repository at this point in the history
CodeQL fix and remove root dependabot file
  • Loading branch information
fraxken authored Jan 21, 2023
2 parents 49a2380 + 8fae98d commit a0f3d69
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
10 changes: 0 additions & 10 deletions dependabot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion public/js/components/bundlephobia.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class Bundlephobia {
}

get httpName() {
return this.name.replace("/", "%2F");
return this.name.replaceAll("/", "%2F");
}

async fetchDataOnHttpServer() {
Expand Down
2 changes: 1 addition & 1 deletion public/js/components/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class HomeView {

try {

const { downloads } = await getJSON(`/downloads/${name.replace("/", "%2F")}`);
const { downloads } = await getJSON(`/downloads/${name.replaceAll("/", "%2F")}`);

if (downloads) {
const formattedNumber = new Intl.NumberFormat("de-DE").format(downloads);
Expand Down
2 changes: 1 addition & 1 deletion src/http-server/endpoints/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const kBaseBundlePhobiaUrl = "https://bundlephobia.com/api";
export async function get(req, res) {
const { pkgName, version } = req.params;

const pkgTemplate = version ? `${pkgName.replace("%2F", "/")}@${version}` : pkgName;
const pkgTemplate = version ? `${pkgName.replaceAll("%2F", "/")}@${version}` : pkgName;
try {
const { data } = await getRequest(`${kBaseBundlePhobiaUrl}/size?package=${pkgTemplate}`);
const { gzip, size, dependencySizes } = data;
Expand Down
2 changes: 1 addition & 1 deletion src/http-server/endpoints/npm-downloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function get(req, res) {
const { pkgName } = req.params;

try {
const data = await downloads(`${pkgName.replace("%2F", "/")}`, "last-week");
const data = await downloads(`${pkgName.replaceAll("%2F", "/")}`, "last-week");

return send(res, 200, data);
}
Expand Down

0 comments on commit a0f3d69

Please sign in to comment.