@poppinss/utils 6.0.1-0 → 6.1.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/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/src/define_static_property.d.ts +2 -2
- package/build/src/exceptions/runtime_exception.d.ts +5 -0
- package/build/src/exceptions/runtime_exception.js +5 -0
- package/build/src/safe_equal.d.ts +1 -1
- package/build/src/types.d.ts +9 -9
- package/package.json +8 -8
package/build/index.d.ts
CHANGED
|
@@ -12,5 +12,6 @@ export { naturalSort } from './src/natural_sort.js';
|
|
|
12
12
|
export { ObjectBuilder } from './src/object_builder.js';
|
|
13
13
|
export { safeEqual } from './src/safe_equal.js';
|
|
14
14
|
export { slash } from './src/slash.js';
|
|
15
|
+
export { RuntimeException } from './src/exceptions/runtime_exception.js';
|
|
15
16
|
export declare function getDirname(url: string | URL): string;
|
|
16
17
|
export declare function getFilename(url: string | URL): string;
|
package/build/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export { naturalSort } from './src/natural_sort.js';
|
|
|
13
13
|
export { ObjectBuilder } from './src/object_builder.js';
|
|
14
14
|
export { safeEqual } from './src/safe_equal.js';
|
|
15
15
|
export { slash } from './src/slash.js';
|
|
16
|
+
export { RuntimeException } from './src/exceptions/runtime_exception.js';
|
|
16
17
|
export function getDirname(url) {
|
|
17
18
|
return pathDirname(getFilename(url));
|
|
18
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type Constructor = new (...args: any[]) => any;
|
|
2
|
+
type AbstractConstructor = abstract new (...args: any[]) => any;
|
|
3
3
|
export declare function defineStaticProperty<T extends Constructor | AbstractConstructor, Prop extends keyof T>(self: T, propertyName: Prop, { initialValue, strategy, }: {
|
|
4
4
|
initialValue: T[Prop];
|
|
5
5
|
strategy: 'inherit' | 'define' | ((value: T[Prop]) => T[Prop]);
|
package/build/src/types.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
type PickKeysByValue<T, V> = {
|
|
2
2
|
[K in keyof T]: T[K] extends V ? K : never;
|
|
3
3
|
}[keyof T];
|
|
4
|
-
export
|
|
5
|
-
|
|
4
|
+
export type OmitProperties<T, P> = Omit<T, PickKeysByValue<T, P>>;
|
|
5
|
+
type ScanFsBaseOptions = {
|
|
6
6
|
ignoreMissingRoot?: boolean;
|
|
7
7
|
filter?: (filePath: string, index: number) => boolean;
|
|
8
8
|
sort?: (current: string, next: string) => number;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type ImportAllFilesOptions = ScanFsBaseOptions & {
|
|
11
11
|
transformKeys?: (keys: string[]) => string[];
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type ReadAllFilesOptions = ScanFsBaseOptions & {
|
|
14
14
|
pathType?: 'relative' | 'unixRelative' | 'absolute' | 'unixAbsolute' | 'url';
|
|
15
15
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
16
|
+
export type JSONReplacer = (this: any, key: string, value: any) => any;
|
|
17
|
+
export type JSONReviver = (this: any, key: string, value: any) => any;
|
|
18
|
+
export type Constructor = new (...args: any[]) => any;
|
|
19
|
+
export type NormalizeConstructor<T extends Constructor> = {
|
|
20
20
|
new (...args: any[]): InstanceType<T>;
|
|
21
21
|
} & Omit<T, 'constructor'>;
|
|
22
22
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poppinss/utils",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0-0",
|
|
4
4
|
"description": "Handy utilities for repetitive work",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -53,32 +53,32 @@
|
|
|
53
53
|
"author": "virk,poppinss",
|
|
54
54
|
"license": "MIT",
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@commitlint/cli": "^17.
|
|
57
|
-
"@commitlint/config-conventional": "^17.
|
|
56
|
+
"@commitlint/cli": "^17.3.0",
|
|
57
|
+
"@commitlint/config-conventional": "^17.3.0",
|
|
58
58
|
"@japa/assert": "^1.3.6",
|
|
59
59
|
"@japa/expect-type": "^1.0.2",
|
|
60
60
|
"@japa/run-failed-tests": "^1.1.0",
|
|
61
61
|
"@japa/runner": "^2.2.2",
|
|
62
62
|
"@japa/spec-reporter": "^1.3.2",
|
|
63
|
-
"@swc/core": "^1.3.
|
|
63
|
+
"@swc/core": "^1.3.20",
|
|
64
64
|
"@types/fs-extra": "^9.0.13",
|
|
65
65
|
"@types/node": "^18.11.7",
|
|
66
66
|
"c8": "^7.12.0",
|
|
67
67
|
"del-cli": "^5.0.0",
|
|
68
|
-
"eslint": "^8.
|
|
68
|
+
"eslint": "^8.28.0",
|
|
69
69
|
"eslint-config-prettier": "^8.5.0",
|
|
70
70
|
"eslint-plugin-adonis": "^3.0.3",
|
|
71
71
|
"eslint-plugin-prettier": "^4.2.1",
|
|
72
|
-
"fs-extra": "^
|
|
72
|
+
"fs-extra": "^11.0.0",
|
|
73
73
|
"github-label-sync": "^2.2.0",
|
|
74
74
|
"husky": "^8.0.1",
|
|
75
75
|
"lodash": "^4.17.21",
|
|
76
76
|
"lodash-cli": "^4.17.5",
|
|
77
77
|
"move-file-cli": "^3.0.0",
|
|
78
78
|
"np": "^7.6.2",
|
|
79
|
-
"prettier": "^2.
|
|
79
|
+
"prettier": "^2.8.0",
|
|
80
80
|
"ts-node": "^10.9.1",
|
|
81
|
-
"typescript": "^4.
|
|
81
|
+
"typescript": "^4.9.3"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@lukeed/ms": "^2.0.0",
|