Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
Release v0.35.0 (#1706)
Browse files Browse the repository at this point in the history
* Release v0.35.0

* catchup

Co-authored-by: Franco Correa <franco@auth0.com>
  • Loading branch information
dmiller9911 and Franco Correa committed Aug 25, 2020
1 parent 37faab6 commit c8abc73
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 26 deletions.
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). Currently, this project is using an `0.x` versioning system to indicate its preview status. As such, it does _not_ currently adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). Once we reach production readiness, we will
follow semver beginning with our `1.0` release. In the meantime, please read this changelog for information on breaking changes!

## 0.35.0 [February 24th, 2020]

### Changes

- (**Breaking** 💥) Updated to styled-components v5 [#1697] (See the [Upgrade Guide](https://auth0-cosmos.now.sh/docs/#/upgrade-guide) for changes required.)
- (**Breaking** 💥) `CssBaseline`: Added `CssBaseline` Component to render global styles [#1699]
- SSR Support: [#1704], [#1703], [#1702]
- Icon: added `danger-fill` icon. [#1701]

## 0.34.0 [February 13th, 2020]

### Changes
Expand Down
2 changes: 1 addition & 1 deletion core/babel-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@auth0/babel-preset-cosmos",
"description": "babel preset to use cosmos",
"version": "0.34.0",
"version": "0.35.0",
"repository": "auth0/cosmos",
"main": "index.js",
"author": "siddharthkp",
Expand Down
2 changes: 1 addition & 1 deletion core/components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@auth0/cosmos",
"description": "Component library for Auth0 Design System",
"version": "0.34.0",
"version": "0.35.0",
"repository": "auth0/cosmos",
"scripts": {},
"keywords": [],
Expand Down
4 changes: 2 additions & 2 deletions examples/perf-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"start": "cosmos-scripts start"
},
"dependencies": {
"@auth0/cosmos": "0.34.0",
"@auth0/cosmos": "0.35.0",
"react": "16.8.6",
"react-dom": "16.8.6"
},
"devDependencies": {
"@auth0/cosmos-scripts": "0.34.0"
"@auth0/cosmos-scripts": "0.35.0"
}
}
4 changes: 2 additions & 2 deletions examples/webpack-hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"start": "cosmos-scripts start"
},
"dependencies": {
"@auth0/cosmos": "0.34.0",
"@auth0/cosmos": "0.35.0",
"@auth0/cosmos-fonts": "0.0.5",
"react": "16.8.6",
"react-dom": "16.8.6"
},
"devDependencies": {
"@auth0/cosmos-scripts": "0.34.0"
"@auth0/cosmos-scripts": "0.35.0"
}
}
2 changes: 1 addition & 1 deletion internal/cosmos-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@auth0/cosmos-scripts",
"version": "0.34.0",
"version": "0.35.0",
"description": "",
"bin": {
"cosmos-scripts": "cli.js"
Expand Down
34 changes: 18 additions & 16 deletions internal/docs/guides.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import GuidingPrinciples from './guides/guiding-principles'
import Usage from './guides/usage'
import ContributionGuide from './guides/contribution-guide'
import FAQS from './guides/faqs'
import Changes from './guides/changes'
import MigrationGuide from './guides/migration-guide'
import GettingStarted from './guides/getting-started'
import GuidingPrinciples from "./guides/guiding-principles";
import Usage from "./guides/usage";
import ContributionGuide from "./guides/contribution-guide";
import FAQS from "./guides/faqs";
import Changes from "./guides/changes";
import MigrationGuide from "./guides/migration-guide";
import GettingStarted from "./guides/getting-started";
import UpgradeGuide from "./guides/upgrade-guide";

const guides = [
{ path: '/', title: 'Getting started', component: GettingStarted },
{ path: '/usage', title: 'How to use Cosmos?', component: Usage },
{ path: '/guiding-principles', title: 'Guiding Principles', component: GuidingPrinciples },
{ path: '/faqs', title: 'FAQs', component: FAQS },
{ path: '/changes', title: 'Changelog', component: Changes },
{ path: '/contribution-guide', title: 'Contributing to Cosmos', component: ContributionGuide },
{ path: '/migration-guide', title: 'Migration Guide', component: MigrationGuide }
]
{ path: "/", title: "Getting started", component: GettingStarted },
{ path: "/usage", title: "How to use Cosmos?", component: Usage },
{ path: "/guiding-principles", title: "Guiding Principles", component: GuidingPrinciples },
{ path: "/faqs", title: "FAQs", component: FAQS },
{ path: "/changes", title: "Changelog", component: Changes },
{ path: "/contribution-guide", title: "Contributing to Cosmos", component: ContributionGuide },
{ path: "/migration-guide", title: "Migration Guide", component: MigrationGuide },
{ path: "/upgrade-guide", title: "Upgrade Guide", component: UpgradeGuide }
];

export default guides
export default guides;
134 changes: 134 additions & 0 deletions internal/docs/guides/upgrade-guide.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import React from "react";
import Helmet from "react-helmet";

import { Heading1, Heading2, Text, Link, CodeBlock, Code } from "../docs-components";

class UpgradeGuide extends React.Component {
render() {
return (
<div>
<Helmet title="Upgrade guide &ndash; Cosmos" />
<Heading1>Upgrading to 0.35.0</Heading1>
<Text>
v0.35.0 of Cosmos includes a few breaking changes. These changes are a result of updating styled-components to
v5 from v3.5, as well as opening up support for SSR (Server Side Rendering). Below is a list of the most
common required changes to make when upgrading from v0.3X.X. More can be read in styled-component's upgrade
guide.
</Text>
<Text>
<strong>
It is recommended you pin your cosmos version, if you have not done so already, until we reach v1.0.0.
</strong>
</Text>
<div>
<Heading2>
Global Styles <Code>CssBaseline</Code>
</Heading2>
<Text>
The global styles are no longer added to the head of the document on component import doing this is a side
effect, and prevented us from supporting SSR. styled-components introduced a helper,{" "}
<Link href="https://styled-components.com/docs/api#helpers" target="_blank" rel="noreferrer noopener">
createGlobalStyle
</Link>
, that we are now making use of. To include the global styles you now only need to import and render this
new CssBaseline component once at the root of your app.
</Text>
<CodeBlock language="tsx">
{`
import { CssBaseline } from '@auth0/cosmos';
const App = () => (
<>
<CssBaseline />
{ // ...the rest of your app }
</>
);
`}
</CodeBlock>
<Text>
If you do not want to include CSS resets you can simply include the <Code>includeGlobals</Code> prop to the
component with a value of false. This replaces the environment variable in previous versions.
</Text>

<CodeBlock language="tsx">
{`
<CssBaseline includeGlobals={false} />
`}
</CodeBlock>
</div>

<div>
<Heading2>innerRef → ref</Heading2>
<Text>
styled-components v5 now uses the React utility <Code>forwardRef</Code>. This means that{" "}
<Code>innerRef</Code> is no longer needed and has been deprecated. For any component that is a result of{" "}
<Code>styled</Code> if you are using <Code>innerRef</Code> this needs to be switched to use <Code>ref</Code>
.
</Text>
<CodeBlock language="tsx">
{`
const Root = styled.div\`\`;
// before
const Foo = () => {
const rootRef = React.useRef<HTMLDivElement>();
return <Root innerRef={rootRef} />;
};
// after
const Foo = () => {
const rootRef = React.useRef<HTMLDivElement>();
return <Root ref={rootRef} />;
};
`}
</CodeBlock>
</div>

<div>
<Heading2>Component.withComponent has been deprecated</Heading2>
<Text>
<Code>Component.withComponent</Code> has been deprecated in favor of the new <Code>as</Code> attribute.
There are a couple ways to use this:
</Text>
<CodeBlock language="tsx">
{`
// before
const Layout = styled.div\`\`;
const Root = Layout.withComponent('main');
// after
const Root = styled(Layout).attr({ as: 'main' })\`\`;
// or
const root = <Layout as="main" />;
`}
</CodeBlock>
</div>

<div>
<Heading2>Component.extend(…) has been deprecated</Heading2>
<Text>
use <Code>styled(Component)`...`</Code> instead.
</Text>
<CodeBlock language="tsx">
{`
// before
const Layout = styled.div\`
background-color: blue;
\`;
const Root = Layout.extend\`
color: red;
\`;
// after
const Root = styled(Layout)\`
color: red;
\`;
`}
</CodeBlock>
</div>
</div>
);
}
}

export default UpgradeGuide;
4 changes: 2 additions & 2 deletions internal/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "cosmos-scripts start"
},
"dependencies": {
"@auth0/cosmos": "0.34.0",
"@auth0/cosmos": "0.35.0",
"@auth0/cosmos-fonts": "0.0.5",
"fuzzysearch": "1.0.3",
"js-beautify": "1.7.5",
Expand All @@ -26,6 +26,6 @@
"yamljs": "0.3.0"
},
"devDependencies": {
"@auth0/cosmos-scripts": "0.34.0"
"@auth0/cosmos-scripts": "0.35.0"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cosmos",
"version": "0.34.0",
"version": "0.35.0",
"engine": "^7.0.0",
"private": true,
"workspaces": [
Expand Down

0 comments on commit c8abc73

Please sign in to comment.