kibana/x-pack/plugins/reporting
Nick Partridge 49a985625b
Upgrade prettier dependencies (#188032)
## Summary

- Upgrade `prettier` to `v2.8.x`.
- Upgrade related decencies.
- Adds `prettier` group to renovate config.
- Fixes bootstrapping type error.

## Main Changes

### Add parentheses for `TypeofTypeAnnotation` to improve readability

[link](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#add-parentheses-for-typeoftypeannotation-to-improve-readability-14458-by-fisker)

```ts
// Input
type A = (typeof node.children)[];

// Prettier 2.8.4
type A = typeof node.children[];

// Prettier 2.8.5
type A = (typeof node.children)[];
```

### Add parentheses to head of `ExpressionStatement` instead of the
whole statement


[link](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#add-parentheses-to-head-of-expressionstatement-instead-of-the-whole-statement-14077-by-fisker)

```ts
// Input
({}).toString.call(foo) === "[object Array]"
  ? foo.forEach(iterateArray)
  : iterateObject(foo);

// Prettier 2.8.1
({}.toString.call(foo) === "[object Array]"
  ? foo.forEach(iterateArray)
  : iterateObject(foo));

// Prettier 2.8.2
({}).toString.call(foo.forEach) === "[object Array]"
  ? foo.forEach(iterateArray)
  : iterateObject(foo);
```

## Details

This started because I noticed we were on `typescript@^5` but still on
an old prettier that complained about use of new TS features such as
[`satisfies`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-24 17:29:05 +01:00
..
common [Reporting] Fix soft disable reporting error (#180950) 2024-04-17 12:06:33 +02:00
public [Global Search] Provide results for reports and report (#186201) 2024-06-17 09:05:54 -06:00
server Upgrade prettier dependencies (#188032) 2024-07-24 17:29:05 +01:00
jest.config.js
jest.integration.config.js [ci] Splits Jest integration tests (#125454) 2022-02-14 17:12:42 +01:00
kibana.jsonc [Embeddable Rebuild] [Saved Search] Migrate saved search embeddable to new embeddable framework (#180536) 2024-07-22 15:14:21 -06:00
README.md [Reporting/CSV] Deprecate Download CSV, add a config flag to enable (#178159) 2024-03-22 18:28:09 -07:00
tsconfig.json migrate getCurrentUser calls in reporting to core security service (#186913) 2024-06-28 17:25:09 -05:00

Kibana Reporting

An awesome Kibana reporting plugin

csv_searchsource.

This is the endpoint used in the Discover UI. It must be replaced by csv_v2 at some point, when we have more capacity in reporting. https://github.com/elastic/kibana/issues/151190

csv_searchsource_immediate.

This is deprecated. This export type provides users with the means to download a CSV export of a saved search without creating a report. It is only available to users when xpack.reporting.csv.enablePanelActionDownload is set to true in kibana.yml. The default is false, which provides users with the means to generate a normal CSV report.

csv_v2.

This new endpoint is designed to have a more automation-friendly signature. It will replace csv_searchsource in the UI at some point, when there is more capacity in reporting. It will need a little more work to have parity: it needs to be able to export "unsaved" searches.

Generate CSV

Although historically related to reporting, the CsvGenerator class has now be moved into its own package @kbn/generate-csv.

Serverless configuration

There are several improvements made for reporting in serverless environments. Most changes are reflected in reporting/server/config/schema.ts for reference.

PNG and PDF reports are currently not possible in serverless. Those export types are not enabled in serverless configuration, and are left out of Reporting's internal registry of export types.

The setting xpack.reporting.roles.enabled is false by default for serverless. This setting enables backwards-compatible functionality for reporting privileges, this type of BWC is not needed in serverless.