Synthetixio / synpress

Synpress is e2e testing framework based on Cypress.io and playwright with support for metamask.
https://synpress.io
MIT License
565 stars 179 forks source link

✨ feat: Run on windows with cache #1161

Closed Seroxdesign closed 1 week ago

Seroxdesign commented 2 weeks ago

Motivation and context

Add support for using Cache on x86 Windows OS

Does it fix any issue?

SYN-126

Other useful info

Quality checklist

⚠️👆 Delete any section you see irrelevant before submitting the pull request 👆⚠️

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
synpress ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2024 0:39am
Seroxdesign commented 2 weeks ago

file path management file:///${filePath.replace(/\\/g, '/').replace(/^([a-zA-Z]):/, (_, drive) => drive.toLowerCase())}

Seroxdesign commented 2 weeks ago

Resources on building files in win32 fs with tsup


Reported issue:

https://github.com/egoist/tsup/issues/1150

Seroxdesign commented 2 weeks ago

    filepath = filepath.replace(/\\/g, '/')
    if (!filepath.startsWith('./')) filepath = './' + filepath
    return filepath
}```

Once located maybe we can reconvert?
Seroxdesign commented 2 weeks ago

Error is occurring specifically here:

https://github.com/egoist/tsup/blob/796fc5030f68f929fecde7c94732e9a586ba7508/src/index.ts#L120C38-L121C1

TSUP is using a library called globby, which isn't handling windows paths properly, despite TSUP not having an issue (,: going to try and figure out what to do here

Additionally seems like this issue requires us to use only forward slashes (,:

https://github.com/sindresorhus/globby/issues/179

Seroxdesign commented 2 weeks ago

NOTE:

We need to update synpress-cache npm package and versioning in package.json before we merge this