Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for Worker instances and module URLs in FsaNodeSyncAdapterWorker#1118

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Copilot wants to merge3 commits intomaster
base:master
Choose a base branch
Loading
fromcopilot/fix-974

Conversation

Copy link
Contributor

CopilotAI commentedJul 27, 2025
edited
Loading

TheFsaNodeSyncAdapterWorker.start() method now accepts either a Worker instance or a URL string, enabling compatibility with modern build tools like Vite that require module workers.

Changes Made

  • Changed the first parameter fromurl: string tourlOrWorker: string | Worker
  • Added automatic detection of module URLs containingtype=module to create workers with{ type: 'module' } options
  • Maintained full backward compatibility with existing string URL usage

Usage Examples

Traditional URL (backward compatible):

constadapter=awaitFsaNodeSyncAdapterWorker.start('/worker.js',dir);

Module URL (for Vite and similar frameworks):

importMyWorkerfrom'../worker?worker&url';// MyWorker becomes '/src/worker.ts?type=module&worker_file'constadapter=awaitFsaNodeSyncAdapterWorker.start(MyWorker,dir);

Pre-created Worker instance:

constworker=newWorker('/worker.js',{type:'module'});constadapter=awaitFsaNodeSyncAdapterWorker.start(worker,dir);

The implementation automatically detects URLs containingtype=module and creates the worker with the appropriate options, making the fsa-to-node module compatible with modern bundlers that use ES module workers.

Fixes#974.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Clickhere to start the survey.

CopilotAIand others added2 commitsJuly 27, 2025 10:11
…Worker implementationCo-authored-by: streamich <9773803+streamich@users.noreply.github.com>
…AdapterWorkerCo-authored-by: streamich <9773803+streamich@users.noreply.github.com>
CopilotAI changed the title[WIP] add ability for worker module creationAdd support for Worker instances and module URLs in FsaNodeSyncAdapterWorkerJul 27, 2025
CopilotAI requested a review fromstreamichJuly 27, 2025 10:21
Copilot finished work on behalf ofstreamichJuly 27, 2025 10:21
@streamichstreamich marked this pull request as ready for reviewJuly 27, 2025 16:18
@louwers
Copy link

@streamich Could you merge?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@streamichstreamichAwaiting requested review from streamich

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

add ability for worker module creation

3 participants

@louwers@streamich

[8]ページ先頭

©2009-2025 Movatter.jp