@pikku/kysely 0.9.3 → 0.9.5-next.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/CHANGELOG.md +15 -0
- package/bin/pikku-kysely-pure.ts +5 -0
- package/dist/bin/pikku-kysely-pure.js +3 -1
- package/package.json +3 -4
- package/run-tests.sh +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @pikku/kysely
|
|
2
2
|
|
|
3
|
+
## 0.9.5-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @pikku/core@0.9.12-next.0
|
|
9
|
+
|
|
10
|
+
## 0.9.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 58fe540: fix: kysely pure script should also clean arrays
|
|
15
|
+
- Updated dependencies [85a1c76]
|
|
16
|
+
- @pikku/core@0.9.7
|
|
17
|
+
|
|
3
18
|
## 0.9.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/bin/pikku-kysely-pure.ts
CHANGED
|
@@ -34,6 +34,11 @@ const main = async (output: string, input?: string) => {
|
|
|
34
34
|
'export type Numeric = string | number'
|
|
35
35
|
)
|
|
36
36
|
.replace(/export type Timestamp =.*;/, 'export type Timestamp = Date')
|
|
37
|
+
.replace(
|
|
38
|
+
/export type ArrayType<T> = ArrayTypeImpl<T> extends \(infer U\)\[\]\s*\?\s*U\[\]\s*:\s*ArrayTypeImpl<T>;\s*export type ArrayTypeImpl<T> = T extends ColumnType<infer S, infer I, infer U>\s*\?\s*ColumnType<S\[\], I\[\], U\[\]>\s*:\s*T\[\];/gs,
|
|
39
|
+
''
|
|
40
|
+
)
|
|
41
|
+
.replace(/ArrayType<([^>]+)>/g, '$1[]')
|
|
37
42
|
|
|
38
43
|
console.log('Writing kysely-pure.gen.ts')
|
|
39
44
|
|
|
@@ -23,7 +23,9 @@ const main = async (output, input) => {
|
|
|
23
23
|
.replace(new RegExp('^export\\s+type\\s+Generated<[^>]+>.*?;\\s*$', 'ms'), '')
|
|
24
24
|
.replace(/Generated<(.*)>/g, '$1')
|
|
25
25
|
.replace(/export type Numeric =.*;/, 'export type Numeric = string | number')
|
|
26
|
-
.replace(/export type Timestamp =.*;/, 'export type Timestamp = Date')
|
|
26
|
+
.replace(/export type Timestamp =.*;/, 'export type Timestamp = Date')
|
|
27
|
+
.replace(/export type ArrayType<T> = ArrayTypeImpl<T> extends \(infer U\)\[\]\s*\?\s*U\[\]\s*:\s*ArrayTypeImpl<T>;\s*export type ArrayTypeImpl<T> = T extends ColumnType<infer S, infer I, infer U>\s*\?\s*ColumnType<S\[\], I\[\], U\[\]>\s*:\s*T\[\];/gs, '')
|
|
28
|
+
.replace(/ArrayType<([^>]+)>/g, '$1[]');
|
|
27
29
|
console.log('Writing kysely-pure.gen.ts');
|
|
28
30
|
const outputPath = `${execDirectory}/${output}`;
|
|
29
31
|
const outputDirectory = dirname(outputPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/kysely",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5-next.0",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/src/index.js",
|
|
@@ -12,12 +12,11 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"tsc": "tsc",
|
|
14
14
|
"ncu": "npx npm-check-updates",
|
|
15
|
-
"build
|
|
16
|
-
"build": "yarn build:esm",
|
|
15
|
+
"build": "tsc -b",
|
|
17
16
|
"release": "npm run build && npm test"
|
|
18
17
|
},
|
|
19
18
|
"peerDependencies": {
|
|
20
|
-
"@pikku/core": "^0.9.
|
|
19
|
+
"@pikku/core": "^0.9.12-next.0"
|
|
21
20
|
},
|
|
22
21
|
"dependencies": {
|
|
23
22
|
"kysely": "^0.28.5",
|
package/run-tests.sh
CHANGED
|
@@ -46,7 +46,7 @@ if [ "$watch_mode" = true ]; then
|
|
|
46
46
|
fi
|
|
47
47
|
|
|
48
48
|
if [ "$coverage_mode" = true ]; then
|
|
49
|
-
node_cmd="$node_cmd --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info"
|
|
49
|
+
node_cmd="$node_cmd --test-coverage-include=\"src/**/*.{ts,js}\" --test-coverage-exclude=\"**/dist/**\" --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info"
|
|
50
50
|
fi
|
|
51
51
|
|
|
52
52
|
# Execute the node command with the expanded list of files
|