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
4 changes: 4 additions & 0 deletions bindings/javascript/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Changed

- Update `napi` to `3`.

## [0.18.0] - 2025-11-01

### Added
Expand Down
6 changes: 3 additions & 3 deletions bindings/javascript/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ mimalloc = "0.1"
mimalloc = { version = "0.1", features = ["local_dynamic_tls"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
napi = { version = "2.16.0", default-features = false, features = ["napi4"] }
napi-derive = "2.16.0"
napi = { version = "3", default-features = false, features = ["napi4"] }
napi-derive = "3"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "=0.2.105"
Expand All @@ -43,7 +43,7 @@ version = "*"
default-features = false

[build-dependencies]
napi-build = "2.1.0"
napi-build = "2.2.4"

[profile.release]
lto = true
Expand Down
23 changes: 12 additions & 11 deletions bindings/javascript/js-binding.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* tslint:disable */
/* auto-generated by NAPI-RS */
/* eslint-disable */
/** Inline CSS styles from <style> tags to matching elements in the HTML tree and return a string. */
export declare function inline(html: string, options?: Options | undefined | null): string

/* auto-generated by NAPI-RS */
/** Inline CSS styles into an HTML fragment. */
export declare function inlineFragment(html: string, css: string, options?: Options | undefined | null): string

export interface StylesheetCache {
/** Cache size. */
size: number
}
export interface Options {
/**
* Whether to inline CSS from "style" tags.
Expand Down Expand Up @@ -37,9 +36,11 @@ export interface Options {
*/
preallocateNodeCapacity?: number
}
/** Inline CSS styles from <style> tags to matching elements in the HTML tree and return a string. */
export function inline(html: string, options?: Options | undefined | null): string
/** Inline CSS styles into an HTML fragment. */
export function inlineFragment(html: string, css: string, options?: Options | undefined | null): string

export interface StylesheetCache {
/** Cache size. */
size: number
}

/** Get the package version. */
export function version(): string
export declare function version(): string
Loading
Loading