feat: add ability to get playwright version from lock file#1112
feat: add ability to get playwright version from lock file#1112ferrandiaz merged 12 commits intomainfrom
Conversation
sorccu
left a comment
There was a problem hiding this comment.
This seems overly complicated. Looking at https://github.com/microsoft/playwright/blob/a6cb0093567e3d539f93978362a8fa784c73f2fe/packages/playwright-test/package.json, @playwright/test exports its own package.json. Is the following not enough?
const { version } = require('@playwright/test/package.json')
Or am I misunderstanding what exactly you need from there?
|
@sorccu We are trying to get it from the lock file, so the exact version the user is using. |
|
Do you mean exact version ( |
|
@sorccu I mean exact version |
|
That's exactly what you get with the snippet I posted. Though it has one caveat: it only works correctly as long as the CLI itself does not have Alternatively you could look up the closest |
This comment has been minimized.
This comment has been minimized.
|
🎉 Experimental release successfully published on npm |
sorccu
left a comment
There was a problem hiding this comment.
I still think that require() or import() could have been used for this, but alright.
Affected Components
Notes for the Reviewer
Add ability to parse lock files and get the playwright version from them so we can populate it as part of the playwright check
Filter out non playwright checks for
pw-testcommandFix: Allow running
pw-teston private locations