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
4 changes: 2 additions & 2 deletions packages/core/src/generators/ast/generate.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import { readFile } from 'node:fs/promises';
import { relative, sep } from 'node:path/posix';
import { relative, sep } from 'node:path';

import globParent from 'glob-parent';
import { globSync } from 'tinyglobby';
Expand Down Expand Up @@ -65,7 +65,7 @@ export async function processChunk(inputSlice, itemIndices) {
);

// The path is the relative path minus the extension
const relativePath = sep + withExt(relative(parent, path));
const relativePath = `/${withExt(relative(parent, path)).replaceAll(sep, '/')}`;
Comment on lines 4 to +68

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the exact same?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds like it is doing the opposite, converting any sep into / but that feels ... wrong? In Windows the \ sep should be used and not the / one 😅

@bmuenzenmeyer bmuenzenmeyer Sep 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels backwards - sep is the right way to do this AFAIK


let tree;

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/html/utils/copying.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function copyStaticAssets(config) {
} catch (err) {
if (err.code !== 'ENOENT') {
logger.error(
`[html-generator] Failed to copy asset from ${src} to ${dest}: ${err.message}`
`[html-generator] Failed to copy asset from ${src} to ${dest.replaceAll('\\', '/')}: ${err.message}`
);
}
}
Expand Down
3 changes: 1 addition & 2 deletions scripts/comparators/file-size.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ if (changed.length) {
base === 0 ? '' : ` (${sign}${((diff / base) * 100).toFixed(1)}%)`;
const diffFormatted = `${sign}${formatBytes(diff)}${percent}`;

return `| \`${file}\` | ${baseStats.has(file) ? formatBytes(base) : '—'} | ${headStats.has(file) ? formatBytes(head) : '—'} | ${diffFormatted} |`;
return `| \`${file.replace(/\\/g, '/')}\` | ${baseStats.has(file) ? formatBytes(base) : '—'} | ${headStats.has(file) ? formatBytes(head) : '—'} | ${diffFormatted} |`;
});

sections.push(
[
`**Output size:** ${changed.length} ${changed.length === 1 ? 'file' : 'files'} changed · net ${totalSign}${formatBytes(totalDiff)}`,
Expand Down
4 changes: 2 additions & 2 deletions scripts/comparators/object-assertion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const details = (summary, diff) =>

const getFileDiff = async file => {
if (!baseFileSet.has(file)) {
return `- \`${file}\` added`;
return `- \`${file.replace(/\\/g, '/')}\` added`;
}

if (!headFileSet.has(file)) {
return `- \`${file}\` removed`;
return `- \`${file.replace(/\\/g, '/')}\` removed`;
}

const basePath = join(BASE, file);
Expand Down
Loading