From 395ceddf862bd4d031562bfca8eb7b0e78626491 Mon Sep 17 00:00:00 2001 From: Rodney Folz Date: Fri, 22 May 2020 13:59:43 -0700 Subject: [PATCH 01/12] [RFC] "default" key for object in scales --- packages/css/package.json | 3 ++- packages/css/src/index.ts | 15 +++++++++--- packages/css/test/index.ts | 50 +++++++++++++++++++++++++++++++++++--- 3 files changed, 60 insertions(+), 8 deletions(-) diff --git a/packages/css/package.json b/packages/css/package.json index 65e8f72dd..b3b6831e0 100644 --- a/packages/css/package.json +++ b/packages/css/package.json @@ -16,6 +16,7 @@ "access": "public" }, "dependencies": { - "csstype": "^2.5.7" + "csstype": "^2.5.7", + "is-object": "^1.0.1" } } diff --git a/packages/css/src/index.ts b/packages/css/src/index.ts index 543b76b97..d0afdab99 100644 --- a/packages/css/src/index.ts +++ b/packages/css/src/index.ts @@ -1,7 +1,10 @@ +import isObject from 'is-object' import { CSSObject, SystemStyleObject, UseThemeFunction, Theme } from './types' export * from './types' +const { hasOwnProperty } = {} + export function get( obj: object, key: string | number, @@ -13,10 +16,16 @@ export function get( for (p = 0; p < path.length; p++) { obj = obj ? (obj as any)[path[p]] : undef } - return obj === undef ? def : obj + if (obj === undef) return def + + if (isObject(obj) && hasOwnProperty.call(obj, 'default')) { + return (obj as any).default + } + + return obj } -export const defaultBreakpoints = [40, 52, 64].map(n => n + 'em') +export const defaultBreakpoints = [40, 52, 64].map((n) => n + 'em') const defaultTheme = { space: [0, 4, 8, 16, 32, 64, 128, 256, 512], @@ -223,7 +232,7 @@ const responsive = (styles: Exclude) => ( (theme && (theme.breakpoints as string[])) || defaultBreakpoints const mediaQueries = [ null, - ...breakpoints.map(n => `@media screen and (min-width: ${n})`), + ...breakpoints.map((n) => `@media screen and (min-width: ${n})`), ] for (const key in styles) { diff --git a/packages/css/test/index.ts b/packages/css/test/index.ts index 395264282..e0a40dd56 100644 --- a/packages/css/test/index.ts +++ b/packages/css/test/index.ts @@ -6,6 +6,17 @@ const theme: Theme = { secondary: 'cyan', background: 'white', text: 'black', + colorScale: { + default: 'color500', + 100: 'color100', + 500: 'color500', + 900: 'color900', + }, + colorScaleNoDefault: { + 100: 'color100', + 500: 'color500', + 900: 'color900', + }, }, fontSizes: [12, 14, 16, 24, 36], fonts: { @@ -196,7 +207,7 @@ test('works with the css prop', () => { }) test('works with functional arguments', () => { - const result = css(t => ({ + const result = css((t) => ({ color: t.colors.primary, }))(theme) expect(result).toEqual({ @@ -206,13 +217,44 @@ test('works with functional arguments', () => { test('supports functional values', () => { const result = css({ - color: t => t.colors.primary, + color: (t) => t.colors.primary, })(theme) expect(result).toEqual({ color: 'tomato', }) }) +test('returns default key when accessing object value with default', () => { + const result = css({ + color: 'colorScale', + })(theme) + expect(result).toEqual({ + color: 'color500', + }) +}) + +test('returns nested key when accessing key from object value with default', () => { + const result = css({ + color: 'colorScale.100', + })(theme) + expect(result).toEqual({ + color: 'color100', + }) +}) + +test('returns object when accessing object value with no default key', () => { + const result = css({ + color: 'colorScaleNoDefault', + })(theme) + expect(result).toEqual({ + color: { + '100': 'color100', + '500': 'color500', + '900': 'color900', + }, + }) +}) + test('returns variants from theme', () => { const result = css({ variant: 'buttons.primary', @@ -285,7 +327,7 @@ test('handles negative margins from scale that is an object', () => { const result = css({ mt: '-s', mx: '-m', - })({...theme, space: { s: '16px', m: '32px' }}) + })({ ...theme, space: { s: '16px', m: '32px' } }) expect(result).toEqual({ marginTop: '-16px', marginLeft: '-32px', @@ -344,7 +386,7 @@ test('ignores array values longer than breakpoints', () => { test('functional values can return responsive arrays', () => { const result = css({ - color: t => [t.colors.primary, t.colors.secondary], + color: (t) => [t.colors.primary, t.colors.secondary], })(theme) expect(result).toEqual({ '@media screen and (min-width: 40em)': { From 6711427a24054520db02e63d6d4dde8e78fe7f02 Mon Sep 17 00:00:00 2001 From: Rodney Folz Date: Tue, 26 May 2020 15:14:36 -0700 Subject: [PATCH 02/12] Changes per PR review comments - Update color scale to use actual colors - Include a test for variant object default behavior - Leave comment indicating object values can't become valid CSS --- packages/css/test/index.ts | 64 +++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/packages/css/test/index.ts b/packages/css/test/index.ts index e0a40dd56..b49088bee 100644 --- a/packages/css/test/index.ts +++ b/packages/css/test/index.ts @@ -6,16 +6,16 @@ const theme: Theme = { secondary: 'cyan', background: 'white', text: 'black', - colorScale: { - default: 'color500', - 100: 'color100', - 500: 'color500', - 900: 'color900', + purple: { + default: 'darkviolet', + 100: 'rebeccapurple', + 500: 'darkviolet', + 900: 'violet', }, - colorScaleNoDefault: { - 100: 'color100', - 500: 'color500', - 900: 'color900', + pink: { + 100: 'mediumvioletred', + 500: 'hotpink', + 900: 'pink', }, }, fontSizes: [12, 14, 16, 24, 36], @@ -35,6 +35,13 @@ const theme: Theme = { sidebar: 320, }, buttons: { + default: { + px: 4, + py: 2, + fontWeight: 'bold', + color: 'secondary', + bg: 'background', + }, primary: { p: 3, fontWeight: 'bold', @@ -224,33 +231,54 @@ test('supports functional values', () => { }) }) -test('returns default key when accessing object value with default', () => { +test('returns `default` key when accessing object value with default', () => { const result = css({ - color: 'colorScale', + color: 'purple', })(theme) expect(result).toEqual({ - color: 'color500', + color: 'darkviolet', }) }) test('returns nested key when accessing key from object value with default', () => { const result = css({ - color: 'colorScale.100', + color: 'purple.100', })(theme) expect(result).toEqual({ - color: 'color100', + color: 'rebeccapurple', + }) +}) + +test('variant prop returns `default` key when accessing variant object with default', () => { + const result = css({ + variant: 'buttons', + })(theme) + + expect(result).toEqual({ + paddingLeft: 32, + paddingRight: 32, + paddingTop: 8, + paddingBottom: 8, + fontWeight: 600, + color: 'cyan', + backgroundColor: 'white', }) }) test('returns object when accessing object value with no default key', () => { const result = css({ - color: 'colorScaleNoDefault', + color: 'pink', })(theme) + // Note: Returning this object is the expected behavior; however, an object + // value like this isn't able to become valid CSS. Ensure the theme path + // points to a primitive value (such as 'pink.100') when intending to make + // CSS out of these values. + // Ref: https://github.com/system-ui/theme-ui/pull/951#discussion_r430697168 expect(result).toEqual({ color: { - '100': 'color100', - '500': 'color500', - '900': 'color900', + 100: 'mediumvioletred', + 500: 'hotpink', + 900: 'pink', }, }) }) From 16debaf4e4ede110b8e950bc916c4c77fa5c6957 Mon Sep 17 00:00:00 2001 From: hasparus Date: Wed, 2 Dec 2020 21:21:26 +0100 Subject: [PATCH 03/12] Remove is-object dependency --- packages/css/package.json | 3 +-- packages/css/src/index.ts | 17 ++++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/css/package.json b/packages/css/package.json index b3b6831e0..65e8f72dd 100644 --- a/packages/css/package.json +++ b/packages/css/package.json @@ -16,7 +16,6 @@ "access": "public" }, "dependencies": { - "csstype": "^2.5.7", - "is-object": "^1.0.1" + "csstype": "^2.5.7" } } diff --git a/packages/css/src/index.ts b/packages/css/src/index.ts index d0afdab99..d69d1be44 100644 --- a/packages/css/src/index.ts +++ b/packages/css/src/index.ts @@ -1,9 +1,16 @@ -import isObject from 'is-object' import { CSSObject, SystemStyleObject, UseThemeFunction, Theme } from './types' export * from './types' -const { hasOwnProperty } = {} +const hasDefault = (x: unknown): x is { default: string | number } => { + return ( + typeof x === 'object' && + x && + 'default' in x && + (typeof (x as any).default === 'string' || + typeof (x as any).default === 'number') + ) +} export function get( obj: object, @@ -18,11 +25,7 @@ export function get( } if (obj === undef) return def - if (isObject(obj) && hasOwnProperty.call(obj, 'default')) { - return (obj as any).default - } - - return obj + return hasDefault(obj) ? obj.default : obj } export const defaultBreakpoints = [40, 52, 64].map((n) => n + 'em') From 3e60ce32f8ca2771306f52a197e7805238ccdcd3 Mon Sep 17 00:00:00 2001 From: hasparus Date: Wed, 2 Dec 2020 21:24:28 +0100 Subject: [PATCH 04/12] Loosen the check, default can be a responsive tuple or an object --- packages/css/src/index.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/css/src/index.ts b/packages/css/src/index.ts index d69d1be44..bb9731e2f 100644 --- a/packages/css/src/index.ts +++ b/packages/css/src/index.ts @@ -3,13 +3,7 @@ import { CSSObject, SystemStyleObject, UseThemeFunction, Theme } from './types' export * from './types' const hasDefault = (x: unknown): x is { default: string | number } => { - return ( - typeof x === 'object' && - x && - 'default' in x && - (typeof (x as any).default === 'string' || - typeof (x as any).default === 'number') - ) + return typeof x === 'object' && x && 'default' in x } export function get( From 4a72ceaa9e6ba28246919441a2d500e443bab697 Mon Sep 17 00:00:00 2001 From: hasparus Date: Wed, 9 Dec 2020 18:46:12 +0100 Subject: [PATCH 05/12] chore: rename master to develop and previous to stable --- deprecated/chrome/README.md | 2 +- packages/docs/src/components/code.js | 2 +- packages/docs/src/components/edit-link.js | 2 +- packages/docs/src/pages/migrating.mdx | 2 +- packages/docs/src/pages/theming.mdx | 21 +++++++++++---------- packages/prism/README.md | 2 +- packages/theme-ui/README.md | 2 +- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/deprecated/chrome/README.md b/deprecated/chrome/README.md index 9cc0b8f84..9844bd860 100644 --- a/deprecated/chrome/README.md +++ b/deprecated/chrome/README.md @@ -10,7 +10,7 @@ See [Blocks UI](https://github.com/blocks/blocks) for a theme editor and JSX pag ## Installation -1. [Download extension](https://github.com/system-ui/theme-ui/tree/master/packages/chrome/public) +1. [Download extension](https://github.com/system-ui/theme-ui/tree/stable/packages/chrome/public) 1. Navigate to chrome://extensions/ 1. Enable "Developer mode" 1. Click "LOAD UNPACKED" diff --git a/packages/docs/src/components/code.js b/packages/docs/src/components/code.js index f1a341cbc..c8b926564 100644 --- a/packages/docs/src/components/code.js +++ b/packages/docs/src/components/code.js @@ -42,7 +42,7 @@ const images = { flatiron: 'https://images.unsplash.com/photo-1520222984843-df35ebc0f24d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjF9', logo: - 'https://raw.githubusercontent.com/system-ui/theme-ui/master/packages/docs/static/logo.png', + 'https://raw.githubusercontent.com/system-ui/theme-ui/stable/packages/docs/static/logo.png', } const scope = { diff --git a/packages/docs/src/components/edit-link.js b/packages/docs/src/components/edit-link.js index 437731502..c3ce3b279 100644 --- a/packages/docs/src/components/edit-link.js +++ b/packages/docs/src/components/edit-link.js @@ -42,7 +42,7 @@ export const EditLink = ({ base, children, ...props }) => ( ) EditLink.defaultProps = { - base: 'https://github.com/system-ui/theme-ui/edit/master/packages/docs/src', + base: 'https://github.com/system-ui/theme-ui/edit/develop/packages/docs/src', children: 'Edit the page on GitHub', } diff --git a/packages/docs/src/pages/migrating.mdx b/packages/docs/src/pages/migrating.mdx index e9896c2a7..26a03288d 100644 --- a/packages/docs/src/pages/migrating.mdx +++ b/packages/docs/src/pages/migrating.mdx @@ -24,7 +24,7 @@ title: Migrating - The `ThemeProvider` now adds global typographic styles to the `` element based on `theme.styles.root`. To disable this behavior set the `useBodyStyles: false` flag in your theme. - Theme context is now stateless. If you've made use of `context.setTheme`, this no longer works. An alternative approach is available with the `@theme-ui/editor` package. - The `ThemeStateProvider` component is no longer avialable, see `@theme-ui/editor` as an alternative. -- The `@theme-ui/editor` package has a completely new API. Please refer to the package's [README.md](https://github.com/system-ui/theme-ui/blob/master/packages/editor/README.md) for more information. +- The `@theme-ui/editor` package has a completely new API. Please refer to the package's [README.md](https://github.com/system-ui/theme-ui/blob/stable/packages/editor/README.md) for more information. ## v0.2 diff --git a/packages/docs/src/pages/theming.mdx b/packages/docs/src/pages/theming.mdx index 1c898c683..12d3229e0 100644 --- a/packages/docs/src/pages/theming.mdx +++ b/packages/docs/src/pages/theming.mdx @@ -168,14 +168,14 @@ These values will be used to generate mobile-first (i.e. `min-width`) media quer The theme object can also include configuration options for Theme UI. The following keys can be used to enable and disable certain features. -Flag | Default | Description ----|---|--- -`useCustomProperties` | `true` | Enables CSS custom properties to help mitigate a flash of unstyled content during rehydration -`useBodyStyles` | `true` | Adds styles defined in `theme.styles.root` to the `` element along with `color` and `background-color` -`initialColorModeName` | `'default'` | The key used for the top-level color palette in `theme.colors` -`useColorSchemeMediaQuery` | `false` | Initializes the color mode based on the `prefers-color-scheme` media query -`useBorderBox` | `true` | Adds a global `box-sizing: border-box` style -`useLocalStorage` | `true` | Persists the color mode in `localStorage` +| Flag | Default | Description | +| -------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------ | +| `useCustomProperties` | `true` | Enables CSS custom properties to help mitigate a flash of unstyled content during rehydration | +| `useBodyStyles` | `true` | Adds styles defined in `theme.styles.root` to the `` element along with `color` and `background-color` | +| `initialColorModeName` | `'default'` | The key used for the top-level color palette in `theme.colors` | +| `useColorSchemeMediaQuery` | `false` | Initializes the color mode based on the `prefers-color-scheme` media query | +| `useBorderBox` | `true` | Adds a global `box-sizing: border-box` style | +| `useLocalStorage` | `true` | Persists the color mode in `localStorage` | ## Example Theme @@ -187,7 +187,8 @@ export const theme = { breakpoints: ['40em', '52em', '64em'], space: [0, 4, 8, 16, 32, 64, 128, 256, 512], fonts: { - body: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif', + body: + 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif', heading: 'inherit', monospace: 'Menlo, monospace', }, @@ -275,5 +276,5 @@ export const theme = { For more information on the Theme UI `theme` object, see the [Theme Specification docs](/theme-spec). -[example]: https://github.com/system-ui/theme-ui/tree/master/packages/preset-base/src/index.ts +[example]: https://github.com/system-ui/theme-ui/tree/stable/packages/preset-base/src/index.ts [emotion]: https://emotion.sh diff --git a/packages/prism/README.md b/packages/prism/README.md index 165235533..ae3097844 100644 --- a/packages/prism/README.md +++ b/packages/prism/README.md @@ -69,7 +69,7 @@ export default { } ``` -The following themes are available and can be found in the [`presets/`](https://github.com/system-ui/theme-ui/tree/master/packages/prism/presets) directory. +The following themes are available and can be found in the [`presets/`](https://github.com/system-ui/theme-ui/tree/stable/packages/prism/presets) directory. - `dracula.json` - `duotone-dark.json` diff --git a/packages/theme-ui/README.md b/packages/theme-ui/README.md index 025f11e78..5c0305c39 100644 --- a/packages/theme-ui/README.md +++ b/packages/theme-ui/README.md @@ -50,7 +50,7 @@ alt="Tree Shaking" /> - + MIT license Date: Wed, 9 Dec 2020 17:49:33 +0000 Subject: [PATCH 06/12] chore(deps-dev): bump lint-staged from 10.5.1 to 10.5.3 Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.5.1 to 10.5.3. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v10.5.1...v10.5.3) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9acb0e26d..1aa31e4ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11700,9 +11700,9 @@ lines-and-columns@^1.1.6: integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= lint-staged@10: - version "10.5.1" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.1.tgz#901e915c2360072dded0e7d752a0d9a49e079daa" - integrity sha512-fTkTGFtwFIJJzn/PbUO3RXyEBHIhbfYBE7+rJyLcOXabViaO/h6OslgeK6zpeUtzkDrzkgyAYDTLAwx6JzDTHw== + version "10.5.3" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.3.tgz#c682838b3eadd4c864d1022da05daa0912fb1da5" + integrity sha512-TanwFfuqUBLufxCc3RUtFEkFraSPNR3WzWcGF39R3f2J7S9+iF9W0KTVLfSy09lYGmZS5NDCxjNvhGMSJyFCWg== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0" From 2b74593346cf22854eb014b1f50594d83b0c4cce Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 17:49:37 +0000 Subject: [PATCH 07/12] chore(deps-dev): bump babel-preset-gatsby from 0.6.0 to 0.8.0 Bumps [babel-preset-gatsby](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/babel-preset-gatsby) from 0.6.0 to 0.8.0. - [Release notes](https://github.com/gatsbyjs/gatsby/releases) - [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/babel-preset-gatsby/CHANGELOG.md) - [Commits](https://github.com/gatsbyjs/gatsby/commits/babel-preset-gatsby@0.8.0/packages/babel-preset-gatsby) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 48 +++++++++++++++++++++++++++++++++--------------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 285c52711..a680fa665 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@types/jest": "^26.0.10", "@types/react-test-renderer": "^16.9.2", "babel-jest": "^26.0.1", - "babel-preset-gatsby": "^0.6.0", + "babel-preset-gatsby": "^0.8.0", "husky": ">=4.0.7", "jest": "^26.0.1", "jest-canvas-mock": "^2.2.0", diff --git a/yarn.lock b/yarn.lock index 9acb0e26d..ea69383e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -466,16 +466,7 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" -"@babel/plugin-proposal-optional-chaining@^7.11.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.1.tgz#cce122203fc8a32794296fc377c6dedaf4363797" - integrity sha512-c2uRpY6WzaVDzynVY9liyykS+kVU+WRZPMPYpkelXH8KBt1oXoI89kPbZKKG/jDT5UK92FTW2fZkZaJhdiBabw== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" - "@babel/plugin-syntax-optional-chaining" "^7.8.0" - -"@babel/plugin-proposal-optional-chaining@^7.12.7": +"@babel/plugin-proposal-optional-chaining@^7.11.0", "@babel/plugin-proposal-optional-chaining@^7.12.1", "@babel/plugin-proposal-optional-chaining@^7.12.7": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz#e02f0ea1b5dc59d401ec16fb824679f683d3303c" integrity sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA== @@ -890,7 +881,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-runtime@^7.10.1", "@babel/plugin-transform-runtime@^7.11.5": +"@babel/plugin-transform-runtime@^7.10.1", "@babel/plugin-transform-runtime@^7.11.5", "@babel/plugin-transform-runtime@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.1.tgz#04b792057eb460389ff6a4198e377614ea1e7ba5" integrity sha512-Ac/H6G9FEIkS2tXsZjL4RAdS3L3WHxci0usAnz7laPWUmFiGtj7tIASChqKZMHTSQTQY6xDbOq+V1/vIq3QrWg== @@ -4368,6 +4359,26 @@ babel-preset-gatsby@^0.6.0: gatsby-core-utils "^1.4.0" gatsby-legacy-polyfills "^0.1.0" +babel-preset-gatsby@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/babel-preset-gatsby/-/babel-preset-gatsby-0.8.0.tgz#3dc69d55b771c850f1c35a0a796430509738ed61" + integrity sha512-ea4qjDiqo6LJ4PISIEajpcrRH7kAbgDNKox8bDEdWT6xtWl1oEN760lby0oPQ5SWTbZf1D+U8xT7s0KEzrcA2w== + dependencies: + "@babel/plugin-proposal-class-properties" "^7.12.1" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.12.1" + "@babel/plugin-proposal-optional-chaining" "^7.12.1" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-transform-runtime" "^7.12.1" + "@babel/plugin-transform-spread" "^7.12.1" + "@babel/preset-env" "^7.12.1" + "@babel/preset-react" "^7.12.5" + "@babel/runtime" "^7.12.5" + babel-plugin-dynamic-import-node "^2.3.3" + babel-plugin-macros "^2.8.0" + babel-plugin-transform-react-remove-prop-types "^0.4.24" + gatsby-core-utils "^1.6.0" + gatsby-legacy-polyfills "^0.3.0" + babel-preset-jest@^26.1.0, babel-preset-jest@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" @@ -8509,10 +8520,10 @@ gatsby-cli@^2.13.1: yoga-layout-prebuilt "^1.9.6" yurnalist "^1.1.2" -gatsby-core-utils@^1.4.0, gatsby-core-utils@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-1.5.0.tgz#0834b561ab32b8b93db2ddb3ee695188f8d2eea9" - integrity sha512-hCt44m7I9Kmra/iVJwrmHXK8WFK9I1JwXQZquIVZ/JaG8UgqroxW1wpsY7ColbHGMATOmp13Efqn02VNPnms5Q== +gatsby-core-utils@^1.4.0, gatsby-core-utils@^1.5.0, gatsby-core-utils@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-1.6.0.tgz#ec719e1a1d409ce69f89883e4334922f3b5c720e" + integrity sha512-jGaXDPbXOkP5Ct7pcOTsx0C0WTvIjSBVlHp0oBIv6rTw7DP498G9RAytqOT8z3uAf1PzWjAcUEMGNdicVucrxg== dependencies: ci-info "2.0.0" configstore "^5.0.1" @@ -8536,6 +8547,13 @@ gatsby-legacy-polyfills@^0.1.0: dependencies: core-js-compat "^3.6.5" +gatsby-legacy-polyfills@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/gatsby-legacy-polyfills/-/gatsby-legacy-polyfills-0.3.0.tgz#515e1d57416c87fe9a107baf63b53b37752d4193" + integrity sha512-bNXUzTAqGQq01zba4W00+XXxdu2uqYABytLZJv3HBJAIKUk/e9eO8KR9GEh3zIVIC8HQ++PSZapl9Afu0i4G1w== + dependencies: + core-js-compat "^3.6.5" + gatsby-link@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/gatsby-link/-/gatsby-link-2.5.0.tgz#89b388520a6d37c991473a6fbbe3e90d9b003622" From b4a66c34ea5d8cc5a8e162b836d0005c361a4871 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 17:51:13 +0000 Subject: [PATCH 08/12] chore(deps-dev): bump execa from 4.1.0 to 5.0.0 Bumps [execa](https://github.com/sindresorhus/execa) from 4.1.0 to 5.0.0. - [Release notes](https://github.com/sindresorhus/execa/releases) - [Commits](https://github.com/sindresorhus/execa/compare/v4.1.0...v5.0.0) Signed-off-by: dependabot-preview[bot] --- packages/tachyons/package.json | 2 +- packages/tailwind/package.json | 2 +- yarn.lock | 31 ++++++++++++++++++++++++++++--- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/packages/tachyons/package.json b/packages/tachyons/package.json index d68c9ce3a..58e22f898 100644 --- a/packages/tachyons/package.json +++ b/packages/tachyons/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@theme-ui/css": "0.6.0-alpha.1", "babel-polyfill": "^6.26.0", - "execa": "^4.0.0" + "execa": "^5.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/tailwind/package.json b/packages/tailwind/package.json index 311c205b1..1b2dad950 100644 --- a/packages/tailwind/package.json +++ b/packages/tailwind/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@theme-ui/css": "0.6.0-alpha.1", "babel-polyfill": "^6.26.0", - "execa": "^4.0.0", + "execa": "^5.0.0", "tailwindcss": "^1.0.4" }, "publishConfig": { diff --git a/yarn.lock b/yarn.lock index 9acb0e26d..2414fcc87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6197,7 +6197,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0: +cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -7862,6 +7862,21 @@ execa@^4.0.0, execa@^4.0.2, execa@^4.0.3, execa@^4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" + integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -9056,6 +9071,11 @@ get-stream@^5.0.0, get-stream@^5.1.0: dependencies: pump "^3.0.0" +get-stream@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" + integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -9937,6 +9957,11 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -13245,7 +13270,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.0: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -13446,7 +13471,7 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -onetime@^5.1.0: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== From 746b278ee874e39aa436b78c932299fb62e87d47 Mon Sep 17 00:00:00 2001 From: hasparus Date: Wed, 9 Dec 2020 18:58:22 +0100 Subject: [PATCH 09/12] docs: link to develop and stable branches in readme --- packages/theme-ui/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/theme-ui/README.md b/packages/theme-ui/README.md index 5c0305c39..9afd1d8ca 100644 --- a/packages/theme-ui/README.md +++ b/packages/theme-ui/README.md @@ -64,8 +64,11 @@ \ Theme UI is a library for creating themeable user interfaces based on constraint-based design principles. Build custom component libraries, design systems, web applications, Gatsby themes, and more with a flexible API for best-in-class developer ergonomics. -**stable docs**: https://theme-ui.com \ -**next (v0.6.0-alpha) docs**: [https://development--dev-theme-ui.netlify.app/](https://development--dev-theme-ui.netlify.app/) +**[stable] docs**: https://theme-ui.com \ +**[develop] (v0.6.0-alpha) docs**: [https://development--dev-theme-ui.netlify.app/](https://development--dev-theme-ui.netlify.app/) + +[stable]: https://github.com/system-ui/theme-ui/tree/stable +[develop]: https://github.com/system-ui/theme-ui/tree/develop --- From c35d0e50dfa6a27c3d8ad228f17efbc6da860c5a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 18:01:51 +0000 Subject: [PATCH 10/12] chore(deps): bump @emotion/react from 11.1.1 to 11.1.2 Bumps [@emotion/react](https://github.com/emotion-js/emotion) from 11.1.1 to 11.1.2. - [Release notes](https://github.com/emotion-js/emotion/releases) - [Changelog](https://github.com/emotion-js/emotion/blob/master/CHANGELOG.md) - [Commits](https://github.com/emotion-js/emotion/compare/@emotion/react@11.1.1...@emotion/react@11.1.2) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9acb0e26d..038deead4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1238,14 +1238,14 @@ integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== "@emotion/react@^11.1.1": - version "11.1.1" - resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.1.1.tgz#4b304d494af321b0179e6763830e07cf674f0423" - integrity sha512-otA0Np8OnOeU9ChkOS9iuLB6vIxiM+bJiU0id33CsQn3R2Pk9ijVHnxevENIKV/P2S7AhrD8cFbUGysEciWlEA== + version "11.1.2" + resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.1.2.tgz#a635cfc6bc0974756f690b848c684338183b2593" + integrity sha512-zEpxynUhHm2GqjY556RnA12Ijt0v6rYUwV6WliyGoFbQKJKkXFuTzGHGQx4UY2jKUV1I4yjr66Ajj/qoQMVPeQ== dependencies: "@babel/runtime" "^7.7.2" "@emotion/cache" "^11.0.0" "@emotion/serialize" "^1.0.0" - "@emotion/sheet" "^1.0.0" + "@emotion/sheet" "^1.0.1" "@emotion/utils" "^1.0.0" "@emotion/weak-memoize" "^0.2.5" hoist-non-react-statics "^3.3.1" @@ -1261,10 +1261,10 @@ "@emotion/utils" "^1.0.0" csstype "^3.0.2" -"@emotion/sheet@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.0.0.tgz#a0ef06080f339477ad4ba7f56e1c931f7ba50822" - integrity sha512-cdCHfZtf/0rahPDCZ9zyq+36EqfD/6c0WUqTFZ/hv9xadTUv2lGE5QK7/Z6Dnx2oRxC0usfVM2/BYn9q9B9wZA== +"@emotion/sheet@^1.0.0", "@emotion/sheet@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.0.1.tgz#245f54abb02dfd82326e28689f34c27aa9b2a698" + integrity sha512-GbIvVMe4U+Zc+929N1V7nW6YYJtidj31lidSmdYcWozwoBIObXBnaJkKNDjZrLm9Nc0BR+ZyHNaRZxqNZbof5g== "@emotion/styled@^11.0.0": version "11.0.0" From 10489793c7da88d9173498ad5ae70bc29fc8d60d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 10 Dec 2020 19:40:21 +0000 Subject: [PATCH 11/12] chore(deps): [security] bump ini from 1.3.5 to 1.3.7 Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. **This update includes a security fix.** - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 038deead4..6adf9a8b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10149,9 +10149,9 @@ inherits@2.0.3: integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.7" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" + integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== init-package-json@^1.10.3: version "1.10.3" From b23b6594795c7edd55edaba513ce726711bd9fd4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 12 Dec 2020 11:20:26 +0000 Subject: [PATCH 12/12] chore(deps-dev): bump babel-jest from 26.1.0 to 26.6.3 Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 26.1.0 to 26.6.3. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v26.6.3/packages/babel-jest) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/yarn.lock b/yarn.lock index 300944ae7..3a79500af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1712,7 +1712,7 @@ jest-runner "^26.6.3" jest-runtime "^26.6.3" -"@jest/transform@^26.1.0", "@jest/transform@^26.6.2": +"@jest/transform@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== @@ -1743,7 +1743,7 @@ "@types/yargs" "^15.0.0" chalk "^3.0.0" -"@jest/types@^26.1.0", "@jest/types@^26.6.2": +"@jest/types@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== @@ -4181,21 +4181,7 @@ babel-eslint@^10.1.0: eslint-visitor-keys "^1.0.0" resolve "^1.12.0" -babel-jest@^26.0.1: - version "26.1.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.1.0.tgz#b20751185fc7569a0f135730584044d1cb934328" - integrity sha512-Nkqgtfe7j6PxLO6TnCQQlkMm8wdTdnIF8xrdpooHCuD5hXRzVEPbPneTJKknH5Dsv3L8ip9unHDAp48YQ54Dkg== - dependencies: - "@jest/transform" "^26.1.0" - "@jest/types" "^26.1.0" - "@types/babel__core" "^7.1.7" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^26.1.0" - chalk "^4.0.0" - graceful-fs "^4.2.4" - slash "^3.0.0" - -babel-jest@^26.6.3: +babel-jest@^26.0.1, babel-jest@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== @@ -4379,7 +4365,7 @@ babel-preset-gatsby@^0.8.0: gatsby-core-utils "^1.6.0" gatsby-legacy-polyfills "^0.3.0" -babel-preset-jest@^26.1.0, babel-preset-jest@^26.6.2: +babel-preset-jest@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==