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

Migration guide for version 3.0.0 #1510

Merged
merged 1 commit into from
Aug 3, 2017
Merged

Migration guide for version 3.0.0 #1510

merged 1 commit into from
Aug 3, 2017

Conversation

acud
Copy link
Contributor

@acud acud commented Aug 3, 2017

added documentation for the migration guide

resolves #1502

Copy link
Member

@mroderick mroderick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @elad-nach!

Just a few comments from me

Codemod available at https://github.com/hurrymaplelad/sinon-codemod

## `sinon.stub(object, property, value)` - Removed
The three parameter signature will now throw an exception (feature has been deprecated at `[email protected]` and has been finally removed from the codebase).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking: In JavaScript, they're called arguments, so this should read something like this:

Calling sinon.stub with three arguments will throw an Error. This was deprecated with sinon@2 and has been removed with sinon@3

`sinon.useFakeTimers()` signature has [changed](./fake-timers). To define which methods to fake, please use `config.toFake`. Other options are now available when configuring `useFakeTimers`. Please consult the [documentation](./fake-timers) for more information.

## Removal of internal helpers
The following utility functions has been marked as deprecated as of `[email protected]` and were removed as planned on this release:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be more concise:

The following internal functions were deprecated as of [email protected] and have been removed in sinon@3

breadcrumb: migrating to 3.0
---

Sinon v3.0 is the third major release, we have made several breaking changes in this release as a result of modernising the internals of Sinon. This guide is intended to walk you through the changes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be more concise:

As with all MAJOR releases in semver, there are breaking changes in sinon@3.
This guide will walk you through those changes.

@acud
Copy link
Contributor Author

acud commented Aug 3, 2017

all done 🗡

Copy link
Member

@mantoni mantoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mroderick
Copy link
Member

Thank you 💯

@mroderick mroderick merged commit 3a4688b into sinonjs:master Aug 3, 2017
@mroderick
Copy link
Member

This has become part of v3.0.0

@acud acud deleted the task-update-sinon-migration-guide branch August 3, 2017 14:28
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 this pull request may close these issues.

Documentation: migration guide from 2.x to 3.0
3 participants