Skip to content

Commit

Permalink
chore: upgrade npm deps (evcc-io#13051)
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis authored Mar 20, 2024
1 parent 8a30eb9 commit 4ff0ab9
Show file tree
Hide file tree
Showing 19 changed files with 1,063 additions and 1,545 deletions.
22 changes: 22 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
env: {
browser: true,
node: true,
es6: true,
},
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier/skip-formatting",
],
parserOptions: {
ecmaVersion: "latest",
},
rules: {
"vue/require-default-prop": "off",
"vue/attribute-hyphenation": "off",
"vue/multi-word-component-names": "off",
"vue/no-reserved-component-names": "off",
},
};
22 changes: 0 additions & 22 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
printWidth: 100,
trailingComma: "es5"
trailingComma: "es5",
};
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
preset: "@vue/cli-plugin-unit-jest/presets/no-babel",
testMatch: ["**/*.spec.js"],
};
2,450 changes: 984 additions & 1,466 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "evcc",
"description": "",
"author": "naltatis & andig",
"description": "evcc UI",
"author": "evcc-io",
"scripts": {
"build": "vite build",
"test": "TZ=Europe/Berlin vitest",
Expand All @@ -11,6 +11,7 @@
"playwright": "playwright test --ui",
"simulator": "vite tests/simulator"
},
"type": "module",
"main": "index.js",
"dependencies": {
"@babel/core": "^7.17.2",
Expand All @@ -23,7 +24,7 @@
"@vitejs/plugin-vue": "^5.0.4",
"@vue/compiler-sfc": "^3.2.30",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/test-utils": "^2.2.7",
"@vue/tsconfig": "^0.5.1",
"axios": "^1.2.1",
Expand All @@ -38,7 +39,7 @@
"eslint-plugin-prettier": "^5.0.0-alpha.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^9.3.0",
"happy-dom": "^13.3.8",
"happy-dom": "^14.0.0",
"histoire": "^0.17.0",
"markty-toml": "^0.1.1",
"prettier": "^3.0.0",
Expand All @@ -54,7 +55,6 @@
"vue-hot-reload-api": "^2.3.4",
"vue-i18n": "^9.2.2",
"vue-router": "^4.0.12",
"vue-tsc": "^1.8.19",
"wait-on": "^7.0.1"
},
"engines": {
Expand All @@ -63,4 +63,4 @@
},
"license": "MIT",
"repository": "github:evcc-io/evcc"
}
}
40 changes: 20 additions & 20 deletions playwright.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
const { defineConfig, devices } = require("@playwright/test");
import { defineConfig, devices } from "@playwright/test";

/**
* @see https://playwright.dev/docs/test-configuration
*/
module.exports = defineConfig({
testDir: "./tests",
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
timeout: 15000, // 15s (default 30s)
expect: { timeout: 2500 }, // 2.5s (default 5s)
workers: 1, // run testfiles serially to avoid port and database conflicts
reporter: "html",
use: {
baseURL: "http://127.0.0.1:7070",
trace: "on-first-retry",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
export default defineConfig({
testDir: "./tests",
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
timeout: 15000, // 15s (default 30s)
expect: { timeout: 2500 }, // 2.5s (default 5s)
workers: 1, // run testfiles serially to avoid port and database conflicts
reporter: "html",
use: {
baseURL: "http://127.0.0.1:7070",
trace: "on-first-retry",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
});
4 changes: 2 additions & 2 deletions tests/basics.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { test, expect } = require("@playwright/test");
const { start, stop } = require("./evcc");
import { test, expect } from "@playwright/test";
import { start, stop } from "./evcc";

test.beforeAll(async () => {
await start("basics.evcc.yaml");
Expand Down
6 changes: 3 additions & 3 deletions tests/config.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { test, expect } = require("@playwright/test");
const { start, stop, restart, cleanRestart } = require("./evcc");
const { startSimulator, stopSimulator, SIMULATOR_URL, SIMULATOR_HOST } = require("./simulator");
import { test, expect } from "@playwright/test";
import { start, stop, restart, cleanRestart } from "./evcc";
import { startSimulator, stopSimulator, SIMULATOR_URL, SIMULATOR_HOST } from "./simulator";

const CONFIG_EMPTY = "config-empty.evcc.yaml";
const CONFIG_WITH_VEHICLE = "config-with-vehicle.evcc.yaml";
Expand Down
2 changes: 1 addition & 1 deletion tests/evcc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from "fs";
import waitOn from "wait-on";
import axios from "axios";
import { exec, execSync } from "child_process";
import playwrightConfig from "../playwright.config";
import playwrightConfig from "../playwright.config.js";

const BASE_URL = playwrightConfig.use.baseURL;

Expand Down
4 changes: 2 additions & 2 deletions tests/heating.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { test, expect } = require("@playwright/test");
const { start, stop } = require("./evcc");
import { test, expect } from "@playwright/test";
import { start, stop } from "./evcc";

test.beforeAll(async () => {
await start("heating.evcc.yaml");
Expand Down
6 changes: 3 additions & 3 deletions tests/limits.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { test, expect } = require("@playwright/test");
const { start, stop } = require("./evcc");
const { startSimulator, stopSimulator, SIMULATOR_URL } = require("./simulator");
import { test, expect } from "@playwright/test";
import { start, stop } from "./evcc";
import { startSimulator, stopSimulator, SIMULATOR_URL } from "./simulator";

const CONFIG = "simulator.evcc.yaml";

Expand Down
6 changes: 3 additions & 3 deletions tests/modals.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { test, expect } = require("@playwright/test");
const { start, stop } = require("./evcc");
const { startSimulator, stopSimulator } = require("./simulator");
import { test, expect } from "@playwright/test";
import { start, stop } from "./evcc";
import { startSimulator, stopSimulator } from "./simulator";

const BASICS_CONFIG = "basics.evcc.yaml";
const SIMULATOR_CONFIG = "simulator.evcc.yaml";
Expand Down
4 changes: 2 additions & 2 deletions tests/plan.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { test, expect } = require("@playwright/test");
const { start, stop, restart } = require("./evcc");
import { test, expect } from "@playwright/test";
import { start, stop } from "./evcc";

const CONFIG = "plan.evcc.yaml";

Expand Down
4 changes: 2 additions & 2 deletions tests/sessions.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { test, expect, devices } = require("@playwright/test");
const { start, stop } = require("./evcc");
import { test, expect, devices } from "@playwright/test";
import { start, stop } from "./evcc";

const mobile = devices["iPhone 12 Mini"].viewport;
const desktop = devices["Desktop Chrome"].viewport;
Expand Down
6 changes: 3 additions & 3 deletions tests/smart-cost.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { test, expect } = require("@playwright/test");
const { start, stop } = require("./evcc");
const { startSimulator, stopSimulator, SIMULATOR_URL } = require("./simulator");
import { test, expect } from "@playwright/test";
import { start, stop } from "./evcc";
import { startSimulator, stopSimulator, SIMULATOR_URL } from "./simulator";

const CONFIG = "simulator.evcc.yaml";

Expand Down
4 changes: 2 additions & 2 deletions tests/statistics.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { test, expect } = require("@playwright/test");
const { start, stop } = require("./evcc");
import { test, expect } from "@playwright/test";
import { start, stop } from "./evcc";

test.beforeAll(async () => {
await start("statistics.evcc.yaml", "statistics.sql");
Expand Down
4 changes: 2 additions & 2 deletions tests/vehicle-error.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { test, expect } = require("@playwright/test");
const { start, stop } = require("./evcc");
import { test, expect } from "@playwright/test";
import { start, stop } from "./evcc";

test.beforeAll(async () => {
await start("vehicle-error.evcc.yaml");
Expand Down
6 changes: 3 additions & 3 deletions tests/vehicle-settings.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { test, expect } = require("@playwright/test");
const { start, stop, restart } = require("./evcc");
const { startSimulator, stopSimulator, SIMULATOR_URL } = require("./simulator");
import { test, expect } from "@playwright/test";
import { start, stop, restart } from "./evcc";
import { startSimulator, stopSimulator, SIMULATOR_URL } from "./simulator";

const CONFIG = "simulator.evcc.yaml";

Expand Down

0 comments on commit 4ff0ab9

Please sign in to comment.