sedentary 0.0.40 → 0.0.41
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/types/db.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +4 -1
- package/jest.config.js +0 -8
- package/testSequencer.js +0 -20
package/dist/types/db.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare type Natural =
|
|
1
|
+
export declare type Natural = Date | Record<string, unknown> | bigint | boolean | number | string | null;
|
|
2
2
|
export declare class EntryBase {
|
|
3
3
|
constructor(from?: Partial<EntryBase>);
|
|
4
4
|
construct(): void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export declare class Sedentary<D extends DB<T>, T extends Transaction> {
|
|
|
116
116
|
DATETIME(): Type<Date, unknown>;
|
|
117
117
|
FKEY<N extends Natural, E extends EntryBase>(attribute: Attribute<N, E>, options?: ForeignKeyOptions): Type<N, E>;
|
|
118
118
|
INT(size?: number): Type<number, unknown>;
|
|
119
|
-
INT8(): Type<
|
|
119
|
+
INT8(): Type<bigint, unknown>;
|
|
120
120
|
NUMBER(): Type<number, unknown>;
|
|
121
121
|
VARCHAR(size?: number): Type<string, unknown>;
|
|
122
122
|
private checkDB;
|
package/package.json
CHANGED
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
"main": "./dist/cjs/index.js",
|
|
44
44
|
"module": "./dist/es/index.js",
|
|
45
45
|
"name": "sedentary",
|
|
46
|
+
"optionalDependencies": {
|
|
47
|
+
"fsevents": "2.3.2"
|
|
48
|
+
},
|
|
46
49
|
"prettier": {
|
|
47
50
|
"arrowParens": "avoid",
|
|
48
51
|
"endOfLine": "lf",
|
|
@@ -80,5 +83,5 @@
|
|
|
80
83
|
}
|
|
81
84
|
},
|
|
82
85
|
"types": "./dist/types/index.d.ts",
|
|
83
|
-
"version": "0.0.
|
|
86
|
+
"version": "0.0.41"
|
|
84
87
|
}
|
package/jest.config.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
collectCoverageFrom: ["db.ts", "index.ts"],
|
|
4
|
-
preset: "ts-jest",
|
|
5
|
-
testEnvironment: "jest-environment-node-single-context",
|
|
6
|
-
testPathIgnorePatterns: ["/node_modules/", "/sedentary-pg/"],
|
|
7
|
-
testSequencer: "./testSequencer.js"
|
|
8
|
-
};
|
package/testSequencer.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
2
|
-
const Sequencer = require("@jest/test-sequencer").default;
|
|
3
|
-
|
|
4
|
-
class CustomSequencer extends Sequencer {
|
|
5
|
-
shard(tests, { shardIndex, shardCount }) {
|
|
6
|
-
const shardSize = Math.ceil(tests.length / shardCount);
|
|
7
|
-
const shardStart = shardSize * (shardIndex - 1);
|
|
8
|
-
const shardEnd = shardSize * shardIndex;
|
|
9
|
-
|
|
10
|
-
return [...tests].sort((a, b) => (a.path > b.path ? 1 : -1)).slice(shardStart, shardEnd);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
sort(tests) {
|
|
14
|
-
const copyTests = Array.from(tests);
|
|
15
|
-
|
|
16
|
-
return copyTests.sort((testA, testB) => (testA.path > testB.path ? 1 : -1));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
module.exports = CustomSequencer;
|