├── .build └── setPackageVersion.js ├── .github └── workflows │ ├── ci.yml │ ├── release.yml │ └── stale.yml ├── .gitignore ├── .npm-upgrade.json ├── .run ├── All Tests.run.xml └── Template Cucumber.js.run.xml ├── .vscode ├── launch.json └── settings.json ├── CONTRIBUTE.md ├── LICENSE ├── README.md ├── cucumber-tsflow-specs ├── features │ ├── basic-test.feature │ ├── cucumber-context-objects.feature │ ├── custom-context-objects.feature │ ├── external-context-extraction.feature │ ├── global-hooks.feature │ ├── hooks.feature │ └── tag-parameters.feature ├── package-lock.json ├── package.json ├── src │ ├── step_definitions │ │ ├── cucumber_steps.ts │ │ ├── file_steps.ts │ │ ├── prepare.ts │ │ └── scenario_steps.ts │ └── support │ │ ├── formatter_output_helpers.ts │ │ ├── helpers.ts │ │ ├── runner.ts │ │ └── testDir.ts └── tsconfig.json ├── cucumber-tsflow ├── .npmignore ├── README.md ├── package-lock.json ├── package.json ├── src │ ├── binding-decorator.ts │ ├── binding-registry.ts │ ├── hook-decorators.ts │ ├── index.ts │ ├── logger.ts │ ├── managed-scenario-context.ts │ ├── our-callsite.ts │ ├── provided-context.ts │ ├── scenario-context.ts │ ├── scenario-info.ts │ ├── step-binding-flags.ts │ ├── step-binding.ts │ ├── step-definition-decorators.ts │ ├── tag-normalization.ts │ └── types.ts └── tsconfig.json ├── cucumber.js ├── lerna.json ├── package-lock.json ├── package.json ├── tsconfig.json ├── tslint.json └── version.json /.build/setPackageVersion.js: -------------------------------------------------------------------------------- 1 | const nbgv = require("nerdbank-gitversioning"); 2 | 3 | const setPackageVersionAndBuildNumber = (versionInfo) => { 4 | // Set a build output value representing the NPM package version 5 | console.log( 6 | "::set-output name=package_version::" + versionInfo.npmPackageVersion, 7 | ); 8 | 9 | nbgv.setPackageVersion("cucumber-tsflow"); 10 | nbgv.setPackageVersion("cucumber-tsflow-specs"); 11 | }; 12 | 13 | const handleError = (err) => 14 | console.error( 15 | "Failed to update the package version number. nerdbank-gitversion failed: " + 16 | err, 17 | ); 18 | 19 | nbgv.getVersion().then(setPackageVersionAndBuildNumber).catch(handleError); 20 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: [master, release/**] 5 | pull_request: 6 | branches: [master, release/**] 7 | jobs: 8 | # Build and Test the 'cucumber-tsflow' package 9 | build: 10 | name: Build and Test 11 | runs-on: ubuntu-latest 12 | strategy: 13 | matrix: 14 | cucumberVersion: ["^7", "^8", "^9", "^10", "^11"] 15 | steps: 16 | - uses: actions/checkout@v2 17 | - uses: actions/setup-node@v3 18 | with: 19 | node-version: 22 20 | - name: Install npm packages 21 | run: |- 22 | npm ci 23 | npm install @cucumber/cucumber@${{ matrix.cucumberVersion }} 24 | - name: Build 25 | run: npm run build 26 | - name: Run specification tests 27 | run: npm test 28 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | # 2 | # This workflow creates a release from a specified branch. The Package version is managed 3 | # by Nerdbank Gitversioning based on configuration held in 'version.json' file. 4 | # 5 | name: Release 6 | on: 7 | workflow_dispatch: 8 | 9 | jobs: 10 | # Build, Test and Pack the 'cucumber-tsflow' package 11 | build: 12 | name: Build and Test 13 | runs-on: ubuntu-latest 14 | outputs: 15 | version: ${{ steps.set_package_version.outputs.NpmPackageVersion }} 16 | releaseTag: ${{ steps.tagInfo.outputs.releaseTag }} 17 | steps: 18 | - uses: actions/checkout@v3 19 | with: 20 | # avoid shallow clone (required by Nerbank GitVersioning) 21 | fetch-depth: 0 22 | - uses: actions/setup-node@v3 23 | with: 24 | node-version: 22 25 | - name: Install npm packages 26 | run: npm ci 27 | - name: Update package version 28 | id: set_package_version 29 | uses: dotnet/nbgv@master 30 | with: 31 | stamp: cucumber-tsflow/package.json 32 | - name: Build 33 | run: npm run build 34 | - name: Create npm package 35 | run: npm pack ./cucumber-tsflow 36 | - name: Read tag info 37 | id: tagInfo 38 | run: |- 39 | echo "releaseTag=$(jq '.releaseTag // "latest"' version.json)" | tee -a $GITHUB_OUTPUT 40 | - uses: actions/upload-artifact@v4 41 | with: 42 | name: npm-package 43 | path: | 44 | cucumber-tsflow-${{ steps.set_package_version.outputs.NpmPackageVersion }}.tgz 45 | 46 | # Publish the 'cucumber-tsflow' package to npm 47 | publish: 48 | name: Publish to npm 49 | runs-on: ubuntu-latest 50 | needs: build 51 | permissions: 52 | contents: write 53 | steps: 54 | - uses: actions/setup-node@v3 55 | with: 56 | node-version: 22 57 | registry-url: "https://registry.npmjs.org" 58 | - uses: actions/download-artifact@v4 59 | name: Download npm package 60 | with: 61 | name: npm-package 62 | - name: Publish npm package 63 | run: |- 64 | npm publish \ 65 | cucumber-tsflow-${{ needs.build.outputs.version }}.tgz \ 66 | --tag ${{ needs.build.outputs.releaseTag }} 67 | env: 68 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 69 | - name: Publish GitHub release 70 | uses: ncipollo/release-action@v1 71 | with: 72 | tag: ${{ needs.build.outputs.version }} 73 | commit: ${{ github.sha }} 74 | artifacts: cucumber-tsflow-${{ needs.build.outputs.version }}.tgz 75 | generateReleaseNotes: true 76 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: "Stale issue handler" 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 0 * * *" 7 | 8 | permissions: 9 | contents: write # only for delete-branch option 10 | issues: write 11 | pull-requests: write 12 | 13 | jobs: 14 | stale: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/stale@v6 18 | id: stale 19 | with: 20 | days-before-stale: 60 21 | days-before-close: 7 22 | 23 | stale-issue-message: "This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days." 24 | close-issue-message: "There hasn't been any activity on this issue for 67 days. Closing it as Spoiled." 25 | stale-issue-label: stale 26 | close-issue-label: spoiled 27 | exempt-issue-labels: "blocked,discussion,good first issue" 28 | 29 | stale-pr-message: "This PR is stale because it has been 60 days with no activity. Remove stale lable or comment or this will be closed in 7 days." 30 | close-pr-message: "There hasn't been any activity on this PR for 67 days. Closing it as Spoiled." 31 | stale-pr-label: stale 32 | close-pr-label: spoiled 33 | exempt-pr-labels: "blocked,discussion" 34 | 35 | - name: Print outputs 36 | run: echo ${{ join(steps.stale.outputs.*, ',') }} 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | tmp/ 4 | .idea/ 5 | tsconfig.tsbuildinfo 6 | -------------------------------------------------------------------------------- /.npm-upgrade.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignore": { 3 | "@cucumber/cucumber": { 4 | "versions": "^8", 5 | "reason": "Mantain compatibility with cucumber 7 and 8" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.run/All Tests.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |