-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Process gitignore-style patterns in
files
property of package.json
(
- Loading branch information
1 parent
009a185
commit 6d0ce6c
Showing
14 changed files
with
108 additions
and
2 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
3 changes: 3 additions & 0 deletions
3
source/test/fixtures/files-gitignore-patterns/negative-pattern-negated/index.js
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,3 @@ | ||
module.exports.default = (foo, bar) => { | ||
return foo + bar; | ||
}; |
7 changes: 7 additions & 0 deletions
7
source/test/fixtures/files-gitignore-patterns/negative-pattern-negated/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,7 @@ | ||
{ | ||
"name": "foo", | ||
"files": [ | ||
"!!types/index.d.ts" | ||
], | ||
"types": "types/index.d.ts" | ||
} |
6 changes: 6 additions & 0 deletions
6
source/test/fixtures/files-gitignore-patterns/negative-pattern-negated/types/index.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,6 @@ | ||
declare const concat: { | ||
(foo: string, bar: string): string; | ||
(foo: number, bar: number): number; | ||
}; | ||
|
||
export default concat; |
5 changes: 5 additions & 0 deletions
5
source/test/fixtures/files-gitignore-patterns/negative-pattern-negated/types/index.test-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,5 @@ | ||
import {expectType} from '../../../../..'; | ||
import concat from '..'; | ||
|
||
expectType<string>(concat('foo', 'bar')); | ||
expectType<number>(concat(1, 2)); |
6 changes: 6 additions & 0 deletions
6
source/test/fixtures/files-gitignore-patterns/negative-pattern/index.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,6 @@ | ||
declare const concat: { | ||
(foo: string, bar: string): string; | ||
(foo: number, bar: number): number; | ||
}; | ||
|
||
export default concat; |
3 changes: 3 additions & 0 deletions
3
source/test/fixtures/files-gitignore-patterns/negative-pattern/index.js
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,3 @@ | ||
module.exports.default = (foo, bar) => { | ||
return foo + bar; | ||
}; |
5 changes: 5 additions & 0 deletions
5
source/test/fixtures/files-gitignore-patterns/negative-pattern/index.test-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,5 @@ | ||
import {expectType} from '../../../..'; | ||
import concat from '.'; | ||
|
||
expectType<string>(concat('foo', 'bar')); | ||
expectType<number>(concat(1, 2)); |
6 changes: 6 additions & 0 deletions
6
source/test/fixtures/files-gitignore-patterns/negative-pattern/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": "foo", | ||
"files": [ | ||
"!index.d.ts" | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
source/test/fixtures/files-gitignore-patterns/root-marker-pattern/index.js
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,3 @@ | ||
module.exports.default = (foo, bar) => { | ||
return foo + bar; | ||
}; |
7 changes: 7 additions & 0 deletions
7
source/test/fixtures/files-gitignore-patterns/root-marker-pattern/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,7 @@ | ||
{ | ||
"name": "foo", | ||
"files": [ | ||
"/types/index.d.ts" | ||
], | ||
"types": "types/index.d.ts" | ||
} |
6 changes: 6 additions & 0 deletions
6
source/test/fixtures/files-gitignore-patterns/root-marker-pattern/types/index.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,6 @@ | ||
declare const concat: { | ||
(foo: string, bar: string): string; | ||
(foo: number, bar: number): number; | ||
}; | ||
|
||
export default concat; |
5 changes: 5 additions & 0 deletions
5
source/test/fixtures/files-gitignore-patterns/root-marker-pattern/types/index.test-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,5 @@ | ||
import {expectType} from '../../../../..'; | ||
import concat from '..'; | ||
|
||
expectType<string>(concat('foo', 'bar')); | ||
expectType<number>(concat(1, 2)); |
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