orchid-orm-test-factory 0.2.15 → 0.2.17
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 +19 -0
- package/package.json +4 -4
- package/src/test-utils.ts +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# orchid-orm-test-factory
|
|
2
2
|
|
|
3
|
+
## 0.2.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Override column types via callback
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- orchid-orm@1.5.11
|
|
10
|
+
- pqb@0.9.9
|
|
11
|
+
- orchid-orm-schema-to-zod@0.2.15
|
|
12
|
+
|
|
13
|
+
## 0.2.16
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [ee1961e]
|
|
18
|
+
- orchid-orm@1.5.10
|
|
19
|
+
- pqb@0.9.8
|
|
20
|
+
- orchid-orm-schema-to-zod@0.2.14
|
|
21
|
+
|
|
3
22
|
## 0.2.15
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orchid-orm-test-factory",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "Orchid ORM factories for tests",
|
|
5
5
|
"homepage": "https://orchid-orm.netlify.app/guide/orm-test-factories.html",
|
|
6
6
|
"repository": {
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@anatine/zod-mock": "^3.6.0",
|
|
42
42
|
"@faker-js/faker": "^7.6.0",
|
|
43
|
-
"orchid-orm": "1.5.
|
|
44
|
-
"orchid-orm-schema-to-zod": "0.2.
|
|
45
|
-
"pqb": "0.9.
|
|
43
|
+
"orchid-orm": "1.5.11",
|
|
44
|
+
"orchid-orm-schema-to-zod": "0.2.15",
|
|
45
|
+
"pqb": "0.9.9",
|
|
46
46
|
"zod": "^3.19.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
package/src/test-utils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createBaseTable, orchidORM } from 'orchid-orm';
|
|
2
|
-
import { Adapter
|
|
2
|
+
import { Adapter } from 'pqb';
|
|
3
3
|
|
|
4
4
|
type AssertEqual<T, Expected> = [T] extends [Expected]
|
|
5
5
|
? [Expected] extends [T]
|
|
@@ -14,11 +14,11 @@ export const assertType = <T, Expected>(
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export const BaseTable = createBaseTable({
|
|
17
|
-
columnTypes: {
|
|
18
|
-
...
|
|
19
|
-
text: (min = 0, max = Infinity) =>
|
|
20
|
-
timestamp: () =>
|
|
21
|
-
},
|
|
17
|
+
columnTypes: (t) => ({
|
|
18
|
+
...t,
|
|
19
|
+
text: (min = 0, max = Infinity) => t.text(min, max),
|
|
20
|
+
timestamp: () => t.timestamp().asNumber(),
|
|
21
|
+
}),
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
export type User = UserTable['columns']['type'];
|