Skip to content
Open
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
42 changes: 32 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"fastify-plugin": "^5.1.0",
"fastify-type-provider-zod": "^6.1.0",
"newrelic": "^13.12.0",
"opinionated-machine": "^4.0.0",
"opinionated-machine": "^6.12.1",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find usages of opinionated-machine and verify package info

echo "=== Finding imports/usages of opinionated-machine ==="
rg -n "opinionated-machine" --type ts --type js -g '!node_modules' -g '!package*.json'

echo ""
echo "=== Checking for any state machine related patterns ==="
# Look for common state machine patterns that might use this library
rg -n -C3 "createMachine|StateMachine|machine\s*\(" --type ts --type js -g '!node_modules'

echo ""
echo "=== Package info from npm ==="
curl -s https://registry.npmjs.org/opinionated-machine/6.12.1 | jq '{name: .name, version: .version, description: .description}' 2>/dev/null || echo "Could not fetch package info"

Repository: lokalise/ce-connector-template-node

Length of output: 1634


🌐 Web query:

opinionated-machine npm changelog breaking changes v6

💡 Result:

opinionated-machine v6 “changelog” + breaking changes

There is no standalone CHANGELOG.md in the repo; v6 changes are tracked via git tags/commits (e.g. v6.0.0, v6.12.1). (github.com)

Latest v6

Breaking changes introduced in v6.0.0 (tagged Jan 28, 2026)

  1. SSE controller registration was refactored
    • resolveSSEControllers() is removed; SSE controllers are now returned from resolveControllers(diOptions) alongside REST controllers, and auto-detected/registered as SSE. (github.com)
  2. resolveControllers signature changed
    • Examples/documentation were updated from resolveControllers() to resolveControllers(diOptions: DependencyInjectionOptions). (github.com)
  3. How to wire asSSEControllerClass changed
    • You now call asSSEControllerClass(..., { diOptions }) inside resolveControllers(diOptions) (not in a separate resolveSSEControllers). (github.com)

(Reference: the v6.0.0 change is primarily the commit “Refactor SSE controller registration to use resolveControllers (#101)”.) (github.com)

Citations:


🏁 Script executed:

#!/bin/bash
# Search for resolveControllers usage pattern
echo "=== Finding resolveControllers calls ==="
rg -n "resolveControllers" --type ts --type js -g '!node_modules'

echo ""
echo "=== Finding resolveSSEControllers calls (should be removed in v6) ==="
rg -n "resolveSSEControllers" --type ts --type js -g '!node_modules'

echo ""
echo "=== Finding asSSEControllerClass usage ==="
rg -n "asSSEControllerClass" --type ts --type js -g '!node_modules'

Repository: lokalise/ce-connector-template-node

Length of output: 579


🏁 Script executed:

#!/bin/bash
# Check the resolveControllers implementations
echo "=== TemplateAdapterModule.ts resolveControllers ==="
sed -n '44,55p' src/modules/adapter/TemplateAdapterModule.ts

echo ""
echo "=== ConnectorShellModule.ts resolveControllers ==="
sed -n '47,60p' src/modules/connector-shell/ConnectorShellModule.ts

echo ""
echo "=== CommonModule.ts resolveControllers ==="
sed -n '47,60p' src/infrastructure/CommonModule.ts

echo ""
echo "=== Check imports in these files to understand base class ==="
head -20 src/modules/adapter/TemplateAdapterModule.ts

Repository: lokalise/ce-connector-template-node

Length of output: 2686


Critical: This v6 upgrade requires code changes before it can be merged.

The v6.0.0 release introduced a breaking change: resolveControllers() now requires a diOptions: DependencyInjectionOptions parameter. The codebase has three implementations of this method (in TemplateAdapterModule.ts, ConnectorShellModule.ts, and CommonModule.ts) that use the old signature without parameters. All three must be updated to accept the required parameter:

resolveControllers(diOptions: DependencyInjectionOptions): MandatoryNameAndRegistrationPair<unknown> {
  // existing implementation
}

Without these updates, TypeScript compilation will fail due to abstract method signature mismatch when using v6.12.1.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 42, Update the three resolveControllers implementations
to match the new v6 signature by adding the required parameter: change
resolveControllers() to resolveControllers(diOptions:
DependencyInjectionOptions): MandatoryNameAndRegistrationPair<unknown> in
TemplateAdapterModule (resolveControllers), ConnectorShellModule
(resolveControllers), and CommonModule (resolveControllers); ensure you import
DependencyInjectionOptions (and MandatoryNameAndRegistrationPair if missing) and
propagate/use or explicitly ignore the diOptions parameter so the method
signatures match the abstract declaration and TypeScript compiles.

"pino": "^10.2.0",
"undici": "^7.22.0",
"zod": "^4.3.6"
Expand Down
Loading