question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove bundled Promise code

See original GitHub issue

Starting in 2.0, js-data will no longer bundle an ES6 Promise polyfill. It will expect a global Promise constructor, allowing developers to polyfill with whatever promise library they want. They can also give js-data a Promise constructor to use by doing:

JSData.DSUtils.Promise = myPromiselib;

They must do this before any js-data code (that uses promises) runs.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jmdobrycommented, Sep 9, 2015

@centigrade-thomas-becker @phhien203 You can remove the warning by polyfilling the ES6 Promise. An easy way to do this:

  1. <bower/npm> install --save-dev es6-promise
  2. Add <bower_components/node_modules>/es6-promise/dist/es6-promise.min.js to the top of the list of files that Karma loads
  3. That’s it 😃
1reaction
eeejaygcommented, Jul 8, 2015

Yeah, it seems so, but it’s giving me a message in IE (js data needs a promise constructor).

ej

On Wed, Jul 8, 2015 at 2:26 PM, Jason Dobry notifications@github.com wrote:

Are you using js-data-angular? You don’t need to worry about configuring js-data to use $q, js-data-angular does that for you.

— Reply to this email directly or view it on GitHub https://github.com/js-data/js-data/issues/121#issuecomment-119735232.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove es6-promise dependency · Issue #555 - GitHub
As a workaround, a webpack consumer can define an alias that resolves to an empty module, e.g. {alias: {'es6-promise': 'empty-module'}} (and ...
Read more >
javascript - How to bundle a promise from a then and catch block
I am trying to chain data from an API request together and would like to gather promises from two of the blocks into...
Read more >
NetSuite Applications Suite - record.delete.promise(options)
Quality Management Bundle Integration · Quality Management User Guide ... Setting Up Matching Promo Codes from the Marketplace or Cart to NetSuite.
Read more >
API - esbuild
Bundling with esbuild only works with statically-defined imports (i.e. when the import path is a string literal). Imports that are defined at run-time...
Read more >
Promise Types and Attributes - CFEngine 3.13 Documentation
Within a bundle, the promise types are executed in a round-robin fashion in the following normal ordering. Which promise types are available ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found