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

Add cross platform path support to workerDirectory #2218

Closed
4 tasks done
Tornek opened this issue Jul 24, 2024 · 7 comments · Fixed by #2260
Closed
4 tasks done

Add cross platform path support to workerDirectory #2218

Tornek opened this issue Jul 24, 2024 · 7 comments · Fixed by #2260
Labels
bug Something isn't working DX good first issue Good for newcomers help wanted Extra attention is needed needs:triage Issues that have not been investigated yet. scope:node Related to MSW running in Node

Comments

@Tornek
Copy link

Tornek commented Jul 24, 2024

Prerequisites

Environment check

  • I'm using the latest msw version
  • I'm using Node.js version 18 or higher

Node.js version

20.15.1

Reproduction repository

Reproduction steps

To reproduce my problem you will need both a Mac and a Windows computer.
You need to write path with slashes in msw.workerDirectory in package.json. For example:

package.json
{
  ...,
  "msw": {
    "workerDirectory": "public/sw"
  },
  ...
}

And run your application with msw

Current behavior

On windows we get this message

image

On Mac we have Service Worker successfully created!

Expected behavior

We have Service Worker successfully created! on each computers

@Tornek Tornek added bug Something isn't working needs:triage Issues that have not been investigated yet. scope:node Related to MSW running in Node labels Jul 24, 2024
@kettanaito kettanaito added help wanted Extra attention is needed good first issue Good for newcomers DX labels Jul 30, 2024
@nabby27
Copy link

nabby27 commented Aug 6, 2024

Great project!

I'm gonna create a small bounty for this issue if you don't mind @kettanaito since I'll like to see this feature implemented

@mobley-trent
Copy link

I'd like to give this issue a go @kettanaito @nabby27

@ivanfernandez2646
Copy link
Contributor

@Tornek I think you use an old version of the library (for the message that you show).
Despite of is a minor problem, I'll try to solve it :)))

Keep in contact!

@ivanfernandez2646
Copy link
Contributor

@nabby27 The bot here is not working, is it installed in the project??. I'm trying to start working on it...

@nabby27
Copy link

nabby27 commented Sep 1, 2024

@ivanfernandez2646 Exactly, the Opire bot is not installed in this project but you can solve it anyway and claim the reward in your dashboard with the PR

@ivanfernandez2646
Copy link
Contributor

@Tornek as I said in the last version it works correctly.

I test on Windows and MacOs computers...

Also I create a PR prove of that with some tescases that cover this.

Thanks!!

@kettanaito @nabby27

@kettanaito
Copy link
Member

Released: v2.4.2 🎉

This has been released in v2.4.2!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working DX good first issue Good for newcomers help wanted Extra attention is needed needs:triage Issues that have not been investigated yet. scope:node Related to MSW running in Node
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@Tornek @kettanaito @nabby27 @ivanfernandez2646 @mobley-trent and others