Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Deferred: Backwards-compatible standards interoperability#1996

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
863b9bc
Deferred: [tests] Standard promise interoperability
gibson042Dec 29, 2014
d9d3657
Deferred: Run the Promises/A+ test suite
mgolSep 11, 2014
f986cab
Deferred: [code] Errors in .done callbacks don't stop .then handlers
gibson042Jan 5, 2015
ec2ee79
Deferred: Update tests for asynchronicity and spec compliance
gibson042Jan 5, 2015
b21e76f
Deferred: Pass explicitly-set context to .then callbacks
gibson042Jan 6, 2015
f7e36bf
Deferred: Pass Promises/A+ section 2.3.1
gibson042Jan 6, 2015
02fbbe2
Deferred: Pass Promises/A+ section 2.3.3.1
gibson042Jan 6, 2015
ba97c51
Deferred: Pass Promises/A+ section 2.3.3.3.1 (resolve-then-throw case)
gibson042Jan 6, 2015
85f32dd
Deferred: Pass Promises/A+ section 2.3.3.3.3
gibson042Jan 6, 2015
747421d
Deferred: Pass Promises/A+ section 2.3.3.3.4.1
gibson042Jan 6, 2015
79276be
Deferred: Pass Promises/A+ section 2.3.4
gibson042Jan 6, 2015
0da2b1a
Deferred: Properly handle thenable/progress interactions
gibson042Jan 12, 2015
43e71b3
Deferred: Standards-compliant jQuery.when tests
gibson042Jan 15, 2015
d838eb4
Tests: Clean up jQuery.when tests
gibson042Jan 18, 2015
faf1adf
Deferred: Rename jQuery.when variable for clarity
gibson042Jan 18, 2015
447cf3d
Deferred: Accept standard Promises in jQuery.when
gibson042Jan 18, 2015
694374c
Deferred: Clarify backcompat and error text
gibson042Feb 25, 2015
3b4d845
Deferred: Test that pipe is a function
gibson042Mar 20, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletionGruntfile.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@ module.exports = function( grunt ) {
}

var gzip = require( "gzip-js" ),
spawn = require( "child_process" ).spawn,
srcHintOptions = readOptionalJSON( "src/.jshintrc" );

// The concatenated file won't pass onevar
Expand DownExpand Up@@ -55,6 +56,8 @@ module.exports = function( grunt ) {
"sizzle/dist": "sizzle/dist",
"sizzle/LICENSE.txt": "sizzle/LICENSE.txt",

"npo/npo.js": "native-promise-only/npo.js",

"qunit/qunit.js": "qunitjs/qunit/qunit.js",
"qunit/qunit.css": "qunitjs/qunit/qunit.css",
"qunit/LICENSE.txt": "qunitjs/LICENSE.txt",
Expand DownExpand Up@@ -168,12 +171,24 @@ module.exports = function( grunt ) {
});
});

grunt.registerTask( "promises-aplus-tests", function() {
var done = this.async();
spawn( "node", [
"./node_modules/.bin/promises-aplus-tests",
"./promises-aplus-adapter.js"
], {
stdio: "inherit"
}).on( "close", function( code ) {
done( code === 0 );
});
});

// Short list as a high frequency watch task
grunt.registerTask( "dev", [ "build:*:*", "lint" ] );

grunt.registerTask( "test_fast", [ "node_smoke_test" ] );

grunt.registerTask( "test", [ "default", "test_fast" ] );
grunt.registerTask( "test", [ "default", "test_fast", "promises-aplus-tests" ] );

grunt.registerTask( "default", [ "jsonlint", "dev", "uglify", "dist:*", "compare_size" ] );
};
5 changes: 5 additions & 0 deletionsexternal/npo/npo.js
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

4 changes: 2 additions & 2 deletionsexternal/requirejs/require.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* @license RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
Expand All@@ -12,7 +12,7 @@ var requirejs, require, define;
(function (global) {
var req, s, head, baseElement, dataMain, src,
interactiveScript, currentlyAddingScript, mainScript, subPath,
version = '2.1.14',
version = '2.1.15',
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
jsSuffixRegExp = /\.js$/,
Expand Down
5 changes: 4 additions & 1 deletionpackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,10 +45,13 @@
"gzip-js": "0.3.2",
"jsdom": "1.5.0",
"load-grunt-tasks": "1.0.0",
"native-promise-only": "0.7.6-a",
"npm": "2.1.12",
"promises-aplus-tests": "2.1.0",
"q": "1.1.2",
"qunitjs": "1.16.0",
"requirejs": "2.1.15",
"sinon": "1.12.2",
"sinon": "1.10.3",
"sizzle": "2.1.1",
"testswarm": "1.1.0"
},
Expand Down
21 changes: 21 additions & 0 deletionspromises-aplus-adapter.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
"use strict";

require( "jsdom" ).env( "", function (errors, window) {
if (errors) {
console.error(errors);
return;
}
var jQuery = require( "./" )( window );

exports.deferred = function () {
var deferred = jQuery.Deferred();

return {
get promise() {
return deferred.promise();
},
resolve: deferred.resolve.bind(deferred),
reject: deferred.reject.bind(deferred)
};
};
});
Loading

[8]ページ先頭

©2009-2025 Movatter.jp