Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"presets": ["airbnb"]
"presets": [
["@babel/preset-env", { "modules": "commonjs" }],
"@babel/preset-react"
]
}
9 changes: 5 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x, 19.x, 20.x]
node-version: [20.x, 22.x, 24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run prepare
- run: npm run build
- run: npm run typecheck
- run: npm test
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
node-version: "24.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run prepare
- run: npm run build
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @lyst/hypernova-react

[React](https://github.com/facebook/react) 18 bindings for [Hypernova](https://github.com/airbnb/hypernova).
[React](https://github.com/facebook/react) 18 & 19 bindings for [Hypernova](https://github.com/airbnb/hypernova).

Based on [hypernova-react](https://github.com/airbnb/hypernova-react).

Expand All @@ -19,11 +19,11 @@ npm install --save @lyst/hypernova-react
Here's how to use it in your module:

```js
import { renderReact } from '@lyst/hypernova-react';
import MyComponent from './src/MyComponent.jsx';
import { renderReact } from "@lyst/hypernova-react";
import MyComponent from "./src/MyComponent.jsx";

export default renderReact(
'MyComponent.hypernova.js', // this file's name (or really any unique name)
MyComponent,
"MyComponent.hypernova.js", // this file's name (or really any unique name)
MyComponent
);
```
Loading