Skip to content

Commit 7156864

Browse files
authored
fix: always include pnpm-workspace.yaml for Playwright checks if present (#1164)
* fix: always include pnpm-workspace.yaml for Playwright checks if present Earlier, it was included because we added lockfiles using a glob pattern which happened to match the workspace file as well. Now that we are only including the lockfile we detect, we have to add the workspace file manually. Done in an extremely simple manner because proper workspace support will follow soon. * fix: resolve extra file path relative to context dir
1 parent 7458782 commit 7156864

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/cli/src/services/util.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,12 @@ export function getPlaywrightVersionFromPackage (cwd: string): string {
273273
}
274274
}
275275

276+
// Temporarily always include these extra files (if present) until they can
277+
// be properly supported.
278+
const extraFiles = [
279+
'pnpm-workspace.yaml',
280+
]
281+
276282
export async function loadPlaywrightProjectFiles (
277283
dir: string, pwConfigParsed: PlaywrightConfig, include: string[], archive: Archiver,
278284
lockFile: string,
@@ -296,6 +302,9 @@ export async function loadPlaywrightProjectFiles (
296302
for (const includePattern of include) {
297303
archive.glob(includePattern, { cwd: path.join(dir, '/') }, { mode })
298304
}
305+
for (const filePath of extraFiles) {
306+
archive.file(path.resolve(dir, filePath), { name: filePath, mode })
307+
}
299308
}
300309

301310
export async function findRegexFiles (directory: string, regex: RegExp, ignorePattern: string[]):

0 commit comments

Comments
 (0)