New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

atomic-promise

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atomic-promise - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

21

dist/atomic-promise.js

@@ -1,2 +0,2 @@

/*! atomic-promise v0.0.4 https://github.com/falsandtru/atomic-promise | (c) 2018, falsandtru | (Apache-2.0 AND MPL-2.0) License */
/*! atomic-promise v0.0.5 https://github.com/falsandtru/atomic-promise | (c) 2018, falsandtru | (Apache-2.0 AND MPL-2.0) License */
require = function () {

@@ -30,3 +30,3 @@ function r(e, n, t) {

1: [
function (require, module, exports) {
function (_dereq_, module, exports) {
},

@@ -36,3 +36,3 @@ {}

2: [
function (require, module, exports) {
function (_dereq_, module, exports) {
arguments[4][1][0].apply(exports, arguments);

@@ -43,3 +43,3 @@ },

3: [
function (require, module, exports) {
function (_dereq_, module, exports) {
'use strict';

@@ -58,8 +58,7 @@ Object.defineProperty(exports, '__esModule', { value: true });

4: [
function (require, module, exports) {
function (_dereq_, module, exports) {
'use strict';
var _a, _b;
Object.defineProperty(exports, '__esModule', { value: true });
var _a, _b;
'use strict';
const concat_1 = require('./concat');
const concat_1 = _dereq_('./concat');
var State;

@@ -163,4 +162,4 @@ (function (State) {

}
exports.AtomicPromise = AtomicPromise;
_a = status, _b = queue;
exports.AtomicPromise = AtomicPromise;
function isPromiseLike(value) {

@@ -173,3 +172,3 @@ return !!value && typeof value === 'object' && 'then' in value && typeof value.then === 'function';

'atomic-promise': [
function (require, module, exports) {
function (_dereq_, module, exports) {
'use strict';

@@ -182,3 +181,3 @@ function __export(m) {

Object.defineProperty(exports, '__esModule', { value: true });
__export(require('spica/promise'));
__export(_dereq_('spica/promise'));
},

@@ -185,0 +184,0 @@ { 'spica/promise': 4 }

@@ -1,2 +0,2 @@

/*! atomic-promise v0.0.4 https://github.com/falsandtru/atomic-promise | (c) 2018, falsandtru | (Apache-2.0 AND MPL-2.0) License */
require=function(){return function e(t,n,r){function i(s,c){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!c&&u)return u(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var h=n[s]={exports:{}};t[s][0].call(h.exports,function(e){return i(t[s][1][e]||e)},h,h.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}}()({1:[function(e,t,n){},{}],2:[function(e,t,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.concat=function(e,t){for(let n=0,r=e.length,i=t.length;n<i;++n)e[r+n]=t[n];return e}},{}],4:[function(e,t,n){"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0});const o=e("./concat");var s;!function(e){e[e.resolved=0]="resolved",e[e.rejected=1]="rejected"}(s||(s={}));const c=Symbol(),u=Symbol(),f=Symbol();class h{constructor(e){this[Symbol.toStringTag]="Promise",this[r]=[],this[i]=[];try{e(e=>{this[c][0]=this[c][0]||[0,e],this[f]()},e=>{this[c][0]=this[c][0]||[1,e],this[f]()})}catch(e){this[c][0]=[1,e],this[f]()}}static get[Symbol.species](){return h}static all(e){return e.reduce((e,t)=>e.then(e=>h.resolve(t).then(t=>o.concat(e,[t]))),h.resolve([]))}static race(e){return new h((t,n)=>void e.forEach(e=>void h.resolve(e).then(t,n)))}static resolve(e){return new h(t=>void t(e))}static reject(e){return new h((t,n)=>void n(e))}[f](){if(!this[c][0])return;const[e,t]=this[c][0];for(;this[u].length>0;){const[n,r]=this[u].shift();switch(e){case 0:a(t)?t.then(n,r):n(t);continue;case 1:r(t);continue}}}then(e,t){return new h((n,r)=>{this[u].push([t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else n(this)}]),this[f]()})}catch(e){return this.then(void 0,e)}finally(e){return this.then(e,e).then(()=>this)}}function a(e){return!!e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}r=c,i=u,n.AtomicPromise=h},{"./concat":3}],"atomic-promise":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(e("spica/promise"))},{"spica/promise":4}]},{},[1,2,"atomic-promise"]),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():Object.assign(e,t())}("undefined"!=typeof self?self:this,function(){return require("atomic-promise")});
/*! atomic-promise v0.0.5 https://github.com/falsandtru/atomic-promise | (c) 2018, falsandtru | (Apache-2.0 AND MPL-2.0) License */
require=function(){return function e(t,n,r){function i(s,c){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!c&&u)return u(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var h=n[s]={exports:{}};t[s][0].call(h.exports,function(e){return i(t[s][1][e]||e)},h,h.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}}()({1:[function(e,t,n){},{}],2:[function(e,t,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.concat=function(e,t){for(let n=0,r=e.length,i=t.length;n<i;++n)e[r+n]=t[n];return e}},{}],4:[function(e,t,n){"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0});const o=e("./concat");var s;!function(e){e[e.resolved=0]="resolved",e[e.rejected=1]="rejected"}(s||(s={}));const c=Symbol(),u=Symbol(),f=Symbol();class h{constructor(e){this[Symbol.toStringTag]="Promise",this[r]=[],this[i]=[];try{e(e=>{this[c][0]=this[c][0]||[0,e],this[f]()},e=>{this[c][0]=this[c][0]||[1,e],this[f]()})}catch(e){this[c][0]=[1,e],this[f]()}}static get[Symbol.species](){return h}static all(e){return e.reduce((e,t)=>e.then(e=>h.resolve(t).then(t=>o.concat(e,[t]))),h.resolve([]))}static race(e){return new h((t,n)=>void e.forEach(e=>void h.resolve(e).then(t,n)))}static resolve(e){return new h(t=>void t(e))}static reject(e){return new h((t,n)=>void n(e))}[f](){if(!this[c][0])return;const[e,t]=this[c][0];for(;this[u].length>0;){const[n,r]=this[u].shift();switch(e){case 0:a(t)?t.then(n,r):n(t);continue;case 1:r(t);continue}}}then(e,t){return new h((n,r)=>{this[u].push([t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else n(this)}]),this[f]()})}catch(e){return this.then(void 0,e)}finally(e){return this.then(e,e).then(()=>this)}}function a(e){return!!e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}n.AtomicPromise=h,r=c,i=u},{"./concat":3}],"atomic-promise":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(e("spica/promise"))},{"spica/promise":4}]},{},[1,2,"atomic-promise"]),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():Object.assign(e,t())}("undefined"!=typeof self?self:this,function(){return require("atomic-promise")});
const gulp = require('gulp');
const { series, parallel } = gulp;
const glob = require('glob');

@@ -8,5 +9,3 @@ const shell = cmd => require('child_process').execSync(cmd, { stdio: [0, 1, 2] });

const $ = require('gulp-load-plugins')();
const seq = require('run-sequence');
const browserify = require('browserify');
const watchify = require('watchify');
const tsify = require('tsify');

@@ -61,18 +60,15 @@ const minify = require('gulp-uglify/composer')(require('uglify-es'), console);

`,
clean: {
dist: 'dist'
}
clean: [
'dist',
]
};
function compile({ src, dest }, opts = {}) {
function compile(src, watch = false) {
let done = true;
const force = !!opts.plugin && opts.plugin.includes(watchify);
const b = browserify(Object.values(src).map(p => glob.sync(p)), {
cache: {},
packageCache: {},
...opts,
})
.require(`./index.ts`, { expose: pkg.name })
.plugin(tsify, { global: true, ...require('./tsconfig.json').compilerOptions })
.on('update', () => void bundle());
.plugin(tsify, { global: true, ...require('./tsconfig.json').compilerOptions });
return bundle();

@@ -84,24 +80,25 @@

.bundle()
.on("error", err => done = console.log(err + ''))
.on("error", err => done = console.log(err + '') || watch)
.pipe(source(`${pkg.name}.js`))
.pipe(buffer())
.pipe($.derequire())
.once('finish', () => console.timeEnd('bundle'))
.once("finish", () => done || force || process.exit(1))
.pipe($.footer(config.module))
.pipe(gulp.dest(dest));
.once("finish", () => done || process.exit(1))
.pipe($.footer(config.module));
}
}
gulp.task('ts:watch', function () {
return compile(config.ts.test, {
plugin: [watchify],
});
});
gulp.task('ts:dev', () =>
gulp.watch(config.ts.test.src, { ignoreInitial: false }, () =>
compile(config.ts.test.src, true)
.pipe($.rename({ extname: '.test.js' }))
.pipe(gulp.dest(config.ts.test.dest))));
gulp.task('ts:test', function () {
return compile(config.ts.test);
});
gulp.task('ts:test', () =>
compile(config.ts.test.src)
.pipe($.rename({ extname: '.test.js' }))
.pipe(gulp.dest(config.ts.test.dest)));
gulp.task('ts:dist', function () {
return compile(config.ts.dist)
gulp.task('ts:dist', () =>
compile(config.ts.dist.src)
.pipe($.unassert())

@@ -112,7 +109,6 @@ .pipe($.header(config.banner))

.pipe(minify({ output: { comments: /^!/ } }))
.pipe(gulp.dest(config.ts.dist.dest));
});
.pipe(gulp.dest(config.ts.dist.dest)));
gulp.task('karma:watch', function (done) {
new Server({
gulp.task('karma:dev', done =>
void new Server({
configFile: __dirname + '/karma.conf.js',

@@ -123,7 +119,7 @@ browsers: config.browsers,

},
}, done).start();
});
singleRun: false
}, done).start());
gulp.task('karma:test', function (done) {
new Server({
gulp.task('karma:test', done =>
void new Server({
configFile: __dirname + '/karma.conf.js',

@@ -137,7 +133,6 @@ browsers: config.browsers,

singleRun: true
}, done).start();
});
}, done).start());
gulp.task('karma:ci', function (done) {
new Server({
gulp.task('karma:ci', done =>
void new Server({
configFile: __dirname + '/karma.conf.js',

@@ -151,55 +146,52 @@ browsers: config.browsers,

singleRun: true
}, done).start();
});
}, done).start());
gulp.task('clean', function () {
return del([config.clean.dist]);
});
gulp.task('clean', () =>
del(config.clean));
gulp.task('install', function () {
gulp.task('install', done => {
shell('npm i --no-shrinkwrap');
done();
});
gulp.task('update', function () {
shell('ncu -ua');
gulp.task('update', done => {
shell('ncu -ux del,npm-check-updates');
shell('npm i -DE typescript@next --no-shrinkwrap');
shell('npm i --no-shrinkwrap');
done();
});
gulp.task('watch', ['clean'], function (done) {
seq(
'ts:test',
[
'ts:watch',
'karma:watch'
],
done
);
});
gulp.task('dev',
series(
'clean',
parallel(
'ts:dev',
'karma:dev',
)));
gulp.task('test', ['clean'], function (done) {
seq(
'ts:test',
'karma:test',
'ts:dist',
done
);
});
gulp.task('test',
series(
'clean',
series(
'ts:test',
'karma:test',
'ts:dist',
)));
gulp.task('dist', ['clean'], function (done) {
seq(
'ts:dist',
done
);
});
gulp.task('dist',
series(
'clean',
series(
'ts:dist',
)));
gulp.task('ci', ['clean'], function (done) {
seq(
'ts:test',
'karma:ci',
'karma:ci',
'karma:ci',
'dist',
done
);
});
gulp.task('ci',
series(
'clean',
series(
'ts:test',
'karma:ci',
'karma:ci',
'karma:ci',
'dist',
)));

@@ -1,1 +0,1 @@

export * from 'spica/promise';
export * from 'spica/promise';

@@ -1,1 +0,1 @@

export * from 'spica/promise';
export * from 'spica/promise';
{
"name": "atomic-promise",
"version": "0.0.4",
"version": "0.0.5",
"description": "Promise with no delay.",

@@ -26,2 +26,3 @@ "private": false,

"*.md",
"NOTICE",
"LICENSE"

@@ -33,17 +34,18 @@ ],

"devDependencies": {
"@types/mocha": "^5.2.5",
"@types/power-assert": "^1.5.0",
"browserify": "^16.2.3",
"del": "^3.0.0",
"gulp": "^3.9.1",
"gulp-footer": "^2.0.1",
"gulp-header": "^2.0.5",
"gulp-load-plugins": "^1.5.0",
"gulp-mocha": "^6.0.0",
"gulp-rename": "^1.4.0",
"gulp-uglify": "^3.0.1",
"@types/mocha": "^5.2.7",
"@types/power-assert": "1.5.0",
"browserify": "^16.5.0",
"del": "^5.0.0",
"gulp": "^4.0.2",
"gulp-derequire": "^2.1.0",
"gulp-footer": "^2.0.2",
"gulp-header": "^2.0.9",
"gulp-load-plugins": "^2.0.1",
"gulp-mocha": "^7.0.2",
"gulp-rename": "^2.0.0",
"gulp-uglify": "^3.0.2",
"gulp-unassert": "^1.1.0",
"isparta": "^4.1.0",
"karma": "^3.1.1",
"karma-chrome-launcher": "^2.2.0",
"isparta": "^4.1.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^1.1.2",

@@ -53,16 +55,14 @@ "karma-coveralls": "^2.1.0",

"karma-espower-preprocessor": "^1.2.0",
"karma-firefox-launcher": "^1.1.0",
"karma-firefox-launcher": "^1.2.0",
"karma-ie-launcher": "^1.0.0",
"karma-mocha": "^1.3.0",
"mocha": "^5.2.0",
"npm-check-updates": "^2.14.3",
"mocha": "^6.2.2",
"npm-check-updates": "3.1.13",
"power-assert": "^1.6.1",
"run-sequence": "^2.2.1",
"tsify": "^4.0.0",
"typescript": "3.2.0-dev.20181117",
"spica": "0.0.293",
"tsify": "^4.0.1",
"typescript": "3.8.0-dev.20191228",
"uglify-es": "^3.3.9",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0",
"watchify": "^3.11.0",
"whatwg-fetch": "^3.0.0"
"vinyl-source-stream": "^2.0.0"
},

@@ -69,0 +69,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc