From 4c7180188a9c13750a4ae6c160ab1c57ea27281e Mon Sep 17 00:00:00 2001 From: MichalMachura <44579524+MichalMachura@users.noreply.github.com> Date: Tue, 14 Jan 2025 00:44:25 +0100 Subject: [PATCH 1/5] Update parse_parameters.ts Fixed pattern for return and yield as a part of variable name. --- src/parse/parse_parameters.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parse/parse_parameters.ts b/src/parse/parse_parameters.ts index 886d5e2..8e7e85d 100644 --- a/src/parse/parse_parameters.ts +++ b/src/parse/parse_parameters.ts @@ -90,7 +90,7 @@ function parseReturn(parameters: string[], body: string[]): Returns { const returnType = parseReturnFromDefinition(parameters); if (returnType == null || isIterator(returnType.type)) { - return parseFromBody(body, /return /); + return parseFromBody(body, /(?:^|\W)return /); } return returnType; @@ -105,7 +105,7 @@ function parseYields(parameters: string[], body: string[]): Yields { // To account for functions that yield but don't have a yield signature const yieldType = returnType ? returnType.type : undefined; - const yieldInBody = parseFromBody(body, /yield /); + const yieldInBody = parseFromBody(body, /(?:^|\W)yield /); if (yieldInBody != null && yieldType != undefined) { yieldInBody.type = `Iterator[${yieldType}]`; From 3956e21ab6c83a71bb0c105250021cb553ce5b10 Mon Sep 17 00:00:00 2001 From: MichalMachura <44579524+MichalMachura@users.noreply.github.com> Date: Fri, 16 May 2025 12:32:22 +0000 Subject: [PATCH 2/5] ... --- src/parse/parse_parameters.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parse/parse_parameters.ts b/src/parse/parse_parameters.ts index 8e7e85d..9ce32cb 100644 --- a/src/parse/parse_parameters.ts +++ b/src/parse/parse_parameters.ts @@ -90,6 +90,7 @@ function parseReturn(parameters: string[], body: string[]): Returns { const returnType = parseReturnFromDefinition(parameters); if (returnType == null || isIterator(returnType.type)) { + // return parseFromBody(body, /(?:^|\W)return /); } From 3f4940b942e0e2bff47772a88d26c67a68e59933 Mon Sep 17 00:00:00 2001 From: MichalMachura <44579524+MichalMachura@users.noreply.github.com> Date: Fri, 16 May 2025 12:42:39 +0000 Subject: [PATCH 3/5] ... --- .github/workflows/test_and_publish.yml | 1 + src/parse/parse_parameters.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_publish.yml b/.github/workflows/test_and_publish.yml index 8de06ff..7fa10fb 100644 --- a/.github/workflows/test_and_publish.yml +++ b/.github/workflows/test_and_publish.yml @@ -9,6 +9,7 @@ on: jobs: unit_tests: runs-on: "${{ matrix.os }}" + timeout-minutes: 5 strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] diff --git a/src/parse/parse_parameters.ts b/src/parse/parse_parameters.ts index 9ce32cb..8e7e85d 100644 --- a/src/parse/parse_parameters.ts +++ b/src/parse/parse_parameters.ts @@ -90,7 +90,6 @@ function parseReturn(parameters: string[], body: string[]): Returns { const returnType = parseReturnFromDefinition(parameters); if (returnType == null || isIterator(returnType.type)) { - // return parseFromBody(body, /(?:^|\W)return /); } From 762191d0e4fd0ac3797e2c9a9aa393314eba1ff8 Mon Sep 17 00:00:00 2001 From: MichalMachura <44579524+MichalMachura@users.noreply.github.com> Date: Fri, 16 May 2025 12:45:42 +0000 Subject: [PATCH 4/5] ... --- .github/workflows/test_and_publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_publish.yml b/.github/workflows/test_and_publish.yml index 7fa10fb..b5ca3b2 100644 --- a/.github/workflows/test_and_publish.yml +++ b/.github/workflows/test_and_publish.yml @@ -9,8 +9,9 @@ on: jobs: unit_tests: runs-on: "${{ matrix.os }}" - timeout-minutes: 5 + timeout-minutes: 10 strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] node: [18] From 9aafc71c146ac72a05b6b6b3de7221ee054c9f41 Mon Sep 17 00:00:00 2001 From: MichalMachura <44579524+MichalMachura@users.noreply.github.com> Date: Fri, 16 May 2025 12:48:21 +0000 Subject: [PATCH 5/5] workflow upgrade --- .github/workflows/test_and_publish.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_and_publish.yml b/.github/workflows/test_and_publish.yml index b5ca3b2..ba66c1a 100644 --- a/.github/workflows/test_and_publish.yml +++ b/.github/workflows/test_and_publish.yml @@ -9,15 +9,14 @@ on: jobs: unit_tests: runs-on: "${{ matrix.os }}" - timeout-minutes: 10 strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] node: [18] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ matrix.node-version }}" cache: "npm" @@ -28,8 +27,8 @@ jobs: integration_tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18 cache: "npm" @@ -46,8 +45,8 @@ jobs: if: startsWith(github.event.ref, 'refs/tags/v') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18 cache: "npm"