Skip to content

Commit c3485f6

Browse files
dej611akowalska622
authored andcommitted
[chore] Bundle fp-ts into the shared bundle (elastic#217034)
## Summary Just had some fun and made fp-ts available in the shared bundle, with support for partial imports. Changes in this PR: * aligned `fp-ts` direct imports to the format: `fp-ts/<module>` * Mapped the direct imports into the shared bundle re-using the same `fp-ts` module under the hood
1 parent 7af6402 commit c3485f6

File tree

305 files changed

+494
-482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+494
-482
lines changed

src/core/packages/saved-objects/migration-server-internal/src/actions/bulk_overwrite_transformed_documents.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import * as Either from 'fp-ts/lib/Either';
11-
import * as TaskEither from 'fp-ts/lib/TaskEither';
10+
import * as Either from 'fp-ts/Either';
11+
import * as TaskEither from 'fp-ts/TaskEither';
1212
import type { estypes } from '@elastic/elasticsearch';
1313
import { errors as esErrors } from '@elastic/elasticsearch';
1414
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';

src/core/packages/saved-objects/migration-server-internal/src/actions/calculate_exclude_filters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
1111
import { withTimeout } from '@kbn/std';
12-
import * as Either from 'fp-ts/lib/Either';
13-
import * as TaskEither from 'fp-ts/lib/TaskEither';
12+
import * as Either from 'fp-ts/Either';
13+
import * as TaskEither from 'fp-ts/TaskEither';
1414
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
1515
import type { SavedObjectTypeExcludeFromUpgradeFilterHook } from '@kbn/core-saved-objects-server';
1616
import type { RetryableEsClientError } from '.';

src/core/packages/saved-objects/migration-server-internal/src/actions/catch_retryable_es_client_errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import * as Either from 'fp-ts/lib/Either';
10+
import * as Either from 'fp-ts/Either';
1111
import { errors as EsErrors } from '@elastic/elasticsearch';
1212
import { isRetryableEsClientError } from '@kbn/core-elasticsearch-server-internal';
1313

src/core/packages/saved-objects/migration-server-internal/src/actions/check_cluster_routing_allocation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import * as TaskEither from 'fp-ts/lib/TaskEither';
11-
import * as Either from 'fp-ts/lib/Either';
10+
import * as TaskEither from 'fp-ts/TaskEither';
11+
import * as Either from 'fp-ts/Either';
1212
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
1313
import {
1414
catchRetryableEsClientErrors,

src/core/packages/saved-objects/migration-server-internal/src/actions/check_for_unknown_docs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import * as Either from 'fp-ts/lib/Either';
11-
import * as TaskEither from 'fp-ts/lib/TaskEither';
10+
import * as Either from 'fp-ts/Either';
11+
import * as TaskEither from 'fp-ts/TaskEither';
1212
import { flatten } from 'lodash';
1313
import type {
1414
AggregationsMultiBucketAggregateBase,

src/core/packages/saved-objects/migration-server-internal/src/actions/check_target_mappings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import * as Either from 'fp-ts/lib/Either';
11-
import * as TaskEither from 'fp-ts/lib/TaskEither';
10+
import * as Either from 'fp-ts/Either';
11+
import * as TaskEither from 'fp-ts/TaskEither';
1212

1313
import type { IndexMapping, VirtualVersionMap } from '@kbn/core-saved-objects-base-server-internal';
1414
import { getNewAndUpdatedTypes } from '../core/compare_mappings';

src/core/packages/saved-objects/migration-server-internal/src/actions/cleanup_unknown_and_excluded.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import * as Either from 'fp-ts/lib/Either';
11-
import * as TaskEither from 'fp-ts/lib/TaskEither';
12-
import { pipe } from 'fp-ts/lib/function';
10+
import * as Either from 'fp-ts/Either';
11+
import * as TaskEither from 'fp-ts/TaskEither';
12+
import { pipe } from 'fp-ts/function';
1313
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
1414
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
1515
import type { SavedObjectTypeExcludeFromUpgradeFilterHook } from '@kbn/core-saved-objects-server';

src/core/packages/saved-objects/migration-server-internal/src/actions/clone_index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import * as Either from 'fp-ts/lib/Either';
11-
import * as TaskEither from 'fp-ts/lib/TaskEither';
12-
import { pipe } from 'fp-ts/lib/function';
10+
import * as Either from 'fp-ts/Either';
11+
import * as TaskEither from 'fp-ts/TaskEither';
12+
import { pipe } from 'fp-ts/function';
1313
import { errors as EsErrors } from '@elastic/elasticsearch';
1414
import type {
1515
ElasticsearchClient,

src/core/packages/saved-objects/migration-server-internal/src/actions/close_pit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import * as Either from 'fp-ts/lib/Either';
11-
import * as TaskEither from 'fp-ts/lib/TaskEither';
10+
import * as Either from 'fp-ts/Either';
11+
import * as TaskEither from 'fp-ts/TaskEither';
1212
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
1313
import {
1414
catchRetryableEsClientErrors,

src/core/packages/saved-objects/migration-server-internal/src/actions/create_index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import * as Either from 'fp-ts/lib/Either';
11-
import * as TaskEither from 'fp-ts/lib/TaskEither';
12-
import { pipe } from 'fp-ts/lib/function';
10+
import * as Either from 'fp-ts/Either';
11+
import * as TaskEither from 'fp-ts/TaskEither';
12+
import { pipe } from 'fp-ts/function';
1313
import type { estypes } from '@elastic/elasticsearch';
1414
import type {
1515
ElasticsearchClient,

0 commit comments

Comments
 (0)