konsumer / powerball

My attempt at predicting Powerball numbers with nodejs
10 stars 4 forks source link

Bump versions and publish to npm #3

Closed knksmith57 closed 8 years ago

knksmith57 commented 8 years ago

Excellent package. I was literally writing the sort function you pushed last night as you were writing it. When I pulled to rebase the change was already there! Nice thinking :)

npm isn't reporting a version newer than 0.2.0, even though I see a version bump for 0.3.0:

❯ npm view powerball versions

[ '0.0.1',
  '0.1.0',
  '0.1.1',
  '0.1.2',
  '0.1.3',
  '0.1.4',
  '0.1.5',
  '0.1.6',
  '0.1.8',
  '0.1.9',
  '0.1.10',
  '0.2.0' ]

Could you please bump again to include the sort and push the new versions to npm? Right now I'm cloning and linking to pick up the changes.

Thanks again for an excellent package; let's hope we all win a few dollars off this ;)

konsumer commented 8 years ago

Yeh l, I am actually actively developing it right now! predict() seems a little broken in how it removes numbers from pools, and I'm trying to fix it. Until things stabilize, feel free to put konsumer/powerball in your package.json as version. I am using npm link locally, to develop. The bump is for once I feel like it's doing what I want, when I will tag it and release to npm. Maybe we can collab. You might also be interested in a lil frontend for it in angular/es6 I am working on. I want it to be a CORS-enabled JSON service for number data & frequency counts, as well as a frontend, so people can get the winning numbers and do their own analysis on their own frontend, if they like. These are just-for-fun projects, so I'm just plugging away today, before I have to go back to work.

knksmith57 commented 8 years ago

Awesome! yeah, I just cloned and am trying to use again now. Something is off.

If I install from npm, everything is kosher:

❯ npm install --global powerball && powerball
/Users/kbsmith/.nvm/versions/node/v4.2.4/bin/powerball -> /Users/kbsmith/.nvm/versions/node/v4.2.4/lib/node_modules/powerball/cli.js
powerball@0.2.0 /Users/kbsmith/.nvm/versions/node/v4.2.4/lib/node_modules/powerball
├── fast-stats@0.0.3
├── node-fetch@1.3.3 (encoding@0.1.12)
└── yargs@3.31.0 (camelcase@2.0.1, window-size@0.1.4, y18n@3.2.0, decamelize@1.1.2, os-locale@1.4.0, string-width@1.0.1, cliui@3.1.0)
22 18 44 48 25 08
08 32 38 06 46 25
42 10 28 29 19 12
20 16 27 31 37 06
03 47 02 04 53 13
36 23 09 58 52 05
13 11 33 30 54 24
40 35 07 45 26 17
39 01 17 14 43 16
50 41 24 57 55 11

If I clone, checkout v0.2.0 (the latest published version), install, link, and run, predict throws:

❯ git clone https://github.com/konsumer/powerball.git powerball && cd $_  && npm install
Cloning into 'powerball'...
remote: Counting objects: 144, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 144 (delta 0), reused 0 (delta 0), pack-reused 139
Receiving objects: 100% (144/144), 25.84 KiB | 0 bytes/s, done.
Resolving deltas: 100% (83/83), done.
Checking connectivity... done.
npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
-
> fsevents@1.0.6 install /Users/kbsmith/Projects/personal/powerball/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/kbsmith/Projects/personal/powerball/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote

> powerball@0.3.0 prepublish /Users/kbsmith/Projects/personal/powerball
> mversion minor -m 'Bumped to v%s' --tag 'v%s' && npm run build

Updated to new version: v0.4.0
Updated package.json
Commited to git and created tag v0.4.0

> powerball@0.4.0 build /Users/kbsmith/Projects/personal/powerball
> babel index.js  --presets es2015 --plugins add-module-exports > lib.js

fast-stats@0.0.3 node_modules/fast-stats

chai@3.4.1 node_modules/chai
├── assertion-error@1.0.1
├── type-detect@1.0.0
└── deep-eql@0.1.3 (type-detect@0.1.1)

node-fetch@1.3.3 node_modules/node-fetch
└── encoding@0.1.12 (iconv-lite@0.4.13)

watch@0.17.1 node_modules/watch
├── minimist@1.2.0
└── exec-sh@0.2.0 (merge@1.2.0)

yargs@3.31.0 node_modules/yargs
├── camelcase@2.0.1
├── window-size@0.1.4
├── y18n@3.2.0
├── decamelize@1.1.2 (escape-string-regexp@1.0.4)
├── cliui@3.1.0 (wrap-ansi@1.0.0, strip-ansi@3.0.0)
├── os-locale@1.4.0 (lcid@1.0.0)
└── string-width@1.0.1 (strip-ansi@3.0.0, code-point-at@1.0.0, is-fullwidth-code-point@1.0.0)

mocha@2.3.4 node_modules/mocha
├── escape-string-regexp@1.0.2
├── commander@2.3.0
├── diff@1.4.0
├── supports-color@1.2.0
├── growl@1.8.1
├── mkdirp@0.5.0 (minimist@0.0.8)
├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
├── debug@2.2.0 (ms@0.7.1)
└── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)

mversion@1.10.1 node_modules/mversion
├── minimist@0.2.0
├── semver@4.3.6
├── minimatch@1.0.0 (sigmund@1.0.1, lru-cache@2.7.3)
├── contra@1.9.1 (atoa@1.0.0, ticky@1.0.0)
├── rc@0.5.5 (ini@1.3.4, strip-json-comments@0.1.3, deep-extend@0.2.11, minimist@0.0.10)
├── chalk@0.5.1 (ansi-styles@1.1.0, escape-string-regexp@1.0.4, supports-color@0.2.0, has-ansi@0.1.0, strip-ansi@0.3.0)
├── through2@1.1.1 (xtend@4.0.1, readable-stream@1.1.13)
├── vinyl-fs@0.3.14 (graceful-fs@3.0.8, strip-bom@1.0.0, vinyl@0.4.6, defaults@1.0.3, through2@0.6.5, mkdirp@0.5.1, glob-watcher@0.0.6, glob-stream@3.1.18)
├── cli-usage@0.1.2 (marked@0.3.5, marked-terminal@1.6.1)
└── update-notifier@0.2.2 (is-npm@1.0.0, semver-diff@2.1.0, string-length@1.0.1, latest-version@1.0.1, configstore@0.3.2)

babel-core@6.4.0 node_modules/babel-core
├── slash@1.0.0
├── babel-messages@6.3.18
├── babel-template@6.3.13
├── path-exists@1.0.0
├── shebang-regex@1.0.0
├── path-is-absolute@1.0.0
├── babel-helpers@6.4.0
├── private@0.1.6
├── babylon@6.4.2
├── convert-source-map@1.1.3
├── debug@2.2.0 (ms@0.7.1)
├── source-map@0.5.3
├── minimatch@2.0.10 (brace-expansion@1.1.2)
├── babel-types@6.4.1 (to-fast-properties@1.0.1, esutils@2.0.2)
├── babel-code-frame@6.3.13 (js-tokens@1.0.2, esutils@2.0.2, line-numbers@0.2.0, chalk@1.1.1, repeating@1.1.3)
├── babel-generator@6.4.2 (trim-right@1.0.1, repeating@1.1.3, is-integer@1.0.6, detect-indent@3.0.1)
├── babel-traverse@6.3.26 (globals@8.18.0, repeating@1.1.3, invariant@2.2.0)
├── json5@0.4.0
├── lodash@3.10.1
├── babel-register@6.3.13 (home-or-tmp@1.0.0, source-map-support@0.2.10, core-js@1.2.6)
└── babel-runtime@5.8.34 (core-js@1.2.6)

babel-plugin-transform-es2015-modules-commonjs@6.4.0 node_modules/babel-plugin-transform-es2015-modules-commonjs
├── babel-plugin-transform-strict-mode@6.3.13
├── babel-template@6.3.13 (babylon@6.4.2, babel-traverse@6.3.26, lodash@3.10.1)
├── babel-types@6.4.1 (to-fast-properties@1.0.1, esutils@2.0.2, babel-traverse@6.3.26, lodash@3.10.1)
└── babel-runtime@5.8.34 (core-js@1.2.6)

babel-plugin-add-module-exports@0.1.2 node_modules/babel-plugin-add-module-exports
├── lodash@3.10.1
└── babel-template@6.3.13 (babylon@6.4.2, babel-types@6.4.1, babel-traverse@6.3.26, babel-runtime@5.8.34)

babel-preset-es2015@6.3.13 node_modules/babel-preset-es2015
├── babel-plugin-transform-es2015-literals@6.3.13 (babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-for-of@6.3.13 (babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-shorthand-properties@6.3.13 (babel-types@6.4.1, babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-block-scoped-functions@6.3.13 (babel-runtime@5.8.34)
├── babel-plugin-check-es2015-constants@6.3.13 (babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-spread@6.4.0 (babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-template-literals@6.3.13 (babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-destructuring@6.4.0 (babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-arrow-functions@6.4.0 (babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-typeof-symbol@6.4.0 (babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-block-scoping@6.4.0 (babel-template@6.3.13, babel-types@6.4.1, babel-traverse@6.3.26, lodash@3.10.1, babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-object-super@6.4.0 (babel-helper-replace-supers@6.3.13, babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-computed-properties@6.4.0 (babel-helper-define-map@6.3.13, babel-template@6.3.13, babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-function-name@6.4.0 (babel-types@6.4.1, babel-helper-function-name@6.4.0, babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-classes@6.4.0 (babel-messages@6.3.18, babel-helper-replace-supers@6.3.13, babel-helper-optimise-call-expression@6.3.13, babel-helper-function-name@6.4.0, babel-template@6.3.13, babel-helper-define-map@6.3.13, babel-types@6.4.1, babel-traverse@6.3.26, babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-parameters@6.4.2 (babel-helper-get-function-arity@6.3.13, babel-helper-call-delegate@6.3.13, babel-template@6.3.13, babel-types@6.4.1, babel-traverse@6.3.26, babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-sticky-regex@6.3.13 (babel-helper-regex@6.3.13, babel-types@6.4.1, babel-runtime@5.8.34)
├── babel-plugin-transform-es2015-unicode-regex@6.3.13 (regexpu@1.3.0, babel-helper-regex@6.3.13, babel-runtime@5.8.34)
└── babel-plugin-transform-regenerator@6.3.26 (babel-plugin-syntax-async-functions@6.3.13, private@0.1.6, babylon@6.4.2, babel-types@6.4.1, babel-traverse@6.3.26, babel-runtime@5.8.34)

standard@5.4.1 node_modules/standard
├── eslint-config-standard-react@1.2.1
├── eslint-config-standard@4.4.0
├── eslint-plugin-standard@1.3.1
├── eslint-plugin-react@3.14.0
├── standard-engine@2.2.5 (get-stdin@4.0.1, find-root@0.1.1, xtend@4.0.1, minimist@1.2.0, pkg-config@1.1.0, multiline@1.0.2, defaults@1.0.3, dezalgo@1.0.3, deglob@1.0.2, eslint@1.9.0)
└── standard-format@1.6.10 (esformatter-spaced-lined-comment@2.0.1, stdin@0.0.1, esformatter-quotes@1.0.3, minimist@1.2.0, esformatter-eol-last@1.0.0, esformatter-semicolon-first@1.1.0, esformatter-literal-notation@1.0.1, deglob@1.0.2, esformatter@0.8.1, esformatter-jsx@2.3.11)

babel-cli@6.4.0 node_modules/babel-cli
├── slash@1.0.0
├── path-exists@1.0.0
├── log-symbols@1.0.2
├── path-is-absolute@1.0.0
├── fs-readdir-recursive@0.1.2
├── convert-source-map@1.1.3
├── v8flags@2.0.11 (user-home@1.1.1)
├── source-map@0.5.3
├── commander@2.9.0 (graceful-readlink@1.0.1)
├── chalk@1.1.1 (escape-string-regexp@1.0.4, ansi-styles@2.1.0, supports-color@2.0.0, strip-ansi@3.0.0, has-ansi@2.0.0)
├── glob@5.0.15 (inherits@2.0.1, once@1.3.3, inflight@1.0.4, minimatch@3.0.0)
├── output-file-sync@1.1.1 (xtend@4.0.1, mkdirp@0.5.1)
├── request@2.67.0 (aws-sign2@0.6.0, forever-agent@0.6.1, tunnel-agent@0.4.2, oauth-sign@0.8.0, caseless@0.11.0, is-typedarray@1.0.0, stringstream@0.0.5, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.2.1, node-uuid@1.4.7, qs@5.2.0, combined-stream@1.0.5, mime-types@2.1.9, form-data@1.0.0-rc3, hawk@3.1.2, bl@1.0.0, http-signature@1.1.0, har-validator@2.0.3)
├── bin-version-check@2.1.0 (minimist@1.2.0, semver@4.3.6, semver-truncate@1.1.0, bin-version@1.0.4)
├── lodash@3.10.1
├── babel-polyfill@6.3.14 (babel-regenerator-runtime@6.3.13, core-js@1.2.6)
├── babel-register@6.3.13 (home-or-tmp@1.0.0, source-map-support@0.2.10, core-js@1.2.6)
├── babel-runtime@5.8.34 (core-js@1.2.6)
└── chokidar@1.4.2 (inherits@2.0.1, glob-parent@2.0.0, async-each@0.1.6, is-glob@2.0.1, is-binary-path@1.0.1, readdirp@2.0.0, anymatch@1.3.0, fsevents@1.0.6)
~/Projects/personal/powerball master ⇡ 1m 9s
❯ npm link .

> powerball@0.4.0 prepublish /Users/kbsmith/Projects/personal/powerball
> mversion minor -m 'Bumped to v%s' --tag 'v%s' && npm run build

Updated to new version: v0.5.0
Updated package.json
Commited to git and created tag v0.5.0

> powerball@0.5.0 build /Users/kbsmith/Projects/personal/powerball
> babel index.js  --presets es2015 --plugins add-module-exports > lib.js

/Users/kbsmith/.nvm/versions/node/v4.2.4/bin/powerball -> /Users/kbsmith/.nvm/versions/node/v4.2.4/lib/node_modules/powerball/cli.js
/Users/kbsmith/.nvm/versions/node/v4.2.4/lib/node_modules/powerball -> /Users/kbsmith/Projects/personal/powerball

~/Projects/personal/powerball master ⇡
❯ git co v0.2.0
Note: checking out 'v0.2.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 424060d... Bumped to v0.2.0

~/Projects/personal/powerball v0.2.0
❯ powerball
/Users/kbsmith/Projects/personal/powerball/lib.js:47
    var found = pool[0].indexOf(i);
                    ^

TypeError: Cannot read property '0' of null
    at addRemaining (/Users/kbsmith/Projects/personal/powerball/lib.js:47:21)
    at Object.predict (/Users/kbsmith/Projects/personal/powerball/lib.js:192:9)
    at Object.<anonymous> (/Users/kbsmith/Projects/personal/powerball/cli.js:37:11)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:136:18)
    at node.js:963:3
konsumer commented 8 years ago

Yeh, just like hold your horses :) , I am actively working on the version that will be functional in 0.3.0. Once it's ready, I'll publish to npm. Stuff is probably a lil broken, right now.

konsumer commented 8 years ago

Ok. Many improvements, tagged & pushed to npm.

knksmith57 commented 8 years ago

looks awesome! Great work :+1: