utilium 0.7.6 → 0.7.7

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/dist/version.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export type Sep = '_' | '-';
2
2
  export type Part = `${number}.${number}.${number}`;
3
- export type Full = Part | `${Part}${Sep}${string}${Sep | '.'}${Part | number}`;
3
+ export type WithPre = `${Part}${Sep}${string}${Sep | '.'}${Part | number}`;
4
+ export type Full = Part | WithPre;
4
5
  type Type<S extends string, Acc extends string = ''> = S extends `${infer First}${infer Rest}` ? (First extends Sep | '.' ? Acc : Type<Rest, `${Acc}${First}`>) : Acc;
5
6
  export type Parse<T extends Full, StripCore extends boolean> = T extends `${infer Core}${Sep}${infer Rest}` ? Rest extends `${infer U}` ? {
6
7
  full: T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utilium",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "description": "Typescript utilies",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/version.ts CHANGED
@@ -4,7 +4,9 @@ export type Sep = '_' | '-';
4
4
 
5
5
  export type Part = `${number}.${number}.${number}`;
6
6
 
7
- export type Full = Part | `${Part}${Sep}${string}${Sep | '.'}${Part | number}`;
7
+ export type WithPre = `${Part}${Sep}${string}${Sep | '.'}${Part | number}`;
8
+
9
+ export type Full = Part | WithPre;
8
10
 
9
11
  type Type<S extends string, Acc extends string = ''> = S extends `${infer First}${infer Rest}` ? (First extends Sep | '.' ? Acc : Type<Rest, `${Acc}${First}`>) : Acc;
10
12