Reconcile master: bring DX (#4) and pnpm (#5) changes onto master#6
Merged
Conversation
- startExecution now resolves to the final output, so callers can write
`const out = await sm.startExecution(input)` without a separate call
- getExecutionResult is non-mutating (was popping the steps array, so a second
call returned a different value); repeated calls now return the same result
- the constructor accepts a bare Amazon States Language definition
(`new Sfn({ StartAt, States })`) in addition to `new Sfn({ StateMachine })`
All three are additive; the previous usage continues to work.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QznGWnSQuwvNRAcYinsZiG
- ship both entry points: index.js (CJS) and index.mjs (ESM) behind an `exports` map with per-condition `types`, plus a `module` field - add index.d.mts (ESM types) alongside index.d.ts (CJS); both type-check under node16 module resolution; constructor/return types updated for the new ergonomics - clear all npm audit advisories via overrides: underscore ^1.13.8 (fixes the jsonpath -> underscore high advisory that reaches consumers) and js-yaml ^4.2.0 (the dev-only istanbul advisory); `npm audit` now reports 0 - add a dual-loading smoke test (test/smoke.mjs) wired into CI on every Node version, and run CI on all pull requests (so PRs stacked on feature branches are covered) - lint index.mjs (ESM) and document ESM/CJS usage in the README Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QznGWnSQuwvNRAcYinsZiG
- pin pnpm via the `packageManager` field (Corepack) and commit pnpm-lock.yaml (replacing package-lock.json) - move the dependency `overrides` to `pnpm.overrides` (pnpm doesn't read npm's top-level overrides), keeping `npm audit` / `pnpm audit` at 0 advisories - add .npmrc `auto-install-peers=false` so the optional `serverless` peer (and its large tree) is not pulled into the dev install, matching npm's behavior - acknowledge jest's optional native resolver (unrs-resolver) as an ignored build dependency; jest uses its JS fallback, which keeps installs robust on brand-new Node releases - CI: install pnpm via pnpm/action-setup, cache the pnpm store, and run `pnpm install --frozen-lockfile` + pnpm lint/test/test:smoke - husky pre-commit now runs `pnpm exec lint-staged` - README: document pnpm install/usage Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QznGWnSQuwvNRAcYinsZiG
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.
Why this PR exists
PRs #3, #4, and #5 were a stack, but the merge order stranded #4 and #5:
…gfy802→master…gfy802-dx→…gfy802…gfy802-pnpm→…gfy802-dxBecause #3 was merged into
masterbefore #4 and #5 were merged into their intermediate branches,masteronly ever received #3's content. GitHub marks #4 and #5 as "merged", but their changes never propagated up tomaster.This PR merges the top of the stack directly into
masterto reconcile it. The merge base is the #3 branch tip,masterhas no divergence beyond it, and a dry-run merge is conflict-free.What this brings to master (3 commits, 16 files)
b390703— ergonomic API + footgun fixes (backwards compatible):startExecutionresolves to final output, non-mutatinggetExecutionResult(), bare-ASL constructor97f63d1— dual ESM/CJS packaging,index.d.mtstypes,npm audit→ 0 advisories12c5f54— npm → pnpm dev workflow (pnpm-lock.yaml,.npmrc, CI on pnpm)New files that are currently missing from
master:index.mjs,index.d.mts,pnpm-lock.yaml,.npmrc,test/smoke.mjs(andpackage-lock.jsonis removed in favor of the pnpm lockfile).🤖 Generated with Claude Code
https://claude.ai/code/session_013D5eGpjUUFCkfiucRJz166
Generated by Claude Code