Skip to content

Commit

Permalink
fix: file path normalization on Windows (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: HiDeoo <[email protected]>
  • Loading branch information
Genteure and HiDeoo authored Nov 6, 2023
1 parent dbe5b00 commit ba1be29
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
12 changes: 8 additions & 4 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ on:
jobs:
lint_test:
name: Lint & Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -35,8 +39,8 @@ jobs:
run: pnpm astro sync
working-directory: example

- name: Lint
run: pnpm lint

- name: Test
run: pnpm test

- name: Lint
run: pnpm lint
2 changes: 1 addition & 1 deletion packages/starlight-links-validator/libs/remark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function normalizeFilePath(filePath?: string) {
.replace(/\.\w+$/, '')
.replace(/index$/, '')
.replace(/\/?$/, '/')
.split('/')
.split(/[/\\]/)
.map((segment) => slug(segment))
.join('/')
}
Expand Down
2 changes: 1 addition & 1 deletion packages/starlight-links-validator/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { defineConfig } from 'vitest/config'

export default defineConfig({
test: {
testTimeout: 15_000,
testTimeout: 30_000,
},
})

0 comments on commit ba1be29

Please sign in to comment.