forked from bmustiata/core-promise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
44 lines (44 loc) · 4.86 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
"name": "core-promise",
"description": "An ES6 and Promises/A+ 1.1 fully compliant Promise implementation, that works on IE8+",
"author": {
"name": "Bogdan Mustiata",
"email": "bogdan.mustiata@gmail.com"
},
"version": "0.3.4",
"dependencies": {},
"devDependencies": {
"ciplogic-dts-generator": "^1.5.0",
"es5-shim": "^4.1.7",
"grunt": "^0.4.5",
"grunt-contrib-clean": "^0.6.0",
"grunt-mocha-test": "^0.12.7",
"grunt-typescript": "^0.6.2",
"mocha": "^2.3.2",
"promises-aplus-tests": "^2.1.0",
"promises-es6-tests": "^0.5.0"
},
"keywords": [
"promise",
"fast",
"IE8",
"ES6"
],
"main": "./lib/Promise.js",
"bugs": {
"url": "https://github.com/bmustiata/core-promise/issues"
},
"licenses": [
{
"type": "BSD",
"url": "https://github.com/bmustiata/core-promise/blob/master/LICENSE"
}
],
"repository": {
"type": "git",
"url": "https://github.com/bmustiata/core-promise.git"
},
"readme": "# core-promise\nA promise implementation that is fully conformant to the [Promises/A+ spec](https://github.com/promises-aplus/promises-spec),\npassing all the 872 tests from the [reference tests](https://github.com/promises-aplus/promises-tests), and most of the ES6\ntests as well (except a few tests that V8 itself fails).\nComes with full TypeScript support.\nAnd works from IE8+ without any dependency.\n## IE8, IE9.. Usage\nFirst you will need to fetch the implementation of the promises via bower:\n```\nbower install core-promise\n```\nJust include it in the `<head>` of your page a reference to the core-promise js file:\n```html\n<head>\n <!-- the file is standalone, and has no dependencies -->\n <script type=\"text/javascript\" src=\"core-promise.js\"/>\n</head>\n```\n## Usage in Node\nThe recommended way to use the `core-promise` is to use the DefaultPromise class, that\nwill use the native Promise class if it is available (e.g. from node 0.12 up).\n```javascript\nvar Promise = require('core-promise').DefaultPromise,\n CorePromise = require('core-promise').CorePromise;\n// ..\n// Create new promises with:\nvar p = new Promise(function(fulfill, reject)) {\n //..\n};\n```\n## Node with TypeScript\nIf you use TypeScript, then you should know that the core-promise bundles\nthe definition file inside the module. So in order for you to get autocomplete,\nerror checking etc, just add a reference to it, like so:\n```typescript\n/// <reference path=\"node_modules/core-promise/core-promise.d.ts\"/>\nimport core = require(\"core-promise\");\nimport Promise = core.DefaultPromise;\nPromise.resolve(\"core-promise\")\n .then((x : number) => { // compile error, resolve returns a string\n console.log(x);\n });\n```\n## Test Failures\n### Internet Explorer 9\nOn IE9 only 2 tests are failing (for strict functions the this comes as the `window` object\ninstead of `undefined` - this is a browser bug). Irellevant in practice, since you wouldn't\nuse the `this` context anyway, because it should be undefined.\n### Internet Explorer 8\nOn IE8 multiple tests are failing due to the way the tests themselves are written\n(calling `Object.create`, using properties, etc. that the shims are not implementing fully).\nThe core functional tests that do the then() chaining are passing.\nNote that the implementation of `CorePromise` itself is compield in pure ES3 JavaScript, and doesn't need\n*any* polyfill, and is literally the tests implementation that fails, and not `core-promise` itself.\n### ES6\nOn ES6, the tests that fail are a very specific corner case of having inheritance of the Promise,\n(a broken Promise implementation that inherits another Promise), combined with some illegal calls\nof executors outside of the Promise. In reality this is irrelevant and can't happen in\nyour production code. Furthermore the native V8 promise implementation also fails these tests.\nAll the other sequence tests in regards with timing, are passing.\n* 2015-09-15 v0.3.4 *BugFix* Make the `DefaultPromise` to be of type `PromiseConstructor`.\n* 2015-09-15 v0.3.3 *BugFix* Updated the 'main' to point to the right implementation.\n* 2015-09-15 v0.3.2 *BugFix* CorePromise implements the Promise interface.\n* 2015-09-12 v0.3.1 *BugFix* Fixed definitions.\n* 2015-09-12 v0.3.0 Use dts-generator. Removed bower support.\n* 2015-07-22 v0.2.3 *BugFix* Added local.d.ts module file.\n* 2015-07-02 v0.2.2 *BugFix* Fixed most ES6 tests. Except the ones that V8 itself fails.\n* 2015-07-02 v0.2.1 *BugFix* Added d.ts module file. Recompiled bower client.\n* 2015-07-01 v0.2.0 ES6 compatible functions added (resolve, all, race, reject).\n* 2015-06-30 v0.1.3 Documentation.\n* 2015-06-30 v0.1.2 *BugFix* `setTimeout` call it via `()` not `.call` for IE8\n* 2015-06-30 v0.1.1 Browserify browser tests via mocha.\n* 2015-06-30 v0.1.0 Promises/A+ 1.1 compatible.\n",
"readmeFilename": "README.md",
"homepage": "http://blog.ciplogic.com"
}