Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: force the use of posix path separators for ts module graphs (#8149)
- Loading branch information
Showing
9 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
packages/core/integration-tests/test/integration/ts-types/windows-paths/expected.d.ts
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,18 @@ | ||
type Params = { | ||
hello: number; | ||
}; | ||
interface Hello { | ||
yo: string; | ||
} | ||
export class Test { | ||
test(hello: Hello): string; | ||
} | ||
export function test(params: Params): number; | ||
export function foo(): number; | ||
export var x: number; | ||
export var hi: number; | ||
export declare module mod { | ||
function bar(): number; | ||
} | ||
|
||
//# sourceMappingURL=types.d.ts.map |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/ts-types/windows-paths/index.ts
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 @@ | ||
export * from './src/index'; |
6 changes: 6 additions & 0 deletions
6
packages/core/integration-tests/test/integration/ts-types/windows-paths/package.json
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 @@ | ||
{ | ||
"name": "ts-types-main", | ||
"private": true, | ||
"main": "dist/main.js", | ||
"types": "dist/types.d.ts" | ||
} |
31 changes: 31 additions & 0 deletions
31
packages/core/integration-tests/test/integration/ts-types/windows-paths/src/index.ts
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,31 @@ | ||
type Params = { | ||
hello: number; | ||
}; | ||
|
||
interface Hello { | ||
yo: string; | ||
} | ||
|
||
export class Test { | ||
test(hello: Hello) { | ||
return hello.yo; | ||
} | ||
} | ||
|
||
export function test(params: Params) { | ||
return params.hello; | ||
} | ||
|
||
export function foo() { | ||
return 2; | ||
} | ||
|
||
var x = 2; | ||
var p = x + 2, q = 3; | ||
export {p as hi, x}; | ||
|
||
export module mod { | ||
export function bar() { | ||
return 2; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/core/integration-tests/test/integration/ts-types/windows-paths/tsconfig.json
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,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"removeComments": true, | ||
"baseUrl": ".", | ||
"paths": { | ||
"@parcel/*": ["../../*"] | ||
} | ||
} | ||
} |
Empty file.
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