Skip to content

Commit

Permalink
Revive and rework tooling around exported API (#2367)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgoss authored Jan 7, 2024
1 parent 0fbe487 commit 920ee17
Show file tree
Hide file tree
Showing 125 changed files with 1,527 additions and 1,340 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Site

on:
push:
branches:
- main

jobs:
upload-artifact:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
- run: npm install
- run: npm run exports-generate-docs
- run: |
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- uses: actions/upload-pages-artifact@v3

deploy:
needs: upload-artifact
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.nyc_output_feature/
.nyc_output_unit/
.nyc_output/
_site/
@rerun.txt
coverage/
lib/
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bin
docs
exports
lib
node_modules
reports
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) on how to contribute to Cucumber.

## [Unreleased]
### Changed
- Improve API documentation and TypeScript types ([#2367](https://github.com/cucumber/cucumber-js/pull/2367))

## [10.1.0] - 2023-12-21
### Added
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ Type `npm run` or see the `package.json` scripts section for how to run each cat
* feature tests - `npm run feature-test`
* cucumber-js tests itself

## API Documentation
## Exports

The functionality exposed under the `@cucumber/cucumber/api` entry point is analysed and has documentation generated by [API Extractor](https://api-extractor.com/). If you make a change that affects the public API surface, you'll need to run `npm run docs:local` to run the analysis and regenerate the docs, and commit the changes. If you forget to do this locally, the CI build will fail and remind you.
The functionality exposed under both the `@cucumber/cucumber` and `@cucumber/cucumber/api` entry points is analysed and has a report generated by [API Extractor](https://api-extractor.com/). If you make a change that affects the exported API surface, you'll need to run `npm run exports-update` to run the analysis and regenerate the file, and commit the changes. If you forget to do this locally, the CI build will fail and remind you.

## Internals

Expand Down
6 changes: 4 additions & 2 deletions dependency-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ executedModules:
npmScripts:
dev:
- build
- docs:ci
- docs:local
- exports-generate-docs
- exports-test
- exports-update
- lint
- publish
- test
Expand Down Expand Up @@ -37,6 +38,7 @@ ignoreErrors:
- prettier # peer dependency of eslint-plugin-prettier
- ts-node # .mocharc.yml / cucumber.js
- type-fest # utility types
- typedoc-plugin-extras

requiredModules:
files:
Expand Down
13 changes: 0 additions & 13 deletions docs/api/cucumber.iloadconfigurationoptions.file.md

This file was deleted.

21 changes: 0 additions & 21 deletions docs/api/cucumber.iloadconfigurationoptions.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/api/cucumber.iloadconfigurationoptions.profiles.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/api/cucumber.iloadconfigurationoptions.provided.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/cucumber.iloadsourcesresult.errors.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/api/cucumber.iloadsourcesresult.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/cucumber.iloadsourcesresult.plan.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/api/cucumber.iloadsupportoptions.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/cucumber.iloadsupportoptions.sources.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/cucumber.iloadsupportoptions.support.md

This file was deleted.

14 changes: 0 additions & 14 deletions docs/api/cucumber.iplannedpickle.location.md

This file was deleted.

21 changes: 0 additions & 21 deletions docs/api/cucumber.iplannedpickle.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/cucumber.iplannedpickle.name.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/cucumber.iplannedpickle.uri.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/api/cucumber.iresolvedconfiguration.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/api/cucumber.iresolvedconfiguration.runconfiguration.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/api/cucumber.iresolvedconfiguration.useconfiguration.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/cucumber.irunconfiguration.formats.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/api/cucumber.irunconfiguration.md

This file was deleted.

Loading

0 comments on commit 920ee17

Please sign in to comment.