promises-aplus / promises-spec

An open standard for sound, interoperable JavaScript promises—by implementers, for implementers.
https://promisesaplus.com/
Creative Commons Zero v1.0 Universal
1.84k stars 171 forks source link

Add my new Promise implementation #262

Closed yanguango closed 6 years ago

yanguango commented 6 years ago

A 150 loc Promises/A+ implementation with ES6 class

briancavalier commented 6 years ago

Hi @yanguango, thanks for adding your implementation!

I had trouble running the tests, so I couldn't verify that it passes the test suite. It looks like you need to add babel-cli to you package.json, since you use the babel executable. Let us know once you've address that, I'll give it another go. Thanks!

Here's a transcript of what happened:

❯ git clone git@github.com:yanguango/promised.git
Cloning into 'promised'...
remote: Counting objects: 62, done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 62 (delta 19), reused 44 (delta 10), pack-reused 0
Receiving objects: 100% (62/62), 19.76 KiB | 749.00 KiB/s, done.
Resolving deltas: 100% (19/19), done.

/private/tmp
❯ cd promised/

/private/tmp/promised master
❯ npm install
npm WARN promised@1.0.0 No repository field.

added 79 packages in 2.327s

/private/tmp/promised master*
❯ npm run build

> promised@1.0.0 build /private/tmp/promised
> babel src/**/* test/**/* -d dist

sh: babel: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! promised@1.0.0 build: `babel src/**/* test/**/* -d dist`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the promised@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/brian/.npm/_logs/2018-02-02T12_47_59_654Z-debug.log

/private/tmp/promised master*
❯ less package-lock.json

/private/tmp/promised master*
❯ ls node_modules/.bin
_mocha   jade   json5         mkdirp  promises-aplus-tests
babylon  jsesc  loose-envify  mocha   supports-color

👆 babel executable missing from node_modules/.bin

yanguango commented 6 years ago

Hi @briancavalier, Thanks for your reviewing of my PR. I have added babel-cli to the dependencies, and tested on my local machine. Could you give it one more try?

briancavalier commented 6 years ago

Looks good, @yanguango. All tests passed. Well done!