Commit graph

17 commits

Author SHA1 Message Date
23e601fab4 chore: update min supported node version to >=18 (#19)
Update required minimum node version to >=18 in preparation for updating other dependencies that require newer node versions.
2024-07-15 00:01:14 -07:00
cccea423d9 chore: update optional deps (ws & node-watch)
Updates node-watch dep to ^0.7.1 which is a breaking change in the interface of watch function for compatibility on certain windows systems that don't give event and filename info.

Also updates ws dep to v^7.4.3, minor version and bug fixes.
2021-02-28 08:26:02 -08:00
b4fb973fc5 fix: eslint warning in dev runner 2021-02-28 08:22:44 -08:00
eef25d360d feat: add dangerouslySetInnerHTML attr
This adds are new attribute to Elements, "dangerouslySetInnerHTML", which like the same attribute from React allows one to take a stirng of unescaped HTML and render it unconditionally. This is of course a potentially dangerous operation that can open your app up to XSS attacks, but for interoperating with existing content management systems and libraries that output HTML (e.g. markdown renderers).

Using "dangerouslySetInnerHTML" on an element with children will generate an error within createElement, since it doesn't make sense to have both children and inner HTML.
2021-01-02 21:24:17 -08:00
45d96fae9f chore: update * pin prettier version & format code 2021-01-02 13:40:18 -08:00
e5e70655c2 fix: stack size exceed error on purging module cache 2020-06-14 12:06:59 -07:00
1dd30984d4 fix: dont require config file
Fixes a couple of issues with config files in websnacks projects.

First, config files are no longer required and the dev and build
commands will no longer error out if a websnacks.ts/js file doesn't
exist.

Second, all optional user config params are now actually optional -
before some parameters were assumed to exist and would error out if not
present (e.g. the "watch" parameter).

Finally, e2e tests were added to prevent regressions on these issues
and test helpers were extracted to a separate file.
2020-06-10 12:39:54 -07:00
d4f713e5c5 fix: dev cmd didn't watch files due to import mangling
Appearently the esModuleInterop flag in TypeScript is not compatible
with node-watch, and the import helper was mangling the import as a
result and causing an error in the dev command that resulted in files
not being watched.

This fixes that import issue and adds an e2e test to help prevent a
regression of this issue in the future.
2020-06-09 13:56:11 -07:00
5930d10efc feat: provide Fragment component
Adds a new Fragment component that provides the same functionality as
React.Fragment. See issue #9 for details.

closes issue #9
2020-06-04 11:25:34 -07:00
dc7167475c chore: fix some eslint warnings 2020-06-03 17:52:54 -07:00
89d599598d fix: type signature of Component too narrow 2020-06-03 17:27:12 -07:00
206c58ab88 feat: support rendering array elements 2020-06-02 16:39:44 -07:00
b32d2a2d8d fix: support number elements in jsx templates 2020-06-02 15:38:39 -07:00
7092f608c2 fix: target es2018 to support node 10+ 2020-05-26 16:29:43 -07:00
b0ef223c9d chore: resolve linting errors & warnings 2020-06-01 23:29:59 -07:00
99ae3402a5 test: add testing framework 2020-05-30 11:41:23 -07:00
9e9842dc8c initial commit (it all starts here...) 2020-05-25 22:36:20 -07:00