diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index caac36d64..a7e29d20f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,8 @@ # Readiness checklist -- [ ] I added/updated tests. -- [ ] I ensured that the PR title is good enough for the changelog. -- [ ] I labeled the PR. -- [ ] I self-reviewed the PR. +- [ ] I added/updated tests. +- [ ] I ensured that the PR title is good enough for the changelog. +- [ ] I labeled the PR. +- [ ] I self-reviewed the PR. diff --git a/README_dev.md b/README_dev.md index 5db82fb89..c4097b106 100644 --- a/README_dev.md +++ b/README_dev.md @@ -8,11 +8,11 @@ This workspace provides two types of scripts: -- root level scripts (like lints): +- root level scripts (like lints): These can be run by `npm run ` from the root of the project. -- package level scripts (like tests): +- package level scripts (like tests): These can be run by `npm run ` from the package directory or by `npm run -w packages/ ` from the root of the project. @@ -20,11 +20,11 @@ This workspace provides two types of scripts: ## Linting -- TypeScript: - - Each package provides its own TypeScript linting script. You can run it by `npm run lint:tsc` from the package directory or by `npm run -w packages/ lint:tsc` from the root of the project. - - The root project also provides a script that lints all packages. You can run it by `npm run lint:tsc` from the root of the project. -- Prettier: Run `npm run lint:prettier` from the root of the project. -- ESLint: Run `npm run lint:eslint` from the root of the project. +- TypeScript: + - Each package provides its own TypeScript linting script. You can run it by `npm run lint:tsc` from the package directory or by `npm run -w packages/ lint:tsc` from the root of the project. + - The root project also provides a script that lints all packages. You can run it by `npm run lint:tsc` from the root of the project. +- Prettier: Run `npm run lint:prettier` from the root of the project. +- ESLint: Run `npm run lint:eslint` from the root of the project. ## Check for outdated dependencies @@ -36,9 +36,9 @@ To check for outdated dependencies, run `npm run outdated`. This will check the Set the following environment variables: -- `NMSHD_TEST_BASEURL` (the Backbone baseUrl to test against) -- `NMSHD_TEST_CLIENTID` (the Backbone clientId for the configured baseUrl) -- `NMSHD_TEST_CLIENTSECRET` (the Backbone clientSecret for the configured baseUrl) +- `NMSHD_TEST_BASEURL` (the Backbone baseUrl to test against) +- `NMSHD_TEST_CLIENTID` (the Backbone clientId for the configured baseUrl) +- `NMSHD_TEST_CLIENTSECRET` (the Backbone clientSecret for the configured baseUrl) > We recommend to persist these variables for example in your `.bashrc` / `.zshrc` or in the Windows environment variables. @@ -52,17 +52,17 @@ npm run start:backbone Set the following environment variables: -- `NMSHD_TEST_BASEURL` to `http://localhost:8090` -- `NMSHD_TEST_CLIENTID` to `test` -- `NMSHD_TEST_CLIENTSECRET` to `test` +- `NMSHD_TEST_BASEURL` to `http://localhost:8090` +- `NMSHD_TEST_CLIENTID` to `test` +- `NMSHD_TEST_CLIENTSECRET` to `test` > We recommend to persist these variables for example in your `.bashrc` / `.zshrc` or in the Windows environment variables. ### Running the tests -- a specific database: `npm run test:local:[mongodb|lokijs|ferretdb]` -- a specific test suite: `npm run test:local:[mongodb|lokijs|ferretdb] -- testSuiteName` -- with code coverage: `npm run test:local:[mongodb|lokijs|ferretdb] -- --coverage`, a result summary is written to the console, a detailed report is accessible via the path `coverage/lcov-report/index.html` +- a specific database: `npm run test:local:[mongodb|lokijs|ferretdb]` +- a specific test suite: `npm run test:local:[mongodb|lokijs|ferretdb] -- testSuiteName` +- with code coverage: `npm run test:local:[mongodb|lokijs|ferretdb] -- --coverage`, a result summary is written to the console, a detailed report is accessible via the path `coverage/lcov-report/index.html` ### Teardown @@ -74,15 +74,15 @@ After testing on MongoDB or FerretDB, you can run `npm run test:local:teardown` Examples: -- Doesn't build at all -- Module not found -- Something is undefined which should not be undefined (e.g. "TypeError: Cannot read property 'from_base64' of undefined") +- Doesn't build at all +- Module not found +- Something is undefined which should not be undefined (e.g. "TypeError: Cannot read property 'from_base64' of undefined") Solutions: -- Check if you have got absolute `"src/"` or `"/"` includes somewhere and change them to relative ones (`"../"`). -- Check if you have a cyclic reference somewhere (sometimes quite hard to find). In general, no class should include something from the root's `index.ts` export (looks like `import * from "../../"`). -- Check if you have `"/dist"` as suffix for includes (e.g. `"@nmshd/crypto/dist"`). This usually works fine within NodeJS, however Webpack (Browser Build) has some issues therein, resulting e.g. in the crypto lib being copied into the transport lib. It should be fixed, but you never know... +- Check if you have got absolute `"src/"` or `"/"` includes somewhere and change them to relative ones (`"../"`). +- Check if you have a cyclic reference somewhere (sometimes quite hard to find). In general, no class should include something from the root's `index.ts` export (looks like `import * from "../../"`). +- Check if you have `"/dist"` as suffix for includes (e.g. `"@nmshd/crypto/dist"`). This usually works fine within NodeJS, however Webpack (Browser Build) has some issues therein, resulting e.g. in the crypto lib being copied into the transport lib. It should be fixed, but you never know... ### Something about duplicating private properties @@ -92,5 +92,5 @@ Do not use abstract classes. Or deserialize-/fromUnknown doesn't find your class. -- Check if all (parent) classes up to Serializable(-Async) inclulde a `@schema` declaration with a type. -- You might have several different Serializable(-Async) instances up- and running. This usually happens if ts-serval/crypto/transport are not correctly imported. +- Check if all (parent) classes up to Serializable(-Async) inclulde a `@schema` declaration with a type. +- You might have several different Serializable(-Async) instances up- and running. This usually happens if ts-serval/crypto/transport are not correctly imported. diff --git a/package-lock.json b/package-lock.json index 1354fe12c..9ab45342a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,14 +18,14 @@ "@js-soft/eslint-config-ts": "^1.6.13", "@js-soft/license-check": "^1.0.9", "@types/jest": "^29.5.14", - "@types/node": "^22.9.3", + "@types/node": "^22.10.1", "enhanced-publish": "^1.1.3", "eslint": "^8.57.1", "jest": "^29.7.0", "jest-expect-message": "^1.1.3", "madge": "^8.0.0", "npm-check-updates": "^17.1.11", - "prettier": "^3.3.3", + "prettier": "^3.4.1", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "tsconfig-paths": "^4.2.0", @@ -2167,13 +2167,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", - "integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "node_modules/@types/qrcode": { @@ -2902,9 +2902,10 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.8.tgz", + "integrity": "sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -7562,10 +7563,11 @@ } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -9170,10 +9172,11 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "dev": true + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, + "license": "MIT" }, "node_modules/unique-filename": { "version": "3.0.0", @@ -9656,7 +9659,7 @@ "@js-soft/ts-utils": "^2.3.3", "@nmshd/core-types": "*", "@nmshd/crypto": "2.1.0", - "axios": "^1.7.7", + "axios": "^1.7.8", "fast-json-patch": "^3.1.1", "form-data": "^4.0.1", "https-proxy-agent": "^7.0.5", diff --git a/package.json b/package.json index 9603959c0..92d9c36d0 100644 --- a/package.json +++ b/package.json @@ -30,14 +30,14 @@ "@js-soft/eslint-config-ts": "^1.6.13", "@js-soft/license-check": "^1.0.9", "@types/jest": "^29.5.14", - "@types/node": "^22.9.3", + "@types/node": "^22.10.1", "enhanced-publish": "^1.1.3", "eslint": "^8.57.1", "jest": "^29.7.0", "jest-expect-message": "^1.1.3", "madge": "^8.0.0", "npm-check-updates": "^17.1.11", - "prettier": "^3.3.3", + "prettier": "^3.4.1", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", "tsconfig-paths": "^4.2.0", diff --git a/packages/transport/package.json b/packages/transport/package.json index 19503594d..0cda027fd 100644 --- a/packages/transport/package.json +++ b/packages/transport/package.json @@ -72,7 +72,7 @@ "@js-soft/ts-utils": "^2.3.3", "@nmshd/core-types": "*", "@nmshd/crypto": "2.1.0", - "axios": "^1.7.7", + "axios": "^1.7.8", "fast-json-patch": "^3.1.1", "form-data": "^4.0.1", "https-proxy-agent": "^7.0.5",