Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-export as Stubscape from shescape/testing #1308

Merged
merged 6 commits into from Dec 7, 2023

Conversation

ericcornelissen
Copy link
Owner

Relates to #710

Summary

Simplify importing the default stub implementation of Shescape as Stubscape by re-exporting it under that name.

As of writing, I'm not sure whether exporting this stub as Shescape or Stubscape is better. I think both have pros and cons. In any case, the export named Shescape can't just be removed because that would be a breaking change.

Simplify importing the default stub implementation of Shescape as
`Stubscape` by re-exporting it under that name.

As of writing, I'm not sure whether exporting this stub as `Shescape` or
`Stubscape` is better. I think both have pros and cons. In any case, the
export named `Shescape` can't just be removed because that would be a
breaking change.
@github-actions github-actions bot added documentation Improvements or additions to documentation test Relates to testing labels Nov 22, 2023
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #1308 (2742c8a) into main (1266341) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1308   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines         1492      1507   +15     
=========================================
+ Hits          1492      1507   +15     
Flag Coverage Δ
integration-MacOS 99.54% <100.00%> (+<0.01%) ⬆️
integration-Ubuntu 99.09% <100.00%> (+0.01%) ⬆️
unit 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
testing.js 100.00% <100.00%> (ø)

Avoid vetting error by knip by marking `Stubscape` as an alias of
`Shescape` in its documentation. Besides making knip happy, this also
makes the re-export more explicit and hopefully clear in context.

To support this, `Shescape` was renamed to `Stubscape` and `Shescape`
now re-exports `Shescape`. This makes semantic sense (I want `Stubscape`
to be the "correct" export, and `Shescape` an alias for backwards
compatibility), but is also required as the (at)alias tag needs to be on
the re-exporting expression for knip to accept it.
Add `Stubscape` export to testing.d.ts and align documentation with
corresponding testing.js code.
@ericcornelissen ericcornelissen enabled auto-merge (squash) December 7, 2023 10:07
@ericcornelissen ericcornelissen merged commit a426207 into main Dec 7, 2023
33 checks passed
@ericcornelissen ericcornelissen deleted the export-as-stubscape branch December 7, 2023 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation test Relates to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant