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

Remove unused/meaningless exports and modules from the codebase #2561

Closed
fatso83 opened this issue Oct 25, 2023 · 1 comment · Fixed by #2565
Closed

Remove unused/meaningless exports and modules from the codebase #2561

fatso83 opened this issue Oct 25, 2023 · 1 comment · Fixed by #2565
Milestone

Comments

@fatso83
Copy link
Contributor

fatso83 commented Oct 25, 2023

Both sinon.defaultConfig (default-config.js) and the get-config modules are unused in the sinon codebase. They originally existed to support sinonTest, which is a separate module, and should just be removed. They can be moved over into that project independently.

@fatso83 fatso83 added this to the v18 milestone Oct 25, 2023
@fatso83 fatso83 changed the title Remove unused exports Remove unused/meaningless exports and modules from the codebase Oct 25, 2023
fatso83 added a commit to fatso83/sinon that referenced this issue Oct 29, 2023
default-config and get-config are leftovers from when Sinon
shipped with sinon.test (now the independent NPM module
 'sinon-test').

These serve no purpose internally, and really have no purpose
but to help sinon-test create a base default. If needed,
these can be copied into the sinon-test project. No projects
should depend on these (my assumption), but since it is a
change of the API we mark it as a breaking change

fixes sinonjs#2561
@fatso83
Copy link
Contributor Author

fatso83 commented Oct 31, 2023

duplicates #2565

@fatso83 fatso83 closed this as completed Oct 31, 2023
fatso83 added a commit that referenced this issue Nov 2, 2023
* breaking: Remove sinon.defaultConfig and related modules

default-config and get-config are leftovers from when Sinon
shipped with sinon.test (now the independent NPM module
 'sinon-test').

These serve no purpose internally, and really have no purpose
but to help sinon-test create a base default. If needed,
these can be copied into the sinon-test project. No projects
should depend on these (my assumption), but since it is a
change of the API we mark it as a breaking change

fixes #2561

* fixed up tests that were lying

It seemed like the the 'injectInto' option
would expose most props by default. This was
not the case. That was formerly hidden by
using the getConfig call that added props
that were never used in the actual implementation.

Added another test to make this more explicit.
Will add docs on this.

* Document Sandbox#inject

This was added in Sinon 0.6 but has never been documented

* Note that 'properties' is empty by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant