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

[Snyk] Upgrade cross-fetch from 3.1.5 to 3.1.8 #64

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions docs/assets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
e || !t || !t.__esModule
? ae(n, "default", { value: t, enumerable: !0 })
: n,
t
t,
)
);
var de = _e((ce, he) => {
Expand Down Expand Up @@ -73,7 +73,7 @@
continue;
}
throw new TypeError(
"clone is not deep and does not support nested objects"
"clone is not deep and does not support nested objects",
);
}
return n;
Expand Down Expand Up @@ -149,10 +149,10 @@
return e === t.Set.complete
? t.Set.complete
: e === t.Set.empty
? this
: new t.Set(
Object.keys(this.elements).concat(Object.keys(e.elements))
);
? this
: new t.Set(
Object.keys(this.elements).concat(Object.keys(e.elements)),
);
}),
(t.idf = function (e, n) {
var r = 0;
Expand Down Expand Up @@ -185,7 +185,7 @@
return e.map(function (m) {
return new t.Token(
t.utils.asString(m).toLowerCase(),
t.utils.clone(n)
t.utils.clone(n),
);
});
for (
Expand Down Expand Up @@ -228,7 +228,7 @@
t.utils.warn(
`Function is not registered with pipeline. This may cause problems when serialising the index.
`,
e
e,
);
}),
(t.Pipeline.load = function (e) {
Expand Down Expand Up @@ -350,8 +350,8 @@
a < u
? (l += 2)
: a > u
? (h += 2)
: a == u && ((n += r[l + 1] * i[h + 1]), (l += 2), (h += 2));
? (h += 2)
: a == u && ((n += r[l + 1] * i[h + 1]), (l += 2), (h += 2));
return n;
}),
(t.Vector.prototype.similarity = function (e) {
Expand Down Expand Up @@ -461,8 +461,8 @@
x.test(c)
? (c = c + "e")
: O.test(c)
? ((d = S), (c = c.replace(d, "")))
: D.test(c) && (c = c + "e"));
? ((d = S), (c = c.replace(d, "")))
: D.test(c) && (c = c + "e"));
}
if (((d = A), d.test(c))) {
var L = d.exec(c);
Expand Down Expand Up @@ -1021,7 +1021,7 @@
t.version +
"' does not match serialized index '" +
e.version +
"'"
"'",
);
for (var l = 0; l < i.length; l++) {
var h = i[l],
Expand Down Expand Up @@ -1067,7 +1067,7 @@
(t.Builder.prototype.field = function (e, n) {
if (/\//.test(e))
throw new RangeError(
"Field '" + e + "' contains illegal character '/'"
"Field '" + e + "' contains illegal character '/'",
);
this._fields[e] = n || {};
}),
Expand Down Expand Up @@ -1190,7 +1190,7 @@
}),
(t.Builder.prototype.createTokenSet = function () {
this.tokenSet = t.TokenSet.fromArray(
Object.keys(this.invertedIndex).sort()
Object.keys(this.invertedIndex).sort(),
);
}),
(t.Builder.prototype.build = function () {
Expand Down Expand Up @@ -1241,7 +1241,7 @@
this.metadata[i][a][h] == null
? (this.metadata[i][a][h] = e.metadata[i][a][h])
: (this.metadata[i][a][h] = this.metadata[i][a][h].concat(
e.metadata[i][a][h]
e.metadata[i][a][h],
));
}
}
Expand Down Expand Up @@ -1632,8 +1632,8 @@
typeof define == "function" && define.amd
? define(n)
: typeof ce == "object"
? (he.exports = n())
: (e.lunr = n());
? (he.exports = n())
: (e.lunr = n());
})(this, function () {
return t;
});
Expand Down Expand Up @@ -1704,11 +1704,11 @@
(this.navigation = document.querySelector(".col-menu")),
window.addEventListener(
"scroll",
ne(() => this.onScroll(), 10)
ne(() => this.onScroll(), 10),
),
window.addEventListener(
"resize",
ne(() => this.onResize(), 10)
ne(() => this.onResize(), 10),
),
(this.searchInput = document.querySelector("#tsd-search input")),
this.searchInput &&
Expand Down Expand Up @@ -1827,7 +1827,7 @@
r = document.querySelector("#tsd-search .results");
if (!n || !r)
throw new Error(
"The input field or the result list wrapper was not found"
"The input field or the result list wrapper was not found",
);
let i = !1;
r.addEventListener("mousedown", () => (i = !0)),
Expand All @@ -1846,20 +1846,20 @@
"input",
ue(() => {
Ae(t, e, n, r);
}, 200)
}, 200),
);
let i = !1;
n.addEventListener("keydown", (s) => {
(i = !0),
s.key == "Enter"
? Ve(e, n)
: s.key == "Escape"
? n.blur()
: s.key == "ArrowUp"
? fe(e, -1)
: s.key === "ArrowDown"
? fe(e, 1)
: (i = !1);
? n.blur()
: s.key == "ArrowUp"
? fe(e, -1)
: s.key === "ArrowDown"
? fe(e, 1)
: (i = !1);
}),
n.addEventListener("keypress", (s) => {
i && s.preventDefault();
Expand Down Expand Up @@ -1943,7 +1943,7 @@
for (; o != -1; )
i.push(
ie(t.substring(s, o)),
`<b>${ie(t.substring(o, o + r.length))}</b>`
`<b>${ie(t.substring(o, o + r.length))}</b>`,
),
(s = o + r.length),
(o = n.indexOf(r, s));
Expand All @@ -1968,7 +1968,7 @@
je = !1,
H = !1,
xe = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
navigator.userAgent,
);
document.documentElement.classList.add(xe ? "is-mobile" : "not-mobile");
xe &&
Expand Down Expand Up @@ -2073,7 +2073,7 @@
document.querySelectorAll(".tsd-index-section").forEach((n) => {
n.style.display = "block";
let r = Array.from(n.querySelectorAll(".tsd-index-link")).every(
(i) => i.offsetParent == null
(i) => i.offsetParent == null,
);
n.style.display = r ? "none" : "block";
});
Expand Down Expand Up @@ -2139,7 +2139,7 @@
this.getIconRotation(i),
],
},
o
o,
)
.addEventListener("finish", () => {
this.icon.style.transform = this.getIconRotation(i);
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"typescript": "^4.8.4"
},
"dependencies": {
"cross-fetch": "^3.1.5",
"cross-fetch": "^3.1.8",
"proj4": "^2.8.0"
}
}
6 changes: 3 additions & 3 deletions src/names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function requestNames(config: Config): Promise<OSFeatureCollection> {
responseObject.results.forEach((result) => {
coordsTemp = coords.fromBNG(
result.GAZETTEER_ENTRY.GEOMETRY_X,
result.GAZETTEER_ENTRY.GEOMETRY_Y
result.GAZETTEER_ENTRY.GEOMETRY_Y,
);
result.GAZETTEER_ENTRY.LNG = coordsTemp.lng;
result.GAZETTEER_ENTRY.LAT = coordsTemp.lat;
Expand All @@ -35,7 +35,7 @@ async function requestNames(config: Config): Promise<OSFeatureCollection> {
*/
export const nearest = async (
apiKey: string,
point: [number, number]
point: [number, number],
): Promise<OSFeatureCollection> => {
validateParams({ apiKey, point });

Expand Down Expand Up @@ -64,7 +64,7 @@ export const nearest = async (
export const find = async (
apiKey: string,
query: string,
{ offset = 0, limit = 100 }: { offset?: number; limit?: number } = {}
{ offset = 0, limit = 100 }: { offset?: number; limit?: number } = {},
): Promise<OSFeatureCollection> => {
validateParams({ apiKey, query, offset, limit });

Expand Down
14 changes: 7 additions & 7 deletions src/ngd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const features = async (
crs?: null | string | number;
bboxCRS?: null | string | number;
filterCRS?: null | string | number;
} = {}
} = {},
): Promise<FeatureCollection> => {
validateParams({ bbox, datetime });
const config = initialiseConfig(apiKey, offset, limit);
Expand All @@ -81,7 +81,7 @@ export const features = async (
* @return {Promise<NGDCollection | NGDCollection[]>} - Collection information
*/
export const collections = async (
collectionId = ""
collectionId = "",
): Promise<NGDCollection | NGDCollections> => {
const endpoint = root + `${collectionId}`;
return (await get(endpoint).then((response) => response.json())) as Promise<
Expand All @@ -98,7 +98,7 @@ export const collections = async (
export const schema = async (collectionId: string): Promise<NGDSchema> => {
const endpoint = root + `${collectionId}/schema`;
return (await get(endpoint).then((response) =>
response.json()
response.json(),
)) as Promise<NGDSchema>;
};

Expand All @@ -109,11 +109,11 @@ export const schema = async (collectionId: string): Promise<NGDSchema> => {
* @return {Promise<NGDQueryables>} - JSON containing querable properties
*/
export const queryables = async (
collectionId: string
collectionId: string,
): Promise<NGDQueryables> => {
const endpoint = root + `${collectionId}/queryables`;
return (await get(endpoint).then((response) =>
response.json()
response.json(),
)) as Promise<NGDQueryables>;
};

Expand All @@ -135,10 +135,10 @@ export const feature = async (
crs = null,
}: {
crs?: null | string | number;
} = {}
} = {},
): Promise<Feature> => {
const endpoint = buildUrl(collectionId, { featureId, crs });
return (await get(endpoint, apiKey).then((response) =>
response.json()
response.json(),
)) as Promise<Feature>;
};
Loading