@node-minify/types 8.0.6 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # @node-minify/types
2
+
3
+ ## 9.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 7ab9745: Version 9.0.0
8
+
9
+ - feat(node): remove node 16, add node 18 (#2092) (c9acdaa4a9906d4019d9381129d66235f3139198)
10
+ - feat(biome): add biome (#2113) (50e9ec46c11c218453de743bed2defa9a83ace7b)
11
+ - fix(yui): fixing yui tests (dd8629712c03b0ac1fe2b94acbb95bc896f8f22f)
12
+ - bump dependencies
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Rodolphe Stoclin
3
+ Copyright (c) 2024 Rodolphe Stoclin
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-minify/types",
3
- "version": "8.0.6",
3
+ "version": "9.0.0",
4
4
  "description": "types for @node-minify",
5
5
  "keywords": [
6
6
  "compressor",
@@ -12,7 +12,7 @@
12
12
  "homepage": "https://github.com/srod/node-minify/tree/master/packages/types#readme",
13
13
  "license": "MIT",
14
14
  "engines": {
15
- "node": ">=16.0.0"
15
+ "node": ">=18.0.0"
16
16
  },
17
17
  "main": "src/types.ts",
18
18
  "types": "src/types.ts",
@@ -25,6 +25,5 @@
25
25
  },
26
26
  "bugs": {
27
27
  "url": "https://github.com/srod/node-minify/issues"
28
- },
29
- "gitHead": "9fb532af458cb6416ecfb7abfb9cc0a3b9cb42e1"
30
- }
28
+ }
29
+ }
package/src/types.ts CHANGED
@@ -1,46 +1,62 @@
1
- export type OptionsPossible = string | boolean | Record<string, string> | object;
1
+ export type OptionsPossible =
2
+ | string
3
+ | boolean
4
+ | Record<string, string>
5
+ | object;
2
6
 
3
7
  export type Options = {
4
- [Key: string]: boolean | Record<string, OptionsPossible>;
8
+ [Key: string]:
9
+ | string
10
+ | string[]
11
+ | boolean
12
+ | Record<string, OptionsPossible>;
5
13
  };
6
14
 
15
+ export type OptionsTest = Options & {
16
+ minify: Settings;
17
+ };
18
+
19
+ type Compressor = (
20
+ args: MinifierOptions
21
+ ) => void | string | Promise<void | string | undefined>;
22
+
7
23
  export type Settings = {
8
- compressorLabel?: string;
9
- compressor?: string | ((arg0: MinifierOptions) => string);
10
- sync?: boolean;
11
- callback?: (err: unknown, minified?: string) => void;
12
- content?: string;
13
- input?: string | string[];
14
- output?: string;
15
- options?: Options;
16
- option?: string;
17
- buffer?: number;
18
- type?: string;
19
- silence?: boolean;
20
- publicFolder?: string;
21
- replaceInPlace?: boolean;
24
+ compressorLabel?: string;
25
+ compressor?: string | Compressor;
26
+ sync?: boolean;
27
+ callback?: (err: unknown, minified?: string) => void;
28
+ content?: string;
29
+ input?: string | string[];
30
+ output?: string;
31
+ options?: Options;
32
+ option?: string;
33
+ buffer?: number;
34
+ type?: "js" | "css" | "uglifyjs";
35
+ silence?: boolean;
36
+ publicFolder?: string;
37
+ replaceInPlace?: boolean;
22
38
  };
23
39
 
24
40
  export type MinifierOptions = {
25
- settings?: Settings;
26
- content?: string;
27
- callback?: null | ((err?: unknown | null, result?: string) => void);
28
- compressor?: string | ((arg0: MinifierOptions) => void);
29
- index?: number;
30
- args?: string[];
31
- data?: string;
32
- sync?: boolean;
33
- input?: string | string[];
34
- output?: string;
41
+ settings?: Settings;
42
+ content?: string;
43
+ callback?: null | ((err?: unknown | null, result?: string) => void);
44
+ compressor?: string | Compressor;
45
+ index?: number;
46
+ args?: string[];
47
+ data?: string;
48
+ sync?: boolean;
49
+ input?: string | string[];
50
+ output?: string;
35
51
  };
36
52
 
37
53
  export type Result = {
38
- compressor?: string | ((arg0: MinifierOptions) => void);
39
- compressorLabel: string | (() => void);
40
- size: string;
41
- sizeGzip: string;
54
+ compressor?: string | Compressor;
55
+ compressorLabel: string | (() => void);
56
+ size: string;
57
+ sizeGzip: string;
42
58
  };
43
59
 
44
60
  export type Dictionary<T> = {
45
- [Key: string]: T;
61
+ [Key: string]: T;
46
62
  };