Skip to content

Conversation

@TooTallNate
Copy link
Member

@TooTallNate TooTallNate commented Nov 6, 2025

Add a new @workflow/utils package to extract common utility functions.

  • Created a new @workflow/utils package with common utility functions:
    • parseDurationToDate() - Parses duration strings, numbers, or Date objects
    • withResolvers() - Polyfill for Promise.withResolvers()
    • once() - Creates a lazily-evaluated, memoized function
    • PromiseWithResolvers - Type interface for promise resolvers
  • Moved these utility functions from the core package to the new utils package
  • Updated imports in the core package to use the new utils package
  • Added tests for the utility functions in the new package

@changeset-bot
Copy link

changeset-bot bot commented Nov 6, 2025

🦋 Changeset detected

Latest commit: b1a6da0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@workflow/utils Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/web-shared Patch
workflow Patch
@workflow/sveltekit Patch
@workflow/world-testing Patch
@workflow/ai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Nov 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview Comment Nov 6, 2025 9:39pm
example-nextjs-workflow-webpack Ready Ready Preview Comment Nov 6, 2025 9:39pm
example-workflow Ready Ready Preview Comment Nov 6, 2025 9:39pm
workbench-nitro-workflow Ready Ready Preview Comment Nov 6, 2025 9:39pm
workbench-nuxt-workflow Ready Ready Preview Comment Nov 6, 2025 9:39pm
workbench-sveltekit-workflow Ready Ready Preview Comment Nov 6, 2025 9:39pm
workbench-vite-workflow Ready Ready Preview Comment Nov 6, 2025 9:39pm
workflow-docs Ready Ready Preview Comment Nov 6, 2025 9:39pm

Copy link
Member Author

TooTallNate commented Nov 6, 2025

Copy link
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

Seems fine to me! Are there already plans to use this outside of core?

@TooTallNate
Copy link
Member Author

@VaguelySerious See the next PR from this stack

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.

4 participants