[Pkg-javascript-commits] [node-es6-promise] 02/06: New upstream version 4.2.4
Julien Puydt
julien.puydt at laposte.net
Thu Feb 22 19:34:30 UTC 2018
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository node-es6-promise.
commit bf1cc7172cad8db10cdfa4044bfd7a62883744d9
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Wed Feb 21 18:57:23 2018 +0100
New upstream version 4.2.4
---
.travis.yml | 6 ++----
CHANGELOG.md | 29 +++++++++++++++++++++++++++++
bin/publish_to_s3.js | 28 ----------------------------
bower.json | 28 ----------------------------
config/s3ProjectConfig.js | 26 --------------------------
lib/es6-promise/-internal.js | 19 +++++++------------
lib/es6-promise/asap.js | 3 +--
lib/es6-promise/enumerator.js | 14 ++++++--------
lib/es6-promise/polyfill.js | 20 ++++++++++----------
lib/es6-promise/promise.js | 2 --
package.json | 2 +-
11 files changed, 56 insertions(+), 121 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 5224d8b..8841825 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,10 @@
language: node_js
node_js:
- - "7"
+ - "9"
+ - "8"
- "6"
- "4"
-addons:
- chrome: stable
-
before_install:
- nvm install 6
- nvm use 6
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6ff0013..5158205 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,34 @@
# Master
+# 4.2.4
+
+* [Fixes #305] Confuse webpack
+
+# 4.2.3
+
+* Cleanup testem related build configuration
+* Use `prepublishOnly` instead of `prepublish` (thanks @rhysd)
+* Add Node.js 9, 8 to testing matrix
+* drop now unused s3 deployment files
+* internal cleanup (thanks to @bekzod, @mariusschulz)
+* Fixup Changelog
+
+# 4.2.2
+
+* Ensure PROMISE_ID works correctly
+* internal cleanup (thanks yo @mariusschulz)
+
+# 4.2.1
+
+* drop bower support
+
+# 4.2.0
+
+* drop `dist` from git repo
+* add `Promise.prototype.finally`
+* update various build related dependencies
+* add CDN links
+
# 4.1.0
* [BUGFIX] Fix memory leak [#269]
diff --git a/bin/publish_to_s3.js b/bin/publish_to_s3.js
deleted file mode 100755
index 7daf49a..0000000
--- a/bin/publish_to_s3.js
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env node
-
-// To invoke this from the commandline you need the following to env vars to exist:
-//
-// S3_BUCKET_NAME
-// TRAVIS_BRANCH
-// TRAVIS_TAG
-// TRAVIS_COMMIT
-// S3_SECRET_ACCESS_KEY
-// S3_ACCESS_KEY_ID
-//
-// Once you have those you execute with the following:
-//
-// ```sh
-// ./bin/publish_to_s3.js
-// ```
-var S3Publisher = require('ember-publisher');
-var configPath = require('path').join(__dirname, '../config/s3ProjectConfig.js');
-publisher = new S3Publisher({ projectConfigPath: configPath });
-
-// Always use wildcard section of project config.
-// This is useful when the including library does not
-// require channels (like in ember.js / ember-data).
-publisher.currentBranch = function() {
- return (process.env.TRAVIS_BRANCH === 'master') ? 'wildcard' : 'no-op';
-};
-publisher.publish();
-
diff --git a/bower.json b/bower.json
deleted file mode 100644
index defe4ec..0000000
--- a/bower.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "es6-promise",
- "namespace": "Promise",
- "description": "A polyfill for ES6-style Promises, tracking rsvp",
- "authors": [
- "Stefan Penner <stefan.penner at gmail.com>"
- ],
- "main": "dist/es6-promise.js",
- "keywords": [
- "promise"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/stefanpenner/es6-promise.git"
- },
- "bugs": {
- "url": "https://github.com/stefanpenner/es6-promise/issues"
- },
- "license": "MIT",
- "ignore": [
- "node_modules",
- "bower_components",
- "test",
- "tests",
- "vendor",
- "tasks"
- ]
-}
diff --git a/config/s3ProjectConfig.js b/config/s3ProjectConfig.js
deleted file mode 100644
index 5f3349a..0000000
--- a/config/s3ProjectConfig.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Using wildcard because es6-promise does not currently have a
- * channel system in place.
- */
-module.exports = function(revision,tag,date){
- return {
- 'es6-promise.js':
- { contentType: 'text/javascript',
- destinations: {
- wildcard: [
- 'es6-promise-latest.js',
- 'es6-promise-' + revision + '.js'
- ]
- }
- },
- 'es6-promise.min.js':
- { contentType: 'text/javascript',
- destinations: {
- wildcard: [
- 'es6-promise-latest.min.js',
- 'es6-promise-' + revision + '.min.js'
- ]
- }
- }
- }
-}
diff --git a/lib/es6-promise/-internal.js b/lib/es6-promise/-internal.js
index 038140d..925776f 100644
--- a/lib/es6-promise/-internal.js
+++ b/lib/es6-promise/-internal.js
@@ -10,7 +10,7 @@ import {
import originalThen from './then';
import originalResolve from './promise/resolve';
-export const PROMISE_ID = Math.random().toString(36).substring(16);
+export const PROMISE_ID = Math.random().toString(36).substring(2);
function noop() {}
@@ -18,7 +18,7 @@ const PENDING = void 0;
const FULFILLED = 1;
const REJECTED = 2;
-const GET_THEN_ERROR = new ErrorObject();
+const TRY_CATCH_ERROR = { error: null };
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
@@ -32,8 +32,8 @@ function getThen(promise) {
try {
return promise.then;
} catch(error) {
- GET_THEN_ERROR.error = error;
- return GET_THEN_ERROR;
+ TRY_CATCH_ERROR.error = error;
+ return TRY_CATCH_ERROR;
}
}
@@ -87,9 +87,9 @@ function handleMaybeThenable(promise, maybeThenable, then) {
maybeThenable.constructor.resolve === originalResolve) {
handleOwnThenable(promise, maybeThenable);
} else {
- if (then === GET_THEN_ERROR) {
- reject(promise, GET_THEN_ERROR.error);
- GET_THEN_ERROR.error = null;
+ if (then === TRY_CATCH_ERROR) {
+ reject(promise, TRY_CATCH_ERROR.error);
+ TRY_CATCH_ERROR.error = null;
} else if (then === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then)) {
@@ -174,11 +174,6 @@ function publish(promise) {
promise._subscribers.length = 0;
}
-function ErrorObject() {
- this.error = null;
-}
-
-const TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, detail) {
try {
diff --git a/lib/es6-promise/asap.js b/lib/es6-promise/asap.js
index 1055b92..0483201 100644
--- a/lib/es6-promise/asap.js
+++ b/lib/es6-promise/asap.js
@@ -96,8 +96,7 @@ function flush() {
function attemptVertx() {
try {
- const r = require;
- const vertx = r('vertx');
+ const vertx = Function('return this')().require('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch(e) {
diff --git a/lib/es6-promise/enumerator.js b/lib/es6-promise/enumerator.js
index ec433c9..b0eaa93 100644
--- a/lib/es6-promise/enumerator.js
+++ b/lib/es6-promise/enumerator.js
@@ -2,7 +2,6 @@ import {
isArray,
isMaybeThenable
} from './utils';
-
import {
noop,
reject,
@@ -23,10 +22,6 @@ import { makePromise, PROMISE_ID } from './-internal';
function validationError() {
return new Error('Array Methods must be provided an Array');
-}
-
-function validationError() {
- return new Error('Array Methods must be provided an Array');
};
export default class Enumerator {
@@ -109,7 +104,10 @@ export default class Enumerator {
_willSettleAt(promise, i) {
let enumerator = this;
- subscribe(promise, undefined, value => enumerator._settledAt(FULFILLED, i, value),
- reason => enumerator._settledAt(REJECTED, i, reason));
+ subscribe(
+ promise, undefined,
+ value => enumerator._settledAt(FULFILLED, i, value),
+ reason => enumerator._settledAt(REJECTED, i, reason)
+ );
}
-}
+};
diff --git a/lib/es6-promise/polyfill.js b/lib/es6-promise/polyfill.js
index 83ddf06..30db73c 100644
--- a/lib/es6-promise/polyfill.js
+++ b/lib/es6-promise/polyfill.js
@@ -5,15 +5,15 @@ export default function polyfill() {
let local;
if (typeof global !== 'undefined') {
- local = global;
+ local = global;
} else if (typeof self !== 'undefined') {
- local = self;
+ local = self;
} else {
- try {
- local = Function('return this')();
- } catch (e) {
- throw new Error('polyfill failed because global object is unavailable in this environment');
- }
+ try {
+ local = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
}
let P = local.Promise;
@@ -21,13 +21,13 @@ export default function polyfill() {
if (P) {
var promiseToString = null;
try {
- promiseToString = Object.prototype.toString.call(P.resolve());
+ promiseToString = Object.prototype.toString.call(P.resolve());
} catch(e) {
- // silently ignored
+ // silently ignored
}
if (promiseToString === '[object Promise]' && !P.cast){
- return;
+ return;
}
}
diff --git a/lib/es6-promise/promise.js b/lib/es6-promise/promise.js
index ae2a27a..8c21b6f 100644
--- a/lib/es6-promise/promise.js
+++ b/lib/es6-promise/promise.js
@@ -1,14 +1,12 @@
import {
isFunction
} from './utils';
-
import {
noop,
nextId,
PROMISE_ID,
initializePromise
} from './-internal';
-
import {
asap,
setAsap,
diff --git a/package.json b/package.json
index 0a7f5c7..05ac66e 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "es6-promise",
"namespace": "es6-promise",
- "version": "4.2.2",
+ "version": "4.2.4",
"description": "A lightweight library that provides tools for organizing asynchronous code",
"main": "dist/es6-promise.js",
"typings": "es6-promise.d.ts",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-es6-promise.git
More information about the Pkg-javascript-commits
mailing list