Comparing version 1.7.31-nightly-20241008.1 to 1.7.35-nightly-20241010.1
@@ -25,3 +25,3 @@ /* auto-generated by NAPI-RS */ | ||
export declare function minify( | ||
code: Buffer, | ||
code: Buffer | string, | ||
opts: Buffer, | ||
@@ -32,3 +32,3 @@ signal?: AbortSignal | undefined | null | ||
export declare function minifyFragment( | ||
code: Buffer, | ||
code: Buffer | string, | ||
opts: Buffer, | ||
@@ -39,7 +39,10 @@ signal?: AbortSignal | undefined | null | ||
export declare function minifyFragmentSync( | ||
code: Buffer, | ||
code: Buffer | string, | ||
opts: Buffer | ||
): TransformOutput; | ||
export declare function minifySync(code: Buffer, opts: Buffer): TransformOutput; | ||
export declare function minifySync( | ||
code: Buffer | string, | ||
opts: Buffer | ||
): TransformOutput; | ||
@@ -46,0 +49,0 @@ export interface TransformOutput { |
@@ -46,5 +46,5 @@ import * as binding from "./binding"; | ||
}; | ||
export declare function minify(content: Buffer, options?: Options): Promise<binding.TransformOutput>; | ||
export declare function minifyFragment(content: Buffer, options?: FragmentOptions): Promise<binding.TransformOutput>; | ||
export declare function minifySync(content: Buffer, options?: Options): binding.TransformOutput; | ||
export declare function minifyFragmentSync(content: Buffer, options?: FragmentOptions): Promise<binding.TransformOutput>; | ||
export declare function minify(content: string | Buffer, options?: Options): Promise<binding.TransformOutput>; | ||
export declare function minifyFragment(content: string | Buffer, options?: FragmentOptions): Promise<binding.TransformOutput>; | ||
export declare function minifySync(content: string | Buffer, options?: Options): binding.TransformOutput; | ||
export declare function minifyFragmentSync(content: string | Buffer, options?: FragmentOptions): Promise<binding.TransformOutput>; |
13
index.ts
@@ -22,6 +22,3 @@ import * as binding from "./binding"; | ||
removeEmptyAttributes?: boolean; | ||
removeRedundantAttributes?: | ||
| "none" | ||
| "all" | ||
| "smart"; | ||
removeRedundantAttributes?: "none" | "all" | "smart"; | ||
collapseBooleanAttributes?: boolean; | ||
@@ -52,3 +49,3 @@ normalizeAttributes?: boolean; | ||
export async function minify( | ||
content: Buffer, | ||
content: string | Buffer, | ||
options?: Options | ||
@@ -60,3 +57,3 @@ ): Promise<binding.TransformOutput> { | ||
export async function minifyFragment( | ||
content: Buffer, | ||
content: string | Buffer, | ||
options?: FragmentOptions | ||
@@ -68,3 +65,3 @@ ): Promise<binding.TransformOutput> { | ||
export function minifySync( | ||
content: Buffer, | ||
content: string | Buffer, | ||
options?: Options | ||
@@ -76,3 +73,3 @@ ): binding.TransformOutput { | ||
export async function minifyFragmentSync( | ||
content: Buffer, | ||
content: string | Buffer, | ||
options?: FragmentOptions | ||
@@ -79,0 +76,0 @@ ): Promise<binding.TransformOutput> { |
{ | ||
"name": "@swc/html", | ||
"version": "1.7.31-nightly-20241008.1", | ||
"version": "1.7.35-nightly-20241010.1", | ||
"description": "Super-fast HTML minifier", | ||
@@ -32,4 +32,4 @@ "homepage": "https://swc.rs", | ||
"armv7-unknown-linux-gnueabihf", | ||
"aarch64-apple-darwin", | ||
"aarch64-unknown-linux-gnu", | ||
"aarch64-apple-darwin", | ||
"aarch64-unknown-linux-musl", | ||
@@ -48,4 +48,4 @@ "aarch64-pc-windows-msvc" | ||
"build:ts": "tsc -d", | ||
"build": "tsc -d && napi build --manifest-path ../../bindings/Cargo.toml --platform -p binding_html_node --js ./binding.js --dts ./binding.d.ts --release -o .", | ||
"build:dev": "tsc -d && napi build --manifest-path ../../bindings/Cargo.toml --platform -p binding_html_node --js ./binding.js --dts ./binding.d.ts -o .", | ||
"build": "(tsc -d || true) && napi build --manifest-path ../../bindings/Cargo.toml --platform -p binding_html_node --js ./binding.js --dts ./binding.d.ts --release -o .", | ||
"build:dev": "(tsc -d || true) && napi build --manifest-path ../../bindings/Cargo.toml --platform -p binding_html_node --js ./binding.js --dts ./binding.d.ts -o .", | ||
"test": "echo 'done!'", | ||
@@ -62,13 +62,13 @@ "version": "napi version --npm-dir scripts/npm" | ||
"optionalDependencies": { | ||
"@swc/html-darwin-x64": "1.7.31-nightly-20241008.1", | ||
"@swc/html-win32-x64-msvc": "1.7.31-nightly-20241008.1", | ||
"@swc/html-linux-x64-gnu": "1.7.31-nightly-20241008.1", | ||
"@swc/html-linux-x64-musl": "1.7.31-nightly-20241008.1", | ||
"@swc/html-win32-ia32-msvc": "1.7.31-nightly-20241008.1", | ||
"@swc/html-linux-arm-gnueabihf": "1.7.31-nightly-20241008.1", | ||
"@swc/html-linux-arm64-gnu": "1.7.31-nightly-20241008.1", | ||
"@swc/html-darwin-arm64": "1.7.31-nightly-20241008.1", | ||
"@swc/html-linux-arm64-musl": "1.7.31-nightly-20241008.1", | ||
"@swc/html-win32-arm64-msvc": "1.7.31-nightly-20241008.1" | ||
"@swc/html-darwin-x64": "1.7.35-nightly-20241010.1", | ||
"@swc/html-win32-x64-msvc": "1.7.35-nightly-20241010.1", | ||
"@swc/html-linux-x64-gnu": "1.7.35-nightly-20241010.1", | ||
"@swc/html-linux-x64-musl": "1.7.35-nightly-20241010.1", | ||
"@swc/html-win32-ia32-msvc": "1.7.35-nightly-20241010.1", | ||
"@swc/html-linux-arm-gnueabihf": "1.7.35-nightly-20241010.1", | ||
"@swc/html-darwin-arm64": "1.7.35-nightly-20241010.1", | ||
"@swc/html-linux-arm64-gnu": "1.7.35-nightly-20241010.1", | ||
"@swc/html-linux-arm64-musl": "1.7.35-nightly-20241010.1", | ||
"@swc/html-win32-arm64-msvc": "1.7.35-nightly-20241010.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20517