Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

chore(package): update Fela to latest #768

Merged
merged 9 commits into from
Jan 25, 2019
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Update variable names in themes, add missing sizes @layershifter ([#762](https://github.com/stardust-ui/react/pull/762))
- Rename `toggleButton` prop to `toggleIndicator` and make it visible by default @layershifter ([#729](https://github.com/stardust-ui/react/pull/729))
- Remove `props` from variables resolution process @kuzhelov ([#770](https://github.com/stardust-ui/react/pull/770))
- Update Fela and is deps to latest, `10.1.3` is required @layershifter ([#768](https://github.com/stardust-ui/react/pull/768))

### Features
- Add `loading` prop for `Dropdown` @layershifter ([#729](https://github.com/stardust-ui/react/pull/729))
Expand Down
6 changes: 2 additions & 4 deletions build/webpack.config.perf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as webpack from 'webpack'
import config from '../config'

const { paths } = config
const { __DEV__, __PERF__, __PROD__ } = config.compiler_globals
const { __DEV__, __PROD__ } = config.compiler_globals

const webpackConfig: any = {
name: 'client',
Expand Down Expand Up @@ -37,9 +37,7 @@ const webpackConfig: any = {
exclude: /node_modules/,
options: {
useCache: true,
configFileName: __PERF__
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

? paths.base('build/tsconfig.perf.json')
: paths.base('build/tsconfig.docs.json'),
configFileName: paths.base('build/tsconfig.perf.json'),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config is used only for perf stuff, cruft

errorsAsWarnings: __DEV__,
},
},
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@
"dependencies": {
"classnames": "^2.2.5",
"downshift": "^3.1.12",
"fela": "^6.1.7",
"fela-plugin-fallback-value": "^5.0.17",
"fela-plugin-placeholder-prefixer": "^5.0.18",
"fela-plugin-prefixer": "^5.0.18",
"fela-plugin-rtl": "^1.0.6",
"fela": "^10.1.3",
"fela-plugin-fallback-value": "^10.1.3",
"fela-plugin-placeholder-prefixer": "^10.1.3",
"fela-plugin-prefixer": "^10.1.3",
"fela-plugin-rtl": "^10.1.3",
"keyboard-key": "^1.0.1",
"lodash": "^4.17.10",
"prop-types": "^15.6.1",
"react-fela": "^7.2.0",
"react-fela": "^10.1.3",
"react-is": "^16.6.3",
"react-popper": "^1.3.2"
},
Expand Down
5 changes: 3 additions & 2 deletions src/components/Provider/Provider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { IStyle } from 'fela'
import { render } from 'fela-dom'
import * as _ from 'lodash'
import * as PropTypes from 'prop-types'
import * as React from 'react'
import { Provider as RendererProvider, ThemeProvider } from 'react-fela'
import { RendererProvider, ThemeProvider } from 'react-fela'

import { felaRenderer as felaLtrRenderer, isBrowser, mergeThemes } from '../../lib'
import {
Expand Down Expand Up @@ -70,7 +71,7 @@ class Provider extends React.Component<ProviderProps> {

const renderObject = (object: StaticStyleObject) => {
_.forEach(object, (style, selector) => {
felaLtrRenderer.renderStatic(style, selector)
felaLtrRenderer.renderStatic(style as IStyle, selector)
})
}

Expand Down
4 changes: 3 additions & 1 deletion src/components/Provider/ProviderConsumer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export interface ProviderConsumerProps {
/**
* The Provider's Consumer is for accessing theme.
*/
const ProviderConsumer: React.SFC<ProviderConsumerProps> = props => <FelaTheme {...props} />
const ProviderConsumer: React.SFC<ProviderConsumerProps> = ({ render }) => (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had prev here spreading all props, not just the render, not sure if there were other props here, but it may be worth taking a look...

<FelaTheme>{render}</FelaTheme>
)

ProviderConsumer.propTypes = {
render: PropTypes.func.isRequired,
Expand Down
6 changes: 3 additions & 3 deletions src/lib/renderComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ const renderComponent = <P extends {}>(config: RenderConfig<P>): React.ReactElem
} = config

return (
<FelaTheme
render={(theme: ThemePrepared) => {
<FelaTheme>
{(theme: ThemePrepared) => {
if (_.isEmpty(theme)) {
logProviderMissingWarning()
}
Expand Down Expand Up @@ -244,7 +244,7 @@ const renderComponent = <P extends {}>(config: RenderConfig<P>): React.ReactElem

return render(config)
}}
/>
</FelaTheme>
)
}

Expand Down
3 changes: 0 additions & 3 deletions types/react-fela/index.d.ts

This file was deleted.

Loading