Skip to content

Commit 5bd2d92

Browse files
committed
Merge branch 'main' of github.com:grafana/scenes into scene-variable-set-detect-changes
2 parents 1e314d7 + 34cf3cb commit 5bd2d92

File tree

8 files changed

+1018
-146
lines changed

8 files changed

+1018
-146
lines changed

.github/workflows/build-and-test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ jobs:
2020
- name: Install dependencies
2121
run: yarn
2222

23-
- name: Build library
24-
run: lerna run build
25-
2623
- name: Test library
2724
run: lerna run test
25+
26+
- name: Typecheck library
27+
run: lerna run typecheck
28+
29+
- name: Build library
30+
run: lerna run build

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@
4343
"lerna": "^6.5.1",
4444
"lint-staged": "^13.2.0"
4545
}
46-
}
46+
}

packages/scenes/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"rollup": "2.79.1",
9696
"rollup-plugin-dts": "^5.0.0",
9797
"rollup-plugin-esbuild": "5.0.0",
98+
"rollup-plugin-fork-ts-checker": "^0.0.6",
9899
"rollup-plugin-node-externals": "^5.0.0",
99100
"rollup-plugin-svg-import": "^1.6.0",
100101
"rxjs": "7.8.0",

packages/scenes/rollup.config.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ import dts from 'rollup-plugin-dts';
44
import esbuild from 'rollup-plugin-esbuild';
55
import eslint from '@rollup/plugin-eslint';
66
import { externals } from 'rollup-plugin-node-externals';
7-
7+
import ftc from 'rollup-plugin-fork-ts-checker';
88
const env = process.env.NODE_ENV || 'production';
99
const pkg = require('./package.json');
1010

11+
const plugins = [
12+
externals({ deps: true, devDeps: true, packagePath: './package.json' }),
13+
resolve({ browser: true }),
14+
esbuild(),
15+
eslint(),
16+
];
17+
1118
export default [
1219
{
1320
input: 'src/index.ts',
14-
plugins: [
15-
externals({ deps: true, devDeps: true, packagePath: './package.json' }),
16-
resolve({ browser: true }),
17-
esbuild(),
18-
eslint(),
19-
],
21+
plugins: env === 'development' ? [ftc(), ...plugins] : plugins,
2022
output: [
2123
{
2224
format: 'cjs',

packages/scenes/src/querying/SceneDataTransformer.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,8 @@ const runRequestMock = jest.fn().mockReturnValue(
7676
})
7777
);
7878

79-
let sentRequest: DataQueryRequest | undefined;
80-
8179
jest.mock('@grafana/runtime', () => ({
8280
getRunRequest: () => (ds: DataSourceApi, request: DataQueryRequest) => {
83-
sentRequest = request;
8481
return runRequestMock(ds, request);
8582
},
8683
getDataSourceSrv: () => {

packages/scenes/src/querying/SceneQueryRunner.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { map, Observable, of } from 'rxjs';
1+
import { of } from 'rxjs';
22

33
import {
4-
ArrayVector,
54
DataQueryRequest,
65
DataSourceApi,
76
getDefaultTimeRange,

tsconfig.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,21 @@
44
"declarationDir": "./compiled",
55
"emitDeclarationOnly": true,
66
"isolatedModules": true,
7-
"rootDirs": ["."]
7+
"rootDirs": [
8+
"."
9+
]
810
},
9-
"exclude": ["dist/**/*"],
10-
"include": ["utils/**/*.ts*", "src/**/*.ts*"],
11+
"exclude": [
12+
"dist/**/*"
13+
],
14+
"include": [
15+
"utils/**/*.ts*",
16+
"src/**/*.ts*"
17+
],
1118
"ts-node": {
1219
"compilerOptions": {
1320
"isolatedModules": false,
1421
"module": "commonjs"
1522
}
1623
}
17-
}
24+
}

0 commit comments

Comments
 (0)