Skip to content

Releases: ConnorJamesLow/texsaur

Release v1.0.2 - Maintenance Patch

25 May 18:35
8ea7313
Compare
Choose a tag to compare

Fixes 1 high severity vulnerability.

Full Changelog: v1.0.1...v1.0.2

Release v1.0.1 - General Maintenance

20 Jun 15:38
bb3e557
Compare
Choose a tag to compare

This release removes comments from the distributed code so your download is slightly smaller. In addition, the typescript package is no longer listed as a dependency - just a dev dependency as is appropriate.

Also, some other behind-the-scenes devDependencies updates.

What's Changed

Full Changelog: v1.0.0...v1.0.1

v1.0.0

15 Jun 18:39
c0a19e4
Compare
Choose a tag to compare

This marks the version 1 release of texsaur.

Released Features

Here is an overview of what is available in version 1

Create Elements with JSX

Skip document.createElement and instantiate new HTML elements using JSX:

import jsx from 'texsaur'

const div = <div>Hello there.</div>

JSX Fragments

Use <></> to create document fragments (JSX.Fragment: Node[]):

<>
    <div>Foo bar baz</div>
    <div>Fizz buzz</div>
</>

Value-based Elements (Components)

Per the Typescript specification, create Functional Components:

function Header({ title }: { title: string }) {
  return <header>
    <h1>{title}</h1>
  </header>
}

document.body.appendChild(
  <div>
    <Header title="Hello there" />
    {/* Same as */}
    {Header({ title: 'Hello there.' })}
  </div>
)

Custom Elements

Per the TypeScript JSX specification, provide types for custom elements by extending JSX.IntrinsicElements:

namespace JSX {
  interface IntrinsicElements {
    ['my-element']: HTMLElement // or another type representing your custom element
  }
}

TypeScript JSX Modes

Supports "react" and "react-jsx" for the --jsx tsconfig option.

What's Changed

Full Changelog: v0.8.0...v1.0.0

v0.8.0 - Support iterable children

09 Mar 04:04
de52b1b
Compare
Choose a tag to compare

"Breaking" Changes

The previous behavior probably wasn't desirable, but still.

Prior to this release, passing an HTMLCollection (e.g. element.children) or a NodeList (e.g. from document.querySelector('...')) would append the entire object to the element, effectively converting it into a string. Now, any iterable that isn't a string will be treated like an array.

v0.7.1 - Undefined bug fix

05 Mar 04:27
4b51b66
Compare
Choose a tag to compare

Bug Fixes

document.body.append(
  <div class="container">
      <div class="background-image-div"></div>
  </div>
);

Would produce

<div class="container">
    <div class="background-image-div">undefined</div>
</div>

This has been fixed now.

v0.7.0 - react-jsx Support

04 Mar 20:25
3600e5b
Compare
Choose a tag to compare

This release adds support for react-jsx JSX code generation in Typescript.

Features

  • Added "texsaur/jsx-runtime" module.
  • "jsx": "react-jsx" is now supported (must pair with "jsxImportSource": "texsaur" and "moduleResolution": "node16"). See this project's README for details.

Closed Issues

  • #22 "How to use this with jsxImportSource?"

v0.6.4 - Minor patch

24 Feb 04:51
04f1b7d
Compare
Choose a tag to compare

This release just changes an internal import path.

v0.6.3 - Cleanup package dist

22 Feb 21:20
895cabd
Compare
Choose a tag to compare

To keep our package size as low as possible, this release removes some test files that snuck into the previous release

v0.6.2 - Optimizations

22 Feb 20:57
00cdba5
Compare
Choose a tag to compare

No new features here, just some minor improvements and bloat trimming.

Changes

  • The class attribute is now treated like every other attribute (and works the same from the outside). style is the only remaining special case.
  • JSX.Component doesn't need to accept Node for children, since the value passed to it will always be Node[].
  • Various test/environment improvements.

v0.6.1 - SVGs

30 Jun 20:29
f2d10ff
Compare
Choose a tag to compare

This release fixes issues with SVGs as a step closer to making them a stable feature.

Bug Fixes

  • SVG attributes no longer cause errors.
  • Fixed: In some cases, importing a bit of JSX wrapped in a JSX.Fragment would result in [object Object] being printed as text instead of including the fragment's content.