termsite
- 2 Devlogs
- 14 Total hours
Release 1.1.0
The npm releases have issues with importing other files from within the package.
I did a much better job with small commits and using branches. I also improved my use of CI/CD with better test and coverage reporting. Despite the improvements in my test flow I still need to work on improving coverage. Some tests I tried to get to cover cases for the execution component did not cover the lines I intended them to. This combines with my lack of a good debug tooling in my editor, NeoVim, to make it difficult to write tests for specific lines.
The execution component exists as a result of the way preact checks props updates. Because the function for changing the env is passed with a bind it returns a new reference every time as a result the command re-renders which may cause a change to the env forcing the terminal to re-render. Yay, state loop :( /sar. To prevent this the execution component uses lifecycle methods to abort the render before it happens if there are no changes in the env.env, command, and commands props. This prevents re-renders that cause state loops, yay!
Releases to npm are currently empty for some reason?
In the future one thing I need to work more on is small commits. The commit for the terminal component grew a lot and got out of hand as I was finally beginning to use systems like tests in context. I also need to use branches and issue driven development more especially because semantic release pushes to npm with every commit to main.
I am using preact because it is very light. Overall I want this package to focus on remaining as light as possible so it can be put into websites with no performance impact
AI was used when I was figuring out how to setup jest with preact. No other AI was used in this devlog.