From 5c3924cd39c56d26b8569c69910ac4a05cfafee9 Mon Sep 17 00:00:00 2001 From: LexSwed Date: Sun, 5 Aug 2018 16:35:45 +0300 Subject: [PATCH 1/3] Sync latest parse-git-config api changes --- types/parse-git-config/index.d.ts | 8 ++++---- types/parse-git-config/parse-git-config-tests.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/types/parse-git-config/index.d.ts b/types/parse-git-config/index.d.ts index b3302106b0..9ed1f04155 100644 --- a/types/parse-git-config/index.d.ts +++ b/types/parse-git-config/index.d.ts @@ -36,10 +36,10 @@ interface Parse { * If no arguments are passed, the .git/config file relative to process.cwd() is used. */ sync(options?: (Options | object) | string): Config; - /** - * Returns an object with only the properties that had ini-style keys converted to objects. - */ - keys(config: Config): Config; + /** + * Returns an object with only the properties that had ini-style keys converted to objects. + */ + expandKeys(config: Config): Config; } // no-empty-interface is disabled for a better debugging experience. Empty interfaces are used to alias a type alias. diff --git a/types/parse-git-config/parse-git-config-tests.ts b/types/parse-git-config/parse-git-config-tests.ts index c5ce43040a..a6d2a4c983 100644 --- a/types/parse-git-config/parse-git-config-tests.ts +++ b/types/parse-git-config/parse-git-config-tests.ts @@ -99,12 +99,12 @@ function test_sync() { } } -function test_keys() { +function test_expandKeys() { const config = { 'foo "bar"': { doStuff: true }, 'foo "baz"': { doStuff: true } }; - const keys = parse.keys(config); + const keys = parse.expandKeys(config); keys.foo.bar.doStuff === true; keys.foo.baz.doStuff === true; From 92796daeb7141e903115b089425815dd62e678ec Mon Sep 17 00:00:00 2001 From: LexSwed Date: Sun, 5 Aug 2018 16:43:14 +0300 Subject: [PATCH 2/3] parse-git-config - fix tabulation --- types/parse-git-config/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/parse-git-config/index.d.ts b/types/parse-git-config/index.d.ts index 9ed1f04155..cae3e74a45 100644 --- a/types/parse-git-config/index.d.ts +++ b/types/parse-git-config/index.d.ts @@ -36,10 +36,10 @@ interface Parse { * If no arguments are passed, the .git/config file relative to process.cwd() is used. */ sync(options?: (Options | object) | string): Config; - /** - * Returns an object with only the properties that had ini-style keys converted to objects. - */ - expandKeys(config: Config): Config; + /** + * Returns an object with only the properties that had ini-style keys converted to objects. + */ + expandKeys(config: Config): Config; } // no-empty-interface is disabled for a better debugging experience. Empty interfaces are used to alias a type alias. From 4603f233267c3c86422cff3e82fd243bcbe3c641 Mon Sep 17 00:00:00 2001 From: LexSwed Date: Tue, 7 Aug 2018 14:26:47 +0300 Subject: [PATCH 3/3] [parse-git-config] add missing options --- types/parse-git-config/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/parse-git-config/index.d.ts b/types/parse-git-config/index.d.ts index cae3e74a45..3ca55b897a 100644 --- a/types/parse-git-config/index.d.ts +++ b/types/parse-git-config/index.d.ts @@ -49,6 +49,8 @@ interface Options extends Pick<_Options, keyof _Options> { } interface _Options { cwd: string; path: string; + include?: boolean; + expandKeys?: boolean; } type ParseCallback = ((err: Error | null, config: Config) => void);