This repository was archived by the owner on Nov 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +13
-3
lines changed Expand file tree Collapse file tree 5 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ async function runTests(
123123 expectOnly : boolean ,
124124 tsLocal : string | undefined ,
125125) : Promise < void > {
126- const isOlderVersion = / ^ v \d + $ / . test ( basename ( dirPath ) ) ;
126+ const isOlderVersion = / ^ v ( 0 \. ) ? \d + $ / . test ( basename ( dirPath ) ) ;
127127
128128 const indexText = await readFile ( joinPaths ( dirPath , "index.d.ts" ) , "utf-8" ) ;
129129 // If this *is* on DefinitelyTyped, types-publisher will fail if it can't parse the header.
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export function isMainFile(fileName: string, allowNested: boolean) {
100100 let parent = dirname ( fileName ) ;
101101 // May be a directory for an older version, e.g. `v0`.
102102 // Note a types redirect `foo/ts3.1` should not have its own header.
103- if ( allowNested && / ^ v \d + $ / . test ( basename ( parent ) ) ) {
103+ if ( allowNested && / ^ v ( 0 \. ) ? \d + $ / . test ( basename ( parent ) ) ) {
104104 parent = dirname ( parent ) ;
105105 }
106106
Original file line number Diff line number Diff line change 1- // Type definitions for dt-header 1 .0
1+ // Type definitions for dt-header 2 .0
22// Project: https://github.com/bobby-headers/dt-header
33// Definitions by: Jane Doe <https://github.com/janedoe>
44// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
Original file line number Diff line number Diff line change 1+ // Type definitions for dt-header 0.75
2+ // Project: https://github.com/bobby-headers/dt-header
3+ // Definitions by: Jane Doe <https://github.com/janedoe>
4+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+ // Minimum TypeScript Version: 3.1
Original file line number Diff line number Diff line change 1+ // Type definitions for dt-header 1.0
2+ // Project: https://github.com/bobby-headers/dt-header
3+ // Definitions by: Jane Doe <https://github.com/janedoe>
4+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+ // Minimum TypeScript Version: 3.1
You can’t perform that action at this time.
0 commit comments