minify-html-literals
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -5,8 +5,12 @@ # Change Log | ||
<a name="1.0.0"></a> | ||
<a name="1.0.1"></a> | ||
# 1.0.0 (2018-07-23) | ||
## 1.0.1 (2018-07-24) | ||
### Bug Fixes | ||
- option type errors ([b917607](https://github.com/asyncLiz/minify-html-literals/commit/b917607)) | ||
### Features | ||
- initial release ([b7f0fe7](https://github.com/asyncLiz/minify-html-literals/commit/b7f0fe7)) | ||
- initial release ([cadf7c2](https://github.com/asyncLiz/minify-html-literals/commit/cadf7c2)) |
{ | ||
"name": "minify-html-literals", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Minify HTML template literal strings", | ||
@@ -57,9 +57,9 @@ "main": "index.js", | ||
"dependencies": { | ||
"@types/html-minifier": "^3.5.2", | ||
"html-minifier": "^3.5.19", | ||
"magic-string": "^0.25.0", | ||
"parse-literals": "^1.0.0" | ||
"parse-literals": "^1.0.2" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.1.4", | ||
"@types/html-minifier": "^3.5.2", | ||
"@types/mocha": "^5.2.5", | ||
@@ -66,0 +66,0 @@ "@types/node": "^10.5.2", |
@@ -22,7 +22,7 @@ import { SourceMapOptions } from 'magic-string'; | ||
*/ | ||
export interface CustomOptions<O> extends BaseOptions { | ||
export interface CustomOptions<S extends Strategy> extends BaseOptions { | ||
/** | ||
* HTML minification options. | ||
*/ | ||
minifyOptions?: O; | ||
minifyOptions?: S extends Strategy<infer O> ? O : never; | ||
/** | ||
@@ -32,3 +32,3 @@ * Override the default strategy for how to minify HTML. The default is to | ||
*/ | ||
strategy: Strategy<O>; | ||
strategy: S; | ||
} | ||
@@ -181,3 +181,3 @@ /** | ||
*/ | ||
export declare function minifyHTMLLiterals<O>(source: string, options: CustomOptions<O>): Result | null; | ||
export declare function minifyHTMLLiterals(source: string, options: DefaultOptions): Result | null; | ||
/** | ||
@@ -190,2 +190,2 @@ * Minifies all HTML template literals in the provided source string. | ||
*/ | ||
export declare function minifyHTMLLiterals(source: string, options: DefaultOptions): Result | null; | ||
export declare function minifyHTMLLiterals<S extends Strategy>(source: string, options: CustomOptions<S>): Result | null; |
@@ -30,7 +30,7 @@ import MagicString, { DecodedSourceMap, SourceMapOptions } from 'magic-string'; | ||
*/ | ||
export interface CustomOptions<O> extends BaseOptions { | ||
export interface CustomOptions<S extends Strategy> extends BaseOptions { | ||
/** | ||
* HTML minification options. | ||
*/ | ||
minifyOptions?: O; | ||
minifyOptions?: S extends Strategy<infer O> ? O : never; | ||
/** | ||
@@ -40,3 +40,3 @@ * Override the default strategy for how to minify HTML. The default is to | ||
*/ | ||
strategy: Strategy<O>; | ||
strategy: S; | ||
} | ||
@@ -221,5 +221,5 @@ | ||
*/ | ||
export function minifyHTMLLiterals<O>( | ||
export function minifyHTMLLiterals( | ||
source: string, | ||
options: CustomOptions<O> | ||
options: DefaultOptions | ||
): Result | null; | ||
@@ -233,5 +233,5 @@ /** | ||
*/ | ||
export function minifyHTMLLiterals( | ||
export function minifyHTMLLiterals<S extends Strategy>( | ||
source: string, | ||
options: DefaultOptions | ||
options: CustomOptions<S> | ||
): Result | null; | ||
@@ -238,0 +238,0 @@ export function minifyHTMLLiterals( |
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
40819
16
4
+ Added@types/html-minifier@^3.5.2
+ Added@types/clean-css@4.2.11(transitive)
+ Added@types/html-minifier@3.5.3(transitive)
+ Added@types/node@22.10.1(transitive)
+ Added@types/relateurl@0.2.33(transitive)
+ Added@types/uglify-js@3.17.5(transitive)
+ Addedundici-types@6.20.0(transitive)
Updatedparse-literals@^1.0.2