Tranform php.js into Locutus #291

merged 203 commits into from May 2, 2016


None yet

2 participants

kvz commented May 2, 2016

These are a few of the things I have been working on in order to clean up our codebase and breathe new life into this project:

  • Added (generated) Mocha tests for every function, instead of our own test framework
  • Added a $global that works in both Browsers and Node.js (we should try to avoid this when we can though)
  • Added a CONTRIBUTORS guide as well as New Issue and Pull Request templates, so we can be more efficient using GitHub
  • Added native JSON, base64, sha1 and md5 support where available
  • Added npm versioning and releases
  • Added support for ES6, any function can be written in this JavaScript version and it will be transpiled to ES5 before we publish to npm to ensure compatability.
  • Asked Troy Dodd if we could use his stunning Locutus artwork to be our avatar (and he said yes!)
  • Assimilated a dozen of example functions that showcase how we could port four new languages to JavaScript
  • Changed all functions to make them adhere to the JavaScript Standard Style and have a max line length of 100. Travis CI will fail when new additions do not adhere
  • Deprecated/documented all functions using eval, new Function and other bad practices
  • Fixed around 50 failed tests that were previously marked as skipped (still a few to go)
  • Made it so that all functions can be required individually via npm
  • Made it so that dependencies between functions are now handled via CommonJS require
  • Moved the website from Jekyll to Hexo, so that we lose a Ruby dependency and everything needed to work on the website can be npm installed
  • Refactored the utility class
  • Removed _workbench and _experimental folders. They are available for reference in 1.3.2, but making them harder to find for newcomers should help avoid complaints and confusion. If you want to experiment, we can use local files or branches when it's time to collaborate.
added some commits Apr 18, 2016
@kvz WIP 3f626db
@kvz switch to module.exports c2400b0
@kvz Remove cleanup 59e7718
@kvz Throw on parse error 0e90f51
@kvz Revert "switch to module.exports"
This reverts commit c2400b0.
@kvz Module for all 785f571
@kvz module.exports 2c2db48
@kvz Move to dist 2ebbcd0
@kvz Move to php 109808c
@kvz Revert "module.exports"
This reverts commit 2c2db48.
@kvz Revert "Module for all"
This reverts commit 785f571.
@kvz Revert "Revert "Module for all""
This reverts commit 7462314.
@kvz Revert "Revert "module.exports""
This reverts commit ff80b51.
@kvz Add indexes and ruby example 923b342
@kvz Phpjs->locutus 149ba02
@kvz Fix tests 65ab51d
@kvz Copy 09431d6
@kvz Fix tests 2e254ea
@kvz Add a golang function ec429db
@kvz Move playgrounds out of npm 9d3986b
@kvz pp 7d5fa22
@kvz io 63707ab
@kvz drop the js 0919795
@kvz About 39125e0
@kvz Briefness 24db428
@kvz Add python cbb6542
@kvz Fix tests e2fd4f2
@kvz Fixes 79b3500
@kvz Use actual example b8b3239
@kvz Hal 9a142ff
@kvz report 6c4405e
@kvz Allow passing in full path c88c961
@kvz Debug 6a20cf4
@kvz Gen abs e3948e5
@kvz link fixes 5193509
@kvz Niceness 206dfe8
@kvz Function page per language 5647bfc
@kvz Path fixes 8e8051f
@kvz Small testfix 8264838
@kvz Tests cde0c2a
@kvz Fix tests e38ee1d
@kvz Fix tests fd71c75
@kvz Update todo b1cbdf7
@kvz Less verbose 5743061
@kvz Upgrade node dependencies e299b3f
@kvz Whitespace 36c54a0
@kvz Lint is_array 44d1499
@kvz No exceptions d8b00a0
@kvz Todo d0f0fc6
@kvz Todo fac5b2e
@kvz Fix build 50cfd1d
@kvz Merge branch 'master' into locutus 500db61
@kvz Todo 29f9119
@kvz Report failing tests 98daf10
@kvz Fix eqeqeq linting 3ba6d77
@kvz Fix lint no-throw-literal cc56cf3
@kvz Remove experimental and workbench. We have branches and PRs now : ) ead556b
@kvz Move to Util 781c4a7
@kvz Todo 64bb53e
@kvz Birth post 4139d2e
@kvz Rewording ab994aa
@kvz Node 07e6598
@kvz Add github issue templates 72c6083
@kvz Fix cp 1da1828
@kvz First swing at go porter 2ad71f6
@kvz First swing at deeper go package 571b635
@kvz Refac f1bab9b
@kvz Move deps to require dc71388
@kvz First swing at test writer bf6e5af
@kvz Switch to mocha testing 0ab1e4f
@kvz Fixed tests 78f0ef2
@kvz Todo 0a6148a
@kvz Fix Go strings.Count 795d191
@kvz Update abs 5abe4b8
@kvz Simplify util test 66d3cf8
@kvz Remove trailing semicolons from examples 64221e9
@kvz Refactoring c350028
@kvz Rewording 0ba26b4
@kvz Website fixes ea2a3ca
@kvz Add more 8ed2e96
@kvz Make authors use language collection 3284e07
@kvz Add credit 93967f3
@kvz Fix tests 77aee1d
@kvz Runall 1d1e94e
@kvz Cleanup c393131
@kvz Use budo for browser testing a62338d
@kvz Fix tests 119844d
@kvz Credit @kukawski better aab55e7
@kvz Browser is more playground, not test now 6ad160d
@kvz Browserify for single builds too e2ec111
@kvz Badges 6bf2cc5
@kvz Stylng 249fb80
@kvz Rewording about 25b0fb0
@kvz Hall of Fame 274fec1
@kvz editfile 04601f9
@kvz Refactoring c43ebe4
@kvz Remove one more bash dependency by porting reindex to js cc279ad
@kvz Rewrite all the things 678fbd8
@kvz Fix test e59ddf6
@kvz Add beautify 7d056cc
and others added some commits Apr 25, 2016
@kvz Exclude lang 2b76ea6
@kvz Beautify ddf80c5
@kvz End with newline 9245831
@kvz keep_comment_indentation 28c85ab
@kvz Beautify corrupts comments, let's not make it standard for now 7304a19
@kvz Upgrade node dependencies
- bump eslint
- Removed "arrow-parens" rule
  From: feross/standard#414
- Merge pull request #28 from mmazzarolo/patch-1
  Removed "arrow-parens" rule
- New rule: Disallow unnecessary escape usage (no-useless-escape)
- Disallow duplicate imports (no-duplicate-imports)
- Disallow unmodified conditions of loops (no-unmodified-loop-condition)
- Disallow whitespace before properties (no-whitespace-before-property)
- Require Camelcase (camelcase)
- 5.2.0
@kvz Split packages b9bb7d3
@kvz Go splitter a9cb3ff
@kvz Port strings.LastIndex 9dba32a
@kvz That's not a real thing 1457ad7
@kvz Add eslint camelcase exceptions 6e40080
@kvz Update homepage 1767118
@kvz Whitespace 286a475
@kvz First swing at es6 compatibility 83e1476
@kvz Minor refactoring 67a9502
@kvz Legacykiller 34d803c
@kvz New global 31e37e1
@kvz Todo 84ad847
@kvz Make array functions strict d88d194
@kvz Fix is_array aa7f97f
@kvz Fix strcoll 71088c4
@kvz Fix strcol when ran globally 581792f
@kvz Remove str_replace dependency on window 02c7ebb
@kvz Fix money_format a843606
@kvz Test fixes 283e738
@kvz More test fixes ef66755
@kvz Allow less skips 9bcfc6b
@kvz Configurable skip 2634dbe
@kvz Fix more tests ecc6191
@kvz Fix uniqid 24bc17d
@kvz Fix is_callable 470ffe8
@kvz Fix parse_str 6b58abb
@kvz Write relative test dependency paths f57de2f
@kvz Fix i18n_loc_get_default a5b0eaa
@kvz human beings 5f6f87b
@kvz Fix gettimeofday 189f93e
@kvz Fix getdate e7d6534
@kvz Fix krsort 1c9feb1
@kvz Fix array_replace_recursive 30860e9
@kvz One shall pass 71c334c
@kvz Show test file 922fca7
@kvz Add required newline 2f32325
@kvz Linting 19e7b95
@kvz Lint abs d0c1e42
@kvz lint bc c89407f
@kvz Lint xdiff_string_diff 5979819
@kvz Lint d289c45
@kvz Skip again 54796a9
@kvz More linting. Use native base 64 encoding if available 5447a27
@kvz Lint 8024fc6
@kvz Lint 1bd8c4d
@kvz Lint f3f973f
@kvz Lint 21a67b9
@kvz Lint e36722c
@kvz Lint 8c99b9c
@kvz Lint 7fafc86
@kvz Lint 3922895
@kvz Lint 253f36b
@kvz Lint 9fc9705
@kvz Lint 27cbd57
@kvz Make Travis fail on eslint issues 32179d3
@kvz Deprecate support for node_js: 0.8 242dbad
@kvz Deprecate 0.8 for real now d768987
@kvz Try a Travis build without addons 27a1149
@kvz rite one function (`ip2long`) in ES6 and make it pass tests & linting 4925fe7
@kvz Either deprecate or document all functions using `eval` or `new Funct…
@kvz Index all `note`s 16cf2df
@kvz Remove `// (BEGIN|END) (STATIC|REDUNDANT)` 6701ee2
@kvz Don't use reserved work from 7d3e3a5
@kvz Rename `strictForIn` to `sortByReference` b45d862
@kvz Mark todo as completed 2a11ea4
@kvz Add a note about XUL 370785d
@kvz Use native `sha1` and `md5` encoding when available 8eafa59
@kvz Test `is_array` in-browser to see if the `require` for `ini_get` work…
…s correctly with Browserify
@kvz Track all cases of `setTimeout`, use them without window prefix. Remo…
…ve `codez` replace hack
@kvz Have _one_ way of getting an ini value and it's default 23ad276
@kvz Do not pass values by reference via the `window` global, use e.g. `co…
…untObj.value` and `errorObj.value` instead
@kvz Lint 5c13df8
@kvz Lint 345a921
@kvz Lint 91f987c
@kvz Lint 90b7117
@kvz Enforce a 100 character line-length via eslint
and change all functions accordingly
@kvz Replace single line `/**/` comments with `//` a7c64b7
@kvz Change `fix(me)?` and `Todo` to `@todo` 9ef860a
@kvz Update contributor guide 97a8409
@kvz Update changelog 9262508
@kvz Post improvements 751f805
@kvz todo 1478fdb
@kvz Cleanup 6f91b51
@kvz Transpile to ES5 before publishing to npm 0af21e1
@kvz Rework post 78f056f
@kvz Use Hexo instead of Jekyll for our website
So we don't have to have any Ruby dependencies

Squashed commit of the following:

commit da192c6
Author: Kevin van Zonneveld <>
Date:   Mon May 2 15:51:21 2016 +0200

    Rename `_locutus_shared` to `_helpers`. Rename `_locutus_shared_bc` to `_bc`

commit 59b68d7
Author: Kevin van Zonneveld <>
Date:   Mon May 2 14:12:38 2016 +0200

    Fix tests

commit b5f87be
Author: Kevin van Zonneveld <>
Date:   Mon May 2 11:09:14 2016 +0200


commit f7875a0
Author: Kevin van Zonneveld <>
Date:   Mon May 2 10:16:11 2016 +0200


commit 5b029f8
Author: Kevin van Zonneveld <>
Date:   Sun May 1 23:23:08 2016 +0200

    Fix jumpy scrolling due to on the githubs

commit 148a5ab
Author: Kevin van Zonneveld <>
Date:   Sun May 1 23:05:36 2016 +0200

    Add package type

commit c7822cf
Author: Kevin van Zonneveld <>
Date:   Sun May 1 21:12:30 2016 +0200

    Port add more

commit 8eea314
Author: Kevin van Zonneveld <>
Date:   Sun May 1 20:35:51 2016 +0200

    Ported function layout

commit 2685b9c
Author: Kevin van Zonneveld <>
Date:   Sun May 1 19:25:30 2016 +0200

    Fix authors

commit 08557f4
Author: Kevin van Zonneveld <>
Date:   Sun May 1 16:16:32 2016 +0200


commit d4b3ae0
Author: Kevin van Zonneveld <>
Date:   Sun May 1 12:20:35 2016 +0200


commit e848be6
Author: Kevin van Zonneveld <>
Date:   Sun May 1 11:59:17 2016 +0200

    Better injection

commit 5a14b88
Author: Kevin van Zonneveld <>
Date:   Sun May 1 11:52:59 2016 +0200


commit 77966c4
Author: Kevin van Zonneveld <>
Date:   Sun May 1 11:45:11 2016 +0200


commit 100ee7f
Author: Kevin van Zonneveld <>
Date:   Sun May 1 11:35:54 2016 +0200


commit 000e0ae
Author: Kevin van Zonneveld <>
Date:   Sun May 1 10:21:27 2016 +0200

    Add icarus theme
@kvz Update todo 5467228
@kvz Profile 193455e
@AJvanLoon AJvanLoon Update 3543c12
@AJvanLoon AJvanLoon Update f978f58
@kvz Fixes
@kvz kvz merged commit 18e21b2 into master May 2, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
continuous-integration/travis-ci/push The Travis CI build passed
@kvz kvz deleted the locutus branch May 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment