rambda 10.0.0 → 10.0.1
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 +5 -3
- package/README.md +11 -11
- package/index.d.ts +2 -5
- package/package.json +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
10.0.
|
|
1
|
+
10.0.1
|
|
2
|
+
|
|
3
|
+
- Fix issue with `R.unwind`/`R.pick` typings - [Issue #766](https://github.com/selfrefactor/rambda/issues/766)
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
10.0.0
|
|
4
6
|
|
|
5
7
|
This is major revamp of `Rambda` library:
|
|
6
8
|
|
|
@@ -196,7 +198,7 @@ const result = piped(
|
|
|
196
198
|
|
|
197
199
|
9.4.1
|
|
198
200
|
|
|
199
|
-
- Fix bug with `R.differenceWith` when two arrays has same length - [Issue #
|
|
201
|
+
- Fix bug with `R.differenceWith` when two arrays has same length - [Issue #757](https://github.com/selfrefactor/rambda/issues/757)
|
|
200
202
|
|
|
201
203
|
- Allow path input to not be transformed when string numbers are there - [Issue #750](https://github.com/selfrefactor/rambda/issues/750)
|
|
202
204
|
|
package/README.md
CHANGED
|
@@ -7808,10 +7808,7 @@ const expected = [
|
|
|
7808
7808
|
|
|
7809
7809
|
```typescript
|
|
7810
7810
|
pick<K extends PropertyKey>(propsToPick: K[]): <T>(input: T) => MergeTypes<Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>>;
|
|
7811
|
-
pick<
|
|
7812
|
-
S extends string,
|
|
7813
|
-
K extends PickStringToPickPath<K>
|
|
7814
|
-
>(propsToPick: S): <T>(input: T) => MergeTypes<Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>>;
|
|
7811
|
+
pick<S extends string>(propsToPick: S): <T>(input: T) => MergeTypes<Pick<T, Exclude<keyof T, Exclude<keyof T, ElementOf<PickStringToPickPath<S>>>>>>;
|
|
7815
7812
|
```
|
|
7816
7813
|
|
|
7817
7814
|
</details>
|
|
@@ -8222,6 +8219,7 @@ function assertType<T, U extends T>(fn: (x: T) => x is U) {
|
|
|
8222
8219
|
function convertToType<T>() {
|
|
8223
8220
|
return <U>(x: U) => x as unknown as T
|
|
8224
8221
|
}
|
|
8222
|
+
const convertToType = <T>(x: unknown)=> x as unknown as T
|
|
8225
8223
|
|
|
8226
8224
|
function tapFn<T, U>(
|
|
8227
8225
|
transformFn: (x: T) => U,
|
|
@@ -12156,7 +12154,7 @@ describe('R.unless', () => {
|
|
|
12156
12154
|
|
|
12157
12155
|
```typescript
|
|
12158
12156
|
|
|
12159
|
-
unwind<S extends string>(prop: S): <T
|
|
12157
|
+
unwind<S extends string>(prop: S): <T extends Record<S, readonly any[]>>(obj: T) => Array<MergeTypes<Omit<T, S> & { [K in S]: T[S][number] }>>
|
|
12160
12158
|
```
|
|
12161
12159
|
|
|
12162
12160
|
It takes an object and a property name. The method will return a list of objects, where each object is a shallow copy of the input object, but with the property array unwound.
|
|
@@ -12178,7 +12176,7 @@ const expected = [{a:1, b:2}, {a:1, b:3}]
|
|
|
12178
12176
|
<summary>All TypeScript definitions</summary>
|
|
12179
12177
|
|
|
12180
12178
|
```typescript
|
|
12181
|
-
unwind<S extends string>(prop: S): <T
|
|
12179
|
+
unwind<S extends string>(prop: S): <T extends Record<S, readonly any[]>>(obj: T) => Array<MergeTypes<Omit<T, S> & { [K in S]: T[S][number] }>>;
|
|
12182
12180
|
```
|
|
12183
12181
|
|
|
12184
12182
|
</details>
|
|
@@ -12246,12 +12244,12 @@ const obj = {
|
|
|
12246
12244
|
|
|
12247
12245
|
describe('R.unwind', () => {
|
|
12248
12246
|
it('happy', () => {
|
|
12249
|
-
const result = unwind('b')(obj)
|
|
12247
|
+
const [result] = unwind('b')(obj)
|
|
12250
12248
|
result.a // $ExpectType number
|
|
12251
12249
|
result.b // $ExpectType number
|
|
12252
12250
|
})
|
|
12253
12251
|
it('inside pipe', () => {
|
|
12254
|
-
const result = pipe(obj, unwind('b'))
|
|
12252
|
+
const [result] = pipe(obj, unwind('b'))
|
|
12255
12253
|
result.a // $ExpectType number
|
|
12256
12254
|
result.b // $ExpectType number
|
|
12257
12255
|
})
|
|
@@ -12708,9 +12706,11 @@ describe('R.zipWith', () => {
|
|
|
12708
12706
|
|
|
12709
12707
|
## ❯ CHANGELOG
|
|
12710
12708
|
|
|
12711
|
-
10.0.
|
|
12709
|
+
10.0.1
|
|
12712
12710
|
|
|
12713
|
-
|
|
12711
|
+
- Fix issue with `R.unwind`/`R.pick` typings - [Issue #766](https://github.com/selfrefactor/rambda/issues/766)
|
|
12712
|
+
|
|
12713
|
+
10.0.0
|
|
12714
12714
|
|
|
12715
12715
|
This is major revamp of `Rambda` library:
|
|
12716
12716
|
|
|
@@ -12906,7 +12906,7 @@ const result = piped(
|
|
|
12906
12906
|
|
|
12907
12907
|
9.4.1
|
|
12908
12908
|
|
|
12909
|
-
- Fix bug with `R.differenceWith` when two arrays has same length - [Issue #
|
|
12909
|
+
- Fix bug with `R.differenceWith` when two arrays has same length - [Issue #757](https://github.com/selfrefactor/rambda/issues/757)
|
|
12910
12910
|
|
|
12911
12911
|
- Allow path input to not be transformed when string numbers are there - [Issue #750](https://github.com/selfrefactor/rambda/issues/750)
|
|
12912
12912
|
|
package/index.d.ts
CHANGED
|
@@ -1094,10 +1094,7 @@ export function permutations<T>(list: T[]): T[][];
|
|
|
1094
1094
|
* String annotation of `propsToPick` is one of the differences between `Rambda` and `Ramda`.
|
|
1095
1095
|
*/
|
|
1096
1096
|
export function pick<K extends PropertyKey>(propsToPick: K[]): <T>(input: T) => MergeTypes<Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>>;
|
|
1097
|
-
export function pick<
|
|
1098
|
-
S extends string,
|
|
1099
|
-
K extends PickStringToPickPath<K>
|
|
1100
|
-
>(propsToPick: S): <T>(input: T) => MergeTypes<Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>>;
|
|
1097
|
+
export function pick<S extends string>(propsToPick: S): <T>(input: T) => MergeTypes<Pick<T, Exclude<keyof T, Exclude<keyof T, ElementOf<PickStringToPickPath<S>>>>>>;
|
|
1101
1098
|
|
|
1102
1099
|
/**
|
|
1103
1100
|
* It performs left-to-right function composition, where first argument is the input for the chain of functions.
|
|
@@ -2160,7 +2157,7 @@ export function unless<T>(predicate: (x: T) => boolean, whenFalseFn: (x: T) => T
|
|
|
2160
2157
|
/**
|
|
2161
2158
|
* It takes an object and a property name. The method will return a list of objects, where each object is a shallow copy of the input object, but with the property array unwound.
|
|
2162
2159
|
*/
|
|
2163
|
-
export function unwind<S extends string>(prop: S): <T
|
|
2160
|
+
export function unwind<S extends string>(prop: S): <T extends Record<S, readonly any[]>>(obj: T) => Array<MergeTypes<Omit<T, S> & { [K in S]: T[S][number] }>>;
|
|
2164
2161
|
|
|
2165
2162
|
/**
|
|
2166
2163
|
* It returns a copy of `list` with updated element at `index` with `newValue`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rambda",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"out": "yarn populatedocs && yarn populatereadme && yarn build && yarn create-docsify",
|
|
6
6
|
"build": "yarn build:main && yarn build:web && yarn build:esm",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"populatedocs": "cd ../rambda-scripts && yarn populate:docs",
|
|
11
11
|
"populatereadme": "cd ../rambda-scripts && yarn populate:readme",
|
|
12
12
|
"lint": "cd source && run lint:folder > lint-output.txt",
|
|
13
|
+
"lint:typings": "tsc",
|
|
13
14
|
"test:file": "node scripts/tasks/run/run-test.js",
|
|
14
15
|
"test:ci": "vitest run",
|
|
15
16
|
"test": "vitest run --watch -u",
|
|
@@ -39,17 +40,18 @@
|
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@definitelytyped/dtslint": "0.0.182",
|
|
41
42
|
"@types/mocha": "10.0.10",
|
|
42
|
-
"@
|
|
43
|
+
"@types/node": "22.14.1",
|
|
44
|
+
"@vitest/coverage-v8": "3.1.1",
|
|
43
45
|
"helpers-fn": "2.0.0",
|
|
44
46
|
"lodash": "4.17.21",
|
|
45
|
-
"radashi": "
|
|
47
|
+
"radashi": "13.0.0-beta.ffa4778",
|
|
46
48
|
"rambdax": "11.3.1",
|
|
47
49
|
"ramda": "0.30.1",
|
|
48
|
-
"remeda": "2.21.
|
|
49
|
-
"rollup": "4.
|
|
50
|
+
"remeda": "2.21.3",
|
|
51
|
+
"rollup": "4.40.0",
|
|
50
52
|
"types-ramda": "0.30.1",
|
|
51
|
-
"typescript": "5.9.0-dev.
|
|
52
|
-
"vitest": "3.1.
|
|
53
|
+
"typescript": "5.9.0-dev.20250418",
|
|
54
|
+
"vitest": "3.1.1"
|
|
53
55
|
},
|
|
54
56
|
"jest": {
|
|
55
57
|
"testEnvironment": "node",
|