Skip to content

Releases: samualtnorman/hackmud-script-manager

Hackmud Script Manager 0.17

13 Mar 21:05
Compare
Choose a tag to compare

Added

  • --force-quine-cheats command option

Changed

  • minify()'s autocomplete parameter is no longer a parameter and is instead an option

Hackmud Script Manager 0.16.1

01 Mar 20:57
Compare
Choose a tag to compare

Hackmud Script Manager 0.16

21 Feb 22:59
Compare
Choose a tag to compare

Hackmud Script Manager 0.15

18 Feb 15:04
Compare
Choose a tag to compare

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 from hackmud-script-manager/processScript is now called transform
  • hsm push now requires the dir arg
  • removed srcLength from the object returned by processScript() - 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

14 Feb 23:23
Compare
Choose a tag to compare

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) }
  • subscript validation
  • db method validation
  • --watch option to hsm golf
  • add support for scripts that contain illegal strings like SC$ and convert them to be hackmud compatible
  • add onReady callback option to watch()

Fixed

  • importing works again

Changed

  • PushOptions is now exported from hackmud-script-manager/push
  • hsm watch and watch() is now up-to-date feature wise with hsm push and push()
  • removed support for scripts option of push() and watch() being a string (not it must be a string array)
  • removed timeTook from the object returned by processScript()

Hackmud Script Manager 0.13.1

21 Jan 14:56
Compare
Choose a tag to compare

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

14 Jan 14:21
Compare
Choose a tag to compare

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

08 Nov 21:49
Compare
Choose a tag to compare

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 with undefined

Hackmud Script Manager 0.11.1

30 Oct 01:43
Compare
Choose a tag to compare

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

30 Oct 01:28
Compare
Choose a tag to compare

Fix

  • hsm golf now works
  • redundent ""+ at start of template string replacement
  • boolean literals are now handled properly and can be quine cheated
  • replace consts with lets, .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 dev as alias for hsm watch
  • classes in hackmud! this replacement in classes