mirror of
https://github.com/owntracks/frontend.git
synced 2026-02-13 20:59:50 +00:00
Upgrade dependencies
This commit is contained in:
42
package.json
42
package.json
@@ -8,17 +8,17 @@
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint:js": "vue-cli-service lint --no-fix",
|
||||
"lint:md": "prettier --check '{*.md,docs/**/*.md,src/**/*.md}'",
|
||||
"cors-proxy": "node scripts/corsProxy.js",
|
||||
"format:js": "vue-cli-service lint",
|
||||
"format:md": "prettier --write '{*.md,docs/**/*.md,src/**/*.md}'",
|
||||
"cors-proxy": "node scripts/corsProxy.js",
|
||||
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'",
|
||||
"lint:js": "vue-cli-service lint --no-fix",
|
||||
"lint:md": "prettier --check '{*.md,docs/**/*.md,src/**/*.md}'",
|
||||
"test": "vue-cli-service test:unit"
|
||||
},
|
||||
"dependencies": {
|
||||
"clipboard-copy": "^3.1.0",
|
||||
"core-js": "^3.5.0",
|
||||
"core-js": "^3.6.4",
|
||||
"deepmerge": "^4.2.2",
|
||||
"leaflet": "^1.6.0",
|
||||
"leaflet.heat": "^0.2.0",
|
||||
@@ -26,33 +26,33 @@
|
||||
"vue": "^2.6.11",
|
||||
"vue-ctk-date-time-picker": "^2.4.0",
|
||||
"vue-feather-icons": "^5.0.0",
|
||||
"vue-i18n": "^8.0.0",
|
||||
"vue-i18n": "^8.15.3",
|
||||
"vue-js-modal": "^1.3.31",
|
||||
"vue-outside-events": "^1.1.3",
|
||||
"vue-router": "^3.1.3",
|
||||
"vue2-leaflet": "^2.3.0",
|
||||
"vue-router": "^3.1.5",
|
||||
"vue2-leaflet": "^2.4.2",
|
||||
"vuex": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.1.1",
|
||||
"@vue/cli-plugin-eslint": "^4.1.1",
|
||||
"@vue/cli-plugin-unit-jest": "^4.1.1",
|
||||
"@vue/cli-service": "^4.1.1",
|
||||
"@vue/cli-plugin-babel": "^4.1.2",
|
||||
"@vue/cli-plugin-eslint": "^4.1.2",
|
||||
"@vue/cli-plugin-unit-jest": "^4.1.2",
|
||||
"@vue/cli-service": "^4.1.2",
|
||||
"@vue/eslint-config-prettier": "^6.0.0",
|
||||
"@vue/test-utils": "1.0.0-beta.30",
|
||||
"@vue/test-utils": "1.0.0-beta.31",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-jest": "^24.9.0",
|
||||
"babel-jest": "^25.1.0",
|
||||
"cors-anywhere": "^0.4.1",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-prettier": "^3.1.1",
|
||||
"eslint-plugin-vue": "^6.0.1",
|
||||
"jest-fetch-mock": "^2.1.2",
|
||||
"lint-staged": "^9.5.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-prettier": "^3.1.2",
|
||||
"eslint-plugin-vue": "^6.1.2",
|
||||
"jest-fetch-mock": "^3.0.1",
|
||||
"lint-staged": "^10.0.2",
|
||||
"moment-locales-webpack-plugin": "^1.1.2",
|
||||
"node-sass": "^4.13.0",
|
||||
"sass-loader": "^8.0.0",
|
||||
"vue-cli-plugin-i18n": "^0.6.0",
|
||||
"node-sass": "^4.13.1",
|
||||
"sass-loader": "^8.0.2",
|
||||
"vue-cli-plugin-i18n": "^0.6.1",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
||||
@@ -24,7 +24,7 @@ const fetchApi = (path, params = {}) => {
|
||||
const url = getApiUrl(path);
|
||||
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
|
||||
log("HTTP", `GET ${url.href}`);
|
||||
return fetch(url).catch(error => log("HTTP", error, logLevels.ERROR));
|
||||
return fetch(url.href).catch(error => log("HTTP", error, logLevels.ERROR));
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,9 +12,7 @@ describe("API", () => {
|
||||
expect(version).toBe("1.2.3");
|
||||
|
||||
expect(fetch.mock.calls.length).toEqual(1);
|
||||
expect(fetch.mock.calls[0][0].href).toEqual(
|
||||
"http://localhost/api/0/version"
|
||||
);
|
||||
expect(fetch.mock.calls[0][0]).toEqual("http://localhost/api/0/version");
|
||||
});
|
||||
|
||||
test("getUsers", async () => {
|
||||
@@ -24,7 +22,7 @@ describe("API", () => {
|
||||
expect(users).toEqual(["foo", "bar"]);
|
||||
|
||||
expect(fetch.mock.calls.length).toEqual(1);
|
||||
expect(fetch.mock.calls[0][0].href).toEqual("http://localhost/api/0/list");
|
||||
expect(fetch.mock.calls[0][0]).toEqual("http://localhost/api/0/list");
|
||||
});
|
||||
|
||||
test("getDevices", async () => {
|
||||
@@ -37,10 +35,10 @@ describe("API", () => {
|
||||
expect(devices).toEqual({ foo: ["phone", "tablet"], bar: ["laptop"] });
|
||||
|
||||
expect(fetch.mock.calls.length).toEqual(2);
|
||||
expect(fetch.mock.calls[0][0].href).toEqual(
|
||||
expect(fetch.mock.calls[0][0]).toEqual(
|
||||
"http://localhost/api/0/list?user=foo"
|
||||
);
|
||||
expect(fetch.mock.calls[1][0].href).toEqual(
|
||||
expect(fetch.mock.calls[1][0]).toEqual(
|
||||
"http://localhost/api/0/list?user=bar"
|
||||
);
|
||||
});
|
||||
@@ -68,7 +66,7 @@ describe("API", () => {
|
||||
expect(lastLocation).toEqual(response);
|
||||
|
||||
expect(fetch.mock.calls.length).toEqual(1);
|
||||
expect(fetch.mock.calls[0][0].href).toEqual("http://localhost/api/0/last");
|
||||
expect(fetch.mock.calls[0][0]).toEqual("http://localhost/api/0/last");
|
||||
});
|
||||
|
||||
test("getLastLocations with user", async () => {
|
||||
@@ -89,7 +87,7 @@ describe("API", () => {
|
||||
expect(lastLocation).toEqual(response);
|
||||
|
||||
expect(fetch.mock.calls.length).toEqual(1);
|
||||
expect(fetch.mock.calls[0][0].href).toEqual(
|
||||
expect(fetch.mock.calls[0][0]).toEqual(
|
||||
"http://localhost/api/0/last?user=foo"
|
||||
);
|
||||
});
|
||||
@@ -108,7 +106,7 @@ describe("API", () => {
|
||||
expect(lastLocation).toEqual(response);
|
||||
|
||||
expect(fetch.mock.calls.length).toEqual(1);
|
||||
expect(fetch.mock.calls[0][0].href).toEqual(
|
||||
expect(fetch.mock.calls[0][0]).toEqual(
|
||||
"http://localhost/api/0/last?user=foo&device=phone"
|
||||
);
|
||||
});
|
||||
@@ -150,7 +148,7 @@ describe("API", () => {
|
||||
expect(locationHistory).toEqual(response.data);
|
||||
|
||||
expect(fetch.mock.calls.length).toEqual(1);
|
||||
expect(fetch.mock.calls[0][0].href).toEqual(
|
||||
expect(fetch.mock.calls[0][0]).toEqual(
|
||||
"http://localhost/api/0/locations?from=1970-01-01T00%3A00%3A00&to=1970-12-31T23%3A59%3A59&user=foo&device=phone&format=json"
|
||||
);
|
||||
});
|
||||
@@ -206,13 +204,13 @@ describe("API", () => {
|
||||
});
|
||||
|
||||
expect(fetch.mock.calls.length).toEqual(3);
|
||||
expect(fetch.mock.calls[0][0].href).toEqual(
|
||||
expect(fetch.mock.calls[0][0]).toEqual(
|
||||
"http://localhost/api/0/locations?from=1970-01-01T00%3A00%3A00&to=1970-12-31T23%3A59%3A59&user=foo&device=phone&format=json"
|
||||
);
|
||||
expect(fetch.mock.calls[1][0].href).toEqual(
|
||||
expect(fetch.mock.calls[1][0]).toEqual(
|
||||
"http://localhost/api/0/locations?from=1970-01-01T00%3A00%3A00&to=1970-12-31T23%3A59%3A59&user=foo&device=tablet&format=json"
|
||||
);
|
||||
expect(fetch.mock.calls[2][0].href).toEqual(
|
||||
expect(fetch.mock.calls[2][0]).toEqual(
|
||||
"http://localhost/api/0/locations?from=1970-01-01T00%3A00%3A00&to=1970-12-31T23%3A59%3A59&user=bar&device=laptop&format=json"
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1 +1 @@
|
||||
global.fetch = require("jest-fetch-mock");
|
||||
require("jest-fetch-mock").enableMocks();
|
||||
|
||||
Reference in New Issue
Block a user