-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lib):
fileURLToPath
, pathToFileURL
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
587e890
commit 5c6035d
Showing
27 changed files
with
799 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,7 +299,6 @@ jobs: | |
matrix: | ||
node-version: | ||
- 22 | ||
- 20 | ||
steps: | ||
- id: checkout | ||
name: Checkout ${{ env.REF_NAME }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* @file Unit Tests - PlatformOptions | ||
* @module pathe/interfaces/tests/unit-d/PlatformOptions | ||
*/ | ||
|
||
import type { Nilable } from '@flex-development/tutils' | ||
import type TestSubject from '../platform-options' | ||
|
||
describe('unit-d:interfaces/PlatformOptions', () => { | ||
it('should match [windows?: boolean | null | undefined]', () => { | ||
expectTypeOf<TestSubject>() | ||
.toHaveProperty('windows') | ||
.toEqualTypeOf<Nilable<boolean>>() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* @file Interfaces - PlatformOptions | ||
* @module pathe/lib/PlatformOptions | ||
*/ | ||
|
||
/** | ||
* Platform-specific options. | ||
*/ | ||
interface PlatformOptions { | ||
/** | ||
* Use windows-specific logic. | ||
*/ | ||
windows?: boolean | null | undefined | ||
} | ||
|
||
export type { PlatformOptions as default } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* @file Unit Tests - isURL | ||
* @module pathe/internal/tests/unit/isURL | ||
*/ | ||
|
||
import testSubject from '../is-url' | ||
|
||
describe('unit:internal/isURL', () => { | ||
it.each<Parameters<typeof testSubject>>([ | ||
[null], | ||
['https://github.com/flex-development/errnode'], | ||
[{ href: 'file://host/a', path: '/a', pathname: '/a', protocol: 'file:' }] | ||
])('should return `false` if `value` is not URL-like (%#)', value => { | ||
expect(testSubject(value)).to.be.false | ||
}) | ||
|
||
it.each<Parameters<typeof testSubject>>([ | ||
[new URL('https://github.com/flex-development/pathe')], | ||
[{ href: 'file:///', pathname: '/', protocol: 'file:' }] | ||
])('should return `true` if `value` is URL-like (%#)', value => { | ||
expect(testSubject(value)).to.be.true | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* @file Internal - domainToASCII | ||
* @module pathe/internal/domainToASCII/browser | ||
*/ | ||
|
||
export { toASCII as default } from 'punycode.js' |
Oops, something went wrong.