aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-09-10 10:24:12 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-10 10:24:12 +0200
commit3962cd8f026d225968c186cb94609f8a133ead24 (patch)
tree849b3fe9ce847c0e1a7e716d6c04f1769eee5d56 /packages
parentchore: preconditions for pnpm migration (#1903) (diff)
downloadferdium-app-3962cd8f026d225968c186cb94609f8a133ead24.tar.gz
ferdium-app-3962cd8f026d225968c186cb94609f8a133ead24.tar.zst
ferdium-app-3962cd8f026d225968c186cb94609f8a133ead24.zip
chore: preconditions for node 16 (#1904)
Diffstat (limited to 'packages')
-rw-r--r--packages/theme/package.json4
-rw-r--r--packages/theme/src/themes/IStyleTypes.ts2
-rw-r--r--packages/theme/src/themes/default/index.ts2
-rw-r--r--packages/theme/test/index.test.js17
-rw-r--r--packages/theme/test/index.test.ts19
-rw-r--r--packages/theme/tsconfig.json1
6 files changed, 24 insertions, 21 deletions
diff --git a/packages/theme/package.json b/packages/theme/package.json
index 516bab93c..7f3226bd8 100644
--- a/packages/theme/package.json
+++ b/packages/theme/package.json
@@ -17,13 +17,13 @@
17 "dev": "tsc -w", 17 "dev": "tsc -w",
18 "build": "tsc", 18 "build": "tsc",
19 "preprepare": "npm run test", 19 "preprepare": "npm run test",
20 "test": "npx mocha" 20 "test": "ts-mocha 'test/**/*.test.ts'"
21 }, 21 },
22 "bugs": { 22 "bugs": {
23 "url": "https://github.com/meetfranz/franz/issues" 23 "url": "https://github.com/meetfranz/franz/issues"
24 }, 24 },
25 "dependencies": { 25 "dependencies": {
26 "color": "3.1.2" 26 "color": "4.0.1"
27 }, 27 },
28 "gitHead": "9f2ab40b7602bc3df26ebb093b484b9917768f69" 28 "gitHead": "9f2ab40b7602bc3df26ebb093b484b9917768f69"
29} 29}
diff --git a/packages/theme/src/themes/IStyleTypes.ts b/packages/theme/src/themes/IStyleTypes.ts
index cf8bdea33..48f52daf2 100644
--- a/packages/theme/src/themes/IStyleTypes.ts
+++ b/packages/theme/src/themes/IStyleTypes.ts
@@ -1,4 +1,4 @@
1export default interface IStyleTypes { 1export interface IStyleTypes {
2 [index: string]: { 2 [index: string]: {
3 accent: string; 3 accent: string;
4 contrast: string; 4 contrast: string;
diff --git a/packages/theme/src/themes/default/index.ts b/packages/theme/src/themes/default/index.ts
index 7f69e22a5..80bcba766 100644
--- a/packages/theme/src/themes/default/index.ts
+++ b/packages/theme/src/themes/default/index.ts
@@ -2,7 +2,7 @@ import color from 'color';
2import { cloneDeep } from 'lodash'; 2import { cloneDeep } from 'lodash';
3 3
4import * as legacyStyles from '../legacy'; 4import * as legacyStyles from '../legacy';
5import IStyleTypes from '../IStyleTypes'; 5import type { IStyleTypes } from '../IStyleTypes';
6 6
7export default (brandPrimary: string) => { 7export default (brandPrimary: string) => {
8 const brandSuccess = '#5cb85c'; 8 const brandSuccess = '#5cb85c';
diff --git a/packages/theme/test/index.test.js b/packages/theme/test/index.test.js
deleted file mode 100644
index 3906433c1..000000000
--- a/packages/theme/test/index.test.js
+++ /dev/null
@@ -1,17 +0,0 @@
1const expect = require('expect.js');
2
3const { colorBackground: colorBackgroundDefault } = require('../lib/themes/default');
4const { colorBackground: colorBackgroundDark } = require('../lib/themes/dark');
5const { default: theme } = require('../lib');
6
7describe('Load theme', () => {
8 it('Should load default theme', () => {
9 const { colorBackground } = theme('default');
10 expect(colorBackground).to.be(colorBackgroundDefault);
11 });
12
13 it('Should load dark theme', () => {
14 const { colorBackground } = theme('dark');
15 expect(colorBackground).to.be(colorBackgroundDark);
16 });
17});
diff --git a/packages/theme/test/index.test.ts b/packages/theme/test/index.test.ts
new file mode 100644
index 000000000..7eda4e359
--- /dev/null
+++ b/packages/theme/test/index.test.ts
@@ -0,0 +1,19 @@
1import expect from 'expect.js';
2
3import makeDefaultThemeConfig from '../src/themes/default';
4import makeDarkThemeConfig from '../src/themes/dark';
5import { theme, ThemeType } from '../src';
6
7describe('Load theme', () => {
8 it('Should load default theme', () => {
9 const { colorBackground } = theme('default' as ThemeType);
10 expect(colorBackground).to.be(
11 makeDefaultThemeConfig('default').colorBackground,
12 );
13 });
14
15 it('Should load dark theme', () => {
16 const { colorBackground } = theme('dark' as ThemeType);
17 expect(colorBackground).to.be(makeDarkThemeConfig('dark').colorBackground);
18 });
19});
diff --git a/packages/theme/tsconfig.json b/packages/theme/tsconfig.json
index d80ee9ee7..4deaa5dd7 100644
--- a/packages/theme/tsconfig.json
+++ b/packages/theme/tsconfig.json
@@ -4,4 +4,5 @@
4 "outDir": "lib", 4 "outDir": "lib",
5 "rootDir": "src" 5 "rootDir": "src"
6 }, 6 },
7 "exclude": ["node_modules", "lib", "test"]
7} 8}