Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The vendored Playwright client is verified by a byte-exact SHA-256 digest
# (scripts/build-playwright-sandbox-client.mjs), and the generated bundle is
# byte-compared against a fresh esbuild output. Both must therefore check out
# identically on every platform, regardless of core.autocrlf.
src/browser/run/playwright-client/vendor/** text eol=lf
src/browser/run/generated/playwright-client.js text eol=lf
4 changes: 2 additions & 2 deletions scripts/build-playwright-sandbox-client.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createHash } from 'node:crypto';
import { mkdtemp, readFile, readdir, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { join, sep } from 'node:path';
import { build } from 'esbuild';

const output = 'src/browser/run/generated/playwright-client.js';
Expand All @@ -24,7 +24,7 @@ async function vendorDigest(directory) {
await walk(directory);
const hash = createHash('sha256');
for (const file of files.sort()) {
const entry = file.slice(directory.length + 1);
const entry = file.slice(directory.length + 1).split(sep).join('/');
hash.update(entry);
hash.update('\0');
hash.update(await readFile(file));
Expand Down
1 change: 0 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default defineConfig({
test: {
name: 'unit',
include: ['src/**/*.test.ts'],
exclude: ['src/browser/**/*.test.ts'],
sequence: { groupOrder: 0 },
},
},
Expand Down