Releases: samualtnorman/hackmud-script-manager
Releases · samualtnorman/hackmud-script-manager
Hackmud Script Manager 0.17
Added
--force-quine-cheatscommand option
Changed
minify()'sautocompleteparameter is no longer a parameter and is instead an option
Hackmud Script Manager 0.16.1
v0.16.1 0.16.1
Hackmud Script Manager 0.16
v0.16.0 0.16.0
Hackmud Script Manager 0.15
Added
- support for
SC$and other unsafe things in regexes //in strings and regexes automatically has a backslash inserted to stop hackmud from treating it like a comment- preprocessor syntax looking strings in strings and regexes automatically have backslashes inserted to stop hackmud from treating it like preprocessor syntax
hsm pushcan now be passed a--skip-minifyoption
Changes
- the
compileexport fromhackmud-script-manager/processScriptis now calledtransform hsm pushnow requires thedirarg- removed
srcLengthfrom the object returned byprocessScript()- it's quite difficult to maintain at this point _TIMEOUTand_STARTare only shortened to_TOand_STwhen minifying the script
Fixed
- "could not find module Proxy treating as external module" message
_SCRIPT_USERand_FULL_SCRIPT_NAMEnot being replaced properly in some cases_TIMEOUTnot being shortened to_TO
Hackmud Script Manager 0.14
Added
- you can now reference a subscript or any other preprocessor function without calling it, and it'll be automatically wrapped as an arrow function
- e.g.
let fakeScriptor = { name: "scripts.trust", call: #fs.scripts.trust }->let fakeScriptor = { name: "scripts.trust", call: (...args) => #fs.scripts.trust(args) }
- e.g.
- subscript validation
- db method validation
--watchoption tohsm golf- add support for scripts that contain illegal strings like
SC$and convert them to be hackmud compatible - add
onReadycallback option towatch()
Fixed
- importing works again
Changed
PushOptionsis now exported fromhackmud-script-manager/pushhsm watchandwatch()is now up-to-date feature wise withhsm pushandpush()- removed support for
scriptsoption ofpush()andwatch()being a string (not it must be a string array) - removed
timeTookfrom the object returned byprocessScript()
Hackmud Script Manager 0.13.1
Fix
- type declarations for people
importing this to use the api
Changed
- allow comments before script when it's just a classic function expression
- treat sole function declaration in script as if it's the default export
Hackmud Script Manager 0.13
Added
- replace bigint literals with calls to
BigInt() - global variables (variables outside the main function)
- scripts can now
exportstuff - print time took in
hsm golf - various things that make the generated code use less characters
--skip-minifycan now be passed to skip minifying- message when no scripts could be found
- compile time constants
_SOURCE,_BUILD_DATE,_SCRIPT_USER,_SCRIPT_NAME,_FULL_SCRIPT_NAME,_SECLEVEL,_EXPORTS - importing modules (including node modules)
- polyfill
Function.prototype,Object,setPrototypeOf(),Object.getPrototypeOf() - support for new and upcoming js syntax
- quine cheat objects and arrays containing a template string with no expressions
Changed
npx hsm config setnow just takes 2 arguments- the main function is now whatever the default export is
- no longer mangle names by default (
--mangle-namescan override this)
Fixed
- no longer quine cheat empty objects and arrays
- no longer quine cheat objects and arrays inside loops and functions
- classes within classes
- support for node 12
- trying to quine cheat non-json compatible objects
- finding preprocessor directives inside strings and comments
Removed
npx hsm test
Hackmud Script Manager 0.12
Fix
- potential collisions from internal temporary variable names with script's variables names
"-"in({ "-": "bar" })not being quine cheated properly
Add
- function declarations are now converted to
constarrow functions which use less characters - support for new and upcoming javascript syntax
- quine cheat object keys
- quine cheat entire json compatible objects and arrays (even nested)
Change
thisoutside of classes is now replaced withundefined
Hackmud Script Manager 0.11.1
Fix
test.jsonfile being created with random ast stuff- scripts being nullsec despite not using other scripts due to
#ns.scripts.quine()from quine cheats
Change
- stuff can now be individually imported using import path for better tree shaking e.g.
import processScript from "hackmud-script-manager/processScript.js"
Hackmud Script Manager 0.11
Fix
hsm golfnow works- redundent
""+at start of template string replacement - boolean literals are now handled properly and can be quine cheated
- replace
consts withlets,.prototypes with["prototype"]s, and.__proto__s with["__proto__"]s in non quine cheated
Add
- throw error on
this - push single script with
hsm push <script name> hsm devas alias forhsm watch- classes in hackmud!
thisreplacement in classes