Conversation
- Remove unused ServiceEvents import (removed in 0.15) - Replace GenericObject with Record<string, any> (not exported in 0.15) - Fix logger type: Loggers namespace → Logger interface Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lodash 4.17.23, semver 7.7.4, axios 1.13.6, knex 3.2.6, mysql2 3.20.0, pg 8.20.0, prettier 3.8.1, qs 6.15.0, nodemon 3.1.14, @seald-io/nedb 4.1.2, sequelize 6.37.8, eslint-plugin-prettier 5.5.5 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Migrate .eslintrc.js → eslint.config.js (flat config) - Replace deprecated eslint-plugin-node with eslint-plugin-n - Remove eslint-plugin-prettier (handled by eslint-config-prettier) - Add @eslint/js, globals as new deps - Upgrade eslint-config-prettier 9→10, eslint-plugin-promise 6→7, eslint-plugin-security 2→4 - TypeScript 5.7→6.0: add ignoreDeprecations for node10 moduleResolution - tsconfig: moduleResolution node→node10 (explicit naming) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eslint-plugin-promise and eslint-plugin-security don't support ESLint 10 yet (peer dep: ^7 || ^8 || ^9). Downgrade to ESLint 9 which still uses flat config but is compatible with all plugins. Fixes npm ci failure in CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eslint-plugin-promise doesn't support ESLint 10 yet. Remove it instead of downgrading ESLint. The promise rules weren't actively used in this codebase anyway. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ignoreDeprecations and moduleResolution: node10 to test/typescript/tsconfig.json (same fix as root tsconfig). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Version bump 0.3.0 → 0.4.0 - Minimum Node.js: 20 → 22 - Peer dependency: ^0.14.12 || ^0.15.0-0 → ^0.15.0 - CI matrix: drop Node 20, keep 22 + 24 - Fix lint script for ESLint flat config (remove --ext) - Update CHANGELOG Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
No 0.15-specific APIs were introduced, so keep supporting both ^0.14.12 and ^0.15.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR prepares the @moleculer/database package for the v0.4.0 release by modernizing tooling (ESLint flat config, TS upgrade), updating supported runtimes (Node 22+ in CI/engines), and adding/adjusting TypeScript typings plus a TS compilation test project.
Changes:
- Add TypeScript configs + a compile-only TS “typings validation” project and CI workflow.
- Modernize tooling (ESLint flat config) and bump package version/engines/dependencies.
- Adjust typings and small runtime refactor in validation logic; minor docs/changelog updates.
Reviewed changes
Copilot reviewed 13 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Adds root TS config used by npm run typecheck for typings. |
test/typescript/tsconfig.json |
Adds strict TS project for compiling a typings validation test. |
test/typescript/index.ts |
Large compile-only TS file exercising public typings. |
src/validation.js |
Refactors field.set invocation to reuse a shared args object. |
src/index.js |
Updates JSDoc type for settings.scopes. |
package.json |
Bumps version to 0.4.0, adds typings entry + typecheck scripts, updates engines/deps/peer range. |
index.d.ts |
Introduces/updates the package’s public TypeScript declarations. |
eslint.config.js |
Migrates ESLint config to flat config. |
docs/README.md |
Escapes pipe characters in type tables. |
CHANGELOG.md |
Adds v0.4.0 entry describing breaking changes and updates. |
.github/workflows/unit.yml |
Drops Node 20 from unit test matrix. |
.github/workflows/integration.yml |
Drops Node 20 from integration test matrix. |
.github/workflows/typecheck.yml |
Adds CI workflow to run typecheck and TS compilation test. |
.eslintrc.js |
Removes legacy ESLint config file. |
.claude/settings.local.json |
Adds Claude Code local permissions config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "lib": ["es2020"], | ||
| "strict": true, | ||
| "noEmit": true, | ||
| "skipLibCheck": true, |
There was a problem hiding this comment.
This TypeScript test project is meant to validate the package's typings, but skipLibCheck: true suppresses errors inside declaration files (including ../../index.d.ts). That means broken or internally inconsistent type definitions can slip through CI. Consider setting skipLibCheck to false here (and fixing any upstream type issues explicitly) so the test actually validates the published typings.
| "skipLibCheck": true, | |
| "skipLibCheck": false, |
CHANGELOG.md
Outdated
| - add Moleculer 0.15 support (peer dependency: `^0.14.12 || ^0.15.0`). | ||
| - upgrade ESLint to 9 with flat config (`.eslintrc.js` → `eslint.config.js`). | ||
| - upgrade TypeScript to 6. | ||
| - remove `eslint-plugin-promise` (not compatible with ESLint 9+). |
There was a problem hiding this comment.
The changelog says "upgrade ESLint to 9" and references ESLint 9+ compatibility, but package.json in this PR bumps ESLint to ^10.1.0. Please update the v0.4.0 changelog entry to match the actual version being released so users don't get misleading upgrade notes.
| "peerDependencies": { | ||
| "moleculer": "^0.14.12 || ^0.15.0-0" | ||
| "moleculer": "^0.14.12 || ^0.15.0" | ||
| }, |
There was a problem hiding this comment.
PR description lists a breaking change "Minimum Moleculer version: 0.14.12 → 0.15.0", but the updated peerDependencies.moleculer still allows ^0.14.12. Either update the peer range to ^0.15.0 only (if 0.14 is no longer supported) or adjust the PR description/changelog to reflect that 0.14.x remains supported.
.claude/settings.local.json
Outdated
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(npm run test:ts:*)" | ||
| ], | ||
| "deny": [] | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
This file name (settings.local.json) suggests machine-local Claude Code configuration. Committing it may create noisy diffs and override contributors' local preferences. Consider moving this to a non-.local file intended for version control, or add .claude/settings.local.json to .gitignore if it should remain developer-specific.
- Fix CHANGELOG: ESLint 9 → 10 (actual version) - Remove .claude/settings.local.json from repo (local-only) - Add .claude/settings.local.json to .gitignore - Update PR description to reflect 0.14 compatibility kept Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sqlite3 6.0.1 requires Node.js >=20.17.0 (already met with Node 22+). No API breaking changes — only Node.js minimum version bump and bundled SQLite version update (3.45.0 → 3.52.0). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The lockfile was out of sync after dependency upgrades, causing npm ci to fail in GitHub Actions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- @vscode/sqlite3: 5.1.2 → 5.1.12-vscode - axios: 1.13.6 → 1.14.0 - globals: 16.5.0 → 17.4.0 - knex: 3.2.6 → 3.2.7 - mongodb: 6.16.0 → 6.21.0 - npm-check-updates: 16.14.20 → 19.6.6 - tedious: 18.6.2 → 19.2.1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npm on Node 24 (npm 11.x) requires optional platform-specific dependencies to be present in the lockfile even on Linux, otherwise npm ci fails with "Missing: fsevents" error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Node 24 ships with npm 11.9.0 which has a known bug (npm/cli#8805) where npm ci fails with "Missing: fsevents from lock file" when the lockfile was generated on Linux. fsevents is a macOS-only optional dep that's irrelevant on Linux CI runners. Using --omit=optional skips platform-specific optional deps entirely, which is the correct behavior for Linux CI and avoids the npm bug. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npm ci --omit=optional doesn't help because the lockfile validation happens before the omit filter is applied (npm/cli#8805). Instead, upgrade npm to latest (>=11.10.1) on Node 24.x runners where the bug is fixed. Only runs on 24.x matrix entries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npm ci fails on Node 24 due to a persistent fsevents lockfile bug (npm/cli#8805) that isn't fully fixed even in npm@latest (11.12.1). The bug causes npm ci to reject lockfiles generated on Linux because the macOS-only fsevents optional dep is missing. Switch to npm install which tolerates the missing optional dep entry. This is the recommended workaround until npm properly fixes the issue. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Breaking changes in mongodb 7.x that don't affect this adapter:
- Requires Node.js >=20.19.0 (already met with Node 22+)
- FindOptions no longer generic (not used in JS code)
- cursor.stream({ transform }) removed (not used)
- useNewUrlParser/useUnifiedTopology removed (not used)
- Default cursor batchSize removed (not relied upon)
Updated version check to accept both ^6.0.0 and ^7.0.0.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace GitHub branch references with npm registry versions now that both packages are officially released. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
ServiceEvents,GenericObject,Logger), keep peer dependency supporting both^0.14.12and^0.15.0enginesfieldBreaking changes
.eslintrc.js→eslint.config.js)Changes
index.d.ts: removeServiceEvents(unused), replaceGenericObject→Record<string, any>, fixLoggers→Loggereslint-plugin-node→eslint-plugin-n, dropeslint-plugin-promiseignoreDeprecations: "6.0"fornode10moduleResolutionTest plan
tsc --noEmit)npm cisucceeds without peer dep conflicts🤖 Generated with Claude Code