@contember/utilities
Advanced tools
Comparing version 1.2.0-rc.15 to 1.2.0-rc.16
@@ -23,2 +23,3 @@ import { AssertionError } from "./assert-types/AssertionError.js"; | ||
import { svgSizeProps } from "./dom/svgSizeProps.js"; | ||
import { extend } from "./functional/extend.js"; | ||
import { omit } from "./functional/omit.js"; | ||
@@ -43,2 +44,3 @@ import { pick } from "./functional/pick.js"; | ||
deprecate, | ||
extend, | ||
fallback, | ||
@@ -45,0 +47,0 @@ filterThemedClassName, |
@@ -23,2 +23,3 @@ import { AssertionError } from "./assert-types/AssertionError.js"; | ||
import { svgSizeProps } from "./dom/svgSizeProps.js"; | ||
import { extend } from "./functional/extend.js"; | ||
import { omit } from "./functional/omit.js"; | ||
@@ -43,2 +44,3 @@ import { pick } from "./functional/pick.js"; | ||
deprecate, | ||
extend, | ||
fallback, | ||
@@ -45,0 +47,0 @@ filterThemedClassName, |
@@ -0,1 +1,2 @@ | ||
import { NestedClassName } from './types'; | ||
/** | ||
@@ -7,3 +8,3 @@ * Combines a list of class names into a single string, even nested | ||
*/ | ||
export declare function listClassName(list: (string | false | null | undefined)[]): string; | ||
export declare function listClassName(list: NestedClassName): string; | ||
//# sourceMappingURL=listClassName.d.ts.map |
@@ -18,3 +18,3 @@ import { SemverString } from './types'; | ||
*/ | ||
export declare function deprecate(removal: SemverString, condition: boolean, deprecated: string, replacement: string): void; | ||
export declare function deprecate(removal: SemverString, condition: boolean, deprecated: string, replacement: string | null): void; | ||
//# sourceMappingURL=deprecate.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export type SemverString = `${number}.${number}.${number}` | `v${number}.${number}.${number}`; | ||
export type SemverString = `${number}.${number}.${number}`; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -0,1 +1,2 @@ | ||
export * from './extend'; | ||
export * from './omit'; | ||
@@ -2,0 +3,0 @@ export * from './pick'; |
@@ -1,3 +0,5 @@ | ||
export type { CamelCase, DelimiterCase, KebabCase, LiteralToPrimitiveDeep, Opaque, PascalCase, Replace, UnionToIntersection, UnwrapOpaque, } from 'type-fest'; | ||
export type { CamelCase, DelimiterCase, KebabCase, LiteralToPrimitiveDeep, MergeExclusive, Opaque, PascalCase, Replace, Simplify, UnionToIntersection, UnwrapOpaque, } from 'type-fest'; | ||
export * from './Any'; | ||
export * from './DeepPartial'; | ||
export * from './Narrow'; | ||
export * from './NonNullableRequired'; | ||
@@ -4,0 +6,0 @@ export * from './NonOptional'; |
{ | ||
"name": "@contember/utilities", | ||
"license": "Apache-2.0", | ||
"version": "1.2.0-rc.15", | ||
"version": "1.2.0-rc.16", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "sideEffects": false, |
import { deduplicateClassName } from './deduplicateClassName' | ||
import { flatClassNameList } from './flatClassNameList' | ||
import { NestedClassName } from './types' | ||
@@ -10,4 +11,4 @@ /** | ||
*/ | ||
export function listClassName(list: (string | false | null | undefined)[]) { | ||
export function listClassName(list: NestedClassName) { | ||
return deduplicateClassName(flatClassNameList(list)).join(' ') | ||
} |
@@ -19,3 +19,3 @@ import { SemverString } from './types' | ||
*/ | ||
export function deprecate(removal: SemverString, condition: boolean, deprecated: string, replacement: string): void { | ||
export function deprecate(removal: SemverString, condition: boolean, deprecated: string, replacement: string | null): void { | ||
if (condition === true) { | ||
@@ -26,5 +26,5 @@ if (import.meta.env.DEV) { | ||
if (shouldThrow) { | ||
throw new Error(`Support for ${deprecated} was planned to be removed in the ${removal} release. Replace it with ${replacement} instead.`) | ||
throw new Error(`Support for ${deprecated} was planned to be removed in the ${removal} release.${replacement ? ` Replace it with ${replacement} instead.` : 'Remove it.'}`) | ||
} else { | ||
console.warn(`Use of ${deprecated} is deprecated and might be removed in the next release. Use ${replacement} instead.`) | ||
console.warn(`Use of ${deprecated} is deprecated and might be removed in the next release.${replacement ? ` Use ${replacement} instead.` : 'There is no replacement.'}`) | ||
} | ||
@@ -31,0 +31,0 @@ } |
export type SemverString = `${number}.${number}.${number}` | `v${number}.${number}.${number}` | ||
export type SemverString = `${number}.${number}.${number}` |
@@ -0,3 +1,4 @@ | ||
export * from './extend' | ||
export * from './omit' | ||
export * from './pick' | ||
export * from './setHasOneOf' |
@@ -6,9 +6,13 @@ export type { | ||
LiteralToPrimitiveDeep, | ||
MergeExclusive, | ||
Opaque, | ||
PascalCase, | ||
Replace, | ||
Simplify, | ||
UnionToIntersection, | ||
UnwrapOpaque, | ||
} from 'type-fest' | ||
export * from './Any' | ||
export * from './DeepPartial' | ||
export * from './Narrow' | ||
export * from './NonNullableRequired' | ||
@@ -15,0 +19,0 @@ export * from './NonOptional' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
228668
279
2548