Loading .eslintrc.json +1 −7 Changes for .eslintrc.json: 1 added line, 7 removed lines. Original line number Diff line number Diff line { "plugins": ["jest", "@typescript-eslint"], "extends": ["plugin:github/es6"], "extends": ["plugin:github/recommended"], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 9, Loading @@ -16,13 +16,9 @@ "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/array-type": "error", "@typescript-eslint/await-thenable": "error", "@typescript-eslint/ban-ts-ignore": "error", "camelcase": "off", "@typescript-eslint/camelcase": "error", "@typescript-eslint/class-name-casing": "error", "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], "@typescript-eslint/func-call-spacing": ["error", "never"], "@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"], "@typescript-eslint/no-array-constructor": "error", "@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-explicit-any": "error", Loading @@ -33,7 +29,6 @@ "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-non-null-assertion": "warn", "@typescript-eslint/no-object-literal-type-assertion": "error", "@typescript-eslint/no-unnecessary-qualifier": "error", "@typescript-eslint/no-unnecessary-type-assertion": "error", "@typescript-eslint/no-useless-constructor": "error", Loading @@ -41,7 +36,6 @@ "@typescript-eslint/prefer-for-of": "warn", "@typescript-eslint/prefer-function-type": "warn", "@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-interface": "error", "@typescript-eslint/prefer-string-starts-ends-with": "error", "@typescript-eslint/promise-function-async": "error", "@typescript-eslint/require-array-sort-compare": "error", Loading __test__/git-auth-helper.test.ts +4 −4 Changes for __test__/git-auth-helper.test.ts: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -417,7 +417,7 @@ describe('git-auth-helper tests', () => { `Did not expect file to exist: '${globalGitConfigPath}'` ) } catch (err) { if (err.code !== 'ENOENT') { if ((err as any)?.code !== 'ENOENT') { throw err } } Loading Loading @@ -601,7 +601,7 @@ describe('git-auth-helper tests', () => { await fs.promises.stat(actualKeyPath) throw new Error('SSH key should have been deleted') } catch (err) { if (err.code !== 'ENOENT') { if ((err as any)?.code !== 'ENOENT') { throw err } } Loading @@ -611,7 +611,7 @@ describe('git-auth-helper tests', () => { await fs.promises.stat(actualKnownHostsPath) throw new Error('SSH known hosts should have been deleted') } catch (err) { if (err.code !== 'ENOENT') { if ((err as any)?.code !== 'ENOENT') { throw err } } Loading Loading @@ -658,7 +658,7 @@ describe('git-auth-helper tests', () => { await fs.promises.stat(homeOverride) throw new Error(`Should have been deleted '${homeOverride}'`) } catch (err) { if (err.code !== 'ENOENT') { if ((err as any)?.code !== 'ENOENT') { throw err } } Loading __test__/ref-helper.test.ts +5 −3 Changes for __test__/ref-helper.test.ts: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ describe('ref-helper tests', () => { await refHelper.getCheckoutInfo(git, 'refs/heads/my/branch', commit) throw new Error('Should not reach here') } catch (err) { expect(err.message).toBe('Arg git cannot be empty') expect((err as any)?.message).toBe('Arg git cannot be empty') } }) Loading @@ -25,7 +25,9 @@ describe('ref-helper tests', () => { await refHelper.getCheckoutInfo(git, '', '') throw new Error('Should not reach here') } catch (err) { expect(err.message).toBe('Args ref and commit cannot both be empty') expect((err as any)?.message).toBe( 'Args ref and commit cannot both be empty' ) } }) Loading Loading @@ -102,7 +104,7 @@ describe('ref-helper tests', () => { await refHelper.getCheckoutInfo(git, 'my-ref', '') throw new Error('Should not reach here') } catch (err) { expect(err.message).toBe( expect((err as any)?.message).toBe( "A branch or tag with the name 'my-ref' could not be found" ) } Loading __test__/retry-helper.test.ts +1 −1 Changes for __test__/retry-helper.test.ts: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ describe('retry-helper tests', () => { throw new Error(`some error ${++attempts}`) }) } catch (err) { error = err error = err as Error } expect(error.message).toBe('some error 3') expect(attempts).toBe(3) Loading dist/index.js +253 −83 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
.eslintrc.json +1 −7 Changes for .eslintrc.json: 1 added line, 7 removed lines. Original line number Diff line number Diff line { "plugins": ["jest", "@typescript-eslint"], "extends": ["plugin:github/es6"], "extends": ["plugin:github/recommended"], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 9, Loading @@ -16,13 +16,9 @@ "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/array-type": "error", "@typescript-eslint/await-thenable": "error", "@typescript-eslint/ban-ts-ignore": "error", "camelcase": "off", "@typescript-eslint/camelcase": "error", "@typescript-eslint/class-name-casing": "error", "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], "@typescript-eslint/func-call-spacing": ["error", "never"], "@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"], "@typescript-eslint/no-array-constructor": "error", "@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-explicit-any": "error", Loading @@ -33,7 +29,6 @@ "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-non-null-assertion": "warn", "@typescript-eslint/no-object-literal-type-assertion": "error", "@typescript-eslint/no-unnecessary-qualifier": "error", "@typescript-eslint/no-unnecessary-type-assertion": "error", "@typescript-eslint/no-useless-constructor": "error", Loading @@ -41,7 +36,6 @@ "@typescript-eslint/prefer-for-of": "warn", "@typescript-eslint/prefer-function-type": "warn", "@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-interface": "error", "@typescript-eslint/prefer-string-starts-ends-with": "error", "@typescript-eslint/promise-function-async": "error", "@typescript-eslint/require-array-sort-compare": "error", Loading
__test__/git-auth-helper.test.ts +4 −4 Changes for __test__/git-auth-helper.test.ts: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -417,7 +417,7 @@ describe('git-auth-helper tests', () => { `Did not expect file to exist: '${globalGitConfigPath}'` ) } catch (err) { if (err.code !== 'ENOENT') { if ((err as any)?.code !== 'ENOENT') { throw err } } Loading Loading @@ -601,7 +601,7 @@ describe('git-auth-helper tests', () => { await fs.promises.stat(actualKeyPath) throw new Error('SSH key should have been deleted') } catch (err) { if (err.code !== 'ENOENT') { if ((err as any)?.code !== 'ENOENT') { throw err } } Loading @@ -611,7 +611,7 @@ describe('git-auth-helper tests', () => { await fs.promises.stat(actualKnownHostsPath) throw new Error('SSH known hosts should have been deleted') } catch (err) { if (err.code !== 'ENOENT') { if ((err as any)?.code !== 'ENOENT') { throw err } } Loading Loading @@ -658,7 +658,7 @@ describe('git-auth-helper tests', () => { await fs.promises.stat(homeOverride) throw new Error(`Should have been deleted '${homeOverride}'`) } catch (err) { if (err.code !== 'ENOENT') { if ((err as any)?.code !== 'ENOENT') { throw err } } Loading
__test__/ref-helper.test.ts +5 −3 Changes for __test__/ref-helper.test.ts: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ describe('ref-helper tests', () => { await refHelper.getCheckoutInfo(git, 'refs/heads/my/branch', commit) throw new Error('Should not reach here') } catch (err) { expect(err.message).toBe('Arg git cannot be empty') expect((err as any)?.message).toBe('Arg git cannot be empty') } }) Loading @@ -25,7 +25,9 @@ describe('ref-helper tests', () => { await refHelper.getCheckoutInfo(git, '', '') throw new Error('Should not reach here') } catch (err) { expect(err.message).toBe('Args ref and commit cannot both be empty') expect((err as any)?.message).toBe( 'Args ref and commit cannot both be empty' ) } }) Loading Loading @@ -102,7 +104,7 @@ describe('ref-helper tests', () => { await refHelper.getCheckoutInfo(git, 'my-ref', '') throw new Error('Should not reach here') } catch (err) { expect(err.message).toBe( expect((err as any)?.message).toBe( "A branch or tag with the name 'my-ref' could not be found" ) } Loading
__test__/retry-helper.test.ts +1 −1 Changes for __test__/retry-helper.test.ts: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ describe('retry-helper tests', () => { throw new Error(`some error ${++attempts}`) }) } catch (err) { error = err error = err as Error } expect(error.message).toBe('some error 3') expect(attempts).toBe(3) Loading