Commit Graph

138 Commits

Author SHA1 Message Date
AJ Richardson
79b40511a0 Trim down tests to avoid memory error 2018-05-12 10:13:44 -04:00
AJ Richardson
207c35ed90 Remove trivial files from tsconfig.json to avoid memory errors in tests 2018-05-12 08:36:50 -04:00
AJ Richardson
d45c6ed062 lodash: fix test failures 2018-05-05 17:01:11 -04:00
AJ Richardson
1e7f424237 lodash: improve omit/unset/mergeAll (#25361,#25365,#25382), fix partial 2018-05-03 23:12:59 -04:00
AJ Richardson
64104e9760 Lowdb test fix (#25204)
* lodash: _.get should with numeric keys, too.
Also added some better tests.

* lodash: add one more NumericDictionary overload for _.get

* lodash: more reasonable index for _.get tests

* lodash: object type should not be here (fixes #23293)

* lodash: reduce should always return T if no accumulator (#14758)

* lodash: fix iterator types, remove thisArg from documentation

* lodash: return more specific type for stubTrue and stubFalse

* lowdb: fix failing tests
2018-04-24 16:03:38 -07:00
AJ Richardson
a1ff7a2a7d [lodash] Placeholder support (#24728)
* lodash: _.get should with numeric keys, too.
Also added some better tests.

* lodash: add one more NumericDictionary overload for _.get

* lodash: more reasonable index for _.get tests

* lodash: support placeholders for curry

* lodash: add logic for generating overloads with placeholders

* lodash: fix placeholder generation bugs

* lodash: use the original parameter name for placeholder parameters

* lodash: stop generating unnecessary generics

* lodash: move all FP functions into a single file.
Trying to fix memory error in tests.

* lodash: omit comments and useless overloads to make the build work

* lodash: update fp function files

* Fix placeholder definition files

* lodash: add placeholder constants to fp definitions

* lodash: looks like we missed some jsdoc comments.
Let's omit them for consistency.

* lodash: fix build errors
2018-04-14 12:40:40 -07:00
AJ Richardson
67ff021363 [lodash] Add types for lodash/fp (#23532)
* lodash: _.get should with numeric keys, too.
Also added some better tests.

* lodash: add one more NumericDictionary overload for _.get

* lodash: more reasonable index for _.get tests

* Working on script to generate FP types (for #7896)

* Generate generic args and multiple overloads correctly (ish)

* Cap callback arguments

* Fix ObjectIteratee issue, merge interfaces

* Merge similar overloads

* Read and write definiton files

* Generate definitions for all functions
(still needs some tweaking)

* Add JSDoc comments to the output, fix some bugs

* Fix more fp generation bugs

* Add alias functions and special fp functions

* Fix more fp generation bugs

* Fix more fp generation bugs

* Fix more fp generation bugs

* lodash fp: cap more callbacks, use ReadonlyArray, handle special cases

* Add some tests, fix some bugs

* Remove invalid argument from flatten. Don't curry single argument functions.
But do "convert" them so aliases work.
Also fixed some tests.

* lodash fp: implement more tests, fix more bugs, improve performance

* lodash fp: implement more tests, fix more bugs

* lodash fp: add more tests, fix more bugs

* lodash fp: tests finally pass!

* Remove namespace hack

* lodash: fix tests

* lodash fp: fix lint issues

* lodash: Fix lint issues

* lodash: fix more lint issues

* lodash: make travis happy

* lodash: make travis happy (again)

* Update generate-fp script to work with new folder structure

* Lodash: update fp types after merge

* Lodash: test optimizations

* lodash: simplify some tests to avoid GC error

* lodash: simplify tests even more (and fix bugs)
2018-03-22 10:44:42 -07:00
Jeff Lau
9fb4bc7089 Lodash: Improve support for NumericDictionary collections (#24052)
* Change NumericDictionaryIterator's "key" to type "string"

* Finish updating unit tests

* Improve support of NumericDictionary.
* Update signature overloads of many methods.
* Improve many unit tests.

* Fix some mapValues overloads

* Revert changes to V3 files

* Improve _.omit to fully support Dictionary and NumericDictionary

* Remove unused DictionaryIterator typedefs

* Improve signatures of mapValues and add tons of unit tests

* Remove _.sample overloads that did not potentially  return undefined.

* Simplify definition of "AnyKindOfDictionary"

* Fix one of the _.mapValues overloads

* Delete unnecessary/incorrect comments

* Improve _.forEach unit tests

* Clean up unit tests for mapValues

* Clean up unit tests for _.map

* Add more NumericDictionary test coverage

* Fix _.map to accept a PropertyPath param instead of just a string.

* Re-add DictionaryIterator and NumericDictionaryIterator definitions
for backward compatibility.

* Revert change to support PropertyPath in _.map

* Comment out parts of _.forEach tests that fail in TS 2.4

* Fix _.unionBy tests for TS 2.3

* Comment out _.mapKeys tests that break in TS 2.4

* Comment out parts of _.forEach tests that fail in TS 2.4 (again)

* Fix _.xor test that was broken in TS 2.3

* Comment out parts of _.map tests that fail in TS 2.4

* Remove invalid tests for _.some

* Remove "object" type from definition of ObjectIterateeCustom

* Comment out _.pick tests broken in TS 2.4
2018-03-15 09:36:44 -07:00
Andy
7c243097d1 lodash: Revert ReadonlyArray support (crashes older compilers) (#23710) 2018-02-16 10:14:04 -08:00
Andy
81b3b60696 lodash: Reduce number of files (#23672) 2018-02-15 13:25:49 -08:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Ron Buckton
7df273da4e Merge pull request #23412 from thorn0/lodash-readonly-array
lodash: support `ReadonlyArray` for specifying property names
2018-02-07 15:01:39 -08:00
Ron Buckton
2c3081b73c Merge pull request #23405 from ericanderson/patch-1
lodash: Removing myself as an author
2018-02-07 14:40:10 -08:00
Andy
bef4d2b27d Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Georgii Dolzhykov
d85cf6b138 tests for _.pick 2018-02-05 19:16:41 +02:00
Georgii Dolzhykov
cbef44fbdb tests for _.concat 2018-02-05 12:20:59 +02:00
Georgii Dolzhykov
3d46301f55 lodash: support ReadonlyArray for specifying property names
Closes #23278
2018-02-05 02:09:50 +02:00
Eric Anderson
97bae499e4 Removing myself as an author 2018-02-04 11:36:33 -05:00
Wesley Wigham
422003f3c5 Use import require when call or construct signatures are needed to improve compat with esModuleInterop (#23355)
* Use import require when call or construct signatures are needed to improve compat with esModuleInterop

* Add moment-timezoe fix
2018-02-02 14:09:06 -08:00
Georgii Dolzhykov
2cbe4e25c8 Rename confusing identifiers in tests (interface TResult -> AbcObject, var any -> anything) (#23307) 2018-02-01 11:09:56 -08:00
Georgii Dolzhykov
1f0e148136 lodash: remove _.flip from function/delay.d.ts (#23338) 2018-02-01 09:24:03 -08:00
Oliver Joseph Ash
962a9ec919 Lodash: zip: add undefined to return values (#23305)
* Lodash: `zip`: add undefined to return values

* Lodash: `zip`: correct generic typo

* Lodash: `zip`: add undefined to return values for other overloads

* Lodash: `zip`: use `` for tests
2018-01-31 12:35:27 -08:00
AJ Richardson
fe8a866480 Zip different types (#23232)
* lodash: _.get should with numeric keys, too.
Also added some better tests.

* lodash: add one more NumericDictionary overload for _.get

* lodash: more reasonable index for _.get tests

* lodash: zip should allow arrays of different types

* Remove pointless namespace
2018-01-29 11:35:07 -08:00
Andy
745420a23e lodash: Work with classic module resolution (#23198) 2018-01-26 13:33:19 -08:00
Andy
0f4014dbf9 lodash: Use module augmentation instead of namespace augmentation to avoid declaring _ as a global variable (#23164) 2018-01-24 11:17:18 -08:00
Andy
4b720c2d25 lodash: Remove empty files (#23145) 2018-01-23 16:16:58 -08:00
Dominique Rau
8b292ec78a Lodash: split up monolith file and use per file per method. (#23100)
* feat(restructure): split up monolith

* fix(header): fix typo in file header

* fix(properties): add missing property files

* fix(tests): delete new empty test-files for now

* fix(test): revert type changes
2018-01-23 10:22:44 -08:00
AJ Richardson
437a2eef37 lodash: add isMatch to explicit wrapper interface, enable more lint rules (#22883)
* lodash: _.get should with numeric keys, too.
Also added some better tests.

* Enable array-type and ban-types rules

* Enable more lint rules, add isMatchWith to explicit wrapper
2018-01-18 13:25:39 -08:00
AJ Richardson
3f28d2ed00 lodash: _.get should work with NumericDictionaries (#22619)
* lodash: _.get should with numeric keys, too.
Also added some better tests.

* lodash: add one more NumericDictionary overload for _.get

* lodash: more reasonable index for _.get tests
2018-01-03 16:06:27 -08:00
Mine Starks
a75d0a8e73 Merge pull request #21820 from aj-r/misc-fixes
lodash: fix partition, pick, and iteratee functions like trim
2017-12-14 17:08:08 -08:00
AJ Richardson
7021ff77ae lodash: clean up random overloads 2017-12-14 17:47:54 -05:00
Mine Starks
2614f42184 Merge pull request #22126 from andnp/master
[lodash] add array destructure overload for _.zipWith fixes #21884
2017-12-14 08:16:38 -08:00
andy.patterson
8aa84402f7 add array destructure overload for _.zipWith 2017-12-12 08:34:35 -05:00
polizz
6bb4108949 Add _.matches shorthand to ListIterateeCustom 2017-12-07 08:21:16 -06:00
polizz
c770de6b7d Align with standard 2017-12-07 08:21:16 -06:00
polizz
2fb10c3e99 Add missing _.matches iteratee shorthand 2017-12-07 08:20:56 -06:00
Oliver Joseph Ash
a895798045 Merge branch 'master' into oja/lodash/clamp-no-lower-bound 2017-12-02 17:24:49 +00:00
Armando Aguirre
346296d2a9 Merge pull request #21872 from OliverJAsh/oja/lodash/over-some-safe
Lodash: `overSome` and `overEvery`: use generic instead of any
2017-12-01 12:27:16 -08:00
Oliver Joseph Ash
f3d38534f8 Lodash: overSome: tests: add missing function parameters 2017-12-01 10:44:27 +00:00
Oliver Joseph Ash
254f87722d Lodash: overEvery: use generic instead of any 2017-12-01 10:43:54 +00:00
Oliver Joseph Ash
327398e6d9 Lodash: overSome: tests: remove redundant explicit generic
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21872#discussion_r154215366
2017-12-01 10:41:48 +00:00
Thomas Corbière
24664ff23d Fixes TS configuration. 2017-12-01 09:22:56 +01:00
Oliver Joseph Ash
e277980c20 Lodash: overSome: use generic instead of any 2017-11-30 20:29:37 +00:00
Thomas Corbière
601e3fc2a2 Merge branch 'master' into lodash-defaultTo 2017-11-30 12:13:56 +01:00
Thomas Corbière
c72120d5bc Adds missing export for lodash/conformsTo. 2017-11-30 12:10:46 +01:00
Thomas Corbière
3b424cc142 Revert "Fixes lint errors in test file."
This reverts commit 2428c4197f.
2017-11-30 11:38:04 +01:00
Thomas Corbière
2428c4197f Fixes lint errors in test file. 2017-11-30 11:25:45 +01:00
Thomas Corbière
53ec42bbcd Adds missing export for lodash/defaultTo. 2017-11-29 12:42:27 +01:00
AJ Richardson
04ed785cc1 lodash: _.partition should return a tuple instead of an array (#18350) 2017-11-28 21:58:55 -05:00
AJ Richardson
307c17d027 lodash: add guards to allow certain functions to be used as iteratees.
Also fixed _.pick overloads.
2017-11-28 21:47:23 -05:00