v0.0.7
Pre-release
Pre-release
There's lots of new stuff in here! Merry Christmas!
Additions:
- added
cat - yavascript's global APIs are now available as a separate library
- you can use it together with qjsbootstrap to make your own binaries
- added
require.resolve(andstd.resolveModule) - you can now require or import json
- added
printf - added
os.execPath() - attempting to use
mkdir,cpor other common commands which we have under a different name will now throw an error instructing you to useensureDir,copy, etc instead - the parser now supports multiple shebangs at the top of a file (for nix)
- Added
parseScriptArgs(a command-line flag parser) - Added
startRepl(start the repl from your own file, with your own globals) - We now support and provide binaries for linux arm
- Added
CSV.parse,CSV.stringify - Added
YAML.parse,YAML.stringify - Added
chmod - Added
touch - Added
assertfunction, as well asassert.string(...),assert.object(...), etc, which throw TypeErrors with useful messages if their argument isn't correct - Added
grepString,grepFile, andString.prototype.grep - Added
Module.define(create your own builtin modules) - Added
String.cookedandString.dedenttemplate tag helper functions - Added
setTimeout,clearTimeout,setIntervalandclearInterval
Changes:
- Added
Pathclass (represents a filesystem path) and moved functions frompathsnamespace onto that class (both as instance and static methods) - language (js/jsx/ts/coffee) will now be autodetected for files with no extension. previously, it always assumed js
- you can now use
--langwhen running a file to specify the language for that file- it only affects the entrypoint file; all other imported/required files will have their lang determined by their extension or autodetect, as usual
cd()(with no argument) now goes to your home dir- when compiling yavascript from source, the version will now include the git sha and whether the worktree was clean or not
- Help text now has colors (when stdout is a tty)
- APIs are now lazy-loaded; not loaded until they're first used. This reduces startup time
Fixes/Other:
- fixed a memory leak in
require - Fixed lots of bugs with path string handling
- Improved the automated test suite (in the git repo)
- Other misc changes
Full Changelog: v0.0.6...v0.0.7