Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/rollup/rollup into sync-e…
Browse files Browse the repository at this point in the history
…37b05c6
  • Loading branch information
docschina-bot committed Jan 11, 2024
2 parents 627bc37 + e37b05c commit 84683f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
# Windows
- host: windows-latest
build: npm run build:napi -- --release
build: RUSTFLAGS="-C target-feature=+crt-static" npm run build:napi -- --release
target: x86_64-pc-windows-msvc
- host: windows-latest
build: >-
Expand Down
6 changes: 3 additions & 3 deletions src/utils/commondir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export default function commondir(files: readonly string[]): string {
if (files.length === 1) return dirname(files[0]);
const commonSegments = files.slice(1).reduce(
(commonSegments, file) => {
const pathSegements = file.split(/\/+|\\+/);
const pathSegments = file.split(/\/+|\\+/);
let index;
for (
index = 0;
commonSegments[index] === pathSegements[index] &&
index < Math.min(commonSegments.length, pathSegements.length);
commonSegments[index] === pathSegments[index] &&
index < Math.min(commonSegments.length, pathSegments.length);
index++
);
return commonSegments.slice(0, index);
Expand Down

1 comment on commit 84683f4

@vercel
Copy link

@vercel vercel bot commented on 84683f4 Jan 11, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.