Skip to content
Merged
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
4 changes: 2 additions & 2 deletions docs/updates/20220827_jsonconfig_vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you want to have syntax help for JSON Config in VSCode, open `.vscode/setting
"admin/jsonCustom.json",
"admin/jsonTab.json"
],
"url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json"
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/packages/jsonConfig/schemas/jsonConfig.json"
}
```

Expand All @@ -29,7 +29,7 @@ The file should look like this afterwards:
"admin/jsonCustom.json",
"admin/jsonTab.json"
],
"url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json"
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/packages/jsonConfig/schemas/jsonConfig.json"
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions src/lib/core/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,10 @@ export const questionGroups: QuestionGroup[] = [
message:
"What's the minimum Node.js version you want to support?",
initial: "20",
choices: ["18", "20", "22"],
choices: ["20", "22"],
migrate: (ctx) => {
if (ctx.hasDevDependency("@tsconfig/node18")) {
return "18";
return "20"; // For migrations upgrade to Node.js 20 as minimum
} else if (ctx.hasDevDependency("@tsconfig/node20")) {
return "20";
} else if (ctx.hasDevDependency("@tsconfig/node22")) {
Expand Down Expand Up @@ -981,7 +981,7 @@ export interface Answers {
| "code coverage"
| "devcontainer"
)[];
nodeVersion?: "18" | "20" | "22";
nodeVersion?: "20" | "22";
title?: string;
license?: string;
// Not used on the CLI, but can be provided by the web UI for example
Expand Down
2 changes: 1 addition & 1 deletion templates/_vscode/settings.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ${usePrettier ? (`
"admin/jsonCustom.json",
"admin/jsonTab.json"
],
"url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json"
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/packages/jsonConfig/schemas/jsonConfig.json"
}
],
}
Expand Down
2 changes: 1 addition & 1 deletion test/baselines/TS_Prettier/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
{
"fileMatch": ["admin/jsonConfig.json", "admin/jsonCustom.json", "admin/jsonTab.json"],
"url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json"
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/packages/jsonConfig/schemas/jsonConfig.json"
}
]
}
8 changes: 4 additions & 4 deletions test/baselines/TS_SingleQuotes/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class TestAdapter extends utils.Adapter {
await this.setStateAsync('testVariable', { val: true, ack: true, expire: 30 });

// examples for the checkPassword/checkGroup functions
let result = await this.checkPasswordAsync('admin', 'iobroker');
this.log.info('check user admin pw iobroker: ' + result);
const pwdResult = await this.checkPasswordAsync('admin', 'iobroker');
this.log.info('check user admin pw iobroker: ' + pwdResult);

result = await this.checkGroupAsync('admin', 'admin');
this.log.info('check group user admin group admin: ' + result);
const gropupResult = await this.checkGroupAsync('admin', 'admin');
this.log.info('check group user admin group admin: ' + gropupResult);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"admin/jsonCustom.json",
"admin/jsonTab.json"
],
"url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json"
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/packages/jsonConfig/schemas/jsonConfig.json"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ class TestAdapter extends utils.Adapter {
await this.setStateAsync('testVariable', { val: true, ack: true, expire: 30 });

// examples for the checkPassword/checkGroup functions
let result = await this.checkPasswordAsync('admin', 'iobroker');
this.log.info('check user admin pw iobroker: ' + result);
const pwdResult = await this.checkPasswordAsync('admin', 'iobroker');
this.log.info('check user admin pw iobroker: ' + pwdResult);

result = await this.checkGroupAsync('admin', 'admin');
this.log.info('check group user admin group admin: ' + result);
const gropupResult = await this.checkGroupAsync('admin', 'admin');
this.log.info('check group user admin group admin: ' + gropupResult);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/baselines/adapter_JS_React/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"admin/jsonCustom.json",
"admin/jsonTab.json"
],
"url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json"
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/packages/jsonConfig/schemas/jsonConfig.json"
}
]
}
8 changes: 4 additions & 4 deletions test/baselines/adapter_JS_React/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ class TestAdapter extends utils.Adapter {
await this.setStateAsync("testVariable", { val: true, ack: true, expire: 30 });

// examples for the checkPassword/checkGroup functions
let result = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + result);
const pwdResult = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + pwdResult);

result = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + result);
const gropupResult = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + gropupResult);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"admin/jsonCustom.json",
"admin/jsonTab.json"
],
"url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json"
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/packages/jsonConfig/schemas/jsonConfig.json"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class TestAdapter extends utils.Adapter {
await this.setStateAsync("testVariable", { val: true, ack: true, expire: 30 });

// examples for the checkPassword/checkGroup functions
let result = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + result);
const pwdResult = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + pwdResult);

result = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + result);
const gropupResult = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + gropupResult);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/baselines/adapter_TS_React/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"admin/jsonCustom.json",
"admin/jsonTab.json"
],
"url": "https://raw.githubusercontent.com/ioBroker/adapter-react-v5/main/schemas/jsonConfig.json"
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/packages/jsonConfig/schemas/jsonConfig.json"
}
]
}
8 changes: 4 additions & 4 deletions test/baselines/adapter_TS_React/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class TestAdapter extends utils.Adapter {
await this.setStateAsync("testVariable", { val: true, ack: true, expire: 30 });

// examples for the checkPassword/checkGroup functions
let result = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + result);
const pwdResult = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + pwdResult);

result = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + result);
const gropupResult = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + gropupResult);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions test/baselines/connectionIndicator_yes/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ class TestAdapter extends utils.Adapter {
await this.setStateAsync("testVariable", { val: true, ack: true, expire: 30 });

// examples for the checkPassword/checkGroup functions
let result = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + result);
const pwdResult = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + pwdResult);

result = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + result);
const gropupResult = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + gropupResult);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions test/baselines/customAdapterSettings/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class TestAdapter extends utils.Adapter {
await this.setStateAsync("testVariable", { val: true, ack: true, expire: 30 });

// examples for the checkPassword/checkGroup functions
let result = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + result);
const pwdResult = await this.checkPasswordAsync("admin", "iobroker");
this.log.info("check user admin pw iobroker: " + pwdResult);

result = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + result);
const gropupResult = await this.checkGroupAsync("admin", "admin");
this.log.info("check group user admin group admin: " + gropupResult);
}

/**
Expand Down
80 changes: 0 additions & 80 deletions test/baselines/minNodeVersion_18/package.json

This file was deleted.

46 changes: 0 additions & 46 deletions test/baselines/minNodeVersion_18/tsconfig.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ vis.binds["test-widget"] = {
$("#" + widgetID).html(text);

// subscribe on updates of value
function onChange(e, newVal, oldVal) {
function onChange(e, newVal, _oldVal) {
$div.find(".template-value").html(newVal);
}
if (data.oid) {
Expand Down
14 changes: 0 additions & 14 deletions test/create-adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,20 +357,6 @@ describe("adapter creation =>", () => {
);
});

it(`Node.js 18 as minimum`, async () => {
const answers: Answers = {
...baseAnswers,
nodeVersion: "18",
};
await expectSuccess(
"minNodeVersion_18",
answers,
(file) =>
file.name === "package.json" ||
file.name === "tsconfig.json",
);
});

it(`Node.js 20 as minimum`, async () => {
const answers: Answers = {
...baseAnswers,
Expand Down