Repository navigation
fix: client corrections, tests, ESLint 10 and dependency cleanup - #33
Merged
Merged
Conversation
Client (version 3.3.1; the behaviour of 3.3.0 is kept): - CLIENT_VERSION is equal to the package version again (it was 3.0.2), so the User-Agent reports the correct version. - No "Cookie: null" header is sent when the client has no cookie. - A response that is not JSON gives a SyntaxError that names the API method and the HTTP status. - Debug mode masks the parameters pass and tan. - The doc comments of callApi() describe the real behaviour. Tests: - Add tests with the Node.js test runner and a fake fetch (npm test). Tooling: - Remove the unused packages browserify and @types/otplib. - Migrate to ESLint 10 with a flat configuration and typescript-eslint. - Add a Dependabot configuration for npm and GitHub Actions. - CI: Node.js 24, explicit build and test steps. - Publish: check that the release tag matches the package version and run the tests before the publish. - Add the files field to package.json: the package contains lib and src. - tsconfig: module commonjs (same output as before).
ab7z
force-pushed
the
client-corrections-and-dependency-cleanup
branch
from
October 5, 2026 12:08
e13635e to
418da41
Compare
ddmler
approved these changes
Oct 7, 2026
# Conflicts: # package-lock.json
ab7z
force-pushed
the
client-corrections-and-dependency-cleanup
branch
from
October 7, 2026 07:58
40c36ee to
6aee6a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request removes the vulnerable and unused development dependencies, moves the linter to ESLint 10, adds a test suite and a Dependabot configuration, and corrects four small defects of the client. The client behaves as version 3.3.0: no request body, no return value and no public signature changes. The version is 3.3.1.
Client (
src/domrobot.ts)CLIENT_VERSIONis equal to the package version again. It was3.0.2since 2019, so theUser-Agentreported a wrong version. A test now compares the constant withpackage.json.Cookie: nullheader when it has no cookie (before a login and after a logout).SyntaxError, but the message now names the API method and the HTTP status, and the parse error is thecause.passandtan. Before, it printed the password ofaccount.login.callApi()now describe what the code does forclientTransactionId,language,cacheOptionandnextjsOptions.Not changed on purpose: the handling of
clTRIDandlang, the stored cookie value, the result oflogout()and the two-factor flow. These have known defects, but a correction changes what existing users send or get, so it belongs to a major version.Tests
test/domrobot.test.js, 22 tests with the Node.js test runner and a fakefetch(no network, no new package).npm testbuilds and runs them.clTRID/langand thelogout()result), so that a later change of it is a conscious decision.Tooling
browserifyand@types/otplib, and@typescript-eslint/eslint-pluginandeslint-config-prettier.eslint.config.mjs) and thetypescript-eslintpackage. The current source needed no correction.npm auditreports 0 vulnerabilities..github/dependabot.ymlfor npm and GitHub Actions: weekly, grouped updates of development packages, a group for their security updates, a cooldown of 7 days.actions/checkout@v7andactions/setup-node@v7, explicit build and test steps. The job nameformatis unchanged, because it is the required status check.vplus the version ofpackage.json, and it runs the tests before the publish.package.jsonhas afilesfield. The package containslib,src,package.jsonandREADME.md(14 files; 3.3.0 had 19 with the workflow and configuration files).tsconfig.json:moduleiscommonjs. The compiled output is the same as before.How this was checked
fetch: 27 are identical. The other 2 differ only in the error text for a response that is not JSON and in the masked password of the debug output.Notes for the review
CI). Please look at its result.js-yamlpackage is no longer in the dependency tree, so Bump js-yaml from 4.1.0 to 4.1.1 #32 has no effect after this change and can be closed.