Releases: samualtnorman/hackmud-script-manager
Releases · samualtnorman/hackmud-script-manager
Hackmud Script Manager 0.17
Added
--force-quine-cheats
command option
Changed
minify()
'sautocomplete
parameter 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 push
can now be passed a--skip-minify
option
Changes
- the
compile
export fromhackmud-script-manager/processScript
is now calledtransform
hsm push
now requires thedir
arg- removed
srcLength
from the object returned byprocessScript()
- it's quite difficult to maintain at this point _TIMEOUT
and_START
are only shortened to_TO
and_ST
when minifying the script
Fixed
- "could not find module Proxy treating as external module" message
_SCRIPT_USER
and_FULL_SCRIPT_NAME
not being replaced properly in some cases_TIMEOUT
not 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
--watch
option tohsm golf
- add support for scripts that contain illegal strings like
SC$
and convert them to be hackmud compatible - add
onReady
callback option towatch()
Fixed
- importing works again
Changed
PushOptions
is now exported fromhackmud-script-manager/push
hsm watch
andwatch()
is now up-to-date feature wise withhsm push
andpush()
- removed support for
scripts
option ofpush()
andwatch()
being a string (not it must be a string array) - removed
timeTook
from the object returned byprocessScript()
Hackmud Script Manager 0.13.1
Fix
- type declarations for people
import
ing 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
export
stuff - print time took in
hsm golf
- various things that make the generated code use less characters
--skip-minify
can 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 set
now just takes 2 arguments- the main function is now whatever the default export is
- no longer mangle names by default (
--mangle-names
can 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
const
arrow 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
this
outside of classes is now replaced withundefined
Hackmud Script Manager 0.11.1
Fix
test.json
file 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 golf
now works- redundent
""+
at start of template string replacement - boolean literals are now handled properly and can be quine cheated
- replace
const
s withlet
s,.prototype
s 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 dev
as alias forhsm watch
- classes in hackmud!
this
replacement in classes