Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Node-ification #25

Open
wants to merge 18 commits into
base: feat/node
Choose a base branch
from

Commits on Aug 27, 2024

  1. Type Checking, Initial Node Test

    Tried to run `tsc -w`, but it didn't work because it couldn't resolve `@hono/hono/jsx`, changing it to `@jsr/hono__hono/jsx` makes it work now.
    
    microsoft/TypeScript#58600
    
    I'm going to see what it looks like on making this project work closer to plain ESM/Node/npm, maybe with the intent of getting it to work in frontend JS too, I'm not sure it's setup for that just yet.
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    1cc2ccd View commit details
    Browse the repository at this point in the history
  2. Lib Checking

    Going to abstract out the library parts of the code, and allow it to work anywhere, without npm, jsr, Bun, Node, or anything like that. Just plain dependencies :)
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    24d989d View commit details
    Browse the repository at this point in the history
  3. Strictest Config

    This really helps with tightening up parts of a codebase, it took me a while to get on board with it, but it really is great!
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    654b6e9 View commit details
    Browse the repository at this point in the history
  4. Unused Code Trimming

    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    d36d5da View commit details
    Browse the repository at this point in the history
  5. Strict Code + CLI Omitting

    Going to migrate the code over to Node from the backend of it first, then look into the CLI parts again down the road.
    
    Didn't know about Node's `parseArgs()` feature, that's awesome! Pretty much exactly what I've been wanting for NBTify 🔥
    
    I don't want to make a crazy complex CLI setup for that, it should be possible with just some regular modules and logging. I'll probably sway my mind on that later on, but yeah hehe.
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    ce0b4be View commit details
    Browse the repository at this point in the history
  6. Bun Types

    I think the goal is that I'm curious if this will work in the frontend, and in all environments, without needing an opinionated setup for it.
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    7c63609 View commit details
    Browse the repository at this point in the history
  7. CLI + Frontend Removal

    Going back to the basics now (this is definitely opinionated, I like having a whole universal stack whenever possible)
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    fb12672 View commit details
    Browse the repository at this point in the history
  8. Package Config

    Remaining parts from the last step, and parts of the Deno config I realized that the `package.json` could have instead.
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    da9bea8 View commit details
    Browse the repository at this point in the history
  9. Safe Index Signatures

    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    2499acd View commit details
    Browse the repository at this point in the history
  10. Src Folder Flattening

    (also opinionated on my part)
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    7f2b029 View commit details
    Browse the repository at this point in the history
  11. Main Rename pt. 1

    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    bee2876 View commit details
    Browse the repository at this point in the history
  12. Main Move pt. 2

    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    054fcfc View commit details
    Browse the repository at this point in the history
  13. Strict NodeNext + Pretty Config

    The linting for the tsconfig was mad at the lowercase 'asynciterable' lib option for some reason.
    
    This helps make things even easier to run as plain ESM in the browser, nearly there!
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    0a12519 View commit details
    Browse the repository at this point in the history
  14. NBTify Structure Typings

    They are more specific primitives to what the underlying NBT uses, this will make things more safe when loading the file. I still have to bring this to the rest of the functions that implement around these types.
    
    Borrowed this from my Structure-Reader project!
    https://github.com/Offroaders123/Structure-Reader
    
    `block_position_data` still needs specific NBTify typings, I didn't have those in my reference code.
    Offroaders123 committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    34859dd View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2024

  1. Named Imports

    Started working on adding the proper typings for things with the new edits to `types.ts`, and accessing things with the namespace gets a bit taxing, so I want to migrate to this setup before implementing that.
    
    Definitely going to look into using better-named named exports for NBTify, they don't have to be so general as I have them now.
    Offroaders123 committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    a2a1957 View commit details
    Browse the repository at this point in the history
  2. NBTify Primitive Persistence

    Started working on this the other day, now I think this version is the most structurally-sound (pun unintended)
    
    Been using this Gist for documentation :)
    https://gist.github.com/tryashtar/87ad9654305e5df686acab05cc4b6205
    
    The thing I noticed here was that NBT-specific primitives weren't being used for Int number types, and that means that they just get saved as Double values, which might not get handled correctly by the game.
    Offroaders123 committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    a36ecfb View commit details
    Browse the repository at this point in the history
  3. SNBT Conversion Removal

    I don't think this is doing any kind of additional transform to the underlying object, so it can just be passed to the `write()` function itself :)
    Offroaders123 committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    0e298b1 View commit details
    Browse the repository at this point in the history
  4. Root Name Write Config

    This option was renamed a few versions ago, so it may have used to work previously. My bad it wasn't noted much!
    Offroaders123 committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    1d47037 View commit details
    Browse the repository at this point in the history