Commit Graph

22 Commits

Author SHA1 Message Date
Ashley Harrison
47f8717149
React: Use new JSX transform (#88802)
* update eslint, tsconfig + esbuild to handle new jsx transform

* remove thing that breaks the new jsx transform

* remove react imports

* adjust grafana-icons build

* is this the correct syntax?

* try this

* well this was much easier than expected...

* change grafana-plugin-configs webpack config

* fixes

* fix lockfile

* fix 2 more violations

* use path.resolve instead of require.resolve

* remove react import

* fix react imports

* more fixes

* remove React import

* remove import React from docs

* remove another react import
2024-06-25 12:43:47 +01:00
Jack Westbrook
8f06784449
Chore: Bump d3-color to 3.1.0 (#61609)
* chore(d3-color): resolve all copies to 3.1.0 to fix vulnerability

* chore(yarn): fix resolution version

* chore(jest): compile d3-color from esm to cjs

* chore(d3): bump d3 to latest, set jest config to transpile es modules

* chore: bump visx packages to resolve d3-color to latest

* chore(jest): add missing es modules to config

* chore(storybook): prevent storybook config failure due to nested esm imports

* chore(storybook): use a direct path to avoid es modules breaking config build

* build(sass): use esbuild to generate sass theme vars for esm deps

* chore: clean up swc dependencies

* revert: remove debug console.log breaking tests
2023-01-26 13:02:22 +01:00
Jack Westbrook
dcc02a8ebe
Storybook: Fix asset paths for hosted storybooks (#56319)
* feat(sass): introduce font-file-path var to define where to load fonts from

* feat(storybook): introduce storybook sass theme styles to set font file paths

* chore(sass): change imports so treated as sass rather than css

* feat(storybook): filter assets so builds dont contain thousands of files
2022-10-05 12:10:29 +02:00
Jack Westbrook
d87bf30e9e
Build: Introduce ESM and Treeshaking to NPM package builds (#51517)
* Revert "Chore: Bump terser to fix security vulnerability (#53052)"

This reverts commit 7ae74d2a18.

* feat: use tsc and rollup directly with esbuild and publishConfig, files props

* refactor(grafana-data): fix isolatedModules re-export type error

* refactor(grafana-data): import paths from src not package name

* refactor(rollup): fix dts output.file

* chore(grafana-schema): delete dashboard_experimental.gen.ts - cannot work with isolatedModules

* refactor(grafana-e2e-selectors): fix export types isolatedModules error

* refactor(grafana-runtime): fix isolatedModules re-export type error

* refactor(grafana-ui): fix isolatedModules re-export type error

* feat(grafana-ui): use named imports for treeshaking

* refactor(grafana-ui): use named imports for treeshaking

* feat: react and react-dom as peerDeps for packages

* feat(grafana-ui): emotion packages as peerDeps

* feat(grafana-e2e): use tsc, rollup, esbuild for bundling

* chore(packages): clean up redundant dependencies

* chore(toolkit): deprecate unused package:build task

* chore(schema): put back dashboard_experimental and exclude to prevent isolatedModules error

* docs(packages): update readme

* chore(storybook): disable isolatedModules for builds

* chore: relax peerDeps for emotion and react

* revert(grafana-ui): put @emotion dependencies back

* refactor: replace relative package imports with package name

* build(packages): set emitDeclaration false for typecheck scripts to work

* test(publicdashboarddatasource): move test next to implementation. try to appease the betterer gods

* chore(storybook): override ts-node config for storybook compilation

* refactor(grafana-data): use ternary so babel doesnt complain about expecting flow types

* chore(toolkit): prefer files and publishConfig package.json props over copying

* build(npm): remove --contents dist arg from publishing commands

* chore(packages): introduce sideEffects prop to package.json to hint package can be treeshaken

* chore(packages): remove redundant index.js files

* feat(packages): set publishConfig.access to public

* feat(packages): use yarn berry and npm for packaging and publishing

* refactor(packages): simplify rollup configs

* chore(schema): add comment explaining need to exclude dashboard_experimental

* revert(toolkit): put back clean to prevent cli failures

* ci(packages): run packages:pack before a canary publish

* chore(gitignore): add npm-artifacts directory to ignore list

* test(publicdashboarddatasource): fix module mocking

* chore(packages): delete package.tgz when running clean

* chore(grafana-data): move dependencies from devDeps to prevent build resolution errors
2022-08-03 15:47:09 +02:00
Jack Westbrook
398f2b3d18
Build: Fix failing recompile of Grafana packages (#47492)
* build(packages): remove incremental as cache fails to recompile

* build(packages): remove tsBuildInfoFile property from tsconfig files
2022-04-11 09:41:03 +02:00
Jack Westbrook
efe9eed758
Chore: Move Typescript cache file to root (#45964)
* chore(typescript): move TS cache file to root of repo

* chore(typescript): cache packages ts checks to disk for faster yarn typecheck
2022-03-04 09:26:25 +01:00
kay delaney
3a7c5a0755
Chore: Switch yarn 2 to plug-n-play strategy (#40300) 2021-10-27 14:21:07 +01:00
Ryan McKinley
425ec7ca9e
Schema: create a new schema package for basic models (#38409) 2021-08-23 13:03:41 -07:00
Josh Hunt
a13c5380a7
Grafana-UI: Switch CodeEditor to UMD @monao-editor/react (#33204)
* Grafana-UI: Switch CodeEditor to @monao-editor/react

* update copy script and paths

* hide context menu

* use __grafana_public_path__

* Fix value and language not updating

* update jaeger tsconfig

* update tsconfig

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-04-27 17:34:56 +01:00
Ivan Kopeykin
c654e2bfda
Storybook: Use bare specifier @grafana/ui in public stories (#26563) 2020-07-24 16:41:44 +02:00
Torkel Ödegaard
92a16d2e10
Transforms: Adds beta notice and updates transform descriptions (#24158)
* Transforms: Adds beta notice and updates transform descriptions

* Rename organize fields

* Webpack - enable images import

* Introduce FeatureState type

* Alow Container component grow/shrink config

* Enable svg import in main app

* Jest + webpack for svgs

* InfoBox refactor (+ added feature info box), Badge component introduced

* Update packages/grafana-ui/src/components/TransformersUI/FilterByNameTransformerEditor.tsx

Co-authored-by: Carl Bergquist <carl@grafana.com>

* Minor fixes

* Update packages/grafana-ui/src/components/TransformersUI/OrganizeFieldsTransformerEditor.tsx

Co-authored-by: Carl Bergquist <carl@grafana.com>

* Update packages/grafana-ui/src/components/TransformersUI/SeriesToFieldsTransformerEditor.tsx

Co-authored-by: Carl Bergquist <carl@grafana.com>

* fix typo

* Build storybook fixed

* Fix padding

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Carl Bergquist <carl@grafana.com>
2020-05-04 15:05:31 +02:00
Dominik Prokop
d2a13c4715
FieldOverride: Support data links via field overrides (#23590)
* Move xss and sanitize packages to grafana-data

* Move text, url and location utils to grafana-data

* Move grafana config types to grafana-data

* Move field display value proxy to grafana-data

* Fix

* Move data links built in vars to grafana-data

* Attach links supplier to when applying field overrides

* Prep tests

* Use links suppliers attached via field overrides

* locationUtil dependencies type

* Move sanitize-url declaration to grafana-data

* Revert "Move sanitize-url declaration to grafana-data"

This reverts commit 11db9f5e55.

* Fix typo

* fix ts vol1

* Remove import from runtime in data.... Make TS happy at the same time ;)

* Lovely TS, please shut up

* Lovely TS, please shut up vol2

* fix tests

* Fixes

* minor refactor

* Attach get links to FieldDisplayValue for seamless usage

* Update packages/grafana-data/src/field/fieldOverrides.ts

* Make storybook build
2020-04-20 07:37:38 +02:00
Steven Vachon
f48169633c
TSLint → ESLint (#21006)
* Alphabetized tslint and tsconfig files

* Optimized tsconfig files

* Optimized editorconfig & prettier config files

… to reduce redundancy

* Switched to @grafana/tsconfig

… and:
* de-duped options
* removed options with default values

* Fixed nasty issue with types for nested slate-react

* Replaced TSLint with ESLint

* TSLint disables → ESLint disables

… also JSHint removals, which haven’t had an affect since it was replaced with TSLint.

* Compliances for ESLint, Prettier and TypeScript

* Updated lockfile
2020-02-08 02:40:04 +01:00
kay delaney
68d6da77da
Chore: Update Slate to 0.47.8 (#19197)
* Chore: Update Slate to 0.47.8
Closes #17430
2019-09-23 12:26:05 +01:00
Dominik Prokop
503dccb771 Revert "Chore: Update Slate to 0.47.8 (#18412)" (#19167)
This reverts commit 601853fc84.
2019-09-17 13:21:50 +02:00
kay delaney
601853fc84 Chore: Update Slate to 0.47.8 (#18412)
* Chore: Update Slate to 0.47.8
Closes #17430

* Add slate and immutable to grafana-ui deps

* Fixes some small regressions introduced

* Fix suggestions for multiple query fields

* Pin upgraded dependencies

* Prettier fix

* Remove original slate-react dependency

* Fix tiny-invariant dep

* (Temporarily) comments out source maps for grafana-ui
2019-09-17 13:16:24 +02:00
Tobias Skarhed
d6e8129588 Packages: create shared tsconfig.json (#18010) 2019-07-10 12:50:52 +02:00
Dominik Prokop
529c1ea53d Implemented scripts for building and releasing grafana/ui 2019-02-21 15:06:29 +01:00
Torkel Ödegaard
d6de40cbe6 Added missing strict type checking options to grafana/ui and fixed type errors 2019-02-15 10:49:10 +01:00
Dominik Prokop
0fb23bd334 WIP 2019-01-09 09:40:57 +01:00
Torkel Ödegaard
52f583fee7 @grafana/ui lib now contains one components, seperate lint & tsc steps 2018-12-21 14:23:32 +01:00
Torkel Ödegaard
6e66b2b906 breaking up grafana into multiple packages poc 2018-12-20 16:56:46 +01:00