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

@react-dnd/asap

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-dnd/asap - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

.swcrc

18

CHANGES.md

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

## 2.0.6

@@ -21,6 +20,6 @@

First, the ASAP source is CommonJS only and designed with [Browserify][] and
[Browserify-compatible][Mr] module loaders in mind.
[Browserify-compatible][mr] module loaders in mind.
[Browserify]: https://github.com/substack/node-browserify
[Mr]: https://github.com/montagejs/mr
[browserify]: https://github.com/substack/node-browserify
[mr]: https://github.com/montagejs/mr

@@ -50,6 +49,6 @@ The new version has been refactored in two dimensions.

- [asap.js](https://github.com/kriskowal/asap/blob/master/asap.js)
- [raw.js](https://github.com/kriskowal/asap/blob/master/raw.js)
- [browser-asap.js](https://github.com/kriskowal/asap/blob/master/browser-asap.js)
- [browser-raw.js](https://github.com/kriskowal/asap/blob/master/browser-raw.js)
- [asap.js](https://github.com/kriskowal/asap/blob/master/asap.js)
- [raw.js](https://github.com/kriskowal/asap/blob/master/raw.js)
- [browser-asap.js](https://github.com/kriskowal/asap/blob/master/browser-asap.js)
- [browser-raw.js](https://github.com/kriskowal/asap/blob/master/browser-raw.js)

@@ -71,3 +70,2 @@ The new version has also been rigorously tested across a broad spectrum of

[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md
[continuous integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md

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

"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
//# sourceMappingURL=types.js.map

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

Copyright 2009–2014 Contributors. All rights reserved.

@@ -21,2 +20,1 @@

IN THE SOFTWARE.
{
"name": "@react-dnd/asap",
"version": "4.0.0",
"version": "4.0.1",
"description": "High-priority task queue for Node.js and browsers",

@@ -11,46 +11,30 @@ "keywords": [

"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/kriskowal/asap.git"
"main": "dist/cjs/index.js",
"types": "dist/types/index.d.ts",
"exports": {
"import": "./dist/esm/index.mjs",
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts"
},
"main": "dist/cjs/node/index.js",
"module": "dist/esm/browser/index.js",
"types": "lib/node/index.d.ts",
"react-native": {
"domain": false
},
"browser": {
"./asap": "./dist/esm/browser/asap.js",
"./asap.js": "./dist/esm/browser/asap.js",
"./raw": "./dist/esm/browser/raw.js",
"./raw.js": "./dist/esm/browser/raw.js"
},
"scripts": {
"build": "./scripts/build.sh",
"lint": "tsdx lint",
"test": "tsdx test"
"clean": "shx rm -rf dist/",
"build_types": "tsc -b .",
"build_esm": "swc -C module.type=es6 -d dist/esm src/",
"build_cjs": "swc -C module.type=commonjs -d dist/cjs src/",
"esm_hack": "node ../../scripts/esmify.mjs",
"build": "run-s build_types build_esm build_cjs esm_hack"
},
"peerDependencies": {},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
}
"repository": {
"type": "git",
"url": "https://github.com/react-dnd/react-dnd"
},
"prettier": {
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
},
"devDependencies": {
"@types/jest": "^24.0.23",
"@babel/core": "^7.7.5",
"@babel/cli": "^7.7.5",
"@babel/preset-env": "^7.7.5",
"babel-preset-env": "^1.7.0",
"husky": "^3.1.0",
"tsdx": "^0.11.0",
"tslib": "^1.10.0",
"typescript": "^3.7.2"
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.161",
"@types/jest": "^24.9.1",
"@types/node": "^17.0.23",
"npm-run-all": "^4.1.5",
"shx": "^0.3.4",
"typescript": "^4.6.3"
}
}
}

@@ -6,6 +6,6 @@ # ASAP

Promise and asynchronous observer libraries, as well as hand-rolled callback
programs and libraries, often need a mechanism to postpone the execution of a
programs and libraries, often need a mechanism to postpone the running of a
callback until the next available event.
(See [Designing API’s for Asynchrony][Zalgo].)
The `asap` function executes a task **as soon as possible** but not before it
(See [Designing API’s for Asynchrony][zalgo].)
The `asap` function runs a task **as soon as possible** but not before it
returns, waiting only for the completion of the current event and previously

@@ -16,10 +16,10 @@ scheduled tasks.

asap(function () {
// ...
});
// ...
})
```
[Zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony
[zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony
This CommonJS package provides an `asap` module that exports a function that
executes a task function *as soon as possible*.
ruts a task function _as soon as possible_.

@@ -31,3 +31,3 @@ ASAP strives to schedule events to occur before yielding for IO, reflow,

ASAP provides a fast event queue that will execute tasks until it is
ASAP provides a fast event queue that will run tasks until it is
empty before yielding to the JavaScript engine's underlying event-loop.

@@ -57,5 +57,5 @@ When a task gets added to a previously empty event queue, ASAP schedules a flush

It also returns a handler and can be canceled.
For a `setImmediate` shim, consider [YuzuJS setImmediate][setImmediate].
For a `setImmediate` shim, consider [YuzuJS setImmediate][setimmediate].
[setImmediate]: https://github.com/YuzuJS/setImmediate
[setimmediate]: https://github.com/YuzuJS/setImmediate

@@ -67,3 +67,3 @@ Take care.

This is behaviorally equivalent to an infinite loop.
Just as with infinite loops, you can monitor a Node.js process for this behavior
As with infinite loops, you can monitor a Node.js process for this behavior
with a heart-beat signal.

@@ -75,5 +75,5 @@ As with infinite loops, a very small amount of caution goes a long way to

function loop() {
asap(loop);
asap(loop)
}
loop();
loop()
```

@@ -103,5 +103,5 @@

if (process.domain) {
task = process.domain.bind(task);
task = process.domain.bind(task)
}
rawAsap(task);
rawAsap(task)
```

@@ -118,3 +118,2 @@

## Compatibility

@@ -132,3 +131,3 @@

[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md
[continuous integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md

@@ -145,3 +144,3 @@ ![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)

However, once the task queue begins flushing, it will not yield until the queue
is empty, even if the queue grows while executing tasks.
is empty, even if the queue grows while running tasks.

@@ -154,3 +153,3 @@ The following browsers allow the use of [DOM mutation observers][] to access

[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue
[DOM mutation observers]: http://dom.spec.whatwg.org/#mutation-observers
[dom mutation observers]: http://dom.spec.whatwg.org/#mutation-observers

@@ -166,3 +165,3 @@ - Android 4–4.3

In the absense of mutation observers, there are a few browsers, and situations
like web workers in some of the above browsers, where [message channels][]
like web workers in some of the above browsers, where [message channels][]
would be a useful way to avoid falling back to timers.

@@ -194,3 +193,2 @@ Message channels give direct access to the HTML [task queue][], so the ASAP

## Heritage

@@ -200,3 +198,3 @@

It originally had a naïve implementation in terms of `setTimeout`, but
[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be
[Malte Ubl][nonblocking] provided an insight that `postMessage` might be
useful for creating a high-priority, no-delay event dispatch hack.

@@ -212,14 +210,14 @@ Since then, Internet Explorer proposed and implemented `setImmediate`.

[Q]: https://github.com/kriskowal/q
[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html
[q]: https://github.com/kriskowal/q
[nonblocking]: http://www.nonblocking.io/2011/06/windownexttick.html
For further reading, Nicholas Zakas provided a thorough article on [The
Case for setImmediate][NCZ].
Case for setImmediate][ncz].
[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/
[ncz]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/
Ember’s RSVP promise implementation later [adopted][RSVP ASAP] the name ASAP but
Ember’s RSVP promise implementation later [adopted][rsvp asap] the name ASAP but
further developed the implentation.
Particularly, The `MessagePort` implementation was abandoned due to interaction
[problems with Mobile Internet Explorer][IE Problems] in favor of an
[problems with Mobile Internet Explorer][ie problems] in favor of an
implementation backed on the newer and more reliable DOM `MutationObserver`

@@ -229,4 +227,4 @@ interface.

[IE Problems]: https://github.com/cujojs/when/issues/197
[RSVP ASAP]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
[ie problems]: https://github.com/cujojs/when/issues/197
[rsvp asap]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js

@@ -239,11 +237,10 @@ In addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained

At the same time, the exception handling in `asap` was factored into separate
implementations for Node.js and browsers, using the the [Browserify][Browser
Config] `browser` property in `package.json` to instruct browser module loaders
and bundlers, including [Browserify][], [Mr][], and [Mop][], to use the
implementations for Node.js and browsers, using the the [Browserify][browser config] `browser` property in `package.json` to instruct browser module loaders
and bundlers, including [Browserify][], [Mr][], and [Mop][], to use the
browser-only implementation.
[Browser Config]: https://gist.github.com/defunctzombie/4339901
[Browserify]: https://github.com/substack/node-browserify
[Mr]: https://github.com/montagejs/mr
[Mop]: https://github.com/montagejs/mop
[browser config]: https://gist.github.com/defunctzombie/4339901
[browserify]: https://github.com/substack/node-browserify
[mr]: https://github.com/montagejs/mr
[mop]: https://github.com/montagejs/mop

@@ -254,2 +251,1 @@ ## License

MIT License (enclosed)

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

export { asap as nodeAsap } from './node/asap';
export { asap as browserAsap } from './node/asap';
export * from './asap.js'
export * from './types.js'
export * from './AsapQueue.js'
export * from './TaskFactory.js'

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

export type Task = any;
export type Domain = any;
export interface Task {
call(): void
}
export type TaskFn = () => void
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"target": "es5",
"module": "esnext",
"lib": ["dom", "esnext"],
"importHelpers": true,
"declaration": true,
"sourceMap": true,
"rootDir": "./src",
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"baseUrl": "./src",
"paths": {
"*": ["src/*", "node_modules/*"]
},
"jsx": "react",
"esModuleInterop": true,
"outDir": "lib"
"emitDeclarationOnly": true,
"outDir": "dist/types",
"types": ["node", "jest"]
},
"files": ["src/browser/index.ts", "src/node/index.ts"],
"include": ["./src"]
}
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