Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
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"; // Default Node.js 18 users to Node.js 20
Comment thread
Apollon77 marked this conversation as resolved.
Outdated
} 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
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 @@ -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
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 @@ -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/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