Skip to content

[Backport 8.14] Organize imports with Prettier plugin (#2853) #2868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions compiler/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"c8": "^7.11.0",
"minimist": "^1.2.6",
"prettier": "2.5.1",
"prettier-plugin-organize-imports": "^4.0.0",
"ts-node": "^10.4.0",
"ts-standard": "^11.0.0",
"typescript": "^4.5.5"
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/bulk/BulkRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { SourceConfigParam } from '@global/search/_types/SourceFilter'
import { RequestBase } from '@_types/Base'
import {
Fields,
Expand All @@ -27,7 +28,6 @@ import {
} from '@_types/common'
import { Duration } from '@_types/Time'
import { OperationContainer, UpdateAction } from './types'
import { SourceConfigParam } from '@global/search/_types/SourceFilter'

/**
* Performs multiple indexing or delete operations in a single API call.
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/bulk/BulkResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* under the License.
*/

import { SingleKeyDictionary } from '@spec_utils/Dictionary'
import { long } from '@_types/Numeric'
import { OperationType, ResponseItem } from './types'
import { SingleKeyDictionary } from '@spec_utils/Dictionary'

export class Response {
body: {
Expand Down
6 changes: 3 additions & 3 deletions specification/_global/bulk/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
* under the License.
*/

import { InlineGet } from '@_types/common'
import { SourceConfig } from '@global/search/_types/SourceFilter'
import { Dictionary } from '@spec_utils/Dictionary'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
import {
Id,
IndexName,
InlineGet,
Routing,
SequenceNumber,
VersionNumber,
VersionType
} from '@_types/common'
import { ErrorCause } from '@_types/Errors'
import { integer, long } from '@_types/Numeric'
import { ShardStatistics } from '@_types/Stats'
import { Script } from '@_types/Scripting'
import { SourceConfig } from '@global/search/_types/SourceFilter'
import { ShardStatistics } from '@_types/Stats'

export class ResponseItem {
/**
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/clear_scroll/ClearScrollRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { RequestBase } from '@_types/Base'
import { Ids, ScrollIds } from '@_types/common'
import { ScrollIds } from '@_types/common'

/**
* Clears the search context and results for a scrolling search.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import {
} from '@_types/common'
import { float, long } from '@_types/Numeric'
import { QueryContainer } from '@_types/query_dsl/abstractions'
import { Operator } from '@_types/query_dsl/Operator'
import { SlicedScroll } from '@_types/SlicedScroll'
import { Duration } from '@_types/Time'
import { Operator } from '@_types/query_dsl/Operator'

/**
* Deletes documents that match the specified query.
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/exists/DocumentExistsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { SourceConfigParam } from '@global/search/_types/SourceFilter'
import { RequestBase } from '@_types/Base'
import {
Fields,
Expand All @@ -26,7 +27,6 @@ import {
VersionNumber,
VersionType
} from '@_types/common'
import { SourceConfigParam } from '@global/search/_types/SourceFilter'

/**
* Checks if a document in an index exists.
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/exists_source/SourceExistsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { SourceConfigParam } from '@global/search/_types/SourceFilter'
import { RequestBase } from '@_types/Base'
import {
Fields,
Expand All @@ -26,7 +27,6 @@ import {
VersionNumber,
VersionType
} from '@_types/common'
import { SourceConfigParam } from '@global/search/_types/SourceFilter'

/**
* Checks if a document's `_source` is stored.
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/explain/ExplainRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* under the License.
*/

import { SourceConfigParam } from '@global/search/_types/SourceFilter'
import { RequestBase } from '@_types/Base'
import { Fields, Id, IndexName, Routing } from '@_types/common'
import { QueryContainer } from '@_types/query_dsl/abstractions'
import { SourceConfigParam } from '@global/search/_types/SourceFilter'
import { Operator } from '@_types/query_dsl/Operator'

/**
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/get/GetRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { SourceConfigParam } from '@global/search/_types/SourceFilter'
import { RequestBase } from '@_types/Base'
import {
Fields,
Expand All @@ -26,7 +27,6 @@ import {
VersionNumber,
VersionType
} from '@_types/common'
import { SourceConfigParam } from '@global/search/_types/SourceFilter'

/**
* @rest_spec_name get
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/get/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* under the License.
*/

import { Id, IndexName, SequenceNumber, VersionNumber } from '@_types/common'
import { Dictionary } from '@spec_utils/Dictionary'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
import { Id, IndexName, SequenceNumber, VersionNumber } from '@_types/common'
import { long } from '@_types/Numeric'

export class GetResult<TDocument> {
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/get_source/SourceRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { SourceConfigParam } from '@global/search/_types/SourceFilter'
import { RequestBase } from '@_types/Base'
import {
Fields,
Expand All @@ -26,7 +27,6 @@ import {
VersionNumber,
VersionType
} from '@_types/common'
import { SourceConfigParam } from '@global/search/_types/SourceFilter'

/**
* @rest_spec_name get_source
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/health_report/Response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Indicators, IndicatorHealthStatus } from './types'
import { IndicatorHealthStatus, Indicators } from './types'

export class Response {
body: {
Expand Down
4 changes: 2 additions & 2 deletions specification/_global/health_report/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* under the License.
*/

import { Dictionary } from '@spec_utils/Dictionary'
import { Indices } from '@_types/common'
import { LifecycleOperationMode } from '@_types/Lifecycle'
import { integer, long } from '@_types/Numeric'
import { Indices } from '@_types/common'
import { Dictionary } from '@spec_utils/Dictionary'

export enum IndicatorHealthStatus {
green,
Expand Down
5 changes: 2 additions & 3 deletions specification/_global/knn_search/KnnSearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
* under the License.
*/

import { SourceConfig } from '@global/search/_types/SourceFilter'
import { RequestBase } from '@_types/Base'
import { Fields, Indices, Routing } from '@_types/common'
import { FieldAndFormat, QueryContainer } from '@_types/query_dsl/abstractions'
import { Query } from './_types/Knn'
import { QueryContainer } from '@_types/query_dsl/abstractions'
import { SourceConfig } from '@global/search/_types/SourceFilter'
import { FieldAndFormat } from '@_types/query_dsl/abstractions'

/**
* @rest_spec_name knn_search
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/knn_search/KnnSearchResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* under the License.
*/

import { HitsMetadata } from '@global/search/_types/hits'
import { Dictionary } from '@spec_utils/Dictionary'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
import { double, long } from '@_types/Numeric'
import { ShardStatistics } from '@_types/Stats'
import { HitsMetadata } from '@global/search/_types/hits'

export class Response<TDocument> {
body: {
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/knn_search/_types/Knn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/

import { Field } from '@_types/common'
import { integer } from '@_types/Numeric'
import { QueryVector } from '@_types/Knn'
import { integer } from '@_types/Numeric'

export interface Query {
/** The name of the vector field to search against */
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/mget/MultiGetRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* under the License.
*/

import { SourceConfigParam } from '@global/search/_types/SourceFilter'
import { RequestBase } from '@_types/Base'
import { Fields, Ids, IndexName, Routing } from '@_types/common'
import { Operation } from './types'
import { SourceConfigParam } from '@global/search/_types/SourceFilter'

/**
* @rest_spec_name mget
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/mget/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import { GetResult } from '@global/get/types'
import { SourceConfig } from '@global/search/_types/SourceFilter'
import {
Fields,
Expand All @@ -27,7 +28,6 @@ import {
VersionType
} from '@_types/common'
import { ErrorCause } from '@_types/Errors'
import { GetResult } from '@global/get/types'

export class Operation {
/**
Expand Down
22 changes: 11 additions & 11 deletions specification/_global/msearch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@
* under the License.
*/

import { ResponseBody as SearchResponse } from '@global/search/SearchResponse'
import { FieldCollapse } from '@global/search/_types/FieldCollapse'
import { Highlight } from '@global/search/_types/highlighting'
import { TrackHits } from '@global/search/_types/hits'
import { PointInTimeReference } from '@global/search/_types/PointInTimeReference'
import { Rescore } from '@global/search/_types/rescoring'
import { SourceConfig } from '@global/search/_types/SourceFilter'
import { Suggester } from '@global/search/_types/suggester'
import { Dictionary } from '@spec_utils/Dictionary'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
import { ErrorResponseBase } from '@_types/Base'
import {
ExpandWildcards,
Fields,
Expand All @@ -29,20 +37,12 @@ import {
Routing,
SearchType
} from '@_types/common'
import { KnnSearch } from '@_types/Knn'
import { RuntimeFields } from '@_types/mapping/RuntimeFields'
import { double, integer, long } from '@_types/Numeric'
import { FieldAndFormat, QueryContainer } from '@_types/query_dsl/abstractions'
import { ResponseBody as SearchResponse } from '@global/search/SearchResponse'
import { TrackHits } from '@global/search/_types/hits'
import { ErrorResponseBase } from '@_types/Base'
import { Sort, SortResults } from '@_types/sort'
import { FieldCollapse } from '@global/search/_types/FieldCollapse'
import { Highlight } from '@global/search/_types/highlighting'
import { Rescore } from '@global/search/_types/rescoring'
import { SourceConfig } from '@global/search/_types/SourceFilter'
import { RuntimeFields } from '@_types/mapping/RuntimeFields'
import { ScriptField } from '@_types/Scripting'
import { KnnSearch } from '@_types/Knn'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
import { Sort, SortResults } from '@_types/sort'

/**
* @codegen_names header, body
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/msearch_template/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* under the License.
*/

import { MultisearchHeader } from '@global/msearch/types'
import { Dictionary } from '@spec_utils/Dictionary'
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
import { Id } from '@_types/common'
import { MultisearchHeader } from '@global/msearch/types'

/** @codegen_names header, body */
export type RequestItem = MultisearchHeader | TemplateConfig
Expand Down
4 changes: 2 additions & 2 deletions specification/_global/reindex/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Sort } from '@_types/sort'
import { Dictionary } from '@spec_utils/Dictionary'
import {
Fields,
IndexName,
Expand All @@ -33,8 +33,8 @@ import { Host } from '@_types/Networking'
import { integer } from '@_types/Numeric'
import { QueryContainer } from '@_types/query_dsl/abstractions'
import { SlicedScroll } from '@_types/SlicedScroll'
import { Sort } from '@_types/sort'
import { Duration } from '@_types/Time'
import { Dictionary } from '@spec_utils/Dictionary'

export class Destination {
/**
Expand Down
Loading
Loading