Skip to content

port to @scanii/core, bump Lambda runtime to nodejs24.x#107

Merged
rferreira merged 6 commits into
mainfrom
change/use-scanii-node
Apr 30, 2026
Merged

port to @scanii/core, bump Lambda runtime to nodejs24.x#107
rferreira merged 6 commits into
mainfrom
change/use-scanii-node

Conversation

@rferreira

Copy link
Copy Markdown
Collaborator

Summary

  • Replace bespoke axios-based lib/client.js (which had retry logic violating SDK Principle 3) with @scanii/core 1.1.0
  • Drop axios, serialize-javascript, and sinon from dependencies
  • Remove MAX_ATTEMPTS / MAX_ATTEMPT_DELAY_MSEC config (no retry)
  • Bump Lambda runtime from nodejs20.xnodejs24.x in template.yml

Test plan

  • npm test — 25 passing locally
  • Deploy to a real stack and verify S3 trigger → scanii fetch → callback flow end-to-end

🤖 Generated with Claude Code

rferreira and others added 6 commits April 30, 2026 00:16
- Replace bespoke axios-based client (with retry logic) with @scanii/core
- Drop axios, serialize-javascript, sinon from deps
- Remove MAX_ATTEMPTS / MAX_ATTEMPT_DELAY_MSEC config (no retry per SDK principles)
- Bump Lambda runtime from nodejs20.x to nodejs22.x

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep the existing retry logic as a local wrapper in lib/client.js that
delegates to @scanii/core's ScaniiClient. Restores MAX_ATTEMPTS /
MAX_ATTEMPT_DELAY_MSEC config and the retry unit tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add cases for: success on first attempt, success after one transient
failure, exhausted attempts with correct count, and maxAttempts respected
across N failures. Use maxAttemptDelay=0 to keep tests instant.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- pr.yaml → pr.yml: add concurrency cancel, multi-OS matrix
  (ubuntu/macos/windows), node 22+24, npm ci
- main.yaml → release.yml: trigger on release published instead of
  push to main; bump node to 24; add header comment

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
node_modules/mocha/bin/_mocha is not executable on Windows; npm scripts
add node_modules/.bin to PATH so the mocha alias works cross-platform.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rferreira
rferreira merged commit 90750d5 into main Apr 30, 2026
6 checks passed
@rferreira
rferreira deleted the change/use-scanii-node branch April 30, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant