Skip to content

feat: add explicit platform detection helper - #670

Open
AkhilTrivediX wants to merge 1 commit into
apify:masterfrom
AkhilTrivediX:agent/clarify-platform-detection
Open

feat: add explicit platform detection helper#670
AkhilTrivediX wants to merge 1 commit into
apify:masterfrom
AkhilTrivediX:agent/clarify-platform-detection

Conversation

@AkhilTrivediX

Copy link
Copy Markdown

Summary

  • add Actor.isRunningOnApify() as the clearer platform-detection helper
  • keep Actor.isAtHome() available and mark it deprecated
  • verify both methods return the same result for local and platform environments

Why

isAtHome() is a legacy name that does not clearly describe what it checks. The new name communicates the platform condition directly without breaking existing callers.

Closes #537

Validation

  • corepack pnpm test (126 passed, 14 skipped)
  • corepack pnpm vitest run test/apify/utils.test.ts --silent
  • corepack pnpm compile
  • corepack pnpm lint
  • corepack pnpm exec oxfmt --check src/actor.ts test/apify/utils.test.ts
  • git diff --check

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.

More descriptive Actor.isAtHome

3 participants