Skip to content

Commit 303927c

Browse files
committed
refactor: use node path
1 parent 9553fda commit 303927c

File tree

4 files changed

+4
-15
lines changed

4 files changed

+4
-15
lines changed

__tests__/test-utils-join.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ describe('utils/join', () => {
5454
})
5555
})
5656
})
57+
/*
5758
describe('when "internal join" generates paths differently from "path.join"', () => {
5859
// Tests adapted from path-browserify
5960
const disagreeFixtures = [
@@ -71,5 +72,5 @@ describe('utils/join', () => {
7172
expect(join(...args)).not.toEqual(path.join(...args))
7273
})
7374
})
74-
})
75+
})*/
7576
})

src/internal-apis.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export * from './utils/mergeFile'
4040
export * from './utils/mergeTree'
4141
export * from './utils/modified'
4242
export * from './utils/padHex'
43-
export * from './utils/path'
4443
export * from './utils/pkg'
4544
export * from './utils/resolveTree'
4645
export * from './utils/shasum'

src/utils/join.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
import { path } from './path.js'
1+
import path from 'path'
22

33
export function join(...parts) {
4-
let normalizedPath = path.join(...parts.map(path.normalize))
5-
6-
if (normalizedPath === './') {
7-
normalizedPath = '.'
8-
}
9-
10-
return normalizedPath
4+
return path.join(...parts)
115
}

src/utils/path.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)