Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

refactor($q): make $q Promises A+ v1.1 compilant #8708

Closed
wants to merge 1 commit into from

Conversation

jeffbcross
Copy link
Contributor

The Promises A+ 1.1 spec introduces new constraints that would cause $q to fail,
particularly specs 2.3.1 and 2.3.3.

Newly satisfied requirements:

  • "then" functions that return the same fulfilled/rejected promise
    will fail with a TypeError
  • Support for edge cases where "then" is a value other than function

Full 1.1 spec: https://github.com/promises-aplus/promises-spec/tree/1.1.0

This commit also modifies the adapter to use "resolve" method instead of "fulfill"

(PR replaces #5976)

The Promises A+ 1.1 spec introduces new constraints that would cause $q to fail,
particularly specs 2.3.1 and 2.3.3.

Newly satisfied requirements:

 * "then" functions that return the same fulfilled/rejected promise 
	will fail with a TypeError
 * Support for edge cases where "then" is a value other than function

Full 1.1 spec: https://github.com/promises-aplus/promises-spec/tree/1.1.0

This commit also modifies the adapter to use "resolve" method instead of "fulfill"
'finallyCC()->IGNORED',
'successBB(RESOLVED_VAL)->bb',
Copy link
Contributor

Choose a reason for hiding this comment

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

I still don't really understand why adding support for those constraints breaks this test, that just seems weird

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lgalfaso any thoughts?

@caitp
Copy link
Contributor

caitp commented Aug 21, 2014

still generally LGTM but I would really like to properly understand why we break that test some time

@jeffbcross
Copy link
Contributor Author

@caitp good to merge?

@caitp
Copy link
Contributor

caitp commented Aug 21, 2014

yeah I think so

@jeffbcross
Copy link
Contributor Author

Landed 1339c11

@jeffbcross jeffbcross closed this Aug 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants