Skip to content

Commit 32ec992

Browse files
committed
feat: add one exception to default forceignore "no dot files" rules for IDE use
1 parent e4ff2f2 commit 32ec992

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/resolve/forceIgnore.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,22 @@ export class ForceIgnore {
2828

2929
private readonly parser?: Ignore;
3030
private readonly forceIgnoreDirectory?: string;
31-
private DEFAULT_IGNORE = ['**/*.dup', '**/.*', '**/package2-descriptor.json', '**/package2-manifest.json'];
31+
private DEFAULT_IGNORE = [
32+
'**/*.dup',
33+
// I know it's ugly. But I want to be able to retrieve metadata to a local dir, segregated by org.
34+
// and `.sf` is already ignored in projects, and we already have orgIds for STL
35+
// so this nastiness is "ignore all dot files except this one directory"
36+
// once you ignore a parent ex `**/.*` you can't unignore something inside that path, at least with the curent ignore library
37+
'**/.*',
38+
'!.sf',
39+
'**/.sf/**',
40+
'!**/.sf/orgs',
41+
'!**/.sf/orgs/*',
42+
'!**/.sf/orgs/*/remoteMetadata',
43+
'!**/.sf/orgs/*/remoteMetadata/**',
44+
'**/package2-descriptor.json',
45+
'**/package2-manifest.json',
46+
];
3247

3348
public constructor(forceIgnorePath = '') {
3449
try {

0 commit comments

Comments
 (0)