Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #541

Merged
merged 1 commit into from
Apr 19, 2024
Merged

Version Packages #541

merged 1 commit into from
Apr 19, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 18, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

anywidget@0.9.8

Patch Changes

  • experimental Ensure anywidget.experimental.command is called with self (#545)

  • experimental Replace invoke timeout with more flexible AbortSignal (#540)

    This allows more flexible control over aborting the invoke request, including delegating to third-party libraries that manage cancellation.

    export default {
      async render({ model, el }) {
        const controller = new AbortController();
    
        // Randomly abort the request after 1 second
        setTimeout(() => Math.random() < 0.5 && controller.abort(), 1000);
    
        const signal = controller.signal;
        model
          .invoke("echo", "Hello, world", { signal })
          .then((result) => {
            el.innerHTML = result;
          })
          .catch((err) => {
            el.innerHTML = `Error: ${err.message}`;
          });
      },
    };
  • Updated dependencies [a4b0ec07b2b8937111487108e9b82daf3d9be2df]:

    • @anywidget/types@0.1.9

@anywidget/react@0.0.7

Patch Changes

@anywidget/svelte@0.0.8

Patch Changes

@anywidget/types@0.1.9

Patch Changes

  • experimental Replace invoke timeout with more flexible AbortSignal (#540)

    This allows more flexible control over aborting the invoke request, including delegating to third-party libraries that manage cancellation.

    export default {
      async render({ model, el }) {
        const controller = new AbortController();
    
        // Randomly abort the request after 1 second
        setTimeout(() => Math.random() < 0.5 && controller.abort(), 1000);
    
        const signal = controller.signal;
        model
          .invoke("echo", "Hello, world", { signal })
          .then((result) => {
            el.innerHTML = result;
          })
          .catch((err) => {
            el.innerHTML = `Error: ${err.message}`;
          });
      },
    };

@manzt manzt merged commit 7daa99b into main Apr 19, 2024
@manzt manzt deleted the changeset-release/main branch April 19, 2024 18:43
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